summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/d3d1x/progs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/d3d1x/progs')
-rw-r--r--src/gallium/state_trackers/d3d1x/progs/Makefile32
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exebin0 -> 11776 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exebin0 -> 27136 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exebin0 -> 17408 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exebin0 -> 22016 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exebin0 -> 11776 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10app.h51
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10winmain.cpp188
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp164
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp118
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl50
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.ps.h112
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.vs.h128
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.vcxproj98
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11app.h51
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl53
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.ps.h142
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.vs.h130
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h424
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11winmain.cpp172
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp124
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp573
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl75
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.ps.h309
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.vs.h308
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.vcxproj100
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.cpp227
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl193
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ds.h623
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.hs.h297
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ps.h211
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.vs.h105
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.vcxproj102
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.cpp116
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl66
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.ps.h234
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.vs.h153
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.vcxproj98
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp120
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl50
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.ps.h112
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.vs.h128
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.vcxproj99
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/data/cornell_box_image.h1028
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/data/tux_image.h1028
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/progs.sln49
46 files changed, 8441 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/d3d1x/progs/Makefile b/src/gallium/state_trackers/d3d1x/progs/Makefile
new file mode 100644
index 00000000000..4766d3684d0
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/Makefile
@@ -0,0 +1,32 @@
+LIBRARY_INCLUDES = -Id3d10app -Id3d11app -I../gd3dapi -I../d3dapi -I../w32api
+LIBS= \
+ ../dxgi/libdxgi.a \
+ ../gd3d1x/libgd3d1x.a \
+ ../d3d1xshader/libd3d1xshader.a \
+ ../d3d1xstutil/libd3d1xstutil.a \
+ ../../egl/libegl.a \
+ ../../../auxiliary/libgallium.a \
+ ../../../winsys/sw/wrapper/libwsw.a \
+ ../../../winsys/sw/xlib/libws_xlib.a \
+ ../../../winsys/sw/dri/libswdri.a \
+ ../../../winsys/sw/fbdev/libfbdev.a \
+ ../../../../../lib/libEGL.so
+LIBS_D3D10 = ../dxgid3d10/libdxgid3d10.a ../gd3d10/libgd3d10.a $(LIBS)
+LIBS_D3D11 = ../dxgid3d11/libdxgid3d11.a ../gd3d11/libgd3d11.a $(LIBS)
+LDADD=-lGL -lXext -lXfixes -lX11 -ldrm -ldl
+
+all: bin/d3d10tri bin/d3d11tri bin/d3d11tex bin/d3d11gears
+include ../Makefile.inc
+
+bin/d3d10tri: d3d10app/d3d10x11main.o d3d10tri/d3d10tri.o $(LIBS_D3D10)
+ $(CXX) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS_D3D10) -Wl,--end-group $(LDADD)
+
+bin/d3d11tri: d3d11app/d3d11x11main.o d3d11tri/d3d11tri.o $(LIBS_D3D11)
+ $(CXX) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS_D3D11) -Wl,--end-group $(LDADD)
+
+bin/d3d11tex: d3d11app/d3d11x11main.o d3d11tex/d3d11tex.o $(LIBS_D3D11)
+ $(CXX) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS_D3D11) -Wl,--end-group $(LDADD)
+
+bin/d3d11gears: d3d11app/d3d11x11main.o d3d11gears/d3d11gears.o $(LIBS_D3D11)
+ $(CXX) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS_D3D11) -Wl,--end-group $(LDADD)
+
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe
new file mode 100755
index 00000000000..77ab03fcce0
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe
new file mode 100755
index 00000000000..c2cd296a40f
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe
new file mode 100755
index 00000000000..c3bc667fb31
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe
new file mode 100755
index 00000000000..0be5cb8dd72
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe
new file mode 100755
index 00000000000..abada5484bd
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10app.h b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10app.h
new file mode 100755
index 00000000000..c27e66ed54b
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10app.h
@@ -0,0 +1,51 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef D3D10APP_H
+#define D3D10APP_H
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <objbase.h>
+#include <d3d10_1.h>
+#include <assert.h>
+#include <stdio.h>
+#include <float.h>
+
+#define ensure(x) do {HRESULT __hr = (x); if(!SUCCEEDED(__hr)) {fprintf(stderr, "COM error %08x\n", __hr); abort();}} while(0)
+
+struct d3d10_application
+{
+ virtual ~d3d10_application() {}
+
+ virtual void draw(ID3D10Device* ctx, ID3D10RenderTargetView* rtv, unsigned width, unsigned height, double time) = 0;
+ virtual bool init(ID3D10Device* dev, int argc, char** argv) = 0;
+};
+
+/* this is the entry point you must provide */
+extern "C" d3d10_application* d3d10_application_create();
+
+#endif
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10winmain.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10winmain.cpp
new file mode 100755
index 00000000000..ac4798a108e
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10winmain.cpp
@@ -0,0 +1,188 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#define INITGUID
+#include "d3d10app.h"
+#include "stdio.h"
+
+static d3d10_application* app;
+static IDXGISwapChain* swap_chain;
+static unsigned width, height;
+static DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM;
+static ID3D10Device* dev;
+static ID3D10Device* ctx;
+static int frames = 0;
+static int buffer_count = 1;
+
+LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_SIZE:
+ width = lParam & 0xffff;
+ height = lParam >> 16;
+
+ swap_chain->ResizeBuffers(buffer_count, width, height, format, 0);
+ frames = 0;
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ break;
+ default:
+ return DefWindowProc(hwnd, message, wParam, lParam);
+ }
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ HINSTANCE hInstance = GetModuleHandle(NULL);
+ WNDCLASSEXA wcex;
+
+ wcex.cbSize = sizeof(WNDCLASSEX);
+
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = WndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = hInstance;
+ wcex.hIcon = 0;
+ wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = "d3d10";
+ wcex.hIconSm = 0;
+
+ RegisterClassExA(&wcex);
+
+ HWND hwnd = CreateWindowA("d3d10", "d3d10", WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
+
+ if(!hwnd)
+ return FALSE;
+
+ RECT rc;
+ GetClientRect(hwnd, &rc );
+ width = rc.right - rc.left;
+ height = rc.bottom - rc.top;
+
+ DXGI_SWAP_CHAIN_DESC swap_chain_desc;
+ memset(&swap_chain_desc, 0, sizeof(swap_chain_desc));
+ swap_chain_desc.BufferDesc.Width = width;
+ swap_chain_desc.BufferDesc.Height = height;
+ swap_chain_desc.BufferDesc.Format = format;
+ swap_chain_desc.SampleDesc.Count = 1;
+ swap_chain_desc.SampleDesc.Quality = 0;
+ swap_chain_desc.OutputWindow = hwnd;
+ swap_chain_desc.Windowed = TRUE;
+ swap_chain_desc.BufferCount = buffer_count;
+ swap_chain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
+ swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+
+ D3D10_FEATURE_LEVEL1 feature_level = D3D10_FEATURE_LEVEL_10_0;
+
+ HRESULT hr;
+ if(1)
+ {
+ hr = D3D10CreateDeviceAndSwapChain(
+ NULL,
+ D3D10_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D10_CREATE_DEVICE_SINGLETHREADED, // | D3D10_CREATE_DEVICE_DEBUG,
+ D3D10_SDK_VERSION,
+ &swap_chain_desc,
+ &swap_chain,
+ &dev);
+ }
+ else
+ {
+ hr = D3D10CreateDeviceAndSwapChain1(
+ NULL,
+ D3D10_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D10_CREATE_DEVICE_SINGLETHREADED, // | D3D10_CREATE_DEVICE_DEBUG,
+ feature_level,
+ D3D10_SDK_VERSION,
+ &swap_chain_desc,
+ &swap_chain,
+ (ID3D10Device1**)&dev);
+ }
+
+ if(!SUCCEEDED(hr))
+ {
+ fprintf(stderr, "Failed to create D3D10 device (hresult %08x)\n", hr);
+ return 1;
+ }
+
+ ctx = dev;
+
+ app = d3d10_application_create();
+ if(!app->init(dev, argc, argv))
+ return 1;
+
+ ShowWindow(hwnd, SW_SHOWDEFAULT);
+ UpdateWindow(hwnd);
+
+ LARGE_INTEGER freq;
+ QueryPerformanceFrequency(&freq);
+ double period = 1.0 / (double)freq.QuadPart;
+ LARGE_INTEGER ctime_li;
+ QueryPerformanceCounter(&ctime_li);
+ double start_time = ctime_li.QuadPart * period;
+
+ MSG msg;
+ for(;;)
+ {
+ if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ if(msg.message == WM_QUIT)
+ break;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ else if(width && height)
+ {
+ ID3D10Texture2D* tex;
+ static ID3D10RenderTargetView* rtv;
+ ensure(swap_chain->GetBuffer(0, __uuidof(tex), (void**)&tex));
+ ensure(dev->CreateRenderTargetView(tex, NULL, &rtv));
+
+ QueryPerformanceCounter(&ctime_li);
+ double ctime = (double)ctime_li.QuadPart * period - start_time;
+
+ app->draw(ctx, rtv, width, height, ctime);
+ ctx->OMSetRenderTargets(0, 0, 0);
+
+ swap_chain->Present(0, 0);
+ rtv->Release();
+ tex->Release();
+ }
+ else
+ WaitMessage();
+ }
+ return (int) msg.wParam;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp
new file mode 100755
index 00000000000..4ce3dcf1c56
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp
@@ -0,0 +1,164 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#define INITGUID
+#include "d3d10app.h"
+#include <X11/Xlib.h>
+#include <GL/glx.h>
+#include <galliumdxgi.h>
+#include <sys/time.h>
+
+static d3d10_application* app;
+static IDXGISwapChain* swap_chain;
+unsigned width, height;
+DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM;
+static ID3D10Device* dev;
+static ID3D10Device* ctx;
+
+static int attributeList[] = {
+ GLX_RGBA,
+ GLX_RED_SIZE, 8,
+ GLX_GREEN_SIZE, 8,
+ GLX_BLUE_SIZE, 8,
+ None
+};
+
+double get_time()
+{
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+ return (double)tv.tv_sec + (double)tv.tv_usec * 0.000001;
+}
+
+int main(int argc, char** argv)
+{
+ Display* dpy = XOpenDisplay(0);
+ XVisualInfo* vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeList);
+ Colormap cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone);
+ XSetWindowAttributes swa;
+ swa.colormap = cmap;
+ swa.border_pixel = 0;
+ swa.event_mask = StructureNotifyMask;
+ width = 512;
+ height = 512;
+ Window win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, width, height, 0, vi->depth, InputOutput, vi->visual, CWBorderPixel | CWColormap| CWEventMask, &swa);
+ XMapWindow(dpy, win);
+
+ GalliumDXGIUseX11Display(dpy, 0, 0);
+
+ DXGI_SWAP_CHAIN_DESC swap_chain_desc;
+ memset(&swap_chain_desc, 0, sizeof(swap_chain_desc));
+ swap_chain_desc.BufferDesc.Width = width;
+ swap_chain_desc.BufferDesc.Height = height;
+ swap_chain_desc.BufferDesc.Format = format;
+ swap_chain_desc.SampleDesc.Count = 1;
+ swap_chain_desc.SampleDesc.Quality = 0;
+ swap_chain_desc.OutputWindow = (HWND)win;
+ swap_chain_desc.Windowed = TRUE;
+ swap_chain_desc.BufferCount = 3;
+ swap_chain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
+ swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+
+ D3D10_FEATURE_LEVEL1 feature_level = D3D10_FEATURE_LEVEL_10_0;
+
+ HRESULT hr;
+ if(0)
+ {
+ hr = D3D10CreateDeviceAndSwapChain(
+ NULL,
+ D3D10_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D10_CREATE_DEVICE_SINGLETHREADED,
+ D3D10_SDK_VERSION,
+ &swap_chain_desc,
+ &swap_chain,
+ &dev);
+ }
+ else
+ {
+ hr = D3D10CreateDeviceAndSwapChain1(
+ NULL,
+ D3D10_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D10_CREATE_DEVICE_SINGLETHREADED,
+ feature_level,
+ D3D10_SDK_VERSION,
+ &swap_chain_desc,
+ &swap_chain,
+ (ID3D10Device1**)&dev);
+ }
+ if(!SUCCEEDED(hr))
+ {
+ fprintf(stderr, "Failed to create D3D10 device (hresult %08x)\n", hr);
+ return 1;
+ }
+ ctx = dev;
+
+ app = d3d10_application_create();
+ if(!app->init(dev, argc, argv))
+ return 1;
+
+ double start_time = get_time();
+
+ MSG msg;
+ for(;;)
+ {
+ XEvent event;
+ if(XPending(dpy))
+ {
+ XNextEvent(dpy, &event);
+ if(event.type == DestroyNotify)
+ break;
+ switch(event.type)
+ {
+ case ConfigureNotify:
+ width = event.xconfigure.width;
+ height = event.xconfigure.height;
+ swap_chain->ResizeBuffers(3, width, height, format, 0);
+ break;
+ }
+ }
+ else if(width && height)
+ {
+ ID3D10Texture2D* tex;
+ ID3D10RenderTargetView* rtv;
+ ensure(swap_chain->GetBuffer(0, IID_ID3D10Texture2D, (void**)&tex));
+ ensure(dev->CreateRenderTargetView(tex, NULL, &rtv));
+
+ double ctime = get_time() - start_time;
+
+ app->draw(ctx, rtv, width, height, ctime);
+ ctx->OMSetRenderTargets(0, 0, 0);
+
+ tex->Release();
+ rtv->Release();
+ swap_chain->Present(0, 0);
+ }
+ else
+ XPeekEvent(dpy, &event);
+ }
+ return (int) msg.wParam;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp
new file mode 100755
index 00000000000..4e92f0a544c
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp
@@ -0,0 +1,118 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "d3d10app.h"
+#include "d3d10tri.hlsl.ps.h"
+#include "d3d10tri.hlsl.vs.h"
+
+struct vertex {
+ float position[4];
+ float color[4];
+};
+
+static struct vertex vertices[3] =
+{
+ {
+ { 0.0f, 0.9f, 0.5f, 1.0f },
+ { 1.0f, 0.0f, 0.0f, 1.0f }
+ },
+ {
+ { 0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f }
+ },
+ {
+ { -0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f }
+ },
+};
+
+struct d3d10tri : public d3d10_application
+{
+ ID3D10PixelShader* ps;
+ ID3D10VertexShader* vs;
+ ID3D10InputLayout* layout;
+ ID3D10Buffer* vb;
+
+ virtual bool init(ID3D10Device* dev, int argc, char** argv)
+ {
+ ensure(dev->CreatePixelShader(g_ps, sizeof(g_ps), &ps));
+ ensure(dev->CreateVertexShader(g_vs, sizeof(g_vs), &vs));
+
+ D3D10_INPUT_ELEMENT_DESC elements[] =
+ {
+ {"POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0},
+ {"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 16, D3D10_INPUT_PER_VERTEX_DATA, 0},
+ };
+
+ ensure(dev->CreateInputLayout(elements, sizeof(elements) / sizeof(elements[0]), g_vs, sizeof(g_vs), &layout));
+ D3D10_BUFFER_DESC bufferd;
+ bufferd.ByteWidth = sizeof(vertices);
+ bufferd.Usage = D3D10_USAGE_IMMUTABLE;
+ bufferd.BindFlags = D3D10_BIND_VERTEX_BUFFER;
+ bufferd.CPUAccessFlags = 0;
+ bufferd.MiscFlags = 0;
+
+ D3D10_SUBRESOURCE_DATA buffersd;
+ buffersd.pSysMem = vertices;
+ buffersd.SysMemPitch = sizeof(vertices);
+ buffersd.SysMemSlicePitch = sizeof(vertices);
+
+ ensure(dev->CreateBuffer(&bufferd, &buffersd, &vb));
+
+ return true;
+ }
+
+ virtual void draw(ID3D10Device* ctx, ID3D10RenderTargetView* rtv, unsigned width, unsigned height, double time)
+ {
+ float clear_color[4] = {1, 0, 1, 1};
+ D3D10_VIEWPORT vp;
+ memset(&vp, 0, sizeof(vp));
+ vp.Width = (unsigned)width;
+ vp.Height = (unsigned)height;
+ vp.MaxDepth = 1.0f;
+
+ ctx->OMSetRenderTargets(1, &rtv, 0);
+ ctx->RSSetViewports(1, &vp);
+
+ ctx->ClearRenderTargetView(rtv, clear_color);
+
+ ctx->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ctx->IASetInputLayout(layout);
+ unsigned stride = 2 * 4 * 4;
+ unsigned offset = 0;
+ ctx->IASetVertexBuffers(0, 1, &vb, &stride, &offset);
+
+ ctx->VSSetShader(vs);
+ ctx->PSSetShader(ps);
+
+ ctx->Draw(3, 0);
+ }
+};
+
+d3d10_application* d3d10_application_create()
+{
+ return new d3d10tri();
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl
new file mode 100755
index 00000000000..6bdd448ce0a
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl
@@ -0,0 +1,50 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+struct IA2VS
+{
+ float4 position : POSITION;
+ float4 color : COLOR;
+};
+
+struct VS2PS
+{
+ float4 position : SV_POSITION;
+ float4 color : COLOR;
+};
+
+VS2PS vs(IA2VS input)
+{
+ VS2PS result;
+ result.position = input.position;
+ result.color = input.color;
+ return result;
+}
+
+float4 ps(VS2PS input) : SV_TARGET
+{
+ return input.color;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.ps.h b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.ps.h
new file mode 100755
index 00000000000..3502d9f7292
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.ps.h
@@ -0,0 +1,112 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d10tri.hlsl.ps.h /Eps /Tps_4_0 d3d10tri.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// COLOR 0 xyzw 1 NONE float xyzw
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_4_0
+dcl_input_ps linear v1.xyzw
+dcl_output o0.xyzw
+mov o0.xyzw, v1.xyzw
+ret
+// Approximately 2 instruction slots used
+#endif
+
+const BYTE g_ps[] =
+{
+ 68, 88, 66, 67, 206, 120,
+ 117, 238, 118, 127, 10, 87,
+ 80, 75, 114, 198, 95, 2,
+ 120, 102, 1, 0, 0, 0,
+ 208, 1, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 224, 0,
+ 0, 0, 20, 1, 0, 0,
+ 84, 1, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 255, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 76, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3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
+ 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.vs.h b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.vs.h
new file mode 100755
index 00000000000..5c941d8a9f8
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.hlsl.vs.h
@@ -0,0 +1,128 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d10tri.hlsl.vs.h /Evs /Tvs_4_0 d3d10tri.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyzw 0 NONE float xyzw
+// COLOR 0 xyzw 1 NONE float xyzw
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// COLOR 0 xyzw 1 NONE float xyzw
+//
+vs_4_0
+dcl_input v0.xyzw
+dcl_input v1.xyzw
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xyzw
+mov o0.xyzw, v0.xyzw
+mov o1.xyzw, v1.xyzw
+ret
+// Approximately 3 instruction slots used
+#endif
+
+const BYTE g_vs[] =
+{
+ 68, 88, 66, 67, 190, 171,
+ 186, 20, 44, 105, 95, 129,
+ 137, 204, 223, 72, 251, 159,
+ 126, 176, 1, 0, 0, 0,
+ 28, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 220, 0,
+ 0, 0, 48, 1, 0, 0,
+ 160, 1, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 254, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 72, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 15, 0, 0,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 15, 15, 0, 0,
+ 80, 79, 83, 73, 84, 73,
+ 79, 78, 0, 67, 79, 76,
+ 79, 82, 0, 171, 79, 83,
+ 71, 78, 76, 0, 0, 0,
+ 2, 0, 0, 0, 8, 0,
+ 0, 0, 56, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 15, 0,
+ 0, 0, 68, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 1, 0, 0, 0, 15, 0,
+ 0, 0, 83, 86, 95, 80,
+ 79, 83, 73, 84, 73, 79,
+ 78, 0, 67, 79, 76, 79,
+ 82, 0, 171, 171, 83, 72,
+ 68, 82, 104, 0, 0, 0,
+ 64, 0, 1, 0, 26, 0,
+ 0, 0, 95, 0, 0, 3,
+ 242, 16, 16, 0, 0, 0,
+ 0, 0, 95, 0, 0, 3,
+ 242, 16, 16, 0, 1, 0,
+ 0, 0, 103, 0, 0, 4,
+ 242, 32, 16, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 101, 0, 0, 3, 242, 32,
+ 16, 0, 1, 0, 0, 0,
+ 54, 0, 0, 5, 242, 32,
+ 16, 0, 0, 0, 0, 0,
+ 70, 30, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 5,
+ 242, 32, 16, 0, 1, 0,
+ 0, 0, 70, 30, 16, 0,
+ 1, 0, 0, 0, 62, 0,
+ 0, 1, 83, 84, 65, 84,
+ 116, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.vcxproj b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.vcxproj
new file mode 100755
index 00000000000..f269e3bbc15
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.vcxproj
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5366F4FD-0E6C-40CC-B2F2-CE3D350F0729}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>d3d10tri</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d10app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>d3d10.lib;d3d10_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d10app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>d3d10.lib;d3d10_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <CustomBuild Include="d3d10tri.hlsl">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).ps.h /Eps /Tps_4_0 %(Identity)
+"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).vs.h /Evs /Tvs_4_0 %(Identity)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Identity).ps.h;%(Identity).vs.h;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\d3d10app\d3d10app.h" />
+ <ClInclude Include="d3d10tri.hlsl.ps.h" />
+ <ClInclude Include="d3d10tri.hlsl.vs.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\d3d10app\d3d10winmain.cpp" />
+ <ClCompile Include="d3d10tri.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11app.h b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11app.h
new file mode 100755
index 00000000000..9eb69d6f5d8
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11app.h
@@ -0,0 +1,51 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef D3D11APP_H
+#define D3D11APP_H
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <objbase.h>
+#include <d3d11.h>
+#include <assert.h>
+#include <stdio.h>
+#include <float.h>
+
+#define ensure(x) do {HRESULT __hr = (x); if(!SUCCEEDED(__hr)) {fprintf(stderr, "COM error %08x\n", __hr); abort();}} while(0)
+
+struct d3d11_application
+{
+ virtual ~d3d11_application() {}
+
+ virtual void draw(ID3D11DeviceContext* ctx, ID3D11RenderTargetView* rtv, unsigned width, unsigned height, double time) = 0;
+ virtual bool init(ID3D11Device* dev, int argc, char** argv) = 0;
+};
+
+/* this is the entry point you must provide */
+extern "C" d3d11_application* d3d11_application_create();
+
+#endif
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl
new file mode 100755
index 00000000000..4075160d170
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl
@@ -0,0 +1,53 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+Texture2D tex;
+sampler samp;
+
+struct IA2VS
+{
+ float4 position : POSITION;
+ float2 texcoord : TEXCOORD;
+};
+
+struct VS2PS
+{
+ float4 position : SV_POSITION;
+ float2 texcoord : TEXCOORD;
+};
+
+VS2PS vs_blit(IA2VS input)
+{
+ VS2PS result;
+ result.position = input.position;
+ result.texcoord = input.texcoord;
+ return result;
+}
+
+float4 ps_blit(VS2PS input) : SV_TARGET
+{
+ return tex.Sample(samp, input.texcoord);
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.ps.h b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.ps.h
new file mode 100755
index 00000000000..d034c872224
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.ps.h
@@ -0,0 +1,142 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11blit.hlsl.ps.h /Eps_blit /Tps_4_0 d3d11blit.hlsl
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// samp sampler NA NA 0 1
+// tex texture float4 2d 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// TEXCOORD 0 xy 1 NONE float xy
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_4_0
+dcl_sampler s0, mode_default
+dcl_resource_texture2d (float,float,float,float) t0
+dcl_input_ps linear v1.xy
+dcl_output o0.xyzw
+sample o0.xyzw, v1.xyxx, t0.xyzw, s0
+ret
+// Approximately 2 instruction slots used
+#endif
+
+const BYTE g_ps_blit[] =
+{
+ 68, 88, 66, 67, 183, 100,
+ 39, 89, 244, 20, 241, 39,
+ 36, 169, 159, 230, 234, 214,
+ 114, 11, 1, 0, 0, 0,
+ 72, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 212, 0, 0, 0, 44, 1,
+ 0, 0, 96, 1, 0, 0,
+ 204, 1, 0, 0, 82, 68,
+ 69, 70, 152, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 255, 255, 0, 1, 0, 0,
+ 101, 0, 0, 0, 92, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 97, 0, 0, 0, 2, 0,
+ 0, 0, 5, 0, 0, 0,
+ 4, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 1, 0, 0, 0, 12, 0,
+ 0, 0, 115, 97, 109, 112,
+ 0, 116, 101, 120, 0, 77,
+ 105, 99, 114, 111, 115, 111,
+ 102, 116, 32, 40, 82, 41,
+ 32, 72, 76, 83, 76, 32,
+ 83, 104, 97, 100, 101, 114,
+ 32, 67, 111, 109, 112, 105,
+ 108, 101, 114, 32, 57, 46,
+ 50, 57, 46, 57, 53, 50,
+ 46, 51, 49, 49, 49, 0,
+ 171, 171, 73, 83, 71, 78,
+ 80, 0, 0, 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.vs.h b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.vs.h
new file mode 100755
index 00000000000..8e884d92484
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11blit.hlsl.vs.h
@@ -0,0 +1,130 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11blit.hlsl.vs.h /Evs_blit /Tvs_4_0 d3d11blit.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyzw 0 NONE float xyzw
+// TEXCOORD 0 xy 1 NONE float xy
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// TEXCOORD 0 xy 1 NONE float xy
+//
+vs_4_0
+dcl_input v0.xyzw
+dcl_input v1.xy
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xy
+mov o0.xyzw, v0.xyzw
+mov o1.xy, v1.xyxx
+ret
+// Approximately 3 instruction slots used
+#endif
+
+const BYTE g_vs_blit[] =
+{
+ 68, 88, 66, 67, 142, 11,
+ 173, 22, 73, 47, 224, 51,
+ 147, 83, 148, 177, 56, 17,
+ 72, 237, 1, 0, 0, 0,
+ 36, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 224, 0,
+ 0, 0, 56, 1, 0, 0,
+ 168, 1, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 254, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 76, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 15, 0, 0,
+ 65, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 3, 3, 0, 0,
+ 80, 79, 83, 73, 84, 73,
+ 79, 78, 0, 84, 69, 88,
+ 67, 79, 79, 82, 68, 0,
+ 171, 171, 79, 83, 71, 78,
+ 80, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 68, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 3, 12, 0, 0,
+ 83, 86, 95, 80, 79, 83,
+ 73, 84, 73, 79, 78, 0,
+ 84, 69, 88, 67, 79, 79,
+ 82, 68, 0, 171, 171, 171,
+ 83, 72, 68, 82, 104, 0,
+ 0, 0, 64, 0, 1, 0,
+ 26, 0, 0, 0, 95, 0,
+ 0, 3, 242, 16, 16, 0,
+ 0, 0, 0, 0, 95, 0,
+ 0, 3, 50, 16, 16, 0,
+ 1, 0, 0, 0, 103, 0,
+ 0, 4, 242, 32, 16, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 101, 0, 0, 3,
+ 50, 32, 16, 0, 1, 0,
+ 0, 0, 54, 0, 0, 5,
+ 242, 32, 16, 0, 0, 0,
+ 0, 0, 70, 30, 16, 0,
+ 0, 0, 0, 0, 54, 0,
+ 0, 5, 50, 32, 16, 0,
+ 1, 0, 0, 0, 70, 16,
+ 16, 0, 1, 0, 0, 0,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 116, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h
new file mode 100755
index 00000000000..3b0644a573d
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h
@@ -0,0 +1,424 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <vector>
+
+#include "d3d11blit.hlsl.ps.h"
+#include "d3d11blit.hlsl.vs.h"
+
+template<typename index_type = unsigned>
+struct triangle_list_indices : public std::vector<index_type>
+{
+ unsigned base;
+ bool flip;
+
+ triangle_list_indices()
+ : base(0), flip(false)
+ {}
+
+ void poly(unsigned a, unsigned b, unsigned c)
+ {
+ this->push_back(base + a);
+ this->push_back(base + (flip ? c : b));
+ this->push_back(base + (flip ? b : c));
+ }
+
+ void poly(unsigned a, unsigned b, unsigned c, unsigned d)
+ {
+ poly(a, b, c);
+ poly(a, c, d);
+ }
+
+ void poly(unsigned a, unsigned b, unsigned c, unsigned d, unsigned e)
+ {
+ poly(a, b, c, d);
+ poly(a, d, e);
+ }
+
+ void poly(unsigned a, unsigned b, unsigned c, unsigned d, unsigned e, unsigned f)
+ {
+ poly(a, b, c, d, e);
+ poly(a, e, f);
+ }
+
+ void poly(unsigned a, unsigned b, unsigned c, unsigned d, unsigned e, unsigned f, unsigned g)
+ {
+ poly(a, b, c, d, e, f);
+ poly(a, f, g);
+ }
+
+ void poly(unsigned a, unsigned b, unsigned c, unsigned d, unsigned e, unsigned f, unsigned g, unsigned h)
+ {
+ poly(a, b, c, d, e, f, g);
+ poly(a, g, h);
+ }
+};
+
+struct mesh
+{
+ ID3D11InputLayout* layout;
+ ID3D11Buffer* buffer;
+ D3D11_PRIMITIVE_TOPOLOGY topology;
+ unsigned vertex_size;
+ unsigned draw_count;
+ DXGI_FORMAT index_format;
+ unsigned index_offset;
+
+ mesh(ID3D11Device* dev, D3D11_PRIMITIVE_TOPOLOGY topology,
+ const D3D11_INPUT_ELEMENT_DESC *elements, unsigned num_elements,
+ const void* vs, unsigned vs_size,
+ const void* vertices, unsigned vertex_size, unsigned num_vertices,
+ const void* indices = 0, unsigned index_size = 0, unsigned num_indices = 0)
+ : topology(topology), vertex_size(vertex_size), draw_count(index_size ? num_indices : num_vertices)
+ {
+ dev->CreateInputLayout(elements, num_elements, vs, vs_size, &layout);
+ if(index_size == 2)
+ index_format = DXGI_FORMAT_R16_UINT;
+ else if(index_size == 4)
+ index_format = DXGI_FORMAT_R32_UINT;
+ else
+ index_format = DXGI_FORMAT_UNKNOWN;
+ this->vertex_size = vertex_size;
+ index_offset = vertex_size * num_vertices;
+
+ D3D11_BUFFER_DESC bufferd;
+ memset(&bufferd, 0, sizeof(bufferd));
+ bufferd.Usage = D3D11_USAGE_IMMUTABLE;
+ bufferd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ if(index_format)
+ bufferd.BindFlags |= D3D11_BIND_INDEX_BUFFER;
+ bufferd.ByteWidth = index_offset + index_format * num_indices;
+
+ char* data = (char*)malloc(bufferd.ByteWidth);
+ memcpy(data, vertices, vertex_size * num_vertices);
+ memcpy(data + index_offset, indices, index_size * num_indices);
+
+ D3D11_SUBRESOURCE_DATA buffersd;
+ buffersd.pSysMem = data;
+
+ ensure(dev->CreateBuffer(&bufferd, &buffersd, &buffer));
+ free(data);
+ }
+
+ ~mesh()
+ {
+ layout->Release();
+ buffer->Release();
+ }
+
+ void bind(ID3D11DeviceContext* ctx)
+ {
+ unsigned offset = 0;
+ ctx->IASetPrimitiveTopology(topology);
+ ctx->IASetInputLayout(layout);
+ if(index_format)
+ ctx->IASetIndexBuffer(buffer, index_format, index_offset);
+ ctx->IASetVertexBuffers(0, 1, &buffer, &vertex_size, &offset);
+ }
+
+ void draw_bound(ID3D11DeviceContext* ctx)
+ {
+ if(index_format)
+ ctx->DrawIndexed(draw_count, 0, 0);
+ else
+ ctx->Draw(draw_count, 0);
+ }
+
+ void bind_and_draw(ID3D11DeviceContext* ctx)
+ {
+ bind(ctx);
+ draw_bound(ctx);
+ }
+};
+
+mesh* create_tex_quad(ID3D11Device* dev, const BYTE* vs, unsigned vs_size)
+{
+ float quad_data[] = {
+ -1, -1, 0, 1,
+ -1, 1, 0, 0,
+ 1, -1, 1, 1,
+ 1, 1, 1, 0,
+ };
+
+ D3D11_INPUT_ELEMENT_DESC elements[2] =
+ {
+ {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ {"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ };
+
+ return new mesh(dev, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
+ elements, 2,
+ vs, vs_size,
+ quad_data, 4 * sizeof(float), 4,
+ 0, 0, 0);
+}
+
+struct d3d11_blitter
+{
+ mesh* quad;
+ ID3D11VertexShader* vs;
+ ID3D11PixelShader* ps;
+ ID3D11SamplerState* sampler[2];
+
+ d3d11_blitter(ID3D11Device* dev)
+ {
+ quad = create_tex_quad(dev, g_vs_blit, sizeof(g_vs_blit));
+
+ dev->CreateVertexShader(g_vs_blit, sizeof(g_vs_blit), 0, &vs);
+ dev->CreatePixelShader(g_ps_blit, sizeof(g_ps_blit), 0, &ps);
+
+ for(unsigned i = 0; i < 2; ++i)
+ {
+ D3D11_SAMPLER_DESC samplerd;
+ memset(&samplerd, 0, sizeof(samplerd));
+ samplerd.Filter = i ? D3D11_FILTER_MIN_MAG_MIP_LINEAR : D3D11_FILTER_MIN_MAG_MIP_LINEAR;
+ samplerd.AddressU = samplerd.AddressV = samplerd.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
+ dev->CreateSamplerState(&samplerd, &sampler[i]);
+ }
+ }
+
+ void bind(ID3D11DeviceContext* ctx, ID3D11ShaderResourceView* srv, ID3D11RenderTargetView* rtv, float x, float y, float width, float height, bool linear)
+ {
+ D3D11_VIEWPORT vp;
+ vp.TopLeftX = x;
+ vp.TopLeftY = y;
+ vp.Width = width;
+ vp.Height = height;
+ vp.MinDepth = 0;
+ vp.MaxDepth = 1;
+ ctx->RSSetViewports(1, &vp);
+ ctx->RSSetState(0);
+ ctx->OMSetBlendState(0, 0, ~0);
+ ctx->OMSetDepthStencilState(0, 0);
+ ctx->OMSetRenderTargets(1, &rtv, 0);
+ ctx->VSSetShader(vs, 0, 0);
+ ctx->PSSetShader(ps, 0, 0);
+ ctx->PSSetShaderResources(0, 1, &srv);
+ ctx->PSSetSamplers(0, 1, &sampler[!!linear]);
+ quad->bind(ctx);
+ }
+
+ void draw_bound(ID3D11DeviceContext* ctx)
+ {
+ quad->draw_bound(ctx);
+ }
+
+ void bind_draw_and_unbind(ID3D11DeviceContext* ctx, ID3D11ShaderResourceView* srv, ID3D11RenderTargetView* rtv, float x, float y, float width, float height, bool linear)
+ {
+ bind(ctx, srv, rtv, x, y, width, height, linear);
+ draw_bound(ctx);
+ unbind(ctx);
+ }
+
+ void unbind(ID3D11DeviceContext* ctx)
+ {
+ void* null = 0;
+ ctx->PSSetShaderResources(0, 1, (ID3D11ShaderResourceView**)&null);
+ ctx->PSSetSamplers(0, 1, (ID3D11SamplerState**)&null);
+ }
+};
+
+template<typename T, unsigned n>
+struct vec_t
+{
+ T v[n];
+
+ T& operator [](unsigned i)
+ {
+ return v[i];
+ }
+
+ const T& operator [](unsigned i) const
+ {
+ return v[i];
+ }
+};
+
+template<typename T, unsigned n>
+vec_t<T, n> operator -(const vec_t<T, n> a)
+{
+ vec_t<T, n> r;
+ for(unsigned i = 0; i < n; ++i)
+ r[i] = -a[i];
+ return r;
+}
+
+template<typename T, unsigned n>
+vec_t<T, n> operator +(const vec_t<T, n>& a, const vec_t<T, n>& b)
+{
+ vec_t<T, n> r;
+ for(unsigned i = 0; i < n; ++i)
+ r[i] = a[i] + b[i];
+ return r;
+}
+
+template<typename T, unsigned n>
+vec_t<T, n>& operator +=(vec_t<T, n>& a, const vec_t<T, n>& b)
+{
+ for(unsigned i = 0; i < n; ++i)
+ a[i] += b[i];
+ return a;
+}
+
+template<typename T, unsigned r, unsigned c>
+struct mat_t : public vec_t<vec_t<T, r>, c>
+{};
+
+template<typename T, unsigned n>
+vec_t<T, n> operator *(const vec_t<T, n>& a, const T& b)
+{
+ vec_t<T, n> r;
+ for(unsigned i = 0; i < n; ++i)
+ r[i] = a[i] * b;
+ return r;
+}
+
+template<typename T, unsigned n>
+vec_t<T, n> operator *(const T& b, const vec_t<T, n>& a)
+{
+ vec_t<T, n> r;
+ for(unsigned i = 0; i < n; ++i)
+ r[i] = a[i] * b;
+ return r;
+}
+
+template<typename T, unsigned d, unsigned e>
+vec_t<T, e> operator *(const mat_t<T, e, d>& m, const vec_t<T, d>& b)
+{
+ vec_t<T, e> r;
+ r = m[0] * b[0];
+ for(unsigned i = 1; i < d; ++i)
+ r += m[i] * b[i];
+ return r;
+}
+
+template<typename T, unsigned d, unsigned e, unsigned f>
+mat_t<T, e, f> operator *(const mat_t<T, e, d>& m, const mat_t<T, d, f>& b)
+{
+ mat_t<T, e, f> r;
+ for(unsigned i = 0; i < d; ++i)
+ r[i] = m * b[i];
+ return r;
+}
+
+template<typename T>
+vec_t<T, 3> vec(T a, T b, T c)
+{
+ vec_t<T, 4> v;
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ return v;
+}
+
+template<typename T>
+vec_t<T, 4> vec(T a, T b, T c, T d)
+{
+ vec_t<T, 4> v;
+ v[0] = a;
+ v[1] = b;
+ v[2] = c;
+ v[3] = d;
+ return v;
+}
+
+typedef mat_t<float, 4, 4> float4x4;
+typedef mat_t<float, 4, 3> float4x3;
+typedef mat_t<float, 3, 4> float3x4;
+typedef mat_t<float, 3, 3> float3x3;
+
+typedef vec_t<float, 3> float3;
+typedef vec_t<float, 4> float4;
+
+template<typename T>
+mat_t<T, 4, 4> mat4x4_frustum(T left, T right, T bottom, T top, T nearval, T farval)
+{
+ T x = (2.0f * nearval) / (right - left);
+ T y = (2.0f * nearval) / (top - bottom);
+ T a = (right + left) / (right - left);
+ T b = (top + bottom) / (top - bottom);
+ T c = -(farval + nearval) / (farval - nearval);
+ T d = -(2.0f * farval * nearval) / (farval - nearval);
+ T _0 = (T)0;
+
+ mat_t<T, 4, 4> m;
+ m[0] = vec(x, _0, _0, _0);
+ m[1] = vec(_0, y, _0, _0);
+ m[2] = vec(a, b, c, (T)-1);
+ m[3] = vec(_0, _0, d, _0);
+ return m;
+}
+
+template<typename T>
+mat_t<T, 3, 3> mat3x3_diag(T v)
+{
+ mat_t<T, 3, 3> m;
+ T _0 = (T)0;
+ m[0] = vec(v, _0, _0);
+ m[1] = vec(_0, v, _0);
+ m[2] = vec(_0, _0, v);
+ return m;
+}
+
+template<typename T>
+mat_t<T, 4, 4> mat4x4_diag(T v)
+{
+ mat_t<T, 4, 4> m;
+ T _0 = (T)0;
+ m[0] = vec(v, _0, _0, _0);
+ m[1] = vec(_0, v, _0, _0);
+ m[2] = vec(_0, _0, v, _0);
+ m[3] = vec(_0, _0, _0, v);
+ return m;
+}
+
+template<typename T, unsigned n>
+mat_t<T, n, n> mat_push_rotate(const mat_t<T, n, n>& m, unsigned axis, T angle)
+{
+ T s = (T)sin(angle);
+ T c = (T)cos(angle);
+
+ mat_t<T, n, n> r = m;
+ unsigned a = (axis + 1) % 3;
+ unsigned b = (axis + 2) % 3;
+ r[a] = (m[a] * c) + (m[b] * s);
+ r[b] = -(m[a] * s) + (m[b] * c);
+ return r;
+}
+
+template<typename T, unsigned n>
+mat_t<T, n, n> mat_push_translate(const mat_t<T, n, n>& m, float x, float y, float z)
+{
+ mat_t<T, n, n> r = m;
+ vec_t<T, n> v;
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ if(n >= 4)
+ v[3] = (T)0;
+ r[3] += m * v;
+ return r;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11winmain.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11winmain.cpp
new file mode 100755
index 00000000000..76903e57f09
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11winmain.cpp
@@ -0,0 +1,172 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#define INITGUID
+#include "d3d11app.h"
+#include "stdio.h"
+
+static d3d11_application* app;
+static IDXGISwapChain* swap_chain;
+static unsigned width, height;
+static DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM;
+static ID3D11Device* dev;
+static ID3D11DeviceContext* ctx;
+static int frames = 0;
+static int buffer_count = 1;
+
+LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message)
+ {
+ case WM_SIZE:
+ width = lParam & 0xffff;
+ height = lParam >> 16;
+
+ swap_chain->ResizeBuffers(buffer_count, width, height, format, 0);
+ frames = 0;
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ break;
+ default:
+ return DefWindowProc(hwnd, message, wParam, lParam);
+ }
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ HINSTANCE hInstance = GetModuleHandle(NULL);
+ WNDCLASSEXA wcex;
+
+ wcex.cbSize = sizeof(WNDCLASSEX);
+
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = WndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = hInstance;
+ wcex.hIcon = 0;
+ wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = "d3d11";
+ wcex.hIconSm = 0;
+
+ RegisterClassExA(&wcex);
+
+ HWND hwnd = CreateWindowA("d3d11", "d3d11", WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
+
+ if(!hwnd)
+ return FALSE;
+
+ RECT rc;
+ GetClientRect(hwnd, &rc );
+ width = rc.right - rc.left;
+ height = rc.bottom - rc.top;
+
+ DXGI_SWAP_CHAIN_DESC swap_chain_desc;
+ memset(&swap_chain_desc, 0, sizeof(swap_chain_desc));
+ swap_chain_desc.BufferDesc.Width = width;
+ swap_chain_desc.BufferDesc.Height = height;
+ swap_chain_desc.BufferDesc.Format = format;
+ swap_chain_desc.SampleDesc.Count = 1;
+ swap_chain_desc.SampleDesc.Quality = 0;
+ swap_chain_desc.OutputWindow = hwnd;
+ swap_chain_desc.Windowed = TRUE;
+ swap_chain_desc.BufferCount = buffer_count;
+ swap_chain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
+ swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+
+ D3D_FEATURE_LEVEL feature_level = D3D_FEATURE_LEVEL_10_0;
+
+ HRESULT hr = D3D11CreateDeviceAndSwapChain(
+ NULL,
+ D3D_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D11_CREATE_DEVICE_SINGLETHREADED, // | D3D11_CREATE_DEVICE_DEBUG,
+ NULL,
+ 0,
+ D3D11_SDK_VERSION,
+ &swap_chain_desc,
+ &swap_chain,
+ &dev,
+ &feature_level,
+ &ctx);
+ if(!SUCCEEDED(hr))
+ {
+ fprintf(stderr, "Failed to create D3D11 device (hresult %08x)\n", hr);
+ return 1;
+ }
+
+ app = d3d11_application_create();
+ if(!app->init(dev, argc, argv))
+ return 1;
+
+ ShowWindow(hwnd, SW_SHOWDEFAULT);
+ UpdateWindow(hwnd);
+
+ LARGE_INTEGER freq;
+ QueryPerformanceFrequency(&freq);
+ double period = 1.0 / (double)freq.QuadPart;
+ LARGE_INTEGER ctime_li;
+ QueryPerformanceCounter(&ctime_li);
+ double start_time = ctime_li.QuadPart * period;
+
+ MSG msg;
+ for(;;)
+ {
+ if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ if(msg.message == WM_QUIT)
+ break;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ else if(width && height)
+ {
+ ID3D11Texture2D* tex;
+ static ID3D11RenderTargetView* rtv;
+ ensure(swap_chain->GetBuffer(0, __uuidof(tex), (void**)&tex));
+ ensure(dev->CreateRenderTargetView(tex, NULL, &rtv));
+
+ QueryPerformanceCounter(&ctime_li);
+ double ctime = (double)ctime_li.QuadPart * period - start_time;
+
+ app->draw(ctx, rtv, width, height, ctime);
+ ctx->OMSetRenderTargets(0, 0, 0);
+
+ swap_chain->Present(0, 0);
+ rtv->Release();
+ tex->Release();
+ }
+ else
+ WaitMessage();
+ }
+ return (int) msg.wParam;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp
new file mode 100755
index 00000000000..9dcb32537e7
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp
@@ -0,0 +1,124 @@
+#define INITGUID
+#include "d3d11app.h"
+#include <X11/Xlib.h>
+#include <GL/glx.h>
+#include <galliumdxgi.h>
+#include <sys/time.h>
+
+static d3d11_application* app;
+static IDXGISwapChain* swap_chain;
+unsigned width, height;
+DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM;
+static ID3D11Device* dev;
+static ID3D11DeviceContext* ctx;
+
+static int attributeList[] = {
+ GLX_RGBA,
+ GLX_RED_SIZE, 8,
+ GLX_GREEN_SIZE, 8,
+ GLX_BLUE_SIZE, 8,
+ None
+};
+
+double get_time()
+{
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+ return (double)tv.tv_sec + (double)tv.tv_usec * 0.000001;
+}
+
+int main(int argc, char** argv)
+{
+ Display* dpy = XOpenDisplay(0);
+ XVisualInfo* vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeList);
+ Colormap cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone);
+ XSetWindowAttributes swa;
+ swa.colormap = cmap;
+ swa.border_pixel = 0;
+ swa.event_mask = StructureNotifyMask;
+ width = 512;
+ height = 512;
+ Window win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, width, height, 0, vi->depth, InputOutput, vi->visual, CWBorderPixel | CWColormap| CWEventMask, &swa);
+ XMapWindow(dpy, win);
+
+ GalliumDXGIUseX11Display(dpy, 0, 0);
+
+ DXGI_SWAP_CHAIN_DESC swap_chain_desc;
+ memset(&swap_chain_desc, 0, sizeof(swap_chain_desc));
+ swap_chain_desc.BufferDesc.Width = width;
+ swap_chain_desc.BufferDesc.Height = height;
+ swap_chain_desc.BufferDesc.Format = format;
+ swap_chain_desc.SampleDesc.Count = 1;
+ swap_chain_desc.SampleDesc.Quality = 0;
+ swap_chain_desc.OutputWindow = (HWND)win;
+ swap_chain_desc.Windowed = TRUE;
+ swap_chain_desc.BufferCount = 3;
+ swap_chain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
+ swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+
+ D3D_FEATURE_LEVEL feature_level = D3D_FEATURE_LEVEL_10_0;
+
+ HRESULT hr =D3D11CreateDeviceAndSwapChain(
+ NULL,
+ D3D_DRIVER_TYPE_HARDWARE,
+ NULL,
+ D3D11_CREATE_DEVICE_SINGLETHREADED,
+ NULL,
+ 0,
+ D3D11_SDK_VERSION,
+ &swap_chain_desc,
+ &swap_chain,
+ &dev,
+ &feature_level,
+ &ctx);
+ if(!SUCCEEDED(hr))
+ {
+ fprintf(stderr, "Failed to create D3D11 device (hresult %08x)\n", hr);
+ return 1;
+ }
+
+ app = d3d11_application_create();
+ if(!app->init(dev, argc, argv))
+ return 1;
+
+ double start_time = get_time();
+
+ MSG msg;
+ for(;;)
+ {
+ XEvent event;
+ if(XPending(dpy))
+ {
+ XNextEvent(dpy, &event);
+ if(event.type == DestroyNotify)
+ break;
+ switch(event.type)
+ {
+ case ConfigureNotify:
+ width = event.xconfigure.width;
+ height = event.xconfigure.height;
+ swap_chain->ResizeBuffers(3, width, height, format, 0);
+ break;
+ }
+ }
+ else if(width && height)
+ {
+ ID3D11Texture2D* tex;
+ ID3D11RenderTargetView* rtv;
+ ensure(swap_chain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&tex));
+ ensure(dev->CreateRenderTargetView(tex, NULL, &rtv));
+
+ double ctime = get_time() - start_time;
+
+ app->draw(ctx, rtv, width, height, ctime);
+ ctx->OMSetRenderTargets(0, 0, 0);
+
+ tex->Release();
+ rtv->Release();
+ swap_chain->Present(0, 0);
+ }
+ else
+ XPeekEvent(dpy, &event);
+ }
+ return (int) msg.wParam;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp
new file mode 100755
index 00000000000..32a63ae6dd5
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp
@@ -0,0 +1,573 @@
+/*
+* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+* Copyright (C) 2009-2010 Luca Barbieri All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*.
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/*
+* This is a port of the infamous "glxgears" demo to straight EGL
+* Port by Dane Rushton 10 July 2005
+*
+* This a rewrite of the 'eglgears' demo in straight Gallium
+* Port by Luca Barbieri
+*
+* This a port of the 'galliumgears' demo to Direct3D 11
+* Port by Luca Barbieri
+*/
+
+#define _USE_MATH_DEFINES
+#include "d3d11app.h"
+#include "d3d11u.h"
+#include "d3d11gears.hlsl.ps.h"
+#include "d3d11gears.hlsl.vs.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+struct gear
+{
+ struct mesh* mesh;
+ float x;
+ float y;
+ float t0;
+ float wmul;
+ float4 color;
+};
+
+struct cbuf_t
+{
+ float4x4 projection;
+ float4x4 modelview;
+ float4 light;
+ float4 diffuse;
+ float4 specular;
+ float specular_power;
+ float padding[3];
+};
+
+struct gear gears[3];
+
+struct vertex
+{
+ float position[3];
+ float normal[3];
+
+ vertex(float x, float y, float z, float nx, float ny, float nz)
+ {
+ position[0] = x;
+ position[1] = y;
+ position[2] = z;
+ normal[0] = nx;
+ normal[1] = ny;
+ normal[2] = nz;
+ }
+};
+
+#define VERT(x, y, z) vertices.push_back(vertex((x), (y), (z), (nx), (ny), (nz)))
+
+static mesh* build_gear(ID3D11Device* dev, int triangle_budget, float inner_radius, float outer_radius, float width, int teeth, float tooth_depth)
+{
+ int i, j, k;
+ float r0, r1, r2;
+ float da;
+ float nx, ny, nz;
+ int face;
+ int segs = 4;
+ int base_triangles = teeth * segs * 2 * 2;
+ int divs0 = (triangle_budget / base_triangles) - 1;
+ int divs = (divs0 > 0) ? divs0 : 1;
+ float* c = (float*)malloc(teeth * segs * sizeof(float));
+ float* s = (float*)malloc(teeth * segs * sizeof(float));
+ float* dc = (float*)malloc(teeth * segs * divs * sizeof(float));
+ float* ds = (float*)malloc(teeth * segs * divs * sizeof(float));
+ int num_vertices = teeth * segs * 2 * (3 + 2 * divs);
+ int num_triangles = base_triangles * (1 + divs);
+ printf("Creating gear with %i teeth using %i vertices used in %i triangles\n", teeth, num_vertices, num_triangles);
+ triangle_list_indices<> indices;
+ std::vector<vertex> vertices;
+
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0f;
+ r2 = outer_radius + tooth_depth / 2.0f;
+
+ da = (float)(2.0 * M_PI / (teeth * segs * divs));
+ for(i = 0; i < teeth * segs * divs; ++i) {
+ float angle = da * i;
+ ds[i] = sin(angle);
+ dc[i] = cos(angle);
+ }
+
+ for(i = 0; i < teeth * segs; ++i) {
+ s[i] = ds[i * divs];
+ c[i] = dc[i * divs];
+ }
+
+ /* faces */
+ for(face = -1; face <= 1; face += 2) {
+ float z = width * face * 0.5f;
+ nx = 0.0f;
+ ny = 0.0f;
+ nz = (float)face;
+
+ indices.flip = face > 0;
+
+ assert(segs == 4);
+ for(i = 0; i < teeth; ++i) {
+ VERT(r1 * c[segs * i], r1 * s[segs * i], z);
+ VERT(r2 * c[segs * i + 1], r2 * s[segs * i + 1], z);
+ VERT(r2 * c[segs * i + 2], r2 * s[segs * i + 2], z);
+ VERT(r1 * c[segs * i + 3], r1 * s[segs * i + 3], z);
+ }
+
+ for(i = 0; i < teeth * segs * divs; ++i) {
+ VERT(r0 * dc[i], r0 * ds[i], z);
+ }
+
+ for(i = 0; i < teeth; ++i) {
+ for(j = i * segs; j < (i + 1) * segs; ++j) {
+ int nextj = j + 1;
+ if(nextj == teeth * segs)
+ nextj = 0;
+
+ for(k = j * divs; k < (j + 1) * divs; ++k) {
+ int nextk = k + 1;
+ if(nextk == teeth * segs * divs)
+ nextk = 0;
+ indices.poly(teeth * segs + k, j, teeth * segs + nextk);
+ }
+
+ indices.poly(teeth * segs + nextj * divs, j, nextj);
+ }
+ }
+
+ indices.base += teeth * segs * (1 + divs);
+ }
+
+ /* teeth faces */
+ indices.flip = true;
+ float z = width * 0.5f;
+
+ float* coords = (float*)malloc((segs + 1) * 2 * sizeof(float));
+ nz = 0;
+ for(i = 0; i < teeth; i++) {
+ int next = i + 1;
+ if(next == teeth)
+ next = 0;
+
+ coords[0] = r1 * c[segs * i];
+ coords[1] = r1 * s[segs * i];
+ coords[2] = r2 * c[segs * i + 1];
+ coords[3] = r2 * s[segs * i + 1];
+ coords[4] = r2 * c[segs * i + 2];
+ coords[5] = r2 * s[segs * i + 2];
+ coords[6] = r1 * c[segs * i + 3];
+ coords[7] = r1 * s[segs * i + 3];
+ coords[8] = r1 * c[segs * next];
+ coords[9] = r1 * s[segs * next];
+
+ for(int j = 0; j < segs; ++j) {
+ float dx = coords[j * 2] - coords[j * 2 + 2];
+ float dy = coords[j * 2 + 1] - coords[j * 2 + 3];
+ float len = hypotf(dx, dy);
+ nx = -dy / len;
+ ny = dx / len;
+ VERT(coords[j * 2], coords[j * 2 + 1], z);
+ VERT(coords[j * 2], coords[j * 2 + 1], -z);
+ VERT(coords[j * 2 + 2], coords[j * 2 + 3], z);
+ VERT(coords[j * 2 + 2], coords[j * 2 + 3], -z);
+
+ indices.poly(0, 1, 3, 2);
+ indices.base += 4;
+ }
+ }
+ free(coords);
+
+ /* inner part - simulate a cylinder */
+ indices.flip = true;
+ for(i = 0; i < teeth * segs * divs; i++) {
+ int next = i + 1;
+ if(next == teeth * segs * divs)
+ next = 0;
+
+ nx = -dc[i];
+ ny = -ds[i];
+ VERT(r0 * dc[i], r0 * ds[i], -width * 0.5f);
+ VERT(r0 * dc[i], r0 * ds[i], width * 0.5f);
+
+ indices.poly(i * 2, i * 2 + 1, next * 2 + 1, next * 2);
+ }
+
+ indices.base += teeth * segs * divs * 2;
+ free(c);
+ free(s);
+ free(dc);
+ free(ds);
+
+ D3D11_INPUT_ELEMENT_DESC elements[2] =
+ {
+ {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ {"NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ };
+
+ return new mesh(dev, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
+ elements, 2,
+ g_vs, sizeof(g_vs),
+ &vertices[0], sizeof(vertices[0]), vertices.size(),
+ &indices[0], sizeof(indices[0]), indices.size());
+}
+
+struct d3d11gears : public d3d11_application
+{
+ float view_rotx;
+ float view_roty;
+ float view_rotz;
+ int wireframe;
+ int triangles;
+ float speed;
+ float period;
+ unsigned impressions;
+ bool blue_only;
+
+ float last_time;
+
+ int cur_width;
+ int cur_height;
+
+ ID3D11DepthStencilView* zsv;
+ ID3D11RenderTargetView* offscreen_rtv;
+ ID3D11ShaderResourceView* offscreen_srv;
+
+ ID3D11Device* dev;
+ ID3D11BlendState* blend;
+ ID3D11DepthStencilState* zsa;
+
+ ID3D11PixelShader* ps;
+ ID3D11VertexShader* vs;
+ ID3D11Buffer* cb;
+
+ d3d11_blitter* blitter;
+
+ d3d11gears()
+ : cur_width(-1), cur_height(-1), zsv(0), offscreen_rtv(0), offscreen_srv(0)
+ {
+ view_rotx = (float)(M_PI / 9.0);
+ view_roty = (float)(M_PI / 6.0);
+ view_rotz = 0.0f;
+ wireframe = 0;
+ triangles = 3200;
+ speed = 1.0f;
+ period = -1.0f;
+ impressions = 1;
+ blue_only = false;
+ }
+
+ void draw_one(ID3D11DeviceContext* ctx, cbuf_t& cbd, const float4x4& modelview, float angle)
+ {
+ for(unsigned i = blue_only ? 2 : 0; i < 3; ++i)
+ {
+ float4x4 m2 = modelview;
+ m2 = mat_push_translate(m2, gears[i].x, gears[i].y, 0.0f);
+ m2 = mat_push_rotate(m2, 2, angle * gears[i].wmul + gears[i].t0);
+
+ cbd.modelview = m2;
+ cbd.diffuse = gears[i].color;
+ cbd.specular = gears[i].color;
+ cbd.specular_power = 5.0f;
+
+ ctx->UpdateSubresource(cb, 0, 0, &cbd, 0, 0);
+
+ gears[i].mesh->bind_and_draw(ctx);
+ }
+ }
+
+ float get_angle(double time)
+ {
+ // designed so that 1 = original glxgears speed
+ float mod_speed = M_PI * 70.0f / 180.0f * speed;
+ if(period < 0)
+ return (float)(time * mod_speed);
+ else
+ return (float)(cos(time / period) * period * mod_speed);
+ }
+
+ void init_for_dimensions(unsigned width, unsigned height)
+ {
+ if(zsv)
+ zsv->Release();
+ ID3D11Texture2D* zsbuf;
+ D3D11_TEXTURE2D_DESC zsbufd;
+ memset(&zsbufd, 0, sizeof(zsbufd));
+ zsbufd.Width = width;
+ zsbufd.Height = height;
+ zsbufd.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
+ zsbufd.ArraySize = 1;
+ zsbufd.MipLevels = 1;
+ zsbufd.SampleDesc.Count = 1;
+ zsbufd.BindFlags = D3D11_BIND_DEPTH_STENCIL;
+ ensure(dev->CreateTexture2D(&zsbufd, 0, &zsbuf));
+ ensure(dev->CreateDepthStencilView(zsbuf, 0, &zsv));
+ zsbuf->Release();
+
+ ID3D11Texture2D* offscreen;
+ if(offscreen_rtv)
+ {
+ offscreen_rtv->Release();
+ offscreen_srv->Release();
+ offscreen_rtv = 0;
+ offscreen_srv = 0;
+ }
+
+ if(impressions > 1)
+ {
+ DXGI_FORMAT formats[] = {
+ DXGI_FORMAT_R32G32B32A32_FLOAT,
+ DXGI_FORMAT_R16G16B16A16_UNORM,
+ DXGI_FORMAT_R16G16B16A16_FLOAT,
+ DXGI_FORMAT_R10G10B10A2_UNORM,
+ };
+ DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM; // this won't work well at all
+ unsigned needed_support = D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_BLENDABLE | D3D11_FORMAT_SUPPORT_SHADER_SAMPLE;
+ for(unsigned i = 0; i < sizeof(formats); ++i)
+ {
+ unsigned support;
+ dev->CheckFormatSupport(DXGI_FORMAT_R32G32B32A32_FLOAT, &support);
+ if((support & needed_support) == needed_support)
+ {
+ format = formats[i];
+ break;
+ }
+ }
+
+
+ D3D11_TEXTURE2D_DESC offscreend;
+ memset(&offscreend, 0, sizeof(offscreend));
+ offscreend.Width = width;
+ offscreend.Height = height;
+
+ offscreend.Format = format;
+ offscreend.MipLevels = 1;
+ offscreend.ArraySize = 1;
+ offscreend.SampleDesc.Count = 1;
+ offscreend.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET;
+ ensure(dev->CreateTexture2D(&offscreend, 0, &offscreen));
+ ensure(dev->CreateRenderTargetView(offscreen, 0, &offscreen_rtv));
+ ensure(dev->CreateShaderResourceView(offscreen, 0, &offscreen_srv));
+ offscreen->Release();
+ }
+
+ cur_width = width;
+ cur_height = height;
+ }
+
+ void draw(ID3D11DeviceContext* ctx, ID3D11RenderTargetView* rtv, unsigned width, unsigned height, double time)
+ {
+ D3D11_VIEWPORT vp;
+ memset(&vp, 0, sizeof(vp));
+ vp.Width = (float)width;
+ vp.Height = (float)height;
+ vp.MaxDepth = 1.0f;
+
+ if((int)width != cur_width || (int)height != cur_height)
+ init_for_dimensions(width, height);
+
+ float4 lightpos = vec(5.0f, 5.0f, 10.0f, 0.0f);
+ float black[4] = {0.0, 0.0, 0.0, 0};
+
+ float4x4 proj;
+ float4x4 m;
+
+ float xr = (float)width / (float)height;
+ float yr = 1.0f;
+ if(xr < 1.0f) {
+ yr /= xr;
+ xr = 1.0f;
+ }
+ proj = mat4x4_frustum(-xr, xr, -yr, yr, 5.0f, 60.0f);
+
+ m = mat4x4_diag(1.0f);
+ m = mat_push_translate(m, 0.0f, 0.0f, -40.0f);
+ m = mat_push_rotate(m, 0, view_rotx);
+ m = mat_push_rotate(m, 1, view_roty);
+ m = mat_push_rotate(m, 2, view_rotz);
+
+ cbuf_t cbd;
+
+ cbd.projection = proj;
+ cbd.light = lightpos;
+
+ float blend_factor[4] = {1.0f / (float)impressions, 1.0f / (float)impressions, 1.0f / (float)impressions, 1.0f / (float)impressions};
+
+ ID3D11RenderTargetView* render_rtv;
+ if(impressions == 1)
+ render_rtv = rtv;
+ else
+ render_rtv = offscreen_rtv;
+
+ ctx->RSSetViewports(1, &vp);
+ ctx->ClearRenderTargetView(render_rtv, black);
+
+ ctx->PSSetShader(ps, 0, 0);
+ ctx->VSSetShader(vs, 0, 0);
+
+ ctx->PSSetConstantBuffers(0, 1, &cb);
+ ctx->VSSetConstantBuffers(0, 1, &cb);
+
+ if(impressions == 1)
+ {
+ ctx->OMSetBlendState(0, 0, ~0);
+ ctx->OMSetDepthStencilState(0, 0);
+ ctx->OMSetRenderTargets(1, &rtv, zsv);
+ ctx->ClearDepthStencilView(zsv, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0, 0);
+ draw_one(ctx, cbd, m, get_angle(time));
+ }
+ else
+ {
+ ctx->OMSetBlendState(blend, blend_factor, ~0);
+
+ float time_delta = (float)time - last_time;
+ float time_delta_per_impression = time_delta / impressions;
+ float base_time = last_time + time_delta_per_impression / 2;
+ for(unsigned impression = 0; impression < impressions; ++impression)
+ {
+ float impression_time = base_time + time_delta_per_impression * impression;
+
+ ctx->ClearDepthStencilView(zsv, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0, 0);
+
+ // do early z-pass since we must not write any pixel more than once due to blending
+ for(unsigned pass = 0; pass < 2; ++pass)
+ {
+ if(pass == 0)
+ {
+ ctx->OMSetRenderTargets(0, 0, zsv);
+ ctx->OMSetDepthStencilState(0, 0);
+ }
+ else
+ {
+ ctx->OMSetRenderTargets(1, &render_rtv, zsv);
+ ctx->OMSetDepthStencilState(zsa, 0);
+ }
+
+ draw_one(ctx, cbd, m, get_angle(impression_time));
+ }
+ }
+
+ blitter->bind_draw_and_unbind(ctx, offscreen_srv, rtv, 0, 0, (float)width, (float)height, false);
+ }
+ last_time = (float)time;
+ }
+
+ bool init(ID3D11Device* dev, int argc, char** argv)
+ {
+ this->dev = dev;
+
+ for(char** p = argv + 1; *p; ++p) {
+ if(!strcmp(*p, "-w"))
+ wireframe = 1;
+ else if(!strcmp(*p, "-b"))
+ blue_only = true;
+ else if(!strcmp(*p, "-t"))
+ triangles = atoi(*++p);
+ else if(!strcmp(*p, "-m"))
+ impressions = (float)atof(*++p);
+ else if(!strcmp(*p, "-p"))
+ period = (float)atof(*++p);
+ else if(!strcmp(*p, "-s"))
+ speed = (float)atof(*++p);
+ else {
+ fprintf(stderr, "Usage: d3d11gears [-v|-w] [-t TRIANGLES]\n");
+ fprintf(stderr, "d3d11gears is an enhanced port of glxgears to Direct3D 11\n");
+ fprintf(stderr, "\n");
+ //fprintf(stderr, "-v\t\tuse per-vertex diffuse-only lighting (classic glxgears look)\n");
+ fprintf(stderr, "-w\t\twireframe mode\n");
+ fprintf(stderr, "-t TRIANGLES\ttriangle budget (default is 3200)\n");
+ fprintf(stderr, "-m IMPRESSIONS\tmotion blur impressions (default is 1)\n");
+ fprintf(stderr, "-p PERIOD\tspeed reversal period (default is infinite)\n");
+ fprintf(stderr, "-s SPEED\tgear speed (default is 1.0)\n");
+ fprintf(stderr, "-b\tonly show blue gear (for faster motion blur)\n");
+ return false;
+ }
+ }
+
+ ensure(dev->CreatePixelShader(g_ps, sizeof(g_ps), NULL, &ps));
+ ensure(dev->CreateVertexShader(g_vs, sizeof(g_vs), NULL, &vs));
+
+ gears[0].color = vec(0.8f, 0.1f, 0.0f, 1.0f);
+ gears[1].color = vec(0.0f, 0.8f, 0.2f, 1.0f);
+ gears[2].color = vec(0.2f, 0.2f, 1.0f, 1.0f);
+
+ gears[0].mesh = build_gear(dev, triangles / 2, 1.0f, 4.0f, 1.0f, 20, 0.7f);
+ gears[1].mesh = build_gear(dev, triangles / 4, 0.5f, 2.0f, 2.0f, 10, 0.7f);
+ gears[2].mesh = build_gear(dev, triangles / 4, 1.3f, 2.0f, 0.5f, 10, 0.7f);
+
+ gears[0].x = -3.0f;
+ gears[0].y = -2.0f;
+ gears[0].wmul = 1.0f;
+ gears[0].t0 = 0.0 * M_PI / 180.0f;
+
+ gears[1].x = 3.1f;
+ gears[1].y = -2.0f;
+ gears[1].wmul = -2.0f;
+ gears[1].t0 = -9.0f * (float)M_PI / 180.0f;
+
+ gears[2].x = -3.1f;
+ gears[2].y = 4.2f;
+ gears[2].wmul = -2.0f;
+ gears[2].t0 = -25.0f * (float)M_PI / 180.0f;
+
+ D3D11_BUFFER_DESC bufferd;
+ memset(&bufferd, 0, sizeof(bufferd));
+ bufferd.ByteWidth = sizeof(cbuf_t);
+ bufferd.Usage = D3D11_USAGE_DEFAULT;
+ bufferd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ ensure(dev->CreateBuffer(&bufferd, 0, &cb));
+
+ if(impressions > 1)
+ {
+ D3D11_BLEND_DESC blendd;
+ memset(&blendd, 0, sizeof(blendd));
+ blendd.RenderTarget[0].BlendEnable = TRUE;
+ blendd.RenderTarget[0].BlendOp = blendd.RenderTarget[0].BlendOpAlpha
+ = D3D11_BLEND_OP_ADD;
+ blendd.RenderTarget[0].SrcBlend = blendd.RenderTarget[0].SrcBlendAlpha
+ = D3D11_BLEND_BLEND_FACTOR;
+ blendd.RenderTarget[0].DestBlend = blendd.RenderTarget[0].DestBlendAlpha
+ = D3D11_BLEND_ONE;
+ blendd.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
+ ensure(dev->CreateBlendState(&blendd, &blend));
+
+ D3D11_DEPTH_STENCIL_DESC zsad;
+ memset(&zsad, 0, sizeof(zsad));
+ zsad.DepthEnable = TRUE;
+ zsad.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
+ zsad.DepthFunc = D3D11_COMPARISON_EQUAL;
+ ensure(dev->CreateDepthStencilState(&zsad, &zsa));
+
+ blitter = new d3d11_blitter(dev);
+ }
+
+ return true;
+ }
+};
+
+d3d11_application* d3d11_application_create()
+{
+ return new d3d11gears();
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl
new file mode 100755
index 00000000000..679d417cd78
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl
@@ -0,0 +1,75 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+cbuffer cb
+{
+ float4x4 proj;
+ float4x4 modelview;
+ float4 light;
+ float4 diffuse;
+ float4 specular;
+ float specular_power;
+};
+
+struct IA2VS
+{
+ float4 position : POSITION;
+ float3 normal : NORMAL;
+};
+
+struct VS2PS
+{
+ float4 position : SV_POSITION;
+ float3 normal : NORMAL;
+ float3 eye : EYE;
+ float3 light : LIGHT;
+};
+
+VS2PS vs(IA2VS input)
+{
+ VS2PS result;
+
+ float3 view = mul((float3x4)modelview, input.position);
+ result.position = mul((float4x4)proj, float4(view, 1));
+ result.light = light - view;
+ result.eye = -view;
+ result.normal = mul((float3x3)modelview, input.normal);
+
+ return result;
+}
+
+float4 ps(VS2PS input) : SV_TARGET
+{
+ float3 nlight = normalize(input.light);
+ float3 nnormal = normalize(input.normal);
+
+ float diffuse_c = saturate(dot(nnormal, nlight));
+ float specular_c = pow(saturate(dot(nnormal, normalize(normalize(input.eye) + nlight))), specular_power);
+
+ return diffuse * diffuse_c + specular * specular_c;
+}
+
+
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.ps.h b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.ps.h
new file mode 100755
index 00000000000..890b1af276b
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.ps.h
@@ -0,0 +1,309 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11gears.hlsl.ps.h /Eps /Tps_4_0 d3d11gears.hlsl
+//
+//
+// Buffer Definitions:
+//
+// cbuffer cb
+// {
+//
+// float4x4 proj; // Offset: 0 Size: 64 [unused]
+// float4x4 modelview; // Offset: 64 Size: 64 [unused]
+// float4 light; // Offset: 128 Size: 16 [unused]
+// float4 diffuse; // Offset: 144 Size: 16
+// float4 specular; // Offset: 160 Size: 16
+// float specular_power; // Offset: 176 Size: 4
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// cb cbuffer NA NA 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// NORMAL 0 xyz 1 NONE float xyz
+// EYE 0 xyz 2 NONE float xyz
+// LIGHT 0 xyz 3 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_4_0
+dcl_constantbuffer cb0[12], immediateIndexed
+dcl_input_ps linear v1.xyz
+dcl_input_ps linear v2.xyz
+dcl_input_ps linear v3.xyz
+dcl_output o0.xyzw
+dcl_temps 3
+dp3 r0.x, v2.xyzx, v2.xyzx
+rsq r0.x, r0.x
+dp3 r0.y, v3.xyzx, v3.xyzx
+rsq r0.y, r0.y
+mul r0.yzw, r0.yyyy, v3.xxyz
+mad r1.xyz, v2.xyzx, r0.xxxx, r0.yzwy
+dp3 r0.x, r1.xyzx, r1.xyzx
+rsq r0.x, r0.x
+mul r1.xyz, r0.xxxx, r1.xyzx
+dp3 r0.x, v1.xyzx, v1.xyzx
+rsq r0.x, r0.x
+mul r2.xyz, r0.xxxx, v1.xyzx
+dp3_sat r0.x, r2.xyzx, r1.xyzx
+dp3_sat r0.y, r2.xyzx, r0.yzwy
+log r0.x, r0.x
+mul r0.x, r0.x, cb0[11].x
+exp r0.x, r0.x
+mul r1.xyzw, r0.xxxx, cb0[10].xyzw
+mad o0.xyzw, cb0[9].xyzw, r0.yyyy, r1.xyzw
+ret
+// Approximately 20 instruction slots used
+#endif
+
+const BYTE g_ps[] =
+{
+ 68, 88, 66, 67, 91, 23,
+ 206, 102, 23, 38, 122, 59,
+ 55, 123, 215, 57, 98, 213,
+ 215, 191, 1, 0, 0, 0,
+ 92, 5, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 192, 1, 0, 0, 80, 2,
+ 0, 0, 132, 2, 0, 0,
+ 224, 4, 0, 0, 82, 68,
+ 69, 70, 132, 1, 0, 0,
+ 1, 0, 0, 0, 64, 0,
+ 0, 0, 1, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 255, 255, 0, 1, 0, 0,
+ 80, 1, 0, 0, 60, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 99, 98, 0, 171, 60, 0,
+ 0, 0, 6, 0, 0, 0,
+ 88, 0, 0, 0, 192, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 232, 0,
+ 0, 0, 0, 0, 0, 0,
+ 64, 0, 0, 0, 0, 0,
+ 0, 0, 240, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1,
+ 0, 0, 64, 0, 0, 0,
+ 64, 0, 0, 0, 0, 0,
+ 0, 0, 240, 0, 0, 0,
+ 0, 0, 0, 0, 10, 1,
+ 0, 0, 128, 0, 0, 0,
+ 16, 0, 0, 0, 0, 0,
+ 0, 0, 16, 1, 0, 0,
+ 0, 0, 0, 0, 32, 1,
+ 0, 0, 144, 0, 0, 0,
+ 16, 0, 0, 0, 2, 0,
+ 0, 0, 16, 1, 0, 0,
+ 0, 0, 0, 0, 40, 1,
+ 0, 0, 160, 0, 0, 0,
+ 16, 0, 0, 0, 2, 0,
+ 0, 0, 16, 1, 0, 0,
+ 0, 0, 0, 0, 49, 1,
+ 0, 0, 176, 0, 0, 0,
+ 4, 0, 0, 0, 2, 0,
+ 0, 0, 64, 1, 0, 0,
+ 0, 0, 0, 0, 112, 114,
+ 111, 106, 0, 171, 171, 171,
+ 3, 0, 3, 0, 4, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 109, 111,
+ 100, 101, 108, 118, 105, 101,
+ 119, 0, 108, 105, 103, 104,
+ 116, 0, 1, 0, 3, 0,
+ 1, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 100, 105, 102, 102, 117, 115,
+ 101, 0, 115, 112, 101, 99,
+ 117, 108, 97, 114, 0, 115,
+ 112, 101, 99, 117, 108, 97,
+ 114, 95, 112, 111, 119, 101,
+ 114, 0, 0, 0, 3, 0,
+ 1, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 77, 105, 99, 114, 111, 115,
+ 111, 102, 116, 32, 40, 82,
+ 41, 32, 72, 76, 83, 76,
+ 32, 83, 104, 97, 100, 101,
+ 114, 32, 67, 111, 109, 112,
+ 105, 108, 101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, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.vs.h b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.vs.h
new file mode 100755
index 00000000000..3170d3a0b65
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.hlsl.vs.h
@@ -0,0 +1,308 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11gears.hlsl.vs.h /Evs /Tvs_4_0 d3d11gears.hlsl
+//
+//
+// Buffer Definitions:
+//
+// cbuffer cb
+// {
+//
+// float4x4 proj; // Offset: 0 Size: 64
+// float4x4 modelview; // Offset: 64 Size: 64
+// float4 light; // Offset: 128 Size: 16
+// float4 diffuse; // Offset: 144 Size: 16 [unused]
+// float4 specular; // Offset: 160 Size: 16 [unused]
+// float specular_power; // Offset: 176 Size: 4 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// cb cbuffer NA NA 0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyzw 0 NONE float xyzw
+// NORMAL 0 xyz 1 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// NORMAL 0 xyz 1 NONE float xyz
+// EYE 0 xyz 2 NONE float xyz
+// LIGHT 0 xyz 3 NONE float xyz
+//
+vs_4_0
+dcl_constantbuffer cb0[9], immediateIndexed
+dcl_input v0.xyzw
+dcl_input v1.xyz
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xyz
+dcl_output o2.xyz
+dcl_output o3.xyz
+dcl_temps 2
+mul r0.xyz, v0.yyyy, cb0[5].xyzx
+mad r0.xyz, cb0[4].xyzx, v0.xxxx, r0.xyzx
+mad r0.xyz, cb0[6].xyzx, v0.zzzz, r0.xyzx
+mad r0.xyz, cb0[7].xyzx, v0.wwww, r0.xyzx
+mul r1.xyzw, r0.yyyy, cb0[1].xyzw
+mad r1.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw
+mad r1.xyzw, cb0[2].xyzw, r0.zzzz, r1.xyzw
+add o0.xyzw, r1.xyzw, cb0[3].xyzw
+mul r1.xyz, v1.yyyy, cb0[5].xyzx
+mad r1.xyz, cb0[4].xyzx, v1.xxxx, r1.xyzx
+mad o1.xyz, cb0[6].xyzx, v1.zzzz, r1.xyzx
+mov o2.xyz, -r0.xyzx
+add o3.xyz, -r0.xyzx, cb0[8].xyzx
+ret
+// Approximately 14 instruction slots used
+#endif
+
+const BYTE g_vs[] =
+{
+ 68, 88, 66, 67, 251, 82,
+ 65, 114, 135, 66, 139, 83,
+ 7, 10, 20, 121, 102, 38,
+ 44, 36, 1, 0, 0, 0,
+ 104, 5, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 192, 1, 0, 0, 16, 2,
+ 0, 0, 160, 2, 0, 0,
+ 236, 4, 0, 0, 82, 68,
+ 69, 70, 132, 1, 0, 0,
+ 1, 0, 0, 0, 64, 0,
+ 0, 0, 1, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 254, 255, 0, 1, 0, 0,
+ 80, 1, 0, 0, 60, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0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 0, 0, 0,
+ 0, 0, 6, 0, 0, 0,
+ 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.vcxproj b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.vcxproj
new file mode 100755
index 00000000000..eb2c37a9615
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.vcxproj
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{706313AB-8F2C-48D2-9F67-31AA043F48C9}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>d3d11gears</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\d3d11app\d3d11winmain.cpp" />
+ <ClCompile Include="d3d11gears.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="d3d11gears.hlsl">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).ps.h /Eps /Tps_4_0 %(Identity)
+"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).vs.h /Evs /Tvs_4_0 %(Identity)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Identity).ps.h;%(Identity).vs.h;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\d3d11app\d3d11app.h" />
+ <ClInclude Include="d3d11gears.hlsl.ps.h" />
+ <ClInclude Include="d3d11gears.hlsl.vs.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.cpp
new file mode 100755
index 00000000000..31af95ca2c4
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.cpp
@@ -0,0 +1,227 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#define _USE_MATH_DEFINES
+#include "d3d11app.h"
+#include "d3d11spikysphere.hlsl.vs.h"
+#include "d3d11spikysphere.hlsl.hs.h"
+#include "d3d11spikysphere.hlsl.ds.h"
+#include "d3d11spikysphere.hlsl.ps.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+#include <D3DX10math.h>
+
+struct cb_frame_t
+{
+ D3DXMATRIX model;
+ D3DXMATRIX view_proj;
+ float disp_scale;
+ float disp_freq;
+ float tess_factor;
+};
+
+static float vertex_data[] =
+{
+ 1.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 0.0, 1.0,
+
+ 0.0, 1.0, 0.0,
+ -1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0,
+
+ 0.0, -1.0, 0.0,
+ 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0,
+
+ -1.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0,
+ 0.0, 0.0, 1.0,
+
+ 0.0, 1.0, 0.0,
+ 1.0, 0.0, 0.0,
+ 0.0, 0.0, -1.0,
+
+ -1.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 0.0, -1.0,
+
+ 1.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0,
+ 0.0, 0.0, -1.0,
+
+ 0.0, -1.0, 0.0,
+ -1.0, 0.0, 0.0,
+ 0.0, 0.0, -1.0,
+};
+
+struct d3d11spikysphere : public d3d11_application
+{
+ ID3D11Device* dev;
+ ID3D11PixelShader* ps;
+ ID3D11DomainShader* ds;
+ ID3D11HullShader* hs;
+ ID3D11VertexShader* vs;
+ ID3D11InputLayout* layout;
+ ID3D11Buffer* vb;
+ ID3D11RenderTargetView* rtv;
+ ID3D11DepthStencilView* zsv;
+ ID3D11Buffer* cb_frame;
+
+ int cur_width;
+ int cur_height;
+
+ d3d11spikysphere()
+ : cur_width(-1), cur_height(-1), zsv(0)
+ {}
+
+ bool init(ID3D11Device* dev, int argc, char** argv)
+ {
+ this->dev = dev;
+ ensure(dev->CreateVertexShader(g_vs, sizeof(g_vs), NULL, &vs));
+ ensure(dev->CreateHullShader(g_hs, sizeof(g_hs), NULL, &hs));
+ ensure(dev->CreateDomainShader(g_ds, sizeof(g_ds), NULL, &ds));
+ ensure(dev->CreatePixelShader(g_ps, sizeof(g_ps), NULL, &ps));
+
+ D3D11_INPUT_ELEMENT_DESC elements[1] =
+ {
+ {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0,
+ 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ };
+
+ ensure(dev->CreateInputLayout(elements, 1, g_vs, sizeof(g_vs), &layout));
+
+ D3D11_BUFFER_DESC bufferd;
+ bufferd.ByteWidth = sizeof(vertex_data);
+ bufferd.Usage = D3D11_USAGE_IMMUTABLE;
+ bufferd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufferd.CPUAccessFlags = 0;
+ bufferd.MiscFlags = 0;
+ bufferd.StructureByteStride = 0;
+
+ D3D11_SUBRESOURCE_DATA buffersd;
+ buffersd.pSysMem = vertex_data;
+
+ ensure(dev->CreateBuffer(&bufferd, &buffersd, &vb));
+
+ D3D11_BUFFER_DESC cbd;
+ cbd.ByteWidth = (sizeof(cb_frame_t) + 15) & ~15;
+ cbd.Usage = D3D11_USAGE_DYNAMIC;
+ cbd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ cbd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ cbd.MiscFlags = 0;
+ cbd.StructureByteStride = 0;
+
+ ensure(dev->CreateBuffer(&cbd, NULL, &cb_frame));
+ return true;
+ }
+
+ void draw(ID3D11DeviceContext* ctx, ID3D11RenderTargetView* rtv, unsigned width, unsigned height, double time)
+ {
+ D3D11_VIEWPORT vp;
+ memset(&vp, 0, sizeof(vp));
+ vp.Width = (float)width;
+ vp.Height = (float)height;
+ vp.MaxDepth = 1.0f;
+
+ if(width != cur_width || height != cur_height)
+ {
+ if(zsv)
+ zsv->Release();
+ ID3D11Texture2D* zsbuf;
+ D3D11_TEXTURE2D_DESC zsbufd;
+ memset(&zsbufd, 0, sizeof(zsbufd));
+ zsbufd.Width = width;
+ zsbufd.Height = height;
+ zsbufd.Format = DXGI_FORMAT_D32_FLOAT;
+ zsbufd.ArraySize = 1;
+ zsbufd.MipLevels = 1;
+ zsbufd.SampleDesc.Count = 1;
+ zsbufd.BindFlags = D3D11_BIND_DEPTH_STENCIL;
+ ensure(dev->CreateTexture2D(&zsbufd, 0, &zsbuf));
+ ensure(dev->CreateDepthStencilView(zsbuf, 0, &zsv));
+ zsbuf->Release();
+ }
+
+ float black[4] = {0, 0, 0, 0};
+
+ D3D11_MAPPED_SUBRESOURCE map;
+ ensure(ctx->Map(cb_frame, 0, D3D11_MAP_WRITE_DISCARD, 0, &map));
+ cb_frame_t* cb_frame_data = (cb_frame_t*)map.pData;
+ D3DXMatrixIdentity(&cb_frame_data->model);
+
+ D3DXMATRIX view;
+ D3DXVECTOR3 eye(2.0f * (float)sin(time), 0.0f, 2.0f * (float)cos(time));
+ D3DXVECTOR3 at(0, 0, 0);
+ D3DXVECTOR3 up(0, 1, 0);
+ D3DXMatrixLookAtLH(&view, &eye, &at, &up);
+ D3DXMATRIX proj;
+ D3DXMatrixPerspectiveLH(&proj, 1.1f, 1.1f, 1.0f, 3.0f);
+
+ cb_frame_data->view_proj = view * proj;
+ float min_tess_factor = 1.0f;
+ cb_frame_data->tess_factor = (1.0f - (float)cos(time)) * ((64.0f - min_tess_factor) / 2.0f) + min_tess_factor;
+ cb_frame_data->disp_scale = 0.9f;
+ //cb_frame_data->disp_scale = (sin(time) + 1.0) / 2.0;
+ cb_frame_data->disp_freq = 5.0f * (float)M_PI;
+ //cb_frame_data->disp_freq = (4.0 + 4.0 * cos(time / 5.0)) * PI;
+ ctx->Unmap(cb_frame, 0);
+
+ ctx->HSSetConstantBuffers(0, 1, &cb_frame);
+ ctx->DSSetConstantBuffers(0, 1, &cb_frame);
+
+ //ctx->OMSetBlendState(bs, black, ~0);
+ //ctx->OMSetDepthStencilState(dss, 0);
+ ctx->OMSetRenderTargets(1, &rtv, zsv);
+ //ctx->RSSetState(rs);
+ ctx->RSSetViewports(1, &vp);
+
+ ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST);
+ ctx->IASetInputLayout(layout);
+ unsigned stride = 3 * 4;
+ unsigned offset = 0;
+ ctx->IASetVertexBuffers(0, 1, &vb, &stride, &offset);
+
+ ctx->VSSetShader(vs, NULL, 0);
+ ctx->HSSetShader(hs, NULL, 0);
+ ctx->DSSetShader(ds, NULL, 0);
+ ctx->GSSetShader(NULL, NULL, 0);
+ ctx->PSSetShader(ps, NULL, 0);
+
+ ctx->ClearRenderTargetView(rtv, black);
+ ctx->ClearDepthStencilView(zsv, D3D11_CLEAR_DEPTH, 1.0f, 0);
+
+ ctx->Draw(3 * 8, 0);
+ }
+};
+
+d3d11_application* d3d11_application_create()
+{
+ return new d3d11spikysphere();
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl
new file mode 100755
index 00000000000..1edf42f7693
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl
@@ -0,0 +1,193 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#define INPUT_PATCH_SIZE 3
+#define OUTPUT_PATCH_SIZE 3
+
+static const float PI = 3.141592653589793238462643f;
+
+cbuffer cb_frame
+{
+ float4x4 model;
+ float4x4 view_proj;
+ float disp_scale;
+ float disp_freq;
+ float tess_factor;
+};
+
+struct IA2VS
+{
+ float3 position : POSITION;
+};
+
+struct VS2HS
+{
+ float3 position : POSITION;
+};
+
+VS2HS vs(IA2VS input)
+{
+ VS2HS result;
+ result.position = input.position;
+ return result;
+}
+
+struct HS2DS_PATCH
+{
+ float tessouter[3] : SV_TessFactor;
+ float tessinner[1] : SV_InsideTessFactor;
+};
+
+struct HS2DS
+{
+ float3 position : POSITION;
+};
+
+HS2DS_PATCH hs_patch(InputPatch<VS2HS, INPUT_PATCH_SIZE> ip)
+{
+ HS2DS_PATCH result;
+
+ result.tessouter[0] = result.tessouter[1] = result.tessouter[2]
+ = result.tessinner[0] = tess_factor;
+ return result;
+}
+
+[domain("tri")]
+[partitioning("fractional_even")]
+[outputtopology("triangle_cw")]
+[outputcontrolpoints(OUTPUT_PATCH_SIZE)]
+[patchconstantfunc("hs_patch")]
+HS2DS hs(InputPatch<VS2HS, INPUT_PATCH_SIZE> p, uint i : SV_OutputControlPointID)
+{
+ HS2DS result;
+ result.position = p[i].position;
+ return result;
+}
+
+struct DS2PS
+{
+ float4 position : SV_POSITION;
+ float3 objpos : OBJPOS;
+ // float3 worldpos : WORLDPOS;
+ float3 objnormal : OBJNORMAL;
+ float3 worldnormal : WORLDNORMAL;
+};
+
+float3 dnormf_dt(float3 f, float3 dfdt)
+{
+ float ff = dot(f, f);
+ return (ff * dfdt - dot(f, dfdt) * f) / (ff * sqrt(ff));
+}
+
+float3 map(float3 p, float3 q, float3 r, float3 k)
+{
+ return normalize(p * k.x + q * k.y + r * k.z);
+}
+
+float3 dmap_du(float3 p, float3 q, float3 r, float3 k)
+{
+ return dnormf_dt(p * k.x + q * k.y + r * k.z, p);
+}
+
+float dispf(float v)
+{
+ return cos(v * disp_freq);
+}
+
+float ddispf(float v)
+{
+ return -sin(v * disp_freq) * disp_freq;
+}
+
+float disp(float3 k)
+{
+ return dispf(k.x) * dispf(k.y) * dispf(k.z);
+}
+
+float ddisp_du(float3 k)
+{
+ return ddispf(k.x) * dispf(k.y) * dispf(k.z);
+}
+
+float3 ddisp(float3 k)
+{
+ float3 f = float3(dispf(k.x), dispf(k.y), dispf(k.z));
+ return float3(ddispf(k.x) * f.y * f.z, ddispf(k.y) * f.z * f.x, ddispf(k.z) * f.x * f.y);
+}
+
+[domain("tri")]
+DS2PS ds(HS2DS_PATCH input,
+ float3 k : SV_DomainLocation,
+ const OutputPatch<HS2DS, OUTPUT_PATCH_SIZE> patch)
+{
+ DS2PS result;
+
+ float3 s = map(patch[0].position, patch[1].position, patch[2].position, k);
+ float3 d = 1.0 + disp(s) * disp_scale;
+ result.objpos = s * d;
+ result.objpos /= (1.0 + disp_scale);
+ float3 worldpos = mul(model, float4(result.objpos, 1.0f));
+ result.position = mul(view_proj, float4(worldpos, 1.0f));
+
+ float3 dd = ddisp(s) * disp_scale;
+
+ /*
+ float3 ds_du = dmap_du(patch[0].position, patch[1].position, patch[2].position, k);
+ float3 ds_dv = dmap_du(patch[1].position, patch[2].position, patch[0].position, k.yzx);
+ float3 ds_dw = dmap_du(patch[2].position, patch[0].position, patch[1].position, k.zxy);
+
+ float3 ds_dU = ds_du - ds_dw;
+ float3 ds_dV = ds_dv - ds_dw;
+
+ float3 dc_dU = s * dot(dd, ds_dU) + ds_dU * d;
+ float3 dc_dV = s * dot(dd, ds_dV) + ds_dV * d;
+ */
+
+ // this should be faster
+ float3 _u = normalize((abs(s.x) > abs(s.y)) ? float3(-s.z, 0, s.x) : float3(0, -s.z, s.y));
+ float3 _v = normalize(cross(s, _u));
+ float3 dc_dU = s * dot(dd, _u) + _u * d;
+ float3 dc_dV = s * dot(dd, _v) + _v * d;
+
+ result.objnormal = normalize(cross(dc_dU, dc_dV));
+ result.worldnormal = mul(model, result.objnormal);
+ return result;
+}
+
+float4 ps(DS2PS input) : SV_TARGET
+{
+ float3 pseudoambient = float3(0.4, 0.4, 0.6);
+ float3 diffuse = float3(0.6, 0.6, 0.4);
+ float3 light = normalize(float3(0, 1, -1));
+
+ float4 r;
+// r.xyz = normalize(input.objpos + 2 * input.objnormal);
+ r.xyz = pseudoambient * saturate(dot(normalize(input.objnormal), normalize(input.objpos)));
+ r.xyz += saturate(dot(light, normalize(input.worldnormal))) * diffuse;
+
+ r.w = 1;
+ return r;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ds.h b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ds.h
new file mode 100755
index 00000000000..4ec1f6b87e3
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ds.h
@@ -0,0 +1,623 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11spikysphere.hlsl.ds.h /Eds /Tds_5_0 d3d11spikysphere.hlsl
+//
+//
+// Buffer Definitions:
+//
+// cbuffer cb_frame
+// {
+//
+// float4x4 model; // Offset: 0 Size: 64
+// float4x4 view_proj; // Offset: 64 Size: 64
+// float disp_scale; // Offset: 128 Size: 4
+// float disp_freq; // Offset: 132 Size: 4
+// float tess_factor; // Offset: 136 Size: 4 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// cb_frame cbuffer NA NA 0 1
+//
+//
+//
+// Patch Constant signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TessFactor 0 x 0 TRIEDGE float
+// SV_TessFactor 1 x 1 TRIEDGE float
+// SV_TessFactor 2 x 2 TRIEDGE float
+// SV_InsideTessFactor 0 x 3 TRIINT float
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyz 0 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// OBJPOS 0 xyz 1 NONE float xyz
+// OBJNORMAL 0 xyz 2 NONE float xyz
+// WORLDNORMAL 0 xyz 3 NONE float xyz
+//
+// Tessellation Domain # of control points
+// -------------------- --------------------
+// Triangle 3
+//
+ds_5_0
+dcl_input_control_point_count 3
+dcl_tessellator_domain domain_tri
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer cb0[9], immediateIndexed
+dcl_input vDomain.xyz
+dcl_input vicp[3][0].xyz
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xyz
+dcl_output o2.xyz
+dcl_output o3.xyz
+dcl_temps 5
+add r0.x, cb0[8].x, l(1.000000)
+mul r0.yzw, vDomain.yyyy, vicp[1][0].yyzx
+mad r0.yzw, vicp[0][0].yyzx, vDomain.xxxx, r0.yyzw
+mad r0.yzw, vicp[2][0].yyzx, vDomain.zzzz, r0.yyzw
+dp3 r1.x, r0.yzwy, r0.yzwy
+rsq r1.x, r1.x
+mul r0.yzw, r0.yyzw, r1.xxxx
+mul r1.xyz, r0.wyzw, cb0[8].yyyy
+sincos null, r2.xyz, r1.zxyz
+sincos r1.xyz, null, -r1.xyzx
+mul r1.xyz, r1.xyzx, cb0[8].yyyy
+mul r1.xyz, r2.zxyz, r1.xyzx
+mul r1.xyz, r2.xyzx, r1.xyzx
+mul r1.xyz, r1.xyzx, cb0[8].xxxx
+mul r1.w, r2.z, r2.y
+mul r1.w, r2.x, r1.w
+mad r1.w, r1.w, cb0[8].x, l(1.000000)
+mul r2.xyz, r0.wyzw, r1.wwww
+div r2.xyz, r2.xyzx, r0.xxxx
+mul r3.xyz, r2.yyyy, cb0[1].xyzx
+mad r3.xyz, cb0[0].xyzx, r2.xxxx, r3.xyzx
+mad r3.xyz, cb0[2].xyzx, r2.zzzz, r3.xyzx
+mov o1.xyz, r2.xyzx
+add r2.xyz, r3.xyzx, cb0[3].xyzx
+mul r3.xyzw, r2.yyyy, cb0[5].xyzw
+mad r3.xyzw, cb0[4].xyzw, r2.xxxx, r3.xyzw
+mad r2.xyzw, cb0[6].xyzw, r2.zzzz, r3.xyzw
+add o0.xyzw, r2.xyzw, cb0[7].xyzw
+mov r2.y, l(0)
+lt r0.x, |r0.y|, |r0.w|
+mul r2.xz, r0.zzwz, l(-1.000000, 0.000000, 1.000000, 0.000000)
+mov r2.w, r0.y
+movc r2.xyz, r0.xxxx, r2.zxyz, r2.wyxw
+dp3 r0.x, r2.xyzx, r2.xyzx
+rsq r0.x, r0.x
+mul r2.xyz, r0.xxxx, r2.xyzx
+mul r3.xyz, r0.wyzw, r2.xyzx
+mad r3.xyz, r0.zwyz, r2.yzxy, -r3.xyzx
+dp3 r0.x, r3.xyzx, r3.xyzx
+rsq r0.x, r0.x
+mul r3.xyz, r0.xxxx, r3.xyzx
+dp3 r0.x, r1.yzxy, r3.xyzx
+mul r3.xyz, r1.wwww, r3.xyzx
+mul r4.xyz, r1.wwww, r2.xyzx
+dp3 r1.x, r1.zxyz, r2.xyzx
+mad r1.xyz, r0.zwyz, r1.xxxx, r4.xyzx
+mad r0.xyz, r0.yzwy, r0.xxxx, r3.xyzx
+mul r2.xyz, r0.xyzx, r1.xyzx
+mad r0.xyz, r1.zxyz, r0.yzxy, -r2.xyzx
+dp3 r0.w, r0.xyzx, r0.xyzx
+rsq r0.w, r0.w
+mul r0.xyz, r0.wwww, r0.xyzx
+mov o2.xyz, r0.xyzx
+mul r1.xyz, r0.yyyy, cb0[1].xyzx
+mad r0.xyw, cb0[0].xyxz, r0.xxxx, r1.xyxz
+mad o3.xyz, cb0[2].xyzx, r0.zzzz, r0.xywx
+ret
+// Approximately 57 instruction slots used
+#endif
+
+const BYTE g_ds[] =
+{
+ 68, 88, 66, 67, 0, 128,
+ 111, 5, 170, 61, 238, 30,
+ 169, 104, 139, 245, 182, 233,
+ 180, 255, 1, 0, 0, 0,
+ 112, 11, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 68, 2, 0, 0, 120, 2,
+ 0, 0, 12, 3, 0, 0,
+ 168, 3, 0, 0, 212, 10,
+ 0, 0, 82, 68, 69, 70,
+ 4, 2, 0, 0, 1, 0,
+ 0, 0, 104, 0, 0, 0,
+ 1, 0, 0, 0, 60, 0,
+ 0, 0, 0, 5, 83, 68,
+ 0, 1, 0, 0, 210, 1,
+ 0, 0, 82, 68, 49, 49,
+ 60, 0, 0, 0, 24, 0,
+ 0, 0, 32, 0, 0, 0,
+ 40, 0, 0, 0, 36, 0,
+ 0, 0, 12, 0, 0, 0,
+ 0, 0, 0, 0, 92, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 99, 98, 95, 102, 114, 97,
+ 109, 101, 0, 171, 171, 171,
+ 92, 0, 0, 0, 5, 0,
+ 0, 0, 128, 0, 0, 0,
+ 144, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 72, 1, 0, 0, 0, 0,
+ 0, 0, 64, 0, 0, 0,
+ 2, 0, 0, 0, 88, 1,
+ 0, 0, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 124, 1,
+ 0, 0, 64, 0, 0, 0,
+ 64, 0, 0, 0, 2, 0,
+ 0, 0, 88, 1, 0, 0,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 134, 1, 0, 0,
+ 128, 0, 0, 0, 4, 0,
+ 0, 0, 2, 0, 0, 0,
+ 152, 1, 0, 0, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 188, 1, 0, 0, 132, 0,
+ 0, 0, 4, 0, 0, 0,
+ 2, 0, 0, 0, 152, 1,
+ 0, 0, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 255, 255, 255, 255,
+ 0, 0, 0, 0, 198, 1,
+ 0, 0, 136, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 152, 1, 0, 0,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 109, 111, 100, 101,
+ 108, 0, 102, 108, 111, 97,
+ 116, 52, 120, 52, 0, 171,
+ 3, 0, 3, 0, 4, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 78, 1, 0, 0,
+ 118, 105, 101, 119, 95, 112,
+ 114, 111, 106, 0, 100, 105,
+ 115, 112, 95, 115, 99, 97,
+ 108, 101, 0, 102, 108, 111,
+ 97, 116, 0, 171, 0, 0,
+ 3, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 145, 1, 0, 0, 100, 105,
+ 115, 112, 95, 102, 114, 101,
+ 113, 0, 116, 101, 115, 115,
+ 95, 102, 97, 99, 116, 111,
+ 114, 0, 77, 105, 99, 114,
+ 111, 115, 111, 102, 116, 32,
+ 40, 82, 41, 32, 72, 76,
+ 83, 76, 32, 83, 104, 97,
+ 100, 101, 114, 32, 67, 111,
+ 109, 112, 105, 108, 101, 114,
+ 32, 57, 46, 50, 57, 46,
+ 57, 53, 50, 46, 51, 49,
+ 49, 49, 0, 171, 73, 83,
+ 71, 78, 44, 0, 0, 0,
+ 1, 0, 0, 0, 8, 0,
+ 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 7, 7,
+ 0, 0, 80, 79, 83, 73,
+ 84, 73, 79, 78, 0, 171,
+ 171, 171, 80, 67, 83, 71,
+ 140, 0, 0, 0, 4, 0,
+ 0, 0, 8, 0, 0, 0,
+ 104, 0, 0, 0, 0, 0,
+ 0, 0, 13, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 104, 0, 0, 0, 1, 0,
+ 0, 0, 13, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 1, 0, 0, 0,
+ 104, 0, 0, 0, 2, 0,
+ 0, 0, 13, 0, 0, 0,
+ 3, 0, 0, 0, 2, 0,
+ 0, 0, 1, 0, 0, 0,
+ 118, 0, 0, 0, 0, 0,
+ 0, 0, 14, 0, 0, 0,
+ 3, 0, 0, 0, 3, 0,
+ 0, 0, 1, 0, 0, 0,
+ 83, 86, 95, 84, 101, 115,
+ 115, 70, 97, 99, 116, 111,
+ 114, 0, 83, 86, 95, 73,
+ 110, 115, 105, 100, 101, 84,
+ 101, 115, 115, 70, 97, 99,
+ 116, 111, 114, 0, 171, 171,
+ 79, 83, 71, 78, 148, 0,
+ 0, 0, 4, 0, 0, 0,
+ 8, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 4, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.hs.h b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.hs.h
new file mode 100755
index 00000000000..316bcdfedd7
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.hs.h
@@ -0,0 +1,297 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11spikysphere.hlsl.hs.h /Ehs /Ths_5_0 d3d11spikysphere.hlsl
+//
+//
+// Buffer Definitions:
+//
+// cbuffer cb_frame
+// {
+//
+// float4x4 model; // Offset: 0 Size: 64 [unused]
+// float4x4 view_proj; // Offset: 64 Size: 64 [unused]
+// float disp_scale; // Offset: 128 Size: 4 [unused]
+// float disp_freq; // Offset: 132 Size: 4 [unused]
+// float tess_factor; // Offset: 136 Size: 4
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// cb_frame cbuffer NA NA 0 1
+//
+//
+//
+// Patch Constant signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TessFactor 0 x 0 TRIEDGE float x
+// SV_TessFactor 1 x 1 TRIEDGE float x
+// SV_TessFactor 2 x 2 TRIEDGE float x
+// SV_InsideTessFactor 0 x 3 TRIINT float x
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyz 0 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyz 0 NONE float xyz
+//
+// Tessellation Domain # of control points
+// -------------------- --------------------
+// Triangle 3
+//
+// Tessellation Output Primitive Partitioning Type
+// ------------------------------ ------------------
+// Clockwise Triangles Even Fractional
+//
+hs_5_0
+hs_decls
+dcl_input_control_point_count 3
+dcl_output_control_point_count 3
+dcl_tessellator_domain domain_tri
+dcl_tessellator_partitioning partitioning_fractional_even
+dcl_tessellator_output_primitive output_triangle_cw
+dcl_globalFlags refactoringAllowed
+dcl_constantbuffer cb0[9], immediateIndexed
+hs_fork_phase
+dcl_hs_fork_phase_instance_count 3
+dcl_input vForkInstanceID
+dcl_output_siv o0.x, finalTriUeq0EdgeTessFactor
+dcl_output_siv o1.x, finalTriVeq0EdgeTessFactor
+dcl_output_siv o2.x, finalTriWeq0EdgeTessFactor
+dcl_temps 1
+dcl_indexrange o0.x 3
+mov r0.x, vForkInstanceID.x
+mov o[r0.x + 0].x, cb0[8].z
+ret
+hs_fork_phase
+dcl_output_siv o3.x, finalTriInsideTessFactor
+mov o3.x, cb0[8].z
+ret
+// Approximately 5 instruction slots used
+#endif
+
+const BYTE g_hs[] =
+{
+ 68, 88, 66, 67, 174, 23,
+ 253, 184, 171, 234, 181, 122,
+ 114, 17, 23, 172, 69, 130,
+ 17, 19, 1, 0, 0, 0,
+ 212, 4, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 68, 2, 0, 0, 120, 2,
+ 0, 0, 172, 2, 0, 0,
+ 64, 3, 0, 0, 56, 4,
+ 0, 0, 82, 68, 69, 70,
+ 4, 2, 0, 0, 1, 0,
+ 0, 0, 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, 0, 0, 0, 2, 0,
+ 0, 0, 152, 1, 0, 0,
+ 0, 0, 0, 0, 255, 255,
+ 255, 255, 0, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 109, 111, 100, 101,
+ 108, 0, 102, 108, 111, 97,
+ 116, 52, 120, 52, 0, 171,
+ 3, 0, 3, 0, 4, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 78, 1, 0, 0,
+ 118, 105, 101, 119, 95, 112,
+ 114, 111, 106, 0, 100, 105,
+ 115, 112, 95, 115, 99, 97,
+ 108, 101, 0, 102, 108, 111,
+ 97, 116, 0, 171, 0, 0,
+ 3, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 145, 1, 0, 0, 100, 105,
+ 115, 112, 95, 102, 114, 101,
+ 113, 0, 116, 101, 115, 115,
+ 95, 102, 97, 99, 116, 111,
+ 114, 0, 77, 105, 99, 114,
+ 111, 115, 111, 102, 116, 32,
+ 40, 82, 41, 32, 72, 76,
+ 83, 76, 32, 83, 104, 97,
+ 100, 101, 114, 32, 67, 111,
+ 109, 112, 105, 108, 101, 114,
+ 32, 57, 46, 50, 57, 46,
+ 57, 53, 50, 46, 51, 49,
+ 49, 49, 0, 171, 73, 83,
+ 71, 78, 44, 0, 0, 0,
+ 1, 0, 0, 0, 8, 0,
+ 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 7, 7,
+ 0, 0, 80, 79, 83, 73,
+ 84, 73, 79, 78, 0, 171,
+ 171, 171, 79, 83, 71, 78,
+ 44, 0, 0, 0, 1, 0,
+ 0, 0, 8, 0, 0, 0,
+ 32, 0, 0, 0, 0, 0,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gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ps.h b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ps.h
new file mode 100755
index 00000000000..df0ad052880
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.ps.h
@@ -0,0 +1,211 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11spikysphere.hlsl.ps.h /Eps /Tps_4_0 d3d11spikysphere.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// OBJPOS 0 xyz 1 NONE float xyz
+// OBJNORMAL 0 xyz 2 NONE float xyz
+// WORLDNORMAL 0 xyz 3 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_4_0
+dcl_input_ps linear v1.xyz
+dcl_input_ps linear v2.xyz
+dcl_input_ps linear v3.xyz
+dcl_output o0.xyzw
+dcl_temps 2
+dp3 r0.x, v2.xyzx, v2.xyzx
+rsq r0.x, r0.x
+mul r0.xyz, r0.xxxx, v2.xyzx
+dp3 r0.w, v1.xyzx, v1.xyzx
+rsq r0.w, r0.w
+mul r1.xyz, r0.wwww, v1.xyzx
+dp3_sat r0.x, r0.xyzx, r1.xyzx
+dp3 r0.y, v3.xyzx, v3.xyzx
+rsq r0.y, r0.y
+mul r0.yz, r0.yyyy, v3.yyzy
+dp2_sat r0.y, l(0.707107, -0.707107, 0.000000, 0.000000), r0.yzyy
+mul r0.yzw, r0.yyyy, l(0.000000, 0.600000, 0.600000, 0.400000)
+mad o0.xyz, r0.xxxx, l(0.400000, 0.400000, 0.600000, 0.000000), r0.yzwy
+mov o0.w, l(1.000000)
+ret
+// Approximately 15 instruction slots used
+#endif
+
+const BYTE g_ps[] =
+{
+ 68, 88, 66, 67, 211, 117,
+ 143, 38, 226, 40, 181, 77,
+ 39, 255, 33, 137, 74, 241,
+ 40, 100, 1, 0, 0, 0,
+ 184, 3, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 40, 1,
+ 0, 0, 92, 1, 0, 0,
+ 60, 3, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 255, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 148, 0, 0, 0, 4, 0,
+ 0, 0, 8, 0, 0, 0,
+ 104, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 0, 0, 0,
+ 116, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 0, 0, 7, 7, 0, 0,
+ 123, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 2, 0,
+ 0, 0, 7, 7, 0, 0,
+ 133, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 3, 0,
+ 0, 0, 7, 7, 0, 0,
+ 83, 86, 95, 80, 79, 83,
+ 73, 84, 73, 79, 78, 0,
+ 79, 66, 74, 80, 79, 83,
+ 0, 79, 66, 74, 78, 79,
+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0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.vs.h b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.vs.h
new file mode 100755
index 00000000000..15a4663c0db
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.hlsl.vs.h
@@ -0,0 +1,105 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11spikysphere.hlsl.vs.h /Evs /Tvs_4_0 d3d11spikysphere.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyz 0 NONE float xyz
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyz 0 NONE float xyz
+//
+vs_4_0
+dcl_input v0.xyz
+dcl_output o0.xyz
+mov o0.xyz, v0.xyzx
+ret
+// Approximately 2 instruction slots used
+#endif
+
+const BYTE g_vs[] =
+{
+ 68, 88, 66, 67, 71, 140,
+ 219, 201, 207, 71, 236, 3,
+ 158, 208, 157, 229, 54, 227,
+ 221, 132, 1, 0, 0, 0,
+ 176, 1, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 192, 0,
+ 0, 0, 244, 0, 0, 0,
+ 52, 1, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 254, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 44, 0, 0, 0, 1, 0,
+ 0, 0, 8, 0, 0, 0,
+ 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 7, 7, 0, 0,
+ 80, 79, 83, 73, 84, 73,
+ 79, 78, 0, 171, 171, 171,
+ 79, 83, 71, 78, 44, 0,
+ 0, 0, 1, 0, 0, 0,
+ 8, 0, 0, 0, 32, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 7, 8, 0, 0, 80, 79,
+ 83, 73, 84, 73, 79, 78,
+ 0, 171, 171, 171, 83, 72,
+ 68, 82, 56, 0, 0, 0,
+ 64, 0, 1, 0, 14, 0,
+ 0, 0, 95, 0, 0, 3,
+ 114, 16, 16, 0, 0, 0,
+ 0, 0, 101, 0, 0, 3,
+ 114, 32, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 5,
+ 114, 32, 16, 0, 0, 0,
+ 0, 0, 70, 18, 16, 0,
+ 0, 0, 0, 0, 62, 0,
+ 0, 1, 83, 84, 65, 84,
+ 116, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.vcxproj b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.vcxproj
new file mode 100755
index 00000000000..0cf8c709d4e
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11spikysphere/d3d11spikysphere.vcxproj
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{64988608-72A3-4125-8A31-45E1EACE8F0A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>d3d11spikysphere</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>d3d11.lib;d3dx10.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>d3d11.lib;d3dx10.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\d3d11app\d3d11winmain.cpp" />
+ <ClCompile Include="d3d11spikysphere.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="d3d11spikysphere.hlsl">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).ps.h /Eps /Tps_4_0 %(Identity)
+"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).vs.h /Evs /Tvs_4_0 %(Identity)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Identity).ps.h;%(Identity).vs.h;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\d3d11app\d3d11app.h" />
+ <ClInclude Include="d3d11spikysphere.hlsl.ds.h" />
+ <ClInclude Include="d3d11spikysphere.hlsl.hs.h" />
+ <ClInclude Include="d3d11spikysphere.hlsl.ps.h" />
+ <ClInclude Include="d3d11spikysphere.hlsl.vs.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.cpp
new file mode 100755
index 00000000000..db3742e2f12
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.cpp
@@ -0,0 +1,116 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "d3d11app.h"
+#include "d3d11u.h"
+#include "d3d11tex.hlsl.ps.h"
+#include "d3d11tex.hlsl.vs.h"
+#include "../data/cornell_box_image.h"
+#include "../data/tux_image.h"
+
+struct d3d11tex : public d3d11_application
+{
+ ID3D11PixelShader* ps;
+ ID3D11VertexShader* vs;
+ mesh* quad;
+ ID3D11ShaderResourceView* srv[2];
+ ID3D11SamplerState* samp[2];
+
+ virtual bool init(ID3D11Device* dev, int argc, char** argv)
+ {
+ ensure(dev->CreatePixelShader(g_ps, sizeof(g_ps), NULL, &ps));
+ ensure(dev->CreateVertexShader(g_vs, sizeof(g_vs), NULL, &vs));
+
+ quad = create_tex_quad(dev, g_vs, sizeof(g_vs));
+
+ D3D11_TEXTURE2D_DESC texd;
+ memset(&texd, 0, sizeof(texd));
+ texd.BindFlags = D3D11_BIND_SHADER_RESOURCE;
+ texd.Usage = D3D11_USAGE_IMMUTABLE;
+ texd.SampleDesc.Count = 1;
+ texd.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ texd.Width = 32;
+ texd.Height = 32;
+ texd.ArraySize = 1;
+ texd.MipLevels = 1;
+
+ D3D11_SUBRESOURCE_DATA texsd;
+ texsd.SysMemPitch = 32 * 4;
+ texsd.SysMemSlicePitch = 32 * 32 * 4;
+
+ ID3D11Texture2D* tex;
+
+ texsd.pSysMem = g_cornell_box_image;
+ ensure(dev->CreateTexture2D(&texd, &texsd, &tex));
+ ensure(dev->CreateShaderResourceView(tex, 0, &srv[0]));
+ tex->Release();
+
+ texsd.pSysMem = g_tux_image;
+ ensure(dev->CreateTexture2D(&texd, &texsd, &tex));
+ ensure(dev->CreateShaderResourceView(tex, 0, &srv[1]));
+ tex->Release();
+
+ D3D11_SAMPLER_DESC sampd;
+ memset(&sampd, 0, sizeof(sampd));
+ sampd.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
+ sampd.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
+ sampd.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
+ sampd.MinLOD = -FLT_MAX;
+ sampd.MaxLOD = FLT_MAX;
+
+ sampd.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
+ dev->CreateSamplerState(&sampd, &samp[0]);
+
+ sampd.Filter = D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT;
+ dev->CreateSamplerState(&sampd, &samp[1]);
+ return true;
+ }
+
+ virtual void draw(ID3D11DeviceContext* ctx, ID3D11RenderTargetView* rtv, unsigned width, unsigned height, double time)
+ {
+ D3D11_VIEWPORT vp;
+ memset(&vp, 0, sizeof(vp));
+ vp.Width = (float)width;
+ vp.Height = (float)height;
+ vp.MaxDepth = 1.0f;
+
+ ctx->OMSetRenderTargets(1, &rtv, 0);
+ ctx->RSSetViewports(1, &vp);
+
+ ctx->VSSetShader(vs, NULL, 0);
+ ctx->PSSetShader(ps, NULL, 0);
+
+ ctx->PSSetShaderResources(0, 2, srv);
+ ctx->PSSetSamplers(0, 2, samp);
+
+ quad->bind_and_draw(ctx);
+ }
+};
+
+d3d11_application* d3d11_application_create()
+{
+ return new d3d11tex();
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl
new file mode 100755
index 00000000000..1a6990cc396
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl
@@ -0,0 +1,66 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+Texture2D tex0;
+Texture2D tex1;
+sampler samp0;
+sampler samp1;
+
+struct IA2VS
+{
+ float4 position : POSITION;
+ float2 texcoord : TEXCOORD;
+};
+
+struct VS2PS
+{
+ float4 position : SV_POSITION;
+ float2 texcoord : TEXCOORD;
+ float4 factors : FACTORS;
+};
+
+VS2PS vs(IA2VS input)
+{
+ VS2PS result;
+ result.position = input.position;
+ result.texcoord = input.texcoord * 8;
+ result.factors.xy = input.texcoord;
+ result.factors.zw = 1 - input.texcoord;
+ return result;
+}
+
+float4 ps(VS2PS input) : SV_TARGET
+{
+ float4 a0 = tex0.Sample(samp0, input.texcoord);
+ float4 a1 = tex0.Sample(samp1, input.texcoord);
+ float4 a = a0 * input.factors.z + a1 * input.factors.x;
+
+ float4 b0 = tex1.Sample(samp0, input.texcoord);
+ float4 b1 = tex1.Sample(samp1, input.texcoord);
+ float4 b = b0 * input.factors.z + b1 * input.factors.x;
+
+ return a * input.factors.w + b * input.factors.y;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.ps.h b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.ps.h
new file mode 100755
index 00000000000..722ed9afd0f
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.ps.h
@@ -0,0 +1,234 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11tex.hlsl.ps.h /Eps /Tps_4_0 d3d11tex.hlsl
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim Slot Elements
+// ------------------------------ ---------- ------- ----------- ---- --------
+// samp0 sampler NA NA 0 1
+// samp1 sampler NA NA 1 1
+// tex0 texture float4 2d 0 1
+// tex1 texture float4 2d 1 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// TEXCOORD 0 xy 1 NONE float xy
+// FACTORS 0 xyzw 2 NONE float xyzw
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_4_0
+dcl_sampler s0, mode_default
+dcl_sampler s1, mode_default
+dcl_resource_texture2d (float,float,float,float) t0
+dcl_resource_texture2d (float,float,float,float) t1
+dcl_input_ps linear v1.xy
+dcl_input_ps linear v2.xyzw
+dcl_output o0.xyzw
+dcl_temps 3
+sample r0.xyzw, v1.xyxx, t1.xyzw, s1
+mul r0.xyzw, r0.xyzw, v2.xxxx
+sample r1.xyzw, v1.xyxx, t1.xyzw, s0
+mad r0.xyzw, r1.xyzw, v2.zzzz, r0.xyzw
+mul r0.xyzw, r0.xyzw, v2.yyyy
+sample r1.xyzw, v1.xyxx, t0.xyzw, s1
+mul r1.xyzw, r1.xyzw, v2.xxxx
+sample r2.xyzw, v1.xyxx, t0.xyzw, s0
+mad r1.xyzw, r2.xyzw, v2.zzzz, r1.xyzw
+mad o0.xyzw, r1.xyzw, v2.wwww, r0.xyzw
+ret
+// Approximately 11 instruction slots used
+#endif
+
+const BYTE g_ps[] =
+{
+ 68, 88, 66, 67, 139, 203,
+ 114, 37, 104, 101, 201, 12,
+ 197, 147, 116, 98, 80, 214,
+ 173, 207, 1, 0, 0, 0,
+ 16, 4, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 32, 1, 0, 0, 152, 1,
+ 0, 0, 204, 1, 0, 0,
+ 148, 3, 0, 0, 82, 68,
+ 69, 70, 228, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 4, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 255, 255, 0, 1, 0, 0,
+ 178, 0, 0, 0, 156, 0,
+ 0, 0, 3, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 162, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 168, 0, 0, 0,
+ 2, 0, 0, 0, 5, 0,
+ 0, 0, 4, 0, 0, 0,
+ 255, 255, 255, 255, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 12, 0, 0, 0, 173, 0,
+ 0, 0, 2, 0, 0, 0,
+ 5, 0, 0, 0, 4, 0,
+ 0, 0, 255, 255, 255, 255,
+ 1, 0, 0, 0, 1, 0,
+ 0, 0, 12, 0, 0, 0,
+ 115, 97, 109, 112, 48, 0,
+ 115, 97, 109, 112, 49, 0,
+ 116, 101, 120, 48, 0, 116,
+ 101, 120, 49, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
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 0, 70, 14,
+ 16, 0, 1, 0, 0, 0,
+ 50, 0, 0, 9, 242, 32,
+ 16, 0, 0, 0, 0, 0,
+ 70, 14, 16, 0, 1, 0,
+ 0, 0, 246, 31, 16, 0,
+ 2, 0, 0, 0, 70, 14,
+ 16, 0, 0, 0, 0, 0,
+ 62, 0, 0, 1, 83, 84,
+ 65, 84, 116, 0, 0, 0,
+ 11, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.vs.h b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.vs.h
new file mode 100755
index 00000000000..0e3ebcd66d8
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.hlsl.vs.h
@@ -0,0 +1,153 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11tex.hlsl.vs.h /Evs /Tvs_4_0 d3d11tex.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyzw 0 NONE float xyzw
+// TEXCOORD 0 xy 1 NONE float xy
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// TEXCOORD 0 xy 1 NONE float xy
+// FACTORS 0 xyzw 2 NONE float xyzw
+//
+vs_4_0
+dcl_input v0.xyzw
+dcl_input v1.xy
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xy
+dcl_output o2.xyzw
+mov o0.xyzw, v0.xyzw
+mul o1.xy, v1.xyxx, l(8.000000, 8.000000, 0.000000, 0.000000)
+mad o2.xyzw, v1.xyxy, l(1.000000, 1.000000, -1.000000, -1.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
+ret
+// Approximately 4 instruction slots used
+#endif
+
+const BYTE g_vs[] =
+{
+ 68, 88, 66, 67, 129, 141,
+ 49, 0, 46, 132, 26, 20,
+ 64, 38, 200, 86, 119, 202,
+ 172, 121, 1, 0, 0, 0,
+ 160, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 224, 0,
+ 0, 0, 88, 1, 0, 0,
+ 36, 2, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 254, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 76, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0,
+ 0, 0, 15, 15, 0, 0,
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, 0,
+ 0, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0,
+ 0, 15, 242, 32, 16, 0,
+ 2, 0, 0, 0, 70, 20,
+ 16, 0, 1, 0, 0, 0,
+ 2, 64, 0, 0, 0, 0,
+ 128, 63, 0, 0, 128, 63,
+ 0, 0, 128, 191, 0, 0,
+ 128, 191, 2, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 128, 63,
+ 0, 0, 128, 63, 62, 0,
+ 0, 1, 83, 84, 65, 84,
+ 116, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.vcxproj b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.vcxproj
new file mode 100755
index 00000000000..ea6cc038687
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tex/d3d11tex.vcxproj
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{14F73B97-2DC6-423E-97D9-64E3368713DC}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>d3d11tex</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <CustomBuild Include="d3d11tex.hlsl">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).ps.h /Eps /Tps_4_0 %(Identity)
+"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).vs.h /Evs /Tvs_4_0 %(Identity)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Identity).ps.h;%(Identity).vs.h;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\d3d11app\d3d11app.h" />
+ <ClInclude Include="d3d11tex.hlsl.ps.h" />
+ <ClInclude Include="d3d11tex.hlsl.vs.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\d3d11app\d3d11winmain.cpp" />
+ <ClCompile Include="d3d11tex.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp
new file mode 100755
index 00000000000..5622074e19d
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp
@@ -0,0 +1,120 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include "d3d11app.h"
+#include "d3d11tri.hlsl.ps.h"
+#include "d3d11tri.hlsl.vs.h"
+
+struct vertex {
+ float position[4];
+ float color[4];
+};
+
+static struct vertex vertices[3] =
+{
+ {
+ { 0.0f, 0.9f, 0.5f, 1.0f },
+ { 1.0f, 0.0f, 0.0f, 1.0f }
+ },
+ {
+ { 0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f }
+ },
+ {
+ { -0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f }
+ },
+};
+
+struct d3d11tri : public d3d11_application
+{
+ ID3D11PixelShader* ps;
+ ID3D11VertexShader* vs;
+ ID3D11InputLayout* layout;
+ ID3D11Buffer* vb;
+
+ virtual bool init(ID3D11Device* dev, int argc, char** argv)
+ {
+ ensure(dev->CreatePixelShader(g_ps, sizeof(g_ps), NULL, &ps));
+ ensure(dev->CreateVertexShader(g_vs, sizeof(g_vs), NULL, &vs));
+
+ D3D11_INPUT_ELEMENT_DESC elements[] =
+ {
+ // inverse order to make sure the implementation can properly parse the vertex shader signature
+ {"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ {"POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
+ };
+
+ ensure(dev->CreateInputLayout(elements, sizeof(elements) / sizeof(elements[0]), g_vs, sizeof(g_vs), &layout));
+ D3D11_BUFFER_DESC bufferd;
+ bufferd.ByteWidth = sizeof(vertices);
+ bufferd.Usage = D3D11_USAGE_IMMUTABLE;
+ bufferd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ bufferd.CPUAccessFlags = 0;
+ bufferd.MiscFlags = 0;
+ bufferd.StructureByteStride = 0;
+
+ D3D11_SUBRESOURCE_DATA buffersd;
+ buffersd.pSysMem = vertices;
+ buffersd.SysMemPitch = sizeof(vertices);
+ buffersd.SysMemSlicePitch = sizeof(vertices);
+
+ ensure(dev->CreateBuffer(&bufferd, &buffersd, &vb));
+
+ return true;
+ }
+
+ virtual void draw(ID3D11DeviceContext* ctx, ID3D11RenderTargetView* rtv, unsigned width, unsigned height, double time)
+ {
+ float clear_color[4] = {1, 0, 1, 1};
+ D3D11_VIEWPORT vp;
+ memset(&vp, 0, sizeof(vp));
+ vp.Width = (float)width;
+ vp.Height = (float)height;
+ vp.MaxDepth = 1.0f;
+
+ ctx->OMSetRenderTargets(1, &rtv, 0);
+ ctx->RSSetViewports(1, &vp);
+
+ ctx->ClearRenderTargetView(rtv, clear_color);
+
+ ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ctx->IASetInputLayout(layout);
+ unsigned stride = 2 * 4 * 4;
+ unsigned offset = 0;
+ ctx->IASetVertexBuffers(0, 1, &vb, &stride, &offset);
+
+ ctx->VSSetShader(vs, NULL, 0);
+ ctx->PSSetShader(ps, NULL, 0);
+
+ ctx->Draw(3, 0);
+ }
+};
+
+d3d11_application* d3d11_application_create()
+{
+ return new d3d11tri();
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl
new file mode 100755
index 00000000000..6bdd448ce0a
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl
@@ -0,0 +1,50 @@
+/**************************************************************************
+ *
+ * Copyright 2010 Luca Barbieri
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+struct IA2VS
+{
+ float4 position : POSITION;
+ float4 color : COLOR;
+};
+
+struct VS2PS
+{
+ float4 position : SV_POSITION;
+ float4 color : COLOR;
+};
+
+VS2PS vs(IA2VS input)
+{
+ VS2PS result;
+ result.position = input.position;
+ result.color = input.color;
+ return result;
+}
+
+float4 ps(VS2PS input) : SV_TARGET
+{
+ return input.color;
+}
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.ps.h b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.ps.h
new file mode 100755
index 00000000000..21f6141f380
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.ps.h
@@ -0,0 +1,112 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11tri.hlsl.ps.h /Eps /Tps_4_0 d3d11tri.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float
+// COLOR 0 xyzw 1 NONE float xyzw
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_TARGET 0 xyzw 0 TARGET float xyzw
+//
+ps_4_0
+dcl_input_ps linear v1.xyzw
+dcl_output o0.xyzw
+mov o0.xyzw, v1.xyzw
+ret
+// Approximately 2 instruction slots used
+#endif
+
+const BYTE g_ps[] =
+{
+ 68, 88, 66, 67, 206, 120,
+ 117, 238, 118, 127, 10, 87,
+ 80, 75, 114, 198, 95, 2,
+ 120, 102, 1, 0, 0, 0,
+ 208, 1, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 224, 0,
+ 0, 0, 20, 1, 0, 0,
+ 84, 1, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 255, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 32, 40, 82, 41, 32,
+ 72, 76, 83, 76, 32, 83,
+ 104, 97, 100, 101, 114, 32,
+ 67, 111, 109, 112, 105, 108,
+ 101, 114, 32, 57, 46, 50,
+ 57, 46, 57, 53, 50, 46,
+ 51, 49, 49, 49, 0, 171,
+ 171, 171, 73, 83, 71, 78,
+ 76, 0, 0, 0, 2, 0,
+ 0, 0, 8, 0, 0, 0,
+ 56, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 3, 0, 0, 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
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.vs.h b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.vs.h
new file mode 100755
index 00000000000..edf18e01f76
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.hlsl.vs.h
@@ -0,0 +1,128 @@
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
+//
+//
+// fxc /Fhd3d11tri.hlsl.vs.h /Evs /Tvs_4_0 d3d11tri.hlsl
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// POSITION 0 xyzw 0 NONE float xyzw
+// COLOR 0 xyzw 1 NONE float xyzw
+//
+//
+// Output signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------ ------
+// SV_POSITION 0 xyzw 0 POS float xyzw
+// COLOR 0 xyzw 1 NONE float xyzw
+//
+vs_4_0
+dcl_input v0.xyzw
+dcl_input v1.xyzw
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xyzw
+mov o0.xyzw, v0.xyzw
+mov o1.xyzw, v1.xyzw
+ret
+// Approximately 3 instruction slots used
+#endif
+
+const BYTE g_vs[] =
+{
+ 68, 88, 66, 67, 190, 171,
+ 186, 20, 44, 105, 95, 129,
+ 137, 204, 223, 72, 251, 159,
+ 126, 176, 1, 0, 0, 0,
+ 28, 2, 0, 0, 5, 0,
+ 0, 0, 52, 0, 0, 0,
+ 140, 0, 0, 0, 220, 0,
+ 0, 0, 48, 1, 0, 0,
+ 160, 1, 0, 0, 82, 68,
+ 69, 70, 80, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 28, 0, 0, 0, 0, 4,
+ 254, 255, 0, 1, 0, 0,
+ 28, 0, 0, 0, 77, 105,
+ 99, 114, 111, 115, 111, 102,
+ 116, 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 0, 0, 54, 0, 0, 5,
+ 242, 32, 16, 0, 1, 0,
+ 0, 0, 70, 30, 16, 0,
+ 1, 0, 0, 0, 62, 0,
+ 0, 1, 83, 84, 65, 84,
+ 116, 0, 0, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.vcxproj b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.vcxproj
new file mode 100755
index 00000000000..3ed69fc6f2c
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.vcxproj
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{1C11FC42-BFB5-4668-97F6-C5B564754F8F}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>d3d11tri</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)\d3d11app</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <CustomBuild Include="d3d11tri.hlsl">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).ps.h /Eps /Tps_4_0 %(Identity)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Identity).ps.h;%(Identity).vs.h;%(Outputs)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(DXSDK_DIR)\Utilities\bin\x86\fxc.exe" /Fh%(Identity).ps.h /Eps /Tps_4_0 %(Identity)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Identity).ps.h;%(Identity).vs.h;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\d3d11app\d3d11app.h" />
+ <ClInclude Include="d3d11tri.hlsl.ps.h" />
+ <ClInclude Include="d3d11tri.hlsl.vs.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\d3d11app\d3d11winmain.cpp" />
+ <ClCompile Include="d3d11tri.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/gallium/state_trackers/d3d1x/progs/data/cornell_box_image.h b/src/gallium/state_trackers/d3d1x/progs/data/cornell_box_image.h
new file mode 100755
index 00000000000..007b151f093
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/data/cornell_box_image.h
@@ -0,0 +1,1028 @@
+unsigned char g_cornell_box_image[] =
+{
+ 159, 93, 68, 255,
+ 171, 158, 120, 255,
+ 167, 153, 115, 255,
+ 167, 158, 121, 255,
+ 166, 161, 122, 255,
+ 164, 163, 122, 255,
+ 163, 166, 124, 255,
+ 165, 166, 125, 255,
+ 164, 167, 125, 255,
+ 161, 171, 126, 255,
+ 161, 170, 126, 255,
+ 162, 171, 125, 255,
+ 162, 172, 125, 255,
+ 160, 172, 125, 255,
+ 161, 174, 127, 255,
+ 159, 175, 124, 255,
+ 158, 175, 124, 255,
+ 156, 177, 124, 255,
+ 155, 177, 123, 255,
+ 154, 178, 122, 255,
+ 154, 178, 122, 255,
+ 153, 178, 120, 255,
+ 151, 180, 120, 255,
+ 150, 181, 120, 255,
+ 149, 181, 121, 255,
+ 146, 181, 118, 255,
+ 146, 181, 118, 255,
+ 143, 182, 116, 255,
+ 141, 183, 114, 255,
+ 137, 183, 112, 255,
+ 139, 186, 111, 255,
+ 89, 176, 70, 255,
+ 156, 49, 33, 255,
+ 154, 90, 62, 255,
+ 172, 149, 110, 255,
+ 169, 145, 105, 255,
+ 168, 149, 109, 255,
+ 166, 153, 112, 255,
+ 165, 156, 114, 255,
+ 164, 159, 115, 255,
+ 164, 162, 117, 255,
+ 163, 165, 118, 255,
+ 161, 166, 121, 255,
+ 160, 169, 122, 255,
+ 160, 170, 121, 255,
+ 160, 171, 120, 255,
+ 158, 173, 119, 255,
+ 159, 174, 120, 255,
+ 158, 174, 120, 255,
+ 154, 177, 119, 255,
+ 154, 177, 117, 255,
+ 151, 178, 115, 255,
+ 151, 179, 115, 255,
+ 148, 181, 113, 255,
+ 146, 181, 114, 255,
+ 142, 182, 113, 255,
+ 141, 181, 110, 255,
+ 140, 182, 108, 255,
+ 136, 183, 106, 255,
+ 132, 184, 102, 255,
+ 127, 185, 99, 255,
+ 132, 187, 101, 255,
+ 85, 173, 66, 255,
+ 44, 170, 34, 255,
+ 173, 59, 45, 255,
+ 157, 48, 32, 255,
+ 155, 90, 62, 255,
+ 171, 148, 108, 255,
+ 168, 143, 103, 255,
+ 167, 148, 105, 255,
+ 166, 151, 108, 255,
+ 167, 154, 110, 255,
+ 166, 158, 111, 255,
+ 164, 161, 113, 255,
+ 162, 164, 113, 255,
+ 162, 166, 116, 255,
+ 162, 168, 118, 255,
+ 157, 168, 109, 255,
+ 150, 167, 101, 255,
+ 150, 169, 102, 255,
+ 149, 169, 102, 255,
+ 145, 173, 100, 255,
+ 150, 177, 107, 255,
+ 151, 181, 112, 255,
+ 150, 182, 110, 255,
+ 149, 183, 108, 255,
+ 146, 184, 107, 255,
+ 143, 184, 106, 255,
+ 139, 185, 104, 255,
+ 135, 185, 102, 255,
+ 132, 186, 100, 255,
+ 128, 186, 97, 255,
+ 133, 189, 99, 255,
+ 88, 175, 62, 255,
+ 42, 171, 33, 255,
+ 56, 184, 44, 255,
+ 178, 64, 46, 255,
+ 175, 62, 45, 255,
+ 164, 51, 35, 255,
+ 158, 91, 65, 255,
+ 173, 148, 109, 255,
+ 169, 143, 103, 255,
+ 169, 147, 106, 255,
+ 167, 151, 106, 255,
+ 166, 154, 109, 255,
+ 164, 159, 111, 255,
+ 165, 162, 111, 255,
+ 165, 166, 112, 255,
+ 160, 165, 106, 255,
+ 200, 203, 172, 255,
+ 245, 248, 244, 255,
+ 242, 243, 236, 255,
+ 241, 243, 236, 255,
+ 246, 247, 244, 255,
+ 197, 212, 170, 255,
+ 155, 184, 101, 255,
+ 157, 189, 107, 255,
+ 155, 190, 105, 255,
+ 152, 191, 103, 255,
+ 149, 192, 101, 255,
+ 144, 193, 99, 255,
+ 140, 191, 95, 255,
+ 134, 192, 93, 255,
+ 136, 194, 96, 255,
+ 91, 179, 65, 255,
+ 46, 177, 34, 255,
+ 57, 188, 45, 255,
+ 59, 193, 45, 255,
+ 186, 65, 49, 255,
+ 187, 66, 49, 255,
+ 191, 66, 51, 255,
+ 176, 51, 37, 255,
+ 160, 88, 61, 255,
+ 172, 148, 108, 255,
+ 169, 144, 102, 255,
+ 168, 147, 105, 255,
+ 167, 151, 106, 255,
+ 167, 156, 108, 255,
+ 168, 160, 111, 255,
+ 167, 165, 110, 255,
+ 167, 169, 110, 255,
+ 181, 186, 132, 255,
+ 217, 220, 190, 255,
+ 215, 219, 185, 255,
+ 217, 222, 185, 255,
+ 220, 227, 187, 255,
+ 188, 204, 131, 255,
+ 172, 198, 104, 255,
+ 172, 202, 105, 255,
+ 167, 203, 102, 255,
+ 163, 203, 102, 255,
+ 157, 202, 99, 255,
+ 153, 201, 96, 255,
+ 146, 199, 93, 255,
+ 148, 199, 96, 255,
+ 95, 183, 62, 255,
+ 47, 191, 38, 255,
+ 62, 201, 51, 255,
+ 61, 200, 49, 255,
+ 61, 198, 51, 255,
+ 192, 66, 51, 255,
+ 198, 68, 54, 255,
+ 209, 70, 56, 255,
+ 207, 70, 55, 255,
+ 181, 52, 37, 255,
+ 161, 90, 62, 255,
+ 172, 146, 106, 255,
+ 171, 145, 104, 255,
+ 171, 150, 107, 255,
+ 171, 155, 109, 255,
+ 171, 159, 111, 255,
+ 171, 164, 111, 255,
+ 171, 168, 113, 255,
+ 172, 172, 110, 255,
+ 172, 173, 107, 255,
+ 172, 180, 106, 255,
+ 173, 187, 106, 255,
+ 177, 192, 107, 255,
+ 181, 198, 109, 255,
+ 181, 202, 110, 255,
+ 179, 203, 110, 255,
+ 175, 204, 105, 255,
+ 169, 204, 104, 255,
+ 163, 202, 101, 255,
+ 153, 202, 97, 255,
+ 151, 199, 97, 255,
+ 97, 181, 63, 255,
+ 51, 190, 38, 255,
+ 66, 222, 53, 255,
+ 68, 218, 56, 255,
+ 64, 209, 53, 255,
+ 62, 205, 51, 255,
+ 197, 67, 54, 255,
+ 205, 71, 58, 255,
+ 220, 75, 58, 255,
+ 229, 75, 63, 255,
+ 211, 71, 54, 255,
+ 172, 48, 31, 255,
+ 162, 114, 79, 255,
+ 160, 148, 102, 255,
+ 159, 149, 102, 255,
+ 157, 153, 104, 255,
+ 158, 154, 107, 255,
+ 158, 157, 107, 255,
+ 158, 160, 108, 255,
+ 160, 161, 112, 255,
+ 158, 164, 110, 255,
+ 158, 166, 110, 255,
+ 158, 167, 108, 255,
+ 158, 168, 109, 255,
+ 156, 171, 106, 255,
+ 153, 170, 104, 255,
+ 151, 170, 102, 255,
+ 149, 171, 99, 255,
+ 145, 171, 99, 255,
+ 142, 171, 97, 255,
+ 140, 173, 97, 255,
+ 111, 173, 78, 255,
+ 46, 178, 29, 255,
+ 68, 223, 55, 255,
+ 72, 242, 62, 255,
+ 71, 231, 60, 255,
+ 66, 218, 55, 255,
+ 64, 208, 54, 255,
+ 202, 68, 55, 255,
+ 212, 73, 56, 255,
+ 229, 77, 61, 255,
+ 244, 81, 67, 255,
+ 233, 77, 62, 255,
+ 194, 59, 41, 255,
+ 174, 113, 86, 255,
+ 171, 151, 111, 255,
+ 172, 155, 115, 255,
+ 174, 162, 122, 255,
+ 175, 169, 127, 255,
+ 179, 175, 132, 255,
+ 181, 182, 138, 255,
+ 186, 187, 145, 255,
+ 186, 192, 148, 255,
+ 188, 195, 150, 255,
+ 188, 196, 149, 255,
+ 184, 197, 146, 255,
+ 180, 194, 142, 255,
+ 176, 191, 138, 255,
+ 167, 189, 128, 255,
+ 161, 185, 121, 255,
+ 153, 183, 113, 255,
+ 148, 182, 111, 255,
+ 141, 183, 106, 255,
+ 108, 183, 78, 255,
+ 54, 202, 43, 255,
+ 74, 243, 61, 255,
+ 78, 255, 66, 255,
+ 73, 241, 63, 255,
+ 68, 223, 55, 255,
+ 63, 214, 52, 255,
+ 203, 70, 56, 255,
+ 218, 74, 61, 255,
+ 237, 79, 64, 255,
+ 253, 85, 68, 255,
+ 247, 80, 67, 255,
+ 209, 62, 47, 255,
+ 184, 121, 95, 255,
+ 184, 160, 129, 255,
+ 187, 166, 134, 255,
+ 190, 176, 142, 255,
+ 195, 186, 150, 255,
+ 201, 195, 158, 255,
+ 206, 204, 166, 255,
+ 212, 211, 175, 255,
+ 213, 218, 178, 255,
+ 215, 221, 181, 255,
+ 217, 224, 183, 255,
+ 211, 223, 179, 255,
+ 207, 220, 173, 255,
+ 199, 213, 166, 255,
+ 188, 210, 154, 255,
+ 180, 205, 145, 255,
+ 168, 201, 133, 255,
+ 158, 198, 125, 255,
+ 151, 197, 119, 255,
+ 117, 193, 91, 255,
+ 60, 217, 46, 255,
+ 78, 255, 66, 255,
+ 78, 255, 69, 255,
+ 74, 248, 65, 255,
+ 68, 228, 58, 255,
+ 65, 215, 54, 255,
+ 204, 70, 56, 255,
+ 219, 74, 62, 255,
+ 241, 80, 66, 255,
+ 255, 87, 70, 255,
+ 255, 82, 71, 255,
+ 221, 65, 52, 255,
+ 190, 129, 103, 255,
+ 192, 169, 139, 255,
+ 197, 175, 144, 255,
+ 202, 186, 154, 255,
+ 209, 198, 163, 255,
+ 215, 209, 177, 255,
+ 223, 218, 186, 255,
+ 228, 228, 192, 255,
+ 231, 235, 200, 255,
+ 234, 239, 202, 255,
+ 234, 241, 200, 255,
+ 228, 239, 197, 255,
+ 224, 236, 191, 255,
+ 215, 228, 182, 255,
+ 203, 224, 169, 255,
+ 191, 218, 156, 255,
+ 179, 213, 145, 255,
+ 168, 208, 135, 255,
+ 160, 204, 129, 255,
+ 123, 201, 96, 255,
+ 63, 229, 49, 255,
+ 79, 255, 69, 255,
+ 80, 255, 70, 255,
+ 77, 251, 66, 255,
+ 70, 230, 61, 255,
+ 66, 216, 55, 255,
+ 205, 71, 57, 255,
+ 222, 74, 63, 255,
+ 243, 81, 67, 255,
+ 255, 86, 71, 255,
+ 255, 85, 70, 255,
+ 227, 66, 52, 255,
+ 197, 132, 108, 255,
+ 198, 175, 145, 255,
+ 205, 183, 153, 255,
+ 210, 195, 164, 255,
+ 219, 205, 176, 255,
+ 225, 217, 185, 255,
+ 231, 227, 195, 255,
+ 237, 237, 203, 255,
+ 244, 242, 209, 255,
+ 243, 247, 211, 255,
+ 243, 251, 210, 255,
+ 238, 249, 206, 255,
+ 231, 246, 202, 255,
+ 224, 238, 188, 255,
+ 211, 232, 176, 255,
+ 199, 224, 166, 255,
+ 187, 220, 155, 255,
+ 175, 215, 144, 255,
+ 167, 211, 138, 255,
+ 127, 204, 103, 255,
+ 64, 237, 51, 255,
+ 80, 255, 69, 255,
+ 81, 255, 70, 255,
+ 76, 251, 66, 255,
+ 70, 232, 61, 255,
+ 66, 218, 56, 255,
+ 205, 70, 57, 255,
+ 222, 74, 63, 255,
+ 240, 82, 67, 255,
+ 255, 86, 71, 255,
+ 255, 85, 70, 255,
+ 231, 66, 54, 255,
+ 200, 136, 111, 255,
+ 203, 179, 151, 255,
+ 209, 186, 158, 255,
+ 215, 197, 169, 255,
+ 222, 209, 179, 255,
+ 231, 220, 192, 255,
+ 235, 230, 200, 255,
+ 242, 238, 207, 255,
+ 247, 246, 213, 255,
+ 245, 251, 216, 255,
+ 246, 251, 217, 255,
+ 241, 251, 213, 255,
+ 234, 249, 206, 255,
+ 227, 241, 194, 255,
+ 215, 236, 183, 255,
+ 202, 229, 172, 255,
+ 188, 223, 160, 255,
+ 177, 219, 148, 255,
+ 169, 215, 144, 255,
+ 129, 207, 108, 255,
+ 62, 242, 52, 255,
+ 80, 255, 68, 255,
+ 80, 255, 70, 255,
+ 76, 251, 66, 255,
+ 69, 232, 61, 255,
+ 66, 218, 54, 255,
+ 206, 70, 57, 255,
+ 221, 75, 63, 255,
+ 238, 80, 66, 255,
+ 255, 86, 71, 255,
+ 255, 84, 70, 255,
+ 231, 66, 54, 255,
+ 202, 139, 115, 255,
+ 205, 181, 155, 255,
+ 212, 188, 161, 255,
+ 217, 199, 171, 255,
+ 224, 209, 181, 255,
+ 231, 220, 192, 255,
+ 234, 229, 199, 255,
+ 242, 236, 207, 255,
+ 243, 242, 211, 255,
+ 243, 246, 216, 255,
+ 243, 249, 210, 255,
+ 237, 248, 209, 255,
+ 233, 246, 202, 255,
+ 227, 241, 179, 255,
+ 214, 236, 170, 255,
+ 202, 229, 160, 255,
+ 191, 226, 150, 255,
+ 177, 220, 144, 255,
+ 175, 217, 153, 255,
+ 129, 210, 110, 255,
+ 61, 242, 51, 255,
+ 78, 255, 67, 255,
+ 79, 255, 69, 255,
+ 76, 250, 66, 255,
+ 70, 231, 60, 255,
+ 66, 218, 54, 255,
+ 206, 71, 57, 255,
+ 219, 76, 63, 255,
+ 235, 79, 65, 255,
+ 251, 85, 71, 255,
+ 253, 83, 67, 255,
+ 231, 66, 53, 255,
+ 202, 139, 118, 255,
+ 206, 182, 155, 255,
+ 211, 188, 161, 255,
+ 216, 198, 170, 255,
+ 223, 207, 181, 255,
+ 228, 217, 189, 255,
+ 230, 226, 196, 255,
+ 237, 231, 201, 255,
+ 237, 236, 206, 255,
+ 239, 237, 218, 255,
+ 250, 252, 49, 255,
+ 250, 253, 59, 255,
+ 246, 250, 60, 255,
+ 240, 245, 58, 255,
+ 229, 238, 55, 255,
+ 220, 230, 51, 255,
+ 221, 224, 51, 255,
+ 77, 197, 0, 255,
+ 126, 209, 94, 255,
+ 134, 211, 117, 255,
+ 61, 241, 50, 255,
+ 73, 255, 67, 255,
+ 77, 255, 69, 255,
+ 74, 247, 64, 255,
+ 70, 229, 58, 255,
+ 66, 218, 56, 255,
+ 205, 71, 56, 255,
+ 217, 74, 61, 255,
+ 232, 78, 67, 255,
+ 245, 83, 70, 255,
+ 247, 80, 69, 255,
+ 229, 66, 51, 255,
+ 202, 139, 118, 255,
+ 206, 179, 156, 255,
+ 211, 185, 161, 255,
+ 215, 194, 170, 255,
+ 222, 203, 178, 255,
+ 225, 211, 185, 255,
+ 227, 219, 191, 255,
+ 230, 223, 195, 255,
+ 232, 227, 199, 255,
+ 233, 228, 210, 255,
+ 227, 231, 53, 255,
+ 230, 232, 66, 255,
+ 225, 230, 65, 255,
+ 220, 228, 62, 255,
+ 210, 225, 62, 255,
+ 204, 220, 60, 255,
+ 209, 217, 60, 255,
+ 82, 198, 17, 255,
+ 119, 208, 87, 255,
+ 131, 211, 115, 255,
+ 57, 242, 51, 255,
+ 69, 255, 63, 255,
+ 74, 255, 67, 255,
+ 75, 242, 64, 255,
+ 69, 227, 58, 255,
+ 66, 216, 56, 255,
+ 204, 70, 56, 255,
+ 215, 74, 60, 255,
+ 227, 77, 65, 255,
+ 237, 81, 66, 255,
+ 240, 79, 67, 255,
+ 225, 65, 50, 255,
+ 202, 138, 116, 255,
+ 204, 178, 154, 255,
+ 208, 182, 158, 255,
+ 212, 190, 166, 255,
+ 216, 197, 172, 255,
+ 219, 204, 179, 255,
+ 221, 211, 184, 255,
+ 225, 215, 188, 255,
+ 224, 218, 189, 255,
+ 225, 219, 201, 255,
+ 211, 216, 48, 255,
+ 213, 218, 62, 255,
+ 210, 218, 62, 255,
+ 207, 217, 60, 255,
+ 201, 215, 57, 255,
+ 196, 212, 57, 255,
+ 200, 210, 55, 255,
+ 84, 198, 16, 255,
+ 118, 208, 87, 255,
+ 133, 210, 116, 255,
+ 47, 221, 39, 255,
+ 68, 255, 61, 255,
+ 73, 253, 65, 255,
+ 72, 237, 62, 255,
+ 69, 225, 58, 255,
+ 66, 215, 56, 255,
+ 202, 69, 55, 255,
+ 213, 72, 59, 255,
+ 222, 76, 62, 255,
+ 230, 79, 65, 255,
+ 233, 76, 64, 255,
+ 221, 64, 49, 255,
+ 200, 134, 113, 255,
+ 201, 174, 150, 255,
+ 204, 178, 155, 255,
+ 207, 185, 161, 255,
+ 211, 192, 167, 255,
+ 213, 197, 172, 255,
+ 215, 203, 177, 255,
+ 217, 205, 179, 255,
+ 216, 209, 180, 255,
+ 216, 210, 190, 255,
+ 198, 204, 45, 255,
+ 199, 207, 55, 255,
+ 197, 209, 56, 255,
+ 194, 209, 55, 255,
+ 193, 206, 55, 255,
+ 189, 204, 55, 255,
+ 193, 204, 54, 255,
+ 85, 197, 17, 255,
+ 113, 204, 82, 255,
+ 126, 203, 107, 255,
+ 34, 180, 27, 255,
+ 63, 253, 57, 255,
+ 70, 249, 60, 255,
+ 70, 234, 61, 255,
+ 67, 223, 58, 255,
+ 65, 216, 54, 255,
+ 200, 69, 56, 255,
+ 209, 72, 59, 255,
+ 216, 74, 62, 255,
+ 223, 76, 64, 255,
+ 226, 74, 63, 255,
+ 215, 63, 51, 255,
+ 200, 132, 111, 255,
+ 197, 171, 146, 255,
+ 200, 173, 150, 255,
+ 204, 180, 156, 255,
+ 206, 185, 161, 255,
+ 209, 191, 166, 255,
+ 209, 195, 169, 255,
+ 210, 197, 172, 255,
+ 207, 200, 172, 255,
+ 209, 202, 182, 255,
+ 186, 196, 41, 255,
+ 188, 200, 53, 255,
+ 188, 202, 53, 255,
+ 187, 202, 52, 255,
+ 183, 202, 53, 255,
+ 180, 200, 51, 255,
+ 188, 199, 52, 255,
+ 84, 199, 20, 255,
+ 92, 190, 53, 255,
+ 102, 179, 78, 255,
+ 33, 170, 24, 255,
+ 51, 221, 45, 255,
+ 67, 244, 62, 255,
+ 68, 229, 58, 255,
+ 67, 220, 58, 255,
+ 64, 213, 55, 255,
+ 198, 68, 54, 255,
+ 204, 71, 58, 255,
+ 211, 72, 60, 255,
+ 216, 74, 61, 255,
+ 219, 71, 61, 255,
+ 213, 60, 49, 255,
+ 197, 129, 108, 255,
+ 195, 166, 143, 255,
+ 196, 168, 144, 255,
+ 197, 175, 149, 255,
+ 200, 179, 154, 255,
+ 201, 184, 158, 255,
+ 202, 188, 161, 255,
+ 202, 190, 163, 255,
+ 200, 192, 161, 255,
+ 202, 193, 173, 255,
+ 176, 190, 40, 255,
+ 180, 194, 50, 255,
+ 178, 196, 51, 255,
+ 178, 196, 51, 255,
+ 177, 195, 50, 255,
+ 174, 196, 50, 255,
+ 182, 195, 52, 255,
+ 86, 199, 20, 255,
+ 84, 184, 46, 255,
+ 89, 167, 62, 255,
+ 34, 171, 25, 255,
+ 39, 199, 31, 255,
+ 65, 238, 59, 255,
+ 67, 225, 57, 255,
+ 66, 217, 57, 255,
+ 64, 212, 54, 255,
+ 196, 67, 53, 255,
+ 200, 70, 56, 255,
+ 205, 70, 58, 255,
+ 209, 71, 58, 255,
+ 212, 69, 58, 255,
+ 208, 59, 47, 255,
+ 199, 127, 104, 255,
+ 200, 154, 133, 255,
+ 199, 156, 133, 255,
+ 202, 161, 136, 255,
+ 203, 165, 139, 255,
+ 204, 171, 143, 255,
+ 203, 174, 144, 255,
+ 202, 176, 146, 255,
+ 199, 180, 145, 255,
+ 197, 184, 162, 255,
+ 169, 185, 37, 255,
+ 170, 190, 48, 255,
+ 172, 190, 50, 255,
+ 173, 191, 50, 255,
+ 172, 191, 50, 255,
+ 171, 192, 47, 255,
+ 178, 191, 50, 255,
+ 86, 198, 21, 255,
+ 86, 184, 48, 255,
+ 88, 167, 62, 255,
+ 35, 173, 27, 255,
+ 35, 187, 27, 255,
+ 64, 229, 56, 255,
+ 66, 221, 57, 255,
+ 65, 214, 55, 255,
+ 62, 210, 52, 255,
+ 194, 68, 52, 255,
+ 197, 67, 54, 255,
+ 197, 67, 54, 255,
+ 201, 66, 55, 255,
+ 203, 66, 55, 255,
+ 207, 57, 46, 255,
+ 142, 121, 104, 255,
+ 122, 229, 199, 255,
+ 129, 224, 200, 255,
+ 123, 231, 211, 255,
+ 118, 241, 229, 255,
+ 119, 241, 235, 255,
+ 120, 244, 238, 255,
+ 112, 251, 250, 255,
+ 144, 226, 217, 255,
+ 174, 192, 170, 255,
+ 159, 183, 34, 255,
+ 162, 184, 44, 255,
+ 164, 187, 46, 255,
+ 164, 188, 48, 255,
+ 165, 189, 46, 255,
+ 165, 189, 47, 255,
+ 173, 187, 48, 255,
+ 85, 195, 22, 255,
+ 86, 185, 48, 255,
+ 87, 168, 64, 255,
+ 35, 175, 26, 255,
+ 32, 183, 23, 255,
+ 61, 223, 51, 255,
+ 62, 218, 55, 255,
+ 63, 210, 52, 255,
+ 61, 209, 53, 255,
+ 193, 67, 53, 255,
+ 193, 67, 52, 255,
+ 191, 63, 54, 255,
+ 190, 63, 49, 255,
+ 196, 63, 51, 255,
+ 207, 61, 49, 255,
+ 92, 64, 48, 255,
+ 46, 154, 127, 255,
+ 52, 196, 156, 255,
+ 54, 192, 154, 255,
+ 49, 186, 143, 255,
+ 48, 185, 143, 255,
+ 47, 182, 138, 255,
+ 43, 176, 129, 255,
+ 40, 180, 133, 255,
+ 28, 180, 142, 255,
+ 152, 182, 35, 255,
+ 149, 184, 44, 255,
+ 155, 183, 44, 255,
+ 158, 185, 45, 255,
+ 160, 185, 43, 255,
+ 161, 187, 45, 255,
+ 167, 186, 49, 255,
+ 87, 195, 20, 255,
+ 86, 184, 46, 255,
+ 87, 168, 65, 255,
+ 35, 176, 26, 255,
+ 32, 183, 23, 255,
+ 60, 217, 49, 255,
+ 62, 214, 54, 255,
+ 64, 208, 51, 255,
+ 61, 206, 51, 255,
+ 189, 65, 51, 255,
+ 190, 65, 51, 255,
+ 183, 60, 52, 255,
+ 182, 60, 52, 255,
+ 189, 61, 48, 255,
+ 202, 59, 47, 255,
+ 98, 71, 58, 255,
+ 50, 145, 114, 255,
+ 52, 184, 142, 255,
+ 50, 179, 139, 255,
+ 51, 180, 139, 255,
+ 52, 181, 138, 255,
+ 52, 181, 138, 255,
+ 51, 181, 137, 255,
+ 51, 181, 135, 255,
+ 42, 181, 144, 255,
+ 141, 182, 34, 255,
+ 141, 180, 44, 255,
+ 148, 182, 45, 255,
+ 151, 182, 45, 255,
+ 152, 184, 47, 255,
+ 154, 184, 45, 255,
+ 162, 184, 48, 255,
+ 87, 194, 21, 255,
+ 89, 182, 47, 255,
+ 87, 168, 66, 255,
+ 35, 176, 27, 255,
+ 32, 184, 24, 255,
+ 57, 213, 47, 255,
+ 61, 210, 52, 255,
+ 61, 206, 50, 255,
+ 60, 205, 51, 255,
+ 186, 65, 49, 255,
+ 185, 63, 49, 255,
+ 177, 59, 50, 255,
+ 175, 57, 48, 255,
+ 182, 60, 47, 255,
+ 196, 57, 44, 255,
+ 95, 71, 58, 255,
+ 50, 146, 114, 255,
+ 51, 184, 142, 255,
+ 50, 180, 139, 255,
+ 50, 179, 139, 255,
+ 52, 182, 139, 255,
+ 51, 181, 137, 255,
+ 50, 180, 137, 255,
+ 51, 181, 135, 255,
+ 41, 179, 141, 255,
+ 136, 178, 32, 255,
+ 135, 180, 40, 255,
+ 139, 181, 41, 255,
+ 145, 180, 41, 255,
+ 150, 181, 44, 255,
+ 152, 179, 43, 255,
+ 159, 181, 47, 255,
+ 86, 192, 21, 255,
+ 92, 181, 47, 255,
+ 87, 169, 66, 255,
+ 35, 176, 26, 255,
+ 33, 184, 24, 255,
+ 56, 211, 47, 255,
+ 59, 206, 49, 255,
+ 59, 203, 48, 255,
+ 58, 203, 51, 255,
+ 184, 65, 50, 255,
+ 183, 61, 49, 255,
+ 172, 57, 50, 255,
+ 167, 53, 45, 255,
+ 178, 57, 48, 255,
+ 191, 56, 41, 255,
+ 95, 71, 57, 255,
+ 51, 145, 116, 255,
+ 52, 184, 141, 255,
+ 53, 180, 139, 255,
+ 53, 180, 139, 255,
+ 52, 178, 136, 255,
+ 52, 178, 135, 255,
+ 52, 178, 136, 255,
+ 48, 179, 133, 255,
+ 43, 179, 143, 255,
+ 133, 176, 32, 255,
+ 131, 177, 39, 255,
+ 137, 177, 42, 255,
+ 141, 177, 43, 255,
+ 145, 178, 43, 255,
+ 148, 178, 44, 255,
+ 154, 178, 46, 255,
+ 91, 189, 22, 255,
+ 96, 176, 55, 255,
+ 85, 167, 64, 255,
+ 37, 173, 28, 255,
+ 33, 182, 25, 255,
+ 55, 207, 47, 255,
+ 59, 202, 52, 255,
+ 61, 200, 49, 255,
+ 60, 200, 49, 255,
+ 182, 63, 50, 255,
+ 177, 61, 48, 255,
+ 170, 56, 48, 255,
+ 151, 48, 41, 255,
+ 173, 56, 44, 255,
+ 182, 44, 33, 255,
+ 94, 80, 67, 255,
+ 51, 145, 115, 255,
+ 52, 181, 140, 255,
+ 52, 176, 136, 255,
+ 50, 178, 137, 255,
+ 51, 178, 136, 255,
+ 51, 178, 135, 255,
+ 49, 176, 134, 255,
+ 49, 177, 132, 255,
+ 42, 177, 140, 255,
+ 129, 173, 30, 255,
+ 129, 174, 38, 255,
+ 134, 174, 40, 255,
+ 139, 174, 41, 255,
+ 142, 176, 39, 255,
+ 145, 175, 41, 255,
+ 152, 174, 43, 255,
+ 91, 187, 22, 255,
+ 105, 173, 61, 255,
+ 96, 164, 77, 255,
+ 31, 169, 23, 255,
+ 32, 180, 25, 255,
+ 53, 202, 47, 255,
+ 57, 199, 48, 255,
+ 59, 197, 48, 255,
+ 59, 199, 48, 255,
+ 181, 62, 50, 255,
+ 175, 60, 48, 255,
+ 166, 54, 47, 255,
+ 130, 44, 35, 255,
+ 162, 40, 31, 255,
+ 209, 130, 111, 255,
+ 105, 125, 103, 255,
+ 48, 141, 111, 255,
+ 52, 179, 138, 255,
+ 52, 174, 136, 255,
+ 50, 176, 136, 255,
+ 50, 176, 134, 255,
+ 50, 176, 133, 255,
+ 50, 175, 133, 255,
+ 49, 175, 131, 255,
+ 42, 175, 138, 255,
+ 126, 164, 20, 255,
+ 122, 166, 33, 255,
+ 129, 169, 35, 255,
+ 134, 170, 36, 255,
+ 138, 171, 41, 255,
+ 142, 171, 43, 255,
+ 148, 172, 45, 255,
+ 101, 182, 24, 255,
+ 89, 162, 53, 255,
+ 104, 170, 83, 255,
+ 72, 170, 55, 255,
+ 29, 172, 24, 255,
+ 52, 198, 46, 255,
+ 56, 196, 46, 255,
+ 57, 195, 48, 255,
+ 58, 198, 47, 255,
+ 178, 61, 48, 255,
+ 171, 58, 48, 255,
+ 156, 53, 45, 255,
+ 119, 28, 25, 255,
+ 193, 119, 102, 255,
+ 228, 193, 167, 255,
+ 96, 121, 99, 255,
+ 47, 142, 110, 255,
+ 52, 175, 137, 255,
+ 51, 171, 133, 255,
+ 50, 172, 134, 255,
+ 50, 172, 132, 255,
+ 50, 172, 131, 255,
+ 49, 171, 131, 255,
+ 49, 172, 128, 255,
+ 36, 169, 127, 255,
+ 172, 197, 99, 255,
+ 153, 186, 86, 255,
+ 148, 182, 71, 255,
+ 143, 176, 58, 255,
+ 139, 170, 45, 255,
+ 135, 163, 30, 255,
+ 139, 163, 27, 255,
+ 84, 155, 25, 255,
+ 57, 136, 49, 255,
+ 71, 151, 54, 255,
+ 85, 160, 67, 255,
+ 62, 166, 49, 255,
+ 42, 189, 34, 255,
+ 53, 194, 45, 255,
+ 54, 192, 48, 255,
+ 58, 196, 48, 255,
+ 176, 61, 47, 255,
+ 168, 58, 45, 255,
+ 140, 39, 34, 255,
+ 140, 73, 55, 255,
+ 152, 103, 77, 255,
+ 141, 78, 59, 255,
+ 90, 80, 65, 255,
+ 45, 148, 114, 255,
+ 50, 173, 134, 255,
+ 50, 169, 132, 255,
+ 50, 170, 130, 255,
+ 48, 170, 129, 255,
+ 46, 170, 129, 255,
+ 46, 171, 130, 255,
+ 44, 171, 128, 255,
+ 23, 161, 117, 255,
+ 225, 253, 204, 255,
+ 211, 244, 195, 255,
+ 212, 245, 199, 255,
+ 213, 245, 199, 255,
+ 215, 243, 193, 255,
+ 213, 243, 190, 255,
+ 208, 240, 182, 255,
+ 193, 235, 176, 255,
+ 185, 231, 167, 255,
+ 180, 225, 163, 255,
+ 172, 223, 156, 255,
+ 176, 221, 158, 255,
+ 107, 206, 96, 255,
+ 39, 183, 33, 255,
+ 55, 188, 47, 255,
+ 57, 193, 49, 255,
+ 173, 60, 45, 255,
+ 159, 45, 33, 255,
+ 159, 91, 77, 255,
+ 157, 108, 85, 255,
+ 146, 94, 74, 255,
+ 139, 87, 72, 255,
+ 134, 71, 56, 255,
+ 42, 143, 109, 255,
+ 37, 172, 131, 255,
+ 39, 167, 128, 255,
+ 43, 164, 123, 255,
+ 48, 159, 118, 255,
+ 52, 155, 115, 255,
+ 58, 151, 112, 255,
+ 63, 149, 104, 255,
+ 73, 149, 104, 255,
+ 206, 233, 185, 255,
+ 208, 237, 190, 255,
+ 207, 237, 188, 255,
+ 205, 237, 186, 255,
+ 203, 237, 185, 255,
+ 199, 237, 179, 255,
+ 199, 236, 178, 255,
+ 196, 235, 174, 255,
+ 192, 233, 170, 255,
+ 190, 230, 167, 255,
+ 184, 228, 162, 255,
+ 178, 227, 158, 255,
+ 187, 227, 167, 255,
+ 114, 205, 102, 255,
+ 38, 181, 33, 255,
+ 55, 191, 48, 255,
+ 164, 44, 34, 255,
+ 178, 112, 95, 255,
+ 183, 153, 126, 255,
+ 158, 121, 90, 255,
+ 151, 117, 88, 255,
+ 148, 122, 92, 255,
+ 148, 126, 95, 255,
+ 140, 136, 102, 255,
+ 135, 144, 109, 255,
+ 145, 148, 114, 255,
+ 151, 157, 121, 255,
+ 160, 167, 131, 255,
+ 170, 178, 141, 255,
+ 178, 190, 149, 255,
+ 188, 201, 162, 255,
+ 199, 213, 173, 255,
+ 199, 220, 181, 255,
+ 205, 226, 183, 255,
+ 203, 227, 182, 255,
+ 204, 228, 182, 255,
+ 202, 228, 180, 255,
+ 200, 230, 179, 255,
+ 199, 229, 178, 255,
+ 196, 227, 176, 255,
+ 193, 228, 172, 255,
+ 189, 226, 168, 255,
+ 186, 225, 165, 255,
+ 181, 223, 161, 255,
+ 177, 223, 155, 255,
+ 184, 226, 163, 255,
+ 112, 203, 98, 255,
+ 39, 183, 34, 255,
+ 185, 121, 100, 255,
+ 206, 188, 162, 255,
+ 196, 177, 149, 255,
+ 193, 178, 146, 255,
+ 192, 186, 153, 255,
+ 198, 192, 161, 255,
+ 204, 198, 169, 255,
+ 207, 203, 173, 255,
+ 210, 206, 175, 255,
+ 207, 212, 178, 255,
+ 209, 213, 179, 255,
+ 208, 216, 181, 255,
+ 207, 216, 182, 255,
+ 207, 218, 183, 255,
+ 206, 217, 179, 255,
+ 204, 219, 180, 255,
+ 203, 219, 180, 255,
+ 203, 220, 178, 255,
+ 201, 221, 178, 255,
+ 202, 222, 178, 255,
+ 201, 222, 176, 255,
+ 199, 223, 177, 255,
+ 198, 222, 176, 255,
+ 195, 222, 173, 255,
+ 194, 222, 174, 255,
+ 193, 221, 170, 255,
+ 191, 220, 167, 255,
+ 187, 220, 166, 255,
+ 182, 220, 162, 255,
+ 180, 218, 158, 255,
+ 186, 221, 161, 255,
+ 111, 202, 97, 255,
+};
+
diff --git a/src/gallium/state_trackers/d3d1x/progs/data/tux_image.h b/src/gallium/state_trackers/d3d1x/progs/data/tux_image.h
new file mode 100755
index 00000000000..53aeffa5582
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/data/tux_image.h
@@ -0,0 +1,1028 @@
+unsigned char g_tux_image[] =
+{
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 249, 249, 249, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 234, 234, 234, 255,
+ 23, 23, 25, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 81, 81, 83, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 1, 1, 3, 255,
+ 0, 0, 2, 255,
+ 8, 7, 9, 255,
+ 71, 71, 70, 255,
+ 0, 0, 0, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 106, 106, 107, 255,
+ 0, 0, 0, 255,
+ 1, 1, 3, 255,
+ 2, 2, 4, 255,
+ 0, 0, 2, 255,
+ 13, 13, 13, 255,
+ 46, 46, 46, 255,
+ 0, 0, 0, 255,
+ 57, 57, 59, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 33, 33, 35, 255,
+ 0, 0, 0, 255,
+ 0, 0, 1, 255,
+ 1, 1, 3, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 0, 0, 1, 255,
+ 0, 0, 0, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 10, 10, 13, 255,
+ 87, 87, 87, 255,
+ 43, 42, 43, 255,
+ 0, 0, 0, 255,
+ 17, 17, 18, 255,
+ 163, 163, 162, 255,
+ 71, 70, 70, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 213, 213, 213, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 29, 29, 32, 255,
+ 178, 178, 177, 255,
+ 210, 212, 215, 255,
+ 0, 0, 0, 255,
+ 213, 215, 219, 255,
+ 112, 112, 112, 255,
+ 235, 235, 234, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 176, 176, 177, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 78, 79, 79, 255,
+ 43, 47, 59, 255,
+ 103, 94, 77, 255,
+ 103, 77, 0, 255,
+ 168, 156, 123, 255,
+ 0, 0, 0, 255,
+ 179, 182, 191, 255,
+ 1, 1, 3, 255,
+ 0, 0, 0, 255,
+ 182, 182, 183, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 31, 35, 45, 255,
+ 172, 146, 99, 255,
+ 237, 173, 0, 255,
+ 248, 208, 9, 255,
+ 250, 215, 39, 255,
+ 220, 183, 4, 255,
+ 223, 201, 120, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 151, 151, 152, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 93, 89, 86, 255,
+ 216, 146, 0, 255,
+ 245, 193, 9, 255,
+ 243, 215, 34, 255,
+ 255, 229, 32, 255,
+ 228, 193, 8, 255,
+ 238, 173, 0, 255,
+ 0, 0, 2, 255,
+ 0, 0, 0, 255,
+ 92, 92, 93, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 77, 81, 91, 255,
+ 120, 94, 41, 255,
+ 209, 163, 0, 255,
+ 215, 176, 9, 255,
+ 189, 133, 0, 255,
+ 198, 135, 4, 255,
+ 198, 176, 136, 255,
+ 0, 0, 0, 255,
+ 115, 115, 114, 255,
+ 0, 0, 0, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 0, 0, 0, 255,
+ 181, 186, 198, 255,
+ 169, 142, 94, 255,
+ 174, 119, 18, 255,
+ 174, 136, 68, 255,
+ 189, 193, 203, 255,
+ 255, 255, 255, 255,
+ 84, 84, 84, 255,
+ 2, 2, 3, 255,
+ 0, 0, 0, 255,
+ 107, 106, 107, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 116, 116, 116, 255,
+ 35, 35, 36, 255,
+ 255, 255, 255, 255,
+ 185, 187, 193, 255,
+ 182, 186, 197, 255,
+ 214, 218, 225, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 0, 0, 0, 255,
+ 0, 0, 1, 255,
+ 0, 0, 0, 255,
+ 248, 248, 248, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 198, 198, 199, 255,
+ 0, 0, 0, 255,
+ 246, 246, 244, 255,
+ 255, 255, 255, 255,
+ 252, 253, 251, 255,
+ 250, 250, 249, 255,
+ 255, 255, 255, 255,
+ 255, 255, 253, 255,
+ 255, 255, 253, 255,
+ 255, 255, 255, 255,
+ 68, 68, 69, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 16, 16, 18, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 246, 246, 246, 255,
+ 0, 0, 0, 255,
+ 26, 25, 26, 255,
+ 254, 255, 254, 255,
+ 255, 255, 253, 255,
+ 243, 243, 242, 255,
+ 241, 241, 240, 255,
+ 253, 253, 251, 255,
+ 247, 247, 246, 255,
+ 236, 236, 235, 255,
+ 236, 235, 235, 255,
+ 132, 131, 132, 255,
+ 0, 0, 0, 255,
+ 0, 0, 1, 255,
+ 0, 0, 0, 255,
+ 46, 46, 47, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 67, 67, 69, 255,
+ 0, 0, 0, 255,
+ 80, 80, 80, 255,
+ 243, 243, 242, 255,
+ 254, 254, 252, 255,
+ 245, 245, 243, 255,
+ 252, 252, 251, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 235, 235, 233, 255,
+ 214, 213, 213, 255,
+ 224, 223, 223, 255,
+ 31, 31, 32, 255,
+ 23, 23, 23, 255,
+ 1, 0, 2, 255,
+ 0, 0, 0, 255,
+ 179, 179, 179, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 254, 254, 252, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 255, 255, 253, 255,
+ 255, 255, 255, 255,
+ 253, 253, 252, 255,
+ 184, 184, 184, 255,
+ 0, 0, 0, 255,
+ 32, 32, 32, 255,
+ 0, 0, 0, 255,
+ 37, 37, 39, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 189, 189, 189, 255,
+ 0, 0, 0, 255,
+ 111, 111, 111, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 248, 248, 247, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 253, 253, 251, 255,
+ 252, 252, 251, 255,
+ 252, 252, 250, 255,
+ 254, 254, 252, 255,
+ 255, 255, 255, 255,
+ 15, 15, 16, 255,
+ 16, 16, 17, 255,
+ 12, 11, 13, 255,
+ 0, 0, 0, 255,
+ 247, 247, 246, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 51, 51, 52, 255,
+ 0, 0, 0, 255,
+ 250, 250, 248, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 240, 240, 239, 255,
+ 254, 254, 252, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 252, 252, 251, 255,
+ 253, 253, 250, 255,
+ 253, 253, 251, 255,
+ 255, 255, 255, 255,
+ 56, 56, 57, 255,
+ 0, 0, 0, 255,
+ 24, 24, 25, 255,
+ 0, 0, 0, 255,
+ 152, 152, 153, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 200, 200, 201, 255,
+ 0, 0, 0, 255,
+ 19, 19, 20, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 235, 235, 234, 255,
+ 254, 254, 252, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 255, 255, 255, 255,
+ 83, 83, 83, 255,
+ 0, 0, 0, 255,
+ 18, 18, 18, 255,
+ 0, 0, 0, 255,
+ 95, 95, 97, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 34, 35, 39, 255,
+ 10, 12, 19, 255,
+ 69, 69, 70, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 237, 237, 236, 255,
+ 254, 254, 252, 255,
+ 252, 252, 250, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 255, 255, 255, 255,
+ 91, 91, 92, 255,
+ 2, 2, 4, 255,
+ 1, 1, 3, 255,
+ 0, 0, 0, 255,
+ 81, 81, 81, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 53, 51, 49, 255,
+ 49, 33, 0, 255,
+ 62, 67, 84, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 251, 251, 250, 255,
+ 240, 240, 239, 255,
+ 254, 254, 252, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 253, 254, 253, 255,
+ 255, 255, 255, 255,
+ 63, 65, 73, 255,
+ 9, 9, 10, 255,
+ 11, 11, 12, 255,
+ 13, 13, 15, 255,
+ 104, 105, 114, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 233, 174, 24, 255,
+ 255, 217, 8, 255,
+ 107, 77, 0, 255,
+ 131, 137, 154, 255,
+ 255, 255, 255, 255,
+ 254, 254, 252, 255,
+ 250, 250, 249, 255,
+ 239, 239, 237, 255,
+ 254, 254, 252, 255,
+ 252, 252, 250, 255,
+ 252, 252, 251, 255,
+ 253, 253, 251, 255,
+ 253, 254, 253, 255,
+ 251, 249, 248, 255,
+ 255, 205, 14, 255,
+ 87, 70, 6, 255,
+ 0, 0, 1, 255,
+ 0, 0, 0, 255,
+ 0, 2, 14, 255,
+ 216, 203, 137, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 230, 207, 159, 255,
+ 216, 168, 49, 255,
+ 207, 153, 25, 255,
+ 239, 180, 4, 255,
+ 246, 190, 11, 255,
+ 255, 214, 12, 255,
+ 25, 13, 0, 255,
+ 79, 81, 89, 255,
+ 255, 255, 255, 255,
+ 255, 255, 254, 255,
+ 250, 250, 249, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 255, 255, 255, 255,
+ 231, 227, 222, 255,
+ 250, 184, 0, 255,
+ 101, 71, 5, 255,
+ 0, 0, 3, 255,
+ 0, 0, 3, 255,
+ 112, 83, 2, 255,
+ 250, 193, 0, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 210, 154, 18, 255,
+ 247, 187, 0, 255,
+ 247, 189, 7, 255,
+ 246, 189, 11, 255,
+ 245, 189, 12, 255,
+ 249, 191, 12, 255,
+ 240, 191, 11, 255,
+ 0, 0, 0, 255,
+ 24, 25, 26, 255,
+ 255, 255, 255, 255,
+ 255, 255, 253, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 252, 252, 251, 255,
+ 253, 253, 251, 255,
+ 255, 255, 255, 255,
+ 188, 186, 184, 255,
+ 232, 168, 0, 255,
+ 216, 154, 8, 255,
+ 158, 108, 7, 255,
+ 182, 127, 7, 255,
+ 251, 190, 10, 255,
+ 243, 181, 0, 255,
+ 250, 247, 244, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 215, 169, 62, 255,
+ 245, 186, 4, 255,
+ 245, 189, 11, 255,
+ 245, 189, 12, 255,
+ 245, 189, 12, 255,
+ 245, 188, 12, 255,
+ 255, 204, 12, 255,
+ 125, 99, 7, 255,
+ 0, 0, 0, 255,
+ 129, 128, 128, 255,
+ 255, 255, 255, 255,
+ 253, 253, 251, 255,
+ 253, 253, 251, 255,
+ 252, 252, 250, 255,
+ 253, 253, 251, 255,
+ 255, 255, 255, 255,
+ 181, 178, 176, 255,
+ 220, 156, 0, 255,
+ 241, 183, 11, 255,
+ 232, 173, 9, 255,
+ 239, 181, 10, 255,
+ 247, 191, 12, 255,
+ 245, 188, 8, 255,
+ 234, 176, 3, 255,
+ 250, 248, 243, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 216, 173, 80, 255,
+ 243, 184, 4, 255,
+ 245, 189, 11, 255,
+ 245, 188, 12, 255,
+ 245, 189, 12, 255,
+ 245, 189, 12, 255,
+ 246, 188, 12, 255,
+ 255, 203, 2, 255,
+ 120, 112, 98, 255,
+ 255, 255, 255, 255,
+ 254, 254, 253, 255,
+ 252, 252, 251, 255,
+ 253, 253, 251, 255,
+ 255, 255, 254, 255,
+ 255, 255, 255, 255,
+ 213, 214, 216, 255,
+ 8, 0, 0, 255,
+ 235, 173, 7, 255,
+ 248, 192, 12, 255,
+ 247, 191, 12, 255,
+ 246, 190, 12, 255,
+ 245, 189, 12, 255,
+ 245, 189, 11, 255,
+ 247, 190, 7, 255,
+ 238, 169, 0, 255,
+ 249, 245, 236, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 206, 145, 1, 255,
+ 249, 191, 9, 255,
+ 246, 190, 12, 255,
+ 245, 189, 11, 255,
+ 245, 189, 11, 255,
+ 245, 189, 12, 255,
+ 245, 189, 12, 255,
+ 247, 191, 9, 255,
+ 197, 150, 8, 255,
+ 229, 234, 248, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 104, 104, 104, 255,
+ 0, 0, 0, 255,
+ 35, 21, 1, 255,
+ 236, 174, 10, 255,
+ 248, 191, 12, 255,
+ 245, 189, 12, 255,
+ 245, 189, 11, 255,
+ 246, 191, 11, 255,
+ 248, 190, 4, 255,
+ 234, 168, 0, 255,
+ 222, 178, 80, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 245, 240, 231, 255,
+ 193, 121, 0, 255,
+ 232, 170, 0, 255,
+ 239, 180, 4, 255,
+ 248, 191, 12, 255,
+ 250, 193, 12, 255,
+ 248, 192, 12, 255,
+ 246, 190, 12, 255,
+ 251, 194, 12, 255,
+ 220, 157, 4, 255,
+ 9, 0, 0, 255,
+ 10, 12, 17, 255,
+ 30, 30, 31, 255,
+ 0, 0, 2, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 0, 0, 0, 255,
+ 62, 38, 2, 255,
+ 232, 169, 9, 255,
+ 250, 194, 12, 255,
+ 247, 191, 12, 255,
+ 248, 191, 12, 255,
+ 229, 164, 0, 255,
+ 210, 162, 50, 255,
+ 241, 234, 228, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 237, 231, 222, 255,
+ 207, 183, 141, 255,
+ 181, 135, 49, 255,
+ 158, 97, 0, 255,
+ 182, 120, 0, 255,
+ 220, 157, 0, 255,
+ 243, 183, 11, 255,
+ 236, 175, 10, 255,
+ 164, 104, 0, 255,
+ 26, 11, 0, 255,
+ 42, 44, 49, 255,
+ 75, 75, 76, 255,
+ 75, 75, 76, 255,
+ 78, 78, 80, 255,
+ 82, 82, 83, 255,
+ 38, 41, 49, 255,
+ 48, 27, 0, 255,
+ 197, 134, 3, 255,
+ 237, 178, 11, 255,
+ 237, 176, 8, 255,
+ 187, 122, 0, 255,
+ 214, 191, 154, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 217, 211, 206, 255,
+ 163, 137, 96, 255,
+ 112, 63, 0, 255,
+ 105, 53, 0, 255,
+ 91, 63, 21, 255,
+ 248, 251, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 219, 217, 212, 255,
+ 95, 48, 0, 255,
+ 143, 84, 0, 255,
+ 124, 71, 0, 255,
+ 210, 201, 190, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 231, 232, 234, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 222, 223, 226, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+};
+
diff --git a/src/gallium/state_trackers/d3d1x/progs/progs.sln b/src/gallium/state_trackers/d3d1x/progs/progs.sln
new file mode 100755
index 00000000000..13c2d6e581c
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/progs/progs.sln
@@ -0,0 +1,49 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "d3d11app", "d3d11app", "{77576C4F-7281-41FB-A5C7-D12707AB9ED0}"
+ ProjectSection(SolutionItems) = preProject
+ d3d11app\d3d11blit.hlsl = d3d11app\d3d11blit.hlsl
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11gears", "d3d11gears\d3d11gears.vcxproj", "{706313AB-8F2C-48D2-9F67-31AA043F48C9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11tri", "d3d11tri\d3d11tri.vcxproj", "{1C11FC42-BFB5-4668-97F6-C5B564754F8F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11spikysphere", "d3d11spikysphere\d3d11spikysphere.vcxproj", "{64988608-72A3-4125-8A31-45E1EACE8F0A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d11tex", "d3d11tex\d3d11tex.vcxproj", "{14F73B97-2DC6-423E-97D9-64E3368713DC}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d10tri", "d3d10tri\d3d10tri.vcxproj", "{5366F4FD-0E6C-40CC-B2F2-CE3D350F0729}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {706313AB-8F2C-48D2-9F67-31AA043F48C9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {706313AB-8F2C-48D2-9F67-31AA043F48C9}.Debug|Win32.Build.0 = Debug|Win32
+ {706313AB-8F2C-48D2-9F67-31AA043F48C9}.Release|Win32.ActiveCfg = Release|Win32
+ {706313AB-8F2C-48D2-9F67-31AA043F48C9}.Release|Win32.Build.0 = Release|Win32
+ {1C11FC42-BFB5-4668-97F6-C5B564754F8F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1C11FC42-BFB5-4668-97F6-C5B564754F8F}.Debug|Win32.Build.0 = Debug|Win32
+ {1C11FC42-BFB5-4668-97F6-C5B564754F8F}.Release|Win32.ActiveCfg = Release|Win32
+ {1C11FC42-BFB5-4668-97F6-C5B564754F8F}.Release|Win32.Build.0 = Release|Win32
+ {64988608-72A3-4125-8A31-45E1EACE8F0A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {64988608-72A3-4125-8A31-45E1EACE8F0A}.Debug|Win32.Build.0 = Debug|Win32
+ {64988608-72A3-4125-8A31-45E1EACE8F0A}.Release|Win32.ActiveCfg = Release|Win32
+ {64988608-72A3-4125-8A31-45E1EACE8F0A}.Release|Win32.Build.0 = Release|Win32
+ {14F73B97-2DC6-423E-97D9-64E3368713DC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {14F73B97-2DC6-423E-97D9-64E3368713DC}.Debug|Win32.Build.0 = Debug|Win32
+ {14F73B97-2DC6-423E-97D9-64E3368713DC}.Release|Win32.ActiveCfg = Release|Win32
+ {14F73B97-2DC6-423E-97D9-64E3368713DC}.Release|Win32.Build.0 = Release|Win32
+ {5366F4FD-0E6C-40CC-B2F2-CE3D350F0729}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5366F4FD-0E6C-40CC-B2F2-CE3D350F0729}.Debug|Win32.Build.0 = Debug|Win32
+ {5366F4FD-0E6C-40CC-B2F2-CE3D350F0729}.Release|Win32.ActiveCfg = Release|Win32
+ {5366F4FD-0E6C-40CC-B2F2-CE3D350F0729}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal