summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/d3d1x/d3dapi
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-09-12 02:49:36 +0200
committerLuca Barbieri <[email protected]>2010-09-21 10:58:17 +0200
commit92617aeac109481258f0c3863d09c1b8903d438b (patch)
treed85d6a04e87d227964386ad1d6b3d6ae6954e179 /src/gallium/state_trackers/d3d1x/d3dapi
parent894a307a91d6437ec418800952da2ec174e092f5 (diff)
d3d1x: add new Direct3D 10/11 COM state tracker for Gallium
This is a new implementation of the Direct3D 11 COM API for Gallium. Direct3D 10 and 10.1 implementations are also provided, which are automatically generated with s/D3D11/D3D10/g plus a bunch of #ifs. While this is an initial version, most of the code is there (limited to what Gallium can express), and tri, gears and texturing demos are working. The primary goal is to realize Gallium's promise of multiple API support, and provide an API that can be easily implemented with just a very thin wrapper over Gallium, instead of the enormous amount of complex code needed for OpenGL. The secondary goal is to run Windows Direct3D 10/11 games on Linux using Wine. Wine dlls are currently not provided, but adding them should be quite easy. Fglrx and nvidia drivers can also be supported by writing a Gallium driver that talks to them using OpenGL, which is a relatively easy task. Thanks to the great design of Direct3D 10/11 and closeness to Gallium, this approach should not result in detectable overhead, and is the most maintainable way to do it, providing a path to switch to the open Gallium drivers once they are on par with the proprietary ones. Currently Wine has a very limited Direct3D 10 implementation, and completely lacks a Direct3D 11 implementation. Note that Direct3D 10/11 are completely different from Direct3D 9 and earlier, and thus warrant a fully separate implementation. The third goal is to provide a superior alternative to OpenGL for graphics programming on non-Windows systems, particularly Linux and other free and open systems. Thanks to a very clean and well-though design done from scratch, the Direct3D 10/11 APIs are vastly better than OpenGL and can be supported with orders of magnitude less code and development time, as you can see by comparing the lines of code of this commit and those in the existing Mesa OpenGL implementation. This would have been true for the Longs Peak proposal as well, but unfortunately it was abandoned by Khronos, leaving the OpenGL ecosystem without a graphics API with a modern design. A binding of Direct3D 10/11 to EGL would solve this issue in the most economical way possible, and this would be great to provide in Mesa, since DXGI, the API used to bind Direct3D 10/11 to Windows, is a bit suboptimal, especially on non-Windows platforms. Finally, a mature Direct3D 10/11 implementation is intrinsically going to be faster and more reliable than an OpenGL implementation, thanks to the dramatically smaller API and the segregation of all nontrivial work to object creation that the application must perform ahead of time. Currently, this commit contains: - Independently created headers for Direct3D 10, 10.1, 11 and DXGI 1.1, partially based on the existing Wine headers for D3D10 and DXGI 1.0 - A parser for Direct3D 10/11 DXBC and TokenizedProgramFormat (TPF) - A shader translator from TokenizedProgramFormat to TGSI - Implementation of the Direct3D 11 core interfaces - Automatically generated implementation of Direct3D 10 and 10.1 - Implementation of DXGI using the "native" framework of the EGL st - Demos, usable either on Windows or on this implementation - d3d11tri, a clone of tri - d3d11tex, a (multi)texturing demo - d3d11gears, an improved version of glxgears - d3d11spikysphere, a D3D11 tessellation demo (currently Windows-only) - A downloader for the Microsoft HLSL compiler, needed to recompile the shaders (compiled shader bytecode is also included) To compile this, configure at least with these options: --with-state-trackers=egl,d3d1x --with-egl-platforms=x11 plus some gallium drivers (such as softpipe with --enable-gallium-swrast) The Wine headers (usually from a wine-dev or wine-devel package) must be installed. Only x86-32 has been tested. You may need to run "make" in the subdirectories of src/gallium/winsys/sw and you may need to manually run "sudo make install" in src/gallium/targets/egl To test it, run the demos in the "progs" directory. Windows binaries are included to find out how demos should work, and to test Wine integration when it will be done. Enjoy, and let me know if you manage to compile and run this, or which issues you are facing if not. Using softpipe is recommended for now, and your mileage with hardware drivers may vary. However, getting this to work on hardware drivers is also obviously very important. Note that currently llvmpipe is buggy and causes all 3 gears to be drawn with the same color. Use export GALLIUM_DRIVER=softpipe to avoid this. Thanks to all the Gallium contributors and especially the VMware team, whose work made it possible to implement Direct3D 10/11 much more easily than it would have been otherwise.
Diffstat (limited to 'src/gallium/state_trackers/d3d1x/d3dapi')
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/Makefile4
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3d10.idl1554
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl191
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h47
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl269
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl2492
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl287
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl700
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl470
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/dxgiformat.idl129
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl84
-rw-r--r--src/gallium/state_trackers/d3d1x/d3dapi/specstrings.h25
12 files changed, 6252 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/Makefile b/src/gallium/state_trackers/d3d1x/d3dapi/Makefile
new file mode 100644
index 00000000000..8b16b1bcbcf
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/Makefile
@@ -0,0 +1,4 @@
+all: idl
+
+include ../Makefile.inc
+
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10.idl
new file mode 100644
index 00000000000..c371bbea134
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10.idl
@@ -0,0 +1,1554 @@
+/*
+ * Copyright 2007 Andras Kovacs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* modified by Luca Barbieri on Sep 2010 to:
+ * - converted to using d3dcommon.idl
+ * - add missing D3D10_FORMAT_SUPPORT
+ * - add DXGI 1.1 D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX, D3D10_RESOURCE_MISC_GDI_COMPATIBLE
+*/
+import "oaidl.idl";
+import "ocidl.idl";
+import "dxgi.idl";
+import "d3dcommon.idl";
+
+cpp_quote("#ifndef _D3D10_CONSTANTS")
+cpp_quote("#define _D3D10_CONSTANTS")
+const float D3D10_DEFAULT_BLEND_FACTOR_ALPHA = 1.0;
+const float D3D10_DEFAULT_BLEND_FACTOR_BLUE = 1.0;
+const float D3D10_DEFAULT_BLEND_FACTOR_GREEN = 1.0;
+const float D3D10_DEFAULT_BLEND_FACTOR_RED = 1.0;
+const float D3D10_DEFAULT_BORDER_COLOR_COMPONENT = 0.0;
+const float D3D10_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0;
+const float D3D10_DEFAULT_DEPTH_BIAS_CLAMP = 0.0;
+const float D3D10_DEFAULT_MAX_ANISOTROPY = 16.0;
+const float D3D10_DEFAULT_MIP_LOD_BIAS = 0.0;
+const float D3D10_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0;
+const float D3D10_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0;
+const float D3D10_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6;
+const float D3D10_FLOAT32_MAX = 3.402823466e+38;
+const float D3D10_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6;
+const float D3D10_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 2.4;
+const float D3D10_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 1.0;
+const float D3D10_FLOAT_TO_SRGB_OFFSET = 0.055;
+const float D3D10_FLOAT_TO_SRGB_SCALE_1 = 12.92;
+const float D3D10_FLOAT_TO_SRGB_SCALE_2 = 1.055;
+const float D3D10_FLOAT_TO_SRGB_THRESHOLD = 0.0031308;
+const float D3D10_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999;
+const float D3D10_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999;
+const float D3D10_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999;
+const float D3D10_FTOU_INSTRUCTION_MIN_INPUT = 0.0;
+const float D3D10_LINEAR_GAMMA = 1.0;
+const float D3D10_MAX_BORDER_COLOR_COMPONENT = 1.0;
+const float D3D10_MAX_DEPTH = 1.0;
+const float D3D10_MAX_POSITION_VALUE = 3.402823466e+34;
+const float D3D10_MIN_BORDER_COLOR_COMPONENT = 0.0;
+const float D3D10_MIN_DEPTH = 0.0;
+const float D3D10_MIP_LOD_BIAS_MAX = 15.99;
+const float D3D10_MIP_LOD_BIAS_MIN = -16.0;
+const float D3D10_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5;
+const float D3D10_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4;
+const float D3D10_SRGB_GAMMA = 2.2;
+const float D3D10_SRGB_TO_FLOAT_DENOMINATOR_1 = 12.92;
+const float D3D10_SRGB_TO_FLOAT_DENOMINATOR_2 = 1.055;
+const float D3D10_SRGB_TO_FLOAT_EXPONENT = 2.4;
+const float D3D10_SRGB_TO_FLOAT_OFFSET = 0.055;
+const float D3D10_SRGB_TO_FLOAT_THRESHOLD = 0.04045;
+const float D3D10_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 0.5;
+const float D3D10_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0;
+const float D3D_SPEC_VERSION = 1.050005;
+const unsigned int D3D10_16BIT_INDEX_STRIP_CUT_VALUE = 0xffff;
+const unsigned int D3D10_32BIT_INDEX_STRIP_CUT_VALUE = 0xffffffff;
+const unsigned int D3D10_8BIT_INDEX_STRIP_CUT_VALUE = 0xff;
+const unsigned int D3D10_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9;
+const unsigned int D3D10_CLIP_OR_CULL_DISTANCE_COUNT = 8;
+const unsigned int D3D10_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64;
+const unsigned int D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1;
+const unsigned int D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D10_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1;
+const unsigned int D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128;
+const unsigned int D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D10_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128;
+const unsigned int D3D10_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1;
+const unsigned int D3D10_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16;
+const unsigned int D3D10_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D10_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT = 16;
+const unsigned int D3D10_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32;
+const unsigned int D3D10_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_COMMONSHADER_TEMP_REGISTER_COUNT = 4096;
+const unsigned int D3D10_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3;
+const unsigned int D3D10_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3;
+const unsigned int D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10;
+const int D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10;
+const int D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8;
+const unsigned int D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7;
+const unsigned int D3D10_DEFAULT_DEPTH_BIAS = 0;
+const unsigned int D3D10_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0;
+const unsigned int D3D10_DEFAULT_SAMPLE_MASK = 0xffffffff;
+const unsigned int D3D10_DEFAULT_SCISSOR_ENDX = 0;
+const unsigned int D3D10_DEFAULT_SCISSOR_ENDY = 0;
+const unsigned int D3D10_DEFAULT_SCISSOR_STARTX = 0;
+const unsigned int D3D10_DEFAULT_SCISSOR_STARTY = 0;
+const unsigned int D3D10_DEFAULT_STENCIL_READ_MASK = 0xff;
+const unsigned int D3D10_DEFAULT_STENCIL_REFERENCE = 0;
+const unsigned int D3D10_DEFAULT_STENCIL_WRITE_MASK = 0xff;
+const unsigned int D3D10_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0;
+const unsigned int D3D10_DEFAULT_VIEWPORT_HEIGHT = 0;
+const unsigned int D3D10_DEFAULT_VIEWPORT_TOPLEFTX = 0;
+const unsigned int D3D10_DEFAULT_VIEWPORT_TOPLEFTY = 0;
+const unsigned int D3D10_DEFAULT_VIEWPORT_WIDTH = 0;
+const unsigned int D3D10_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1;
+const unsigned int D3D10_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1;
+const unsigned int D3D10_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D10_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_GS_INPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT =32;
+const unsigned int D3D10_GS_INPUT_REGISTER_COUNT = 16;
+const unsigned int D3D10_GS_INPUT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D10_GS_INPUT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_GS_INPUT_REGISTER_VERTICES = 6;
+const unsigned int D3D10_GS_OUTPUT_ELEMENTS = 32;
+const unsigned int D3D10_GS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_GS_OUTPUT_REGISTER_COUNT = 32;
+const unsigned int D3D10_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0;
+const unsigned int D3D10_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0;
+const unsigned int D3D10_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0;
+const unsigned int D3D10_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1;
+const unsigned int D3D10_IA_INSTANCE_ID_BIT_COUNT = 32;
+const unsigned int D3D10_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32;
+const unsigned int D3D10_IA_PRIMITIVE_ID_BIT_COUNT = 32;
+const unsigned int D3D10_IA_VERTEX_ID_BIT_COUNT = 32;
+const unsigned int D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 16;
+const unsigned int D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 64;
+const unsigned int D3D10_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 16;
+const unsigned int D3D10_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xffffffff;
+const unsigned int D3D10_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xffffffff;
+const unsigned int D3D10_MAX_MAXANISOTROPY = 16;
+const unsigned int D3D10_MAX_MULTISAMPLE_SAMPLE_COUNT = 32;
+const unsigned int D3D10_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17;
+const unsigned int D3D10_MIN_MAXANISOTROPY = 0;
+const unsigned int D3D10_MIP_LOD_FRACTIONAL_BIT_COUNT = 6;
+const unsigned int D3D10_MIP_LOD_RANGE_BIT_COUNT = 8;
+const unsigned int D3D10_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0;
+const unsigned int D3D10_PIXEL_ADDRESS_RANGE_BIT_COUNT = 13;
+const unsigned int D3D10_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15;
+const unsigned int D3D10_PS_FRONTFACING_DEFAULT_VALUE = 0xffffffff;
+const unsigned int D3D10_PS_FRONTFACING_FALSE_VALUE = 0;
+const unsigned int D3D10_PS_FRONTFACING_TRUE_VALUE = 0xffffffff;
+const unsigned int D3D10_PS_INPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_PS_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D10_PS_INPUT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D10_PS_INPUT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1;
+const unsigned int D3D10_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1;
+const unsigned int D3D10_PS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_PS_OUTPUT_REGISTER_COUNT = 8;
+const unsigned int D3D10_REQ_BLEND_OBJECT_COUNT_PER_CONTEXT = 4096;
+const unsigned int D3D10_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27;
+const unsigned int D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
+const unsigned int D3D10_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_CONTEXT = 4096;
+const unsigned int D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32;
+const unsigned int D3D10_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32;
+const unsigned int D3D10_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 8192;
+const unsigned int D3D10_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024;
+const unsigned int D3D10_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
+const unsigned int D3D10_REQ_MAXANISOTROPY = 16;
+const unsigned int D3D10_REQ_MIP_LEVELS = 14;
+const unsigned int D3D10_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048;
+const unsigned int D3D10_REQ_RASTERIZER_OBJECT_COUNT_PER_CONTEXT = 4096;
+const unsigned int D3D10_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 8192;
+const unsigned int D3D10_REQ_RESOURCE_SIZE_IN_MEGABYTES = 128;
+const unsigned int D3D10_REQ_RESOURCE_VIEW_COUNT_PER_CONTEXT_2_TO_EXP = 20;
+const unsigned int D3D10_REQ_SAMPLER_OBJECT_COUNT_PER_CONTEXT = 4096;
+const unsigned int D3D10_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 512;
+const unsigned int D3D10_REQ_TEXTURE1D_U_DIMENSION = 8192;
+const unsigned int D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 512;
+const unsigned int D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION = 8192;
+const unsigned int D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048;
+const unsigned int D3D10_REQ_TEXTURECUBE_DIMENSION = 8192;
+const unsigned int D3D10_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0;
+const unsigned int D3D10_SHADER_MAJOR_VERSION = 4;
+const unsigned int D3D10_SHADER_MINOR_VERSION = 0;
+const unsigned int D3D10_SHIFT_INSTRUCTION_PAD_VALUE = 0;
+const unsigned int D3D10_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5;
+const unsigned int D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
+const unsigned int D3D10_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
+const unsigned int D3D10_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 256;
+const unsigned int D3D10_SO_BUFFER_SLOT_COUNT = 4;
+const unsigned int D3D10_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff;
+const unsigned int D3D10_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER = 1;
+const unsigned int D3D10_SO_SINGLE_BUFFER_COMPONENT_LIMIT = 64;
+const unsigned int D3D10_STANDARD_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64;
+const unsigned int D3D10_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4;
+const unsigned int D3D10_STANDARD_PIXEL_COMPONENT_COUNT = 128;
+const unsigned int D3D10_STANDARD_PIXEL_ELEMENT_COUNT = 32;
+const unsigned int D3D10_STANDARD_VECTOR_SIZE = 4;
+const unsigned int D3D10_STANDARD_VERTEX_ELEMENT_COUNT = 16;
+const unsigned int D3D10_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64;
+const unsigned int D3D10_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
+const unsigned int D3D10_SUBTEXEL_FRACTIONAL_BIT_COUNT = 6;
+const unsigned int D3D10_TEXEL_ADDRESS_RANGE_BIT_COUNT = 18;
+const unsigned int D3D10_UNBOUND_MEMORY_ACCESS_RESULT = 0;
+const unsigned int D3D10_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15;
+const unsigned int D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16;
+const unsigned int D3D10_VIEWPORT_BOUNDS_MAX = 16383;
+const int D3D10_VIEWPORT_BOUNDS_MIN = -16384;
+const unsigned int D3D10_VS_INPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_VS_INPUT_REGISTER_COUNT = 16;
+const unsigned int D3D10_VS_INPUT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D10_VS_INPUT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D10_VS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D10_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_VS_OUTPUT_REGISTER_COUNT = 16;
+const unsigned int D3D10_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10;
+const unsigned int D3D10_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25;
+const unsigned int D3D10_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25;
+const unsigned int D3D_MAJOR_VERSION = 10;
+const unsigned int D3D_MINOR_VERSION = 0;
+const unsigned int D3D_SPEC_DATE_DAY = 8;
+const unsigned int D3D_SPEC_DATE_MONTH = 8;
+const unsigned int D3D_SPEC_DATE_YEAR = 2006;
+cpp_quote("#endif")
+
+const unsigned int D3D10_APPEND_ALIGNED_ELEMENT = 0xffffffff;
+const unsigned int _FACD3D10 = 0x87;
+const unsigned int _FACD3D10DEBUG = _FACD3D10 + 1;
+const unsigned int D3D10_FILTER_TYPE_MASK = 0x3;
+const unsigned int D3D10_SDK_VERSION = 29;
+
+cpp_quote("#define MAKE_D3D10_HRESULT(code) MAKE_HRESULT( 1, _FACD3D10, code)")
+cpp_quote("#define MAKE_D3D10_STATUS(code) MAKE_HRESULT( 0, _FACD3D10, code)")
+cpp_quote("#define D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D10_HRESULT(1)")
+cpp_quote("#define D3D10_ERROR_FILE_NOT_FOUND MAKE_D3D10_HRESULT(2)")
+
+typedef enum D3D10_FORMAT_SUPPORT
+{
+ D3D10_FORMAT_SUPPORT_BUFFER = 0x1,
+ D3D10_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2,
+ D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4,
+ D3D10_FORMAT_SUPPORT_SO_BUFFER = 0x8,
+ D3D10_FORMAT_SUPPORT_TEXTURE1D = 0x10,
+ D3D10_FORMAT_SUPPORT_TEXTURE2D = 0x20,
+ D3D10_FORMAT_SUPPORT_TEXTURE3D = 0x40,
+ D3D10_FORMAT_SUPPORT_TEXTURECUBE = 0x80,
+ D3D10_FORMAT_SUPPORT_SHADER_LOAD = 0x100,
+ D3D10_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200,
+ D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400,
+ D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800,
+ D3D10_FORMAT_SUPPORT_MIP = 0x1000,
+ D3D10_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000,
+ D3D10_FORMAT_SUPPORT_RENDER_TARGET = 0x4000,
+ D3D10_FORMAT_SUPPORT_BLENDABLE = 0x8000,
+ D3D10_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000,
+ D3D10_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000,
+ D3D10_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000,
+ D3D10_FORMAT_SUPPORT_DISPLAY = 0x80000,
+ D3D10_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000,
+ D3D10_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000,
+ D3D10_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000,
+ D3D10_FORMAT_SUPPORT_SHADER_GATHER = 0x800000,
+} D3D10_FORMAT_SUPPORT;
+
+
+typedef enum D3D10_BLEND {
+ D3D10_BLEND_ZERO = 1,
+ D3D10_BLEND_ONE = 2,
+ D3D10_BLEND_SRC_COLOR = 3,
+ D3D10_BLEND_INV_SRC_COLOR = 4,
+ D3D10_BLEND_SRC_ALPHA = 5,
+ D3D10_BLEND_INV_SRC_ALPHA = 6,
+ D3D10_BLEND_DEST_ALPHA = 7,
+ D3D10_BLEND_INV_DEST_ALPHA = 8,
+ D3D10_BLEND_DEST_COLOR = 9,
+ D3D10_BLEND_INV_DEST_COLOR = 10,
+ D3D10_BLEND_SRC_ALPHA_SAT = 11,
+ D3D10_BLEND_BLEND_FACTOR = 14,
+ D3D10_BLEND_INV_BLEND_FACTOR = 15,
+ D3D10_BLEND_SRC1_COLOR = 16,
+ D3D10_BLEND_INV_SRC1_COLOR = 17,
+ D3D10_BLEND_SRC1_ALPHA = 18,
+ D3D10_BLEND_INV_SRC1_ALPHA = 19
+} D3D10_BLEND;
+
+typedef enum D3D10_BLEND_OP {
+ D3D10_BLEND_OP_ADD = 1,
+ D3D10_BLEND_OP_SUBTRACT,
+ D3D10_BLEND_OP_REV_SUBTRACT,
+ D3D10_BLEND_OP_MIN,
+ D3D10_BLEND_OP_MAX,
+} D3D10_BLEND_OP;
+
+typedef struct D3D10_BLEND_DESC {
+ BOOL AlphaToCoverageEnable;
+ BOOL BlendEnable[8];
+ D3D10_BLEND SrcBlend;
+ D3D10_BLEND DestBlend;
+ D3D10_BLEND_OP BlendOp;
+ D3D10_BLEND SrcBlendAlpha;
+ D3D10_BLEND DestBlendAlpha;
+ D3D10_BLEND_OP BlendOpAlpha;
+ UINT8 RenderTargetWriteMask[8];
+} D3D10_BLEND_DESC;
+
+typedef enum D3D10_DEPTH_WRITE_MASK {
+ D3D10_DEPTH_WRITE_MASK_ZERO,
+ D3D10_DEPTH_WRITE_MASK_ALL,
+} D3D10_DEPTH_WRITE_MASK;
+
+typedef enum D3D10_COMPARISON_FUNC {
+ D3D10_COMPARISON_NEVER = 1,
+ D3D10_COMPARISON_LESS,
+ D3D10_COMPARISON_EQUAL,
+ D3D10_COMPARISON_LESS_EQUAL,
+ D3D10_COMPARISON_GREATER,
+ D3D10_COMPARISON_NOT_EQUAL,
+ D3D10_COMPARISON_GREATER_EQUAL,
+ D3D10_COMPARISON_ALWAYS,
+} D3D10_COMPARISON_FUNC;
+
+typedef enum D3D10_STENCIL_OP {
+ D3D10_STENCIL_OP_KEEP = 1,
+ D3D10_STENCIL_OP_ZERO,
+ D3D10_STENCIL_OP_REPLACE,
+ D3D10_STENCIL_OP_INCR_SAT,
+ D3D10_STENCIL_OP_DECR_SAT,
+ D3D10_STENCIL_OP_INVERT,
+ D3D10_STENCIL_OP_INCR,
+ D3D10_STENCIL_OP_DECR,
+} D3D10_STENCIL_OP;
+
+typedef struct D3D10_DEPTH_STENCILOP_DESC {
+ D3D10_STENCIL_OP StencilFailOp;
+ D3D10_STENCIL_OP StencilDepthFailOp;
+ D3D10_STENCIL_OP StencilPassOp;
+ D3D10_COMPARISON_FUNC StencilFunc;
+} D3D10_DEPTH_STENCILOP_DESC;
+
+typedef struct D3D10_DEPTH_STENCIL_DESC {
+ BOOL DepthEnable;
+ D3D10_DEPTH_WRITE_MASK DepthWriteMask;
+ D3D10_COMPARISON_FUNC DepthFunc;
+ BOOL StencilEnable;
+ UINT8 StencilReadMask;
+ UINT8 StencilWriteMask;
+ D3D10_DEPTH_STENCILOP_DESC FrontFace;
+ D3D10_DEPTH_STENCILOP_DESC BackFace;
+} D3D10_DEPTH_STENCIL_DESC;
+
+typedef enum D3D10_FILL_MODE {
+ D3D10_FILL_WIREFRAME = 2,
+ D3D10_FILL_SOLID,
+} D3D10_FILL_MODE;
+
+typedef enum D3D10_CULL_MODE {
+ D3D10_CULL_NONE = 1,
+ D3D10_CULL_FRONT,
+ D3D10_CULL_BACK,
+} D3D10_CULL_MODE;
+
+typedef struct D3D10_RASTERIZER_DESC {
+ D3D10_FILL_MODE FillMode;
+ D3D10_CULL_MODE CullMode;
+ BOOL FrontCounterClockwise;
+ INT DepthBias;
+ FLOAT DepthBiasClamp;
+ FLOAT SlopeScaledDepthBias;
+ BOOL DepthClipEnable;
+ BOOL ScissorEnable;
+ BOOL MultisampleEnable;
+ BOOL AntialiasedLineEnable;
+} D3D10_RASTERIZER_DESC;
+
+typedef enum D3D10_FILTER {
+ D3D10_FILTER_MIN_MAG_MIP_POINT = 0,
+ D3D10_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1,
+ D3D10_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4,
+ D3D10_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5,
+ D3D10_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
+ D3D10_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
+ D3D10_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
+ D3D10_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
+ D3D10_FILTER_ANISOTROPIC = 0x55,
+ D3D10_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
+ D3D10_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
+ D3D10_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
+ D3D10_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
+ D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
+ D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
+ D3D10_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
+ D3D10_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
+ D3D10_FILTER_COMPARISON_ANISOTROPIC = 0xd5,
+ D3D10_FILTER_TEXT_1BIT = 0x80000000
+} D3D10_FILTER;
+
+typedef enum D3D10_TEXTURE_ADDRESS_MODE {
+ D3D10_TEXTURE_ADDRESS_WRAP = 1,
+ D3D10_TEXTURE_ADDRESS_MIRROR,
+ D3D10_TEXTURE_ADDRESS_CLAMP,
+ D3D10_TEXTURE_ADDRESS_BORDER,
+ D3D10_TEXTURE_ADDRESS_MIRROR_ONCE,
+} D3D10_TEXTURE_ADDRESS_MODE;
+
+typedef struct D3D10_SAMPLER_DESC {
+ D3D10_FILTER Filter;
+ D3D10_TEXTURE_ADDRESS_MODE AddressU;
+ D3D10_TEXTURE_ADDRESS_MODE AddressV;
+ D3D10_TEXTURE_ADDRESS_MODE AddressW;
+ FLOAT MipLODBias;
+ UINT MaxAnisotropy;
+ D3D10_COMPARISON_FUNC ComparisonFunc;
+ FLOAT BorderColor[4];
+ FLOAT MinLOD;
+ FLOAT MaxLOD;
+} D3D10_SAMPLER_DESC;
+
+typedef enum D3D10_COUNTER {
+ D3D10_COUNTER_GPU_IDLE,
+ D3D10_COUNTER_VERTEX_PROCESSING,
+ D3D10_COUNTER_GEOMETRY_PROCESSING,
+ D3D10_COUNTER_PIXEL_PROCESSING,
+ D3D10_COUNTER_OTHER_GPU_PROCESSING,
+ D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION,
+ D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION,
+ D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION,
+ D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION,
+ D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION,
+ D3D10_COUNTER_VS_MEMORY_LIMITED,
+ D3D10_COUNTER_VS_COMPUTATION_LIMITED,
+ D3D10_COUNTER_GS_MEMORY_LIMITED,
+ D3D10_COUNTER_GS_COMPUTATION_LIMITED,
+ D3D10_COUNTER_PS_MEMORY_LIMITED,
+ D3D10_COUNTER_PS_COMPUTATION_LIMITED,
+ D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE,
+ D3D10_COUNTER_TEXTURE_CACHE_HIT_RATE,
+ D3D10_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000
+} D3D10_COUNTER;
+
+typedef struct D3D10_COUNTER_DESC {
+ D3D10_COUNTER Counter;
+ UINT MiscFlags;
+} D3D10_COUNTER_DESC;
+
+typedef enum D3D10_COUNTER_TYPE {
+ D3D10_COUNTER_TYPE_FLOAT32,
+ D3D10_COUNTER_TYPE_UINT16,
+ D3D10_COUNTER_TYPE_UINT32,
+ D3D10_COUNTER_TYPE_UINT64,
+} D3D10_COUNTER_TYPE;
+
+typedef struct D3D10_COUNTER_INFO {
+ D3D10_COUNTER LastDeviceDependentCounter;
+ UINT NumSimultaneousCounters;
+ UINT8 NumDetectableParallelUnits;
+} D3D10_COUNTER_INFO;
+
+typedef enum D3D10_RESOURCE_DIMENSION {
+ D3D10_RESOURCE_DIMENSION_UNKNOWN,
+ D3D10_RESOURCE_DIMENSION_BUFFER,
+ D3D10_RESOURCE_DIMENSION_TEXTURE1D,
+ D3D10_RESOURCE_DIMENSION_TEXTURE2D,
+ D3D10_RESOURCE_DIMENSION_TEXTURE3D,
+} D3D10_RESOURCE_DIMENSION;
+
+typedef enum D3D10_USAGE {
+ D3D10_USAGE_DEFAULT,
+ D3D10_USAGE_IMMUTABLE,
+ D3D10_USAGE_DYNAMIC,
+ D3D10_USAGE_STAGING,
+} D3D10_USAGE;
+
+typedef struct D3D10_BUFFER_DESC {
+ UINT ByteWidth;
+ D3D10_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D10_BUFFER_DESC;
+
+typedef enum D3D10_MAP {
+ D3D10_MAP_READ = 1,
+ D3D10_MAP_WRITE,
+ D3D10_MAP_READ_WRITE,
+ D3D10_MAP_WRITE_DISCARD,
+ D3D10_MAP_WRITE_NO_OVERWRITE,
+} D3D10_MAP;
+
+typedef struct D3D10_TEXTURE1D_DESC {
+ UINT Width;
+ UINT MipLevels;
+ UINT ArraySize;
+ DXGI_FORMAT Format;
+ D3D10_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D10_TEXTURE1D_DESC;
+
+typedef struct D3D10_TEXTURE2D_DESC {
+ UINT Width;
+ UINT Height;
+ UINT MipLevels;
+ UINT ArraySize;
+ DXGI_FORMAT Format;
+ DXGI_SAMPLE_DESC SampleDesc;
+ D3D10_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D10_TEXTURE2D_DESC;
+
+typedef struct D3D10_TEXTURE3D_DESC {
+ UINT Width;
+ UINT Height;
+ UINT Depth;
+ UINT MipLevels;
+ DXGI_FORMAT Format;
+ D3D10_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D10_TEXTURE3D_DESC;
+
+typedef enum D3D10_DSV_DIMENSION
+{
+ D3D10_DSV_DIMENSION_UNKNOWN,
+ D3D10_DSV_DIMENSION_TEXTURE1D,
+ D3D10_DSV_DIMENSION_TEXTURE1DARRAY,
+ D3D10_DSV_DIMENSION_TEXTURE2D,
+ D3D10_DSV_DIMENSION_TEXTURE2DARRAY,
+ D3D10_DSV_DIMENSION_TEXTURE2DMS,
+ D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY,
+} D3D10_DSV_DIMENSION;
+
+typedef struct D3D10_TEX1D_DSV {
+ UINT MipSlice;
+} D3D10_TEX1D_DSV;
+
+typedef struct D3D10_TEX1D_ARRAY_DSV {
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX1D_ARRAY_DSV;
+
+typedef struct D3D10_TEX2D_DSV {
+ UINT MipSlice;
+} D3D10_TEX2D_DSV;
+
+typedef struct D3D10_TEX2D_ARRAY_DSV {
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX2D_ARRAY_DSV;
+
+typedef struct D3D10_TEX2DMS_DSV {
+ UINT UnusedField_NothingToDefine;
+} D3D10_TEX2DMS_DSV;
+
+typedef struct D3D10_TEX2DMS_ARRAY_DSV {
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX2DMS_ARRAY_DSV;
+
+typedef struct D3D10_DEPTH_STENCIL_VIEW_DESC {
+ DXGI_FORMAT Format;
+ D3D10_DSV_DIMENSION ViewDimension;
+ union {
+ D3D10_TEX1D_DSV Texture1D;
+ D3D10_TEX1D_ARRAY_DSV Texture1DArray;
+ D3D10_TEX2D_DSV Texture2D;
+ D3D10_TEX2D_ARRAY_DSV Texture2DArray;
+ D3D10_TEX2DMS_DSV Texture2DMS;
+ D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray;
+ } DUMMYUNIONNAME;
+} D3D10_DEPTH_STENCIL_VIEW_DESC;
+
+typedef enum D3D10_RTV_DIMENSION {
+ D3D10_RTV_DIMENSION_UNKNOWN,
+ D3D10_RTV_DIMENSION_BUFFER,
+ D3D10_RTV_DIMENSION_TEXTURE1D,
+ D3D10_RTV_DIMENSION_TEXTURE1DARRAY,
+ D3D10_RTV_DIMENSION_TEXTURE2D,
+ D3D10_RTV_DIMENSION_TEXTURE2DARRAY,
+ D3D10_RTV_DIMENSION_TEXTURE2DMS,
+ D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY,
+ D3D10_RTV_DIMENSION_TEXTURE3D,
+} D3D10_RTV_DIMENSION;
+
+typedef struct D3D10_BUFFER_RTV {
+ UINT ElementOffset;
+ UINT ElementWidth;
+} D3D10_BUFFER_RTV;
+
+typedef struct D3D10_TEX1D_RTV {
+ UINT MipSlice;
+} D3D10_TEX1D_RTV;
+
+typedef struct D3D10_TEX1D_ARRAY_RTV {
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX1D_ARRAY_RTV;
+
+typedef struct D3D10_TEX2D_RTV {
+ UINT MipSlice;
+} D3D10_TEX2D_RTV;
+
+typedef struct D3D10_TEX2D_ARRAY_RTV {
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX2D_ARRAY_RTV;
+
+typedef struct D3D10_TEX2DMS_RTV {
+ UINT UnusedField_NothingToDefine;
+} D3D10_TEX2DMS_RTV;
+
+typedef struct D3D10_TEX2DMS_ARRAY_RTV {
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX2DMS_ARRAY_RTV;
+
+typedef struct D3D10_TEX3D_RTV {
+ UINT MipSlice;
+ UINT FirstWSlice;
+ UINT WSize;
+} D3D10_TEX3D_RTV;
+
+typedef struct D3D10_RENDER_TARGET_VIEW_DESC {
+ DXGI_FORMAT Format;
+ D3D10_RTV_DIMENSION ViewDimension;
+ union {
+ D3D10_BUFFER_RTV Buffer;
+ D3D10_TEX1D_RTV Texture1D;
+ D3D10_TEX1D_ARRAY_RTV Texture1DArray;
+ D3D10_TEX2D_RTV Texture2D;
+ D3D10_TEX2D_ARRAY_RTV Texture2DArray;
+ D3D10_TEX2DMS_RTV Texture2DMS;
+ D3D10_TEX2DMS_ARRAY_RTV Texture2DMSArray;
+ D3D10_TEX3D_RTV Texture3D;
+ } DUMMYUNIONNAME;
+} D3D10_RENDER_TARGET_VIEW_DESC;
+
+typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION;
+
+typedef struct D3D10_BUFFER_SRV {
+ UINT ElementOffset;
+ UINT ElementWidth;
+} D3D10_BUFFER_SRV;
+
+typedef struct D3D10_TEX1D_SRV {
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D10_TEX1D_SRV;
+
+typedef struct D3D10_TEX1D_ARRAY_SRV {
+ UINT MostDetailedMip;
+ UINT MipLevels;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX1D_ARRAY_SRV;
+
+typedef struct D3D10_TEX2D_SRV {
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D10_TEX2D_SRV;
+
+typedef struct D3D10_TEX2D_ARRAY_SRV {
+ UINT MostDetailedMip;
+ UINT MipLevels;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX2D_ARRAY_SRV;
+
+typedef struct D3D10_TEX2DMS_SRV {
+ UINT UnusedField_NothingToDefine;
+} D3D10_TEX2DMS_SRV;
+
+typedef struct D3D10_TEX2DMS_ARRAY_SRV {
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D10_TEX2DMS_ARRAY_SRV;
+
+typedef struct D3D10_TEX3D_SRV {
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D10_TEX3D_SRV;
+
+typedef struct D3D10_TEXCUBE_SRV {
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D10_TEXCUBE_SRV;
+
+typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC {
+ DXGI_FORMAT Format;
+ D3D10_SRV_DIMENSION ViewDimension;
+ union {
+ D3D10_BUFFER_SRV Buffer;
+ D3D10_TEX1D_SRV Texture1D;
+ D3D10_TEX1D_ARRAY_SRV Texture1DArray;
+ D3D10_TEX2D_SRV Texture2D;
+ D3D10_TEX2D_ARRAY_SRV Texture2DArray;
+ D3D10_TEX2DMS_SRV Texture2DMS;
+ D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray;
+ D3D10_TEX3D_SRV Texture3D;
+ D3D10_TEXCUBE_SRV TextureCube;
+ } DUMMYUNIONNAME;
+} D3D10_SHADER_RESOURCE_VIEW_DESC;
+
+typedef struct D3D10_BOX {
+ UINT left;
+ UINT top;
+ UINT front;
+ UINT right;
+ UINT bottom;
+ UINT back;
+} D3D10_BOX;
+
+typedef struct D3D10_SUBRESOURCE_DATA {
+ const void *pSysMem;
+ UINT SysMemPitch;
+ UINT SysMemSlicePitch;
+} D3D10_SUBRESOURCE_DATA;
+
+typedef struct D3D10_SO_DECLARATION_ENTRY {
+ LPCSTR SemanticName;
+ UINT SemanticIndex;
+ BYTE StartComponent;
+ BYTE ComponentCount;
+ BYTE OutputSlot;
+} D3D10_SO_DECLARATION_ENTRY;
+
+typedef enum D3D10_INPUT_CLASSIFICATION {
+ D3D10_INPUT_PER_VERTEX_DATA,
+ D3D10_INPUT_PER_INSTANCE_DATA,
+} D3D10_INPUT_CLASSIFICATION;
+
+typedef struct D3D10_INPUT_ELEMENT_DESC {
+ LPCSTR SemanticName;
+ UINT SemanticIndex;
+ DXGI_FORMAT Format;
+ UINT InputSlot;
+ UINT AlignedByteOffset;
+ D3D10_INPUT_CLASSIFICATION InputSlotClass;
+ UINT InstanceDataStepRate;
+} D3D10_INPUT_ELEMENT_DESC;
+
+typedef enum D3D10_QUERY {
+ D3D10_QUERY_EVENT,
+ D3D10_QUERY_OCCLUSION,
+ D3D10_QUERY_TIMESTAMP,
+ D3D10_QUERY_TIMESTAMP_DISJOINT,
+ D3D10_QUERY_PIPELINE_STATISTICS,
+ D3D10_QUERY_OCCLUSION_PREDICATE,
+ D3D10_QUERY_SO_STATISTICS,
+ D3D10_QUERY_SO_OVERFLOW_PREDICATE,
+} D3D10_QUERY;
+
+typedef struct D3D10_QUERY_DESC {
+ D3D10_QUERY Query;
+ UINT MiscFlags;
+} D3D10_QUERY_DESC;
+
+typedef D3D_PRIMITIVE_TOPOLOGY D3D10_PRIMITIVE_TOPOLOGY;
+
+typedef RECT D3D10_RECT;
+
+typedef struct D3D10_VIEWPORT {
+ INT TopLeftX;
+ INT TopLeftY;
+ UINT Width;
+ UINT Height;
+ FLOAT MinDepth;
+ FLOAT MaxDepth;
+} D3D10_VIEWPORT;
+
+typedef struct D3D10_MAPPED_TEXTURE2D {
+ void *pData;
+ UINT RowPitch;
+} D3D10_MAPPED_TEXTURE2D;
+
+typedef struct D3D10_MAPPED_TEXTURE3D {
+ void *pData;
+ UINT RowPitch;
+ UINT DepthPitch;
+} D3D10_MAPPED_TEXTURE3D;
+
+typedef enum D3D10_BIND_FLAG {
+ D3D10_BIND_VERTEX_BUFFER = 0x1,
+ D3D10_BIND_INDEX_BUFFER = 0x2,
+ D3D10_BIND_CONSTANT_BUFFER = 0x4,
+ D3D10_BIND_SHADER_RESOURCE = 0x8,
+ D3D10_BIND_STREAM_OUTPUT = 0x10,
+ D3D10_BIND_RENDER_TARGET = 0x20,
+ D3D10_BIND_DEPTH_STENCIL = 0x40
+} D3D10_BIND_FLAG;
+
+typedef enum D3D10_CPU_ACCESS_FLAG {
+ D3D10_CPU_ACCESS_WRITE = 0x10000,
+ D3D10_CPU_ACCESS_READ = 0x20000
+} D3D10_CPU_ACCESS_FLAG;
+
+typedef enum D3D10_RESOURCE_MISC_FLAG {
+ D3D10_RESOURCE_MISC_GENERATE_MIPS = 0x1,
+ D3D10_RESOURCE_MISC_SHARED = 0x2,
+ D3D10_RESOURCE_MISC_TEXTURECUBE = 0x4,
+ D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x10L,
+ D3D10_RESOURCE_MISC_GDI_COMPATIBLE = 0x20L
+} D3D10_RESOURCE_MISC_FLAG;
+
+typedef enum D3D10_MAP_FLAG {
+ D3D10_MAP_FLAG_DO_NOT_WAIT = 0x100000,
+} D3D10_MAP_FLAG;
+
+typedef enum D3D10_CLEAR_FLAG {
+ D3D10_CLEAR_DEPTH = 0x1,
+ D3D10_CLEAR_STENCIL = 0x2
+} D3D10_CLEAR_FLAG;
+
+typedef enum D3D10_COLOR_WRITE_ENABLE {
+ D3D10_COLOR_WRITE_ENABLE_RED = 0x1,
+ D3D10_COLOR_WRITE_ENABLE_GREEN = 0x2,
+ D3D10_COLOR_WRITE_ENABLE_BLUE = 0x4,
+ D3D10_COLOR_WRITE_ENABLE_ALPHA = 0x8,
+ D3D10_COLOR_WRITE_ENABLE_ALL = (D3D10_COLOR_WRITE_ENABLE_RED | D3D10_COLOR_WRITE_ENABLE_GREEN |
+ D3D10_COLOR_WRITE_ENABLE_BLUE | D3D10_COLOR_WRITE_ENABLE_ALPHA)
+} D3D10_COLOR_WRITE_ENABLE;
+
+typedef enum D3D10_TEXTURECUBE_FACE {
+ D3D10_TEXTURECUBE_FACE_POSITIVE_X,
+ D3D10_TEXTURECUBE_FACE_NEGATIVE_X,
+ D3D10_TEXTURECUBE_FACE_POSITIVE_Y,
+ D3D10_TEXTURECUBE_FACE_NEGATIVE_Y,
+ D3D10_TEXTURECUBE_FACE_POSITIVE_Z,
+ D3D10_TEXTURECUBE_FACE_NEGATIVE_Z,
+} D3D10_TEXTURECUBE_FACE;
+
+typedef enum D3D10_ASYNC_GETDATA_FLAG {
+ D3D10_ASYNC_GETDATA_DONOTFLUSH = 0x1,
+} D3D10_ASYNC_GETDATA_FLAG;
+
+typedef enum D3D10_FILTER_TYPE {
+ D3D10_FILTER_TYPE_POINT,
+ D3D10_FILTER_TYPE_LINEAR
+} D3D10_FILTER_TYPE;
+
+typedef enum D3D10_QUERY_MISC_FLAG {
+ D3D10_QUERY_MISC_PREDICATEHINT = 0x1
+} D3D10_QUERY_MISC_FLAG;
+
+typedef struct D3D10_QUERY_DATA_TIMESTAMP_DISJOINT {
+ UINT64 Frequency;
+ BOOL Disjoint;
+} D3D10_QUERY_DATA_TIMESTAMP_DISJOINT;
+
+typedef struct D3D10_QUERY_DATA_PIPELINE_STATISTICS {
+ UINT64 IAVertices;
+ UINT64 IAPrimitives;
+ UINT64 VSInvocations;
+ UINT64 GSInvocations;
+ UINT64 GSPrimitives;
+ UINT64 CInvocations;
+ UINT64 CPrimitives;
+ UINT64 PSInvocations;
+} D3D10_QUERY_DATA_PIPELINE_STATISTICS;
+
+typedef struct D3D10_QUERY_DATA_SO_STATISTICS {
+ UINT64 NumPrimitivesWritten;
+ UINT64 PrimitivesStorageNeeded;
+} D3D10_QUERY_DATA_SO_STATISTICS;
+
+typedef enum D3D10_CREATE_DEVICE_FLAG {
+ D3D10_CREATE_DEVICE_SINGLETHREADED = 0x1,
+ D3D10_CREATE_DEVICE_DEBUG = 0x2,
+ D3D10_CREATE_DEVICE_SWITCH_TO_REF = 0x4,
+ D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8
+} D3D10_CREATE_DEVICE_FLAG;
+
+/* Core */
+
+interface ID3D10Device;
+
+[
+ object,
+ local,
+ uuid(9b7e4c00-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10DeviceChild : IUnknown
+{
+ void GetDevice(
+ [out] ID3D10Device **ppDevice);
+ HRESULT GetPrivateData(
+ [in] REFGUID guid,
+ [in, out] UINT *pDataSize,
+ [out] void *pData);
+ HRESULT SetPrivateData(
+ [in] REFGUID guid,
+ [in] UINT DataSize,
+ [in] const void *pData);
+ HRESULT SetPrivateDataInterface(
+ [in] REFGUID guid,
+ [in] const IUnknown *pData);
+}
+
+/* Resource */
+
+[
+ object,
+ local,
+ uuid(9b7e4c01-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Resource : ID3D10DeviceChild
+{
+ void GetType(
+ [out] D3D10_RESOURCE_DIMENSION *rType);
+ void SetEvictionPriority(
+ [in] UINT EvictionPriority);
+ UINT GetEvictionPriority();
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c02-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Buffer : ID3D10Resource
+{
+ HRESULT Map(
+ [in] D3D10_MAP MapType,
+ [in] UINT MapFlags,
+ [out] void **ppData);
+ void Unmap();
+ void GetDesc(
+ [out] D3D10_BUFFER_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c03-342c-4106-a19f-4f2704f689F0)
+]
+interface ID3D10Texture1D : ID3D10Resource
+{
+ HRESULT Map(
+ [in] UINT Subresource,
+ [in] D3D10_MAP MapType,
+ [in] UINT MapFlags,
+ [out] void **ppData);
+ void Unmap(
+ [in] UINT Subresource);
+ void GetDesc(
+ [out] D3D10_TEXTURE1D_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c04-342c-4106-a19f-4f2704f689F0)
+]
+interface ID3D10Texture2D : ID3D10Resource
+{
+ HRESULT Map(
+ [in] UINT Subresource,
+ [in] D3D10_MAP MapType,
+ [in] UINT MapFlags,
+ [out] D3D10_MAPPED_TEXTURE2D *pMappedTex2D);
+ void Unmap(
+ [in] UINT Subresource);
+ void GetDesc(
+ [out] D3D10_TEXTURE2D_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c05-342c-4106-a19f-4f2704f689F0)
+]
+interface ID3D10Texture3D : ID3D10Resource
+{
+ HRESULT Map(
+ [in] UINT Subresource,
+ [in] D3D10_MAP MapType,
+ [in] UINT MapFlags,
+ [out] D3D10_MAPPED_TEXTURE3D *pMappedTex3D);
+ void Unmap(
+ [in] UINT Subresource);
+ void GetDesc(
+ [out] D3D10_TEXTURE3D_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(c902b03f-60a7-49ba-9936-2a3ab37a7e33)
+]
+interface ID3D10View : ID3D10DeviceChild
+{
+ void GetResource(
+ [out] ID3D10Resource **ppResource);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c09-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10DepthStencilView : ID3D10View
+{
+ void GetDesc(
+ [out] D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc);
+}
+
+
+[
+ object,
+ local,
+ uuid(9b7e4c08-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10RenderTargetView : ID3D10View
+{
+ void GetDesc(
+ [out] D3D10_RENDER_TARGET_VIEW_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c07-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10ShaderResourceView : ID3D10View
+{
+ void GetDesc(
+ [out] D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc);
+}
+
+/* Resource End */
+
+[
+ object,
+ local,
+ uuid(edad8d19-8a35-4d6d-8566-2ea276cde161)
+]
+interface ID3D10BlendState : ID3D10DeviceChild
+{
+ void GetDesc(
+ [out] D3D10_BLEND_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(2b4b1cc8-a4ad-41f8-8322-ca86fc3ec675)
+]
+interface ID3D10DepthStencilState : ID3D10DeviceChild
+{
+ void GetDesc(
+ [out] D3D10_DEPTH_STENCIL_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(6316be88-54cd-4040-ab44-20461bc81f68)
+]
+interface ID3D10GeometryShader : ID3D10DeviceChild
+{
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c0b-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10InputLayout : ID3D10DeviceChild
+{
+}
+
+[
+ object,
+ local,
+ uuid(4968b601-9d00-4cde-8346-8e7f675819b6)
+]
+interface ID3D10PixelShader : ID3D10DeviceChild
+{
+}
+
+[
+ object,
+ local,
+ uuid(a2a07292-89af-4345-be2e-c53d9fbb6e9f)
+]
+interface ID3D10RasterizerState : ID3D10DeviceChild
+{
+ void GetDesc(
+ [out] D3D10_RASTERIZER_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c0c-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10SamplerState : ID3D10DeviceChild
+{
+ void GetDesc(
+ [out] D3D10_SAMPLER_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c0a-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10VertexShader : ID3D10DeviceChild
+{
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c0d-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Asynchronous : ID3D10DeviceChild
+{
+ void Begin();
+ void End();
+ HRESULT GetData(
+ [out] void *pData,
+ [in] UINT DataSize,
+ [in] UINT GetDataFlags);
+ UINT GetDataSize();
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c11-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Counter : ID3D10Asynchronous
+{
+ void GetDesc(
+ [out] D3D10_COUNTER_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4C0e-342C-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Query : ID3D10Asynchronous
+{
+ void GetDesc(
+ [out] D3D10_QUERY_DESC *pDesc);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c10-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Predicate : ID3D10Query
+{
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4c0f-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Device : IUnknown
+{
+ void VSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D10Buffer *const *ppConstantBuffers);
+ void PSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D10ShaderResourceView *const *ppShaderResourceViews);
+ void PSSetShader(
+ [in] ID3D10PixelShader *pPixelShader);
+ void PSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in]ID3D10SamplerState *const *ppSamplers);
+ void VSSetShader(
+ [in] ID3D10VertexShader *pVertexShader);
+ void DrawIndexed(
+ [in] UINT IndexCount,
+ [in] UINT StartIndexLocation,
+ [in] INT BaseVertexLocation);
+ void Draw(
+ [in] UINT VertexCount,
+ [in] UINT StartVertexLocation);
+ void PSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D10Buffer *const *ppConstantBuffers);
+ void IASetInputLayout(
+ [in] ID3D10InputLayout *pInputLayout);
+ void IASetVertexBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D10Buffer *const *ppVertexBuffers,
+ [in] const UINT *pStrides,
+ [in] const UINT *pOffsets);
+ void IASetIndexBuffer(
+ [in] ID3D10Buffer *pIndexBuffer,
+ [in] DXGI_FORMAT Format,
+ [in] UINT Offset);
+ void DrawIndexedInstanced(
+ [in] UINT IndexCountPerInstance,
+ [in] UINT InstanceCount,
+ [in] UINT StartIndexLocation,
+ [in] INT BaseVertexLocation,
+ [in] UINT StartInstanceLocation);
+ void DrawInstanced(
+ [in] UINT VertexCountPerInstance,
+ [in] UINT InstanceCount,
+ [in] UINT StartVertexLocation,
+ [in] UINT StartInstanceLocation);
+ void GSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D10Buffer *const *ppConstantBuffers);
+ void GSSetShader(
+ [in] ID3D10GeometryShader *pShader);
+ void IASetPrimitiveTopology(
+ [in] D3D10_PRIMITIVE_TOPOLOGY Topology);
+ void VSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D10ShaderResourceView *const *ppShaderResourceViews);
+ void VSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D10SamplerState *const *ppSamplers);
+ void SetPredication(
+ [in] ID3D10Predicate *pPredicate,
+ [in] BOOL PredicateValue);
+ void GSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D10ShaderResourceView * const *ppShaderResourceViews);
+ void GSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D10SamplerState *const *ppSamplers);
+ void OMSetRenderTargets(
+ [in] UINT NumViews,
+ [in] ID3D10RenderTargetView *const *ppRenderTargetViews,
+ [in] ID3D10DepthStencilView *pDepthStencilView);
+ void OMSetBlendState(
+ [in] ID3D10BlendState *pBlendState,
+ [in] const FLOAT BlendFactor[4],
+ [in] UINT SampleMask);
+ void OMSetDepthStencilState(
+ [in] ID3D10DepthStencilState *pDepthStencilState,
+ [in] UINT StencilRef);
+ void SOSetTargets(
+ [in] UINT NumBuffers,
+ [in] ID3D10Buffer *const *ppSOTargets,
+ [in] const UINT *pOffsets);
+ void DrawAuto();
+ void RSSetState(
+ [in] ID3D10RasterizerState *pRasterizerState);
+ void RSSetViewports(
+ [in] UINT NumViewports,
+ [in] const D3D10_VIEWPORT *pViewports);
+ void RSSetScissorRects(
+ [in] UINT NumRects,
+ [in] const D3D10_RECT *pRects);
+ void CopySubresourceRegion(
+ [in] ID3D10Resource *pDstResource,
+ [in] UINT DstSubresource,
+ [in] UINT DstX,
+ [in] UINT DstY,
+ [in] UINT DstZ,
+ [in] ID3D10Resource *pSrcResource,
+ [in] UINT SrcSubresource,
+ [in] const D3D10_BOX *pSrcBox);
+ void CopyResource(
+ [in] ID3D10Resource *pDstResource,
+ [in] ID3D10Resource *pSrcResource);
+ void UpdateSubresource(
+ [in] ID3D10Resource *pDstResource,
+ [in] UINT DstSubresource,
+ [in] const D3D10_BOX *pDstBox,
+ [in] const void *pSrcData,
+ [in] UINT SrcRowPitch,
+ [in] UINT SrcDepthPitch);
+ void ClearRenderTargetView(
+ [in] ID3D10RenderTargetView *pRenderTargetView,
+ [in] const FLOAT ColorRGBA[4]);
+ void ClearDepthStencilView(
+ [in] ID3D10DepthStencilView *pDepthStencilView,
+ [in] UINT ClearFlags,
+ [in] FLOAT Depth,
+ [in] UINT8 Stencil);
+ void GenerateMips(
+ [in] ID3D10ShaderResourceView *pShaderResourceView);
+ void ResolveSubresource(
+ [in] ID3D10Resource *pDstResource,
+ [in] UINT DstSubresource,
+ [in] ID3D10Resource *pSrcResource,
+ [in] UINT SrcSubresource,
+ [in] DXGI_FORMAT Format);
+ void VSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D10Buffer **ppConstantBuffers);
+ void PSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D10ShaderResourceView **ppShaderResourceViews);
+ void PSGetShader(
+ [out] ID3D10PixelShader **ppPixelShader);
+ void PSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D10SamplerState **ppSamplers);
+ void VSGetShader(
+ [out] ID3D10VertexShader **ppVertexShader);
+ void PSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D10Buffer **ppConstantBuffers);
+ void IAGetInputLayout(
+ [out] ID3D10InputLayout **ppInputLayout);
+ void IAGetVertexBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D10Buffer **ppVertexBuffers,
+ [out] UINT *pStrides,
+ [out] UINT *pOffsets);
+ void IAGetIndexBuffer(
+ [out] ID3D10Buffer **pIndexBuffer,
+ [out] DXGI_FORMAT *Format,
+ [out] UINT *Offset);
+ void GSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D10Buffer **ppConstantBuffers);
+ void GSGetShader(
+ [out] ID3D10GeometryShader **ppGeometryShader);
+ void IAGetPrimitiveTopology(
+ [out] D3D10_PRIMITIVE_TOPOLOGY *pTopology);
+ void VSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D10ShaderResourceView **ppShaderResourceViews);
+ void VSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D10SamplerState **ppSamplers);
+ void GetPredication(
+ [out] ID3D10Predicate **ppPredicate,
+ [out] BOOL *pPredicateValue);
+ void GSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D10ShaderResourceView **ppShaderResourceViews);
+ void GSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D10SamplerState **ppSamplers);
+ void OMGetRenderTargets(
+ [in] UINT NumViews,
+ [out] ID3D10RenderTargetView **ppRenderTargetViews,
+ [out] ID3D10DepthStencilView **ppDepthStencilView);
+ void OMGetBlendState(
+ [out] ID3D10BlendState **ppBlendState,
+ [out] FLOAT BlendFactor[4],
+ [out] UINT *pSampleMask);
+ void OMGetDepthStencilState(
+ [out] ID3D10DepthStencilState **ppDepthStencilState,
+ [out] UINT *pStencilRef);
+ void SOGetTargets(
+ [in] UINT NumBuffers,
+ [out] ID3D10Buffer **ppSOTargets,
+ [out] UINT *pOffsets);
+ void RSGetState(
+ [out] ID3D10RasterizerState **ppRasterizerState);
+ void RSGetViewports(
+ [in, out] UINT *NumViewports,
+ [out] D3D10_VIEWPORT *pViewports);
+ void RSGetScissorRects(
+ [in, out] UINT *NumRects,
+ [out] D3D10_RECT *pRects);
+ HRESULT GetDeviceRemovedReason();
+ HRESULT SetExceptionMode(
+ [in] UINT RaiseFlags);
+ UINT GetExceptionMode();
+ HRESULT GetPrivateData(
+ [in] REFGUID guid,
+ [in, out] UINT *pDataSize,
+ [out] void *pData);
+ HRESULT SetPrivateData(
+ [in] REFGUID guid,
+ [in] UINT DataSize,
+ [in] const void *pData);
+ HRESULT SetPrivateDataInterface(
+ [in] REFGUID guid,
+ [in] const IUnknown *pData);
+ void ClearState();
+ void Flush();
+ HRESULT CreateBuffer(
+ [in] const D3D10_BUFFER_DESC *pDesc,
+ [in] const D3D10_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D10Buffer **ppBuffer);
+ HRESULT CreateTexture1D(
+ [in] const D3D10_TEXTURE1D_DESC *pDesc,
+ [in] const D3D10_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D10Texture1D **ppTexture1D);
+ HRESULT CreateTexture2D(
+ [in] const D3D10_TEXTURE2D_DESC *pDesc,
+ [in] const D3D10_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D10Texture2D **ppTexture2D);
+ HRESULT CreateTexture3D(
+ [in] const D3D10_TEXTURE3D_DESC *pDesc,
+ [in] const D3D10_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D10Texture3D **ppTexture3D);
+ HRESULT CreateShaderResourceView(
+ [in] ID3D10Resource *pResource,
+ [in] const D3D10_SHADER_RESOURCE_VIEW_DESC *pDesc,
+ [out] ID3D10ShaderResourceView **ppSRView);
+ HRESULT CreateRenderTargetView(
+ [in] ID3D10Resource *pResource,
+ [in] const D3D10_RENDER_TARGET_VIEW_DESC *pDesc,
+ [out] ID3D10RenderTargetView **ppRTView);
+ HRESULT CreateDepthStencilView(
+ [in] ID3D10Resource *pResource,
+ [in] const D3D10_DEPTH_STENCIL_VIEW_DESC *pDesc,
+ [out] ID3D10DepthStencilView **ppDepthStencilView);
+ HRESULT CreateInputLayout(
+ [in] const D3D10_INPUT_ELEMENT_DESC *pInputElementDescs,
+ [in] UINT NumElements,
+ [in] const void *pShaderBytecodeWithInputSignature,
+ [in] SIZE_T BytecodeLength,
+ [out] ID3D10InputLayout **ppInputLayout);
+ HRESULT CreateVertexShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [out] ID3D10VertexShader **ppVertexShader);
+ HRESULT CreateGeometryShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [out] ID3D10GeometryShader **ppGeometryShader);
+ HRESULT CreateGeometryShaderWithStreamOutput(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] const D3D10_SO_DECLARATION_ENTRY *pSODeclaration,
+ [in] UINT NumEntries,
+ [in] UINT OutputStreamStride,
+ [out] ID3D10GeometryShader **ppGeometryShader);
+ HRESULT CreatePixelShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [out] ID3D10PixelShader **ppPixelShader);
+ HRESULT CreateBlendState(
+ [in] const D3D10_BLEND_DESC *pBlendStateDesc,
+ [out] ID3D10BlendState **ppBlendState);
+ HRESULT CreateDepthStencilState(
+ [in] const D3D10_DEPTH_STENCIL_DESC *pDepthStencilDesc,
+ [out] ID3D10DepthStencilState **ppDepthStencilState);
+ HRESULT CreateRasterizerState(
+ [in] const D3D10_RASTERIZER_DESC *pRasterizerDesc,
+ [out] ID3D10RasterizerState **ppRasterizerState);
+ HRESULT CreateSamplerState(
+ [in] const D3D10_SAMPLER_DESC *pSamplerDesc,
+ [out] ID3D10SamplerState **ppSamplerState);
+ HRESULT CreateQuery(
+ [in] const D3D10_QUERY_DESC *pQueryDesc,
+ [out] ID3D10Query **ppQuery);
+ HRESULT CreatePredicate(
+ [in] const D3D10_QUERY_DESC *pPredicateDesc,
+ [out] ID3D10Predicate **ppPredicate);
+ HRESULT CreateCounter(
+ [in] const D3D10_COUNTER_DESC *pCounterDesc,
+ [out] ID3D10Counter **ppCounter);
+ HRESULT CheckFormatSupport(
+ [in] DXGI_FORMAT Format,
+ [out] UINT *pFormatSupport);
+ HRESULT CheckMultisampleQualityLevels(
+ [in] DXGI_FORMAT Format,
+ [in] UINT SampleCount,
+ [out] UINT *pNumQualityLevels);
+ void CheckCounterInfo(
+ [out] D3D10_COUNTER_INFO *pCounterInfo);
+ HRESULT CheckCounter(
+ [in] const D3D10_COUNTER_DESC *pDesc,
+ [out] D3D10_COUNTER_TYPE *pType,
+ [out] UINT *pActiveCounters,
+ [out] LPSTR szName,
+ [in, out] UINT *pNameLength,
+ [out] LPSTR szUnits,
+ [in, out] UINT *pUnitsLength,
+ [out] LPSTR szDescription,
+ [in, out] UINT *pDescriptionLength);
+ UINT GetCreationFlags();
+ HRESULT OpenSharedResource(
+ [in] HANDLE hResource,
+ [in] REFIID ReturnedInterface,
+ [out] void **ppResource);
+ void SetTextFilterSize(
+ [in] UINT Width,
+ [in] UINT Height);
+ void GetTextFilterSize(
+ [out] UINT *pWidth,
+ [out] UINT *pHeight);
+}
+
+[
+ object,
+ local,
+ uuid(9b7e4e00-342c-4106-a19f-4f2704f689f0)
+]
+interface ID3D10Multithread : IUnknown
+{
+ void Enter();
+ void Leave();
+ BOOL SetMultithreadProtected(
+ [in] BOOL bMTProtect);
+ BOOL GetMultithreadProtected();
+}
+
+cpp_quote("#include \"d3d10misc.h\"")
+cpp_quote("#include \"d3d10shader.h\"")
+cpp_quote("#include \"d3d10effect.h\"")
+/* TODO: Include "d310sdklayers.h" as soon as it exists */
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl
new file mode 100644
index 00000000000..b507e098901
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl
@@ -0,0 +1,191 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+import "oaidl.idl";
+import "ocidl.idl";
+import "d3d10.idl";
+import "d3dcommon.idl";
+
+const unsigned int D3D10_1_SDK_VERSION = 0x20;
+
+cpp_quote("#ifndef _D3D10_1_CONSTANTS")
+cpp_quote("#define _D3D10_1_CONSTANTS")
+const unsigned int D3D10_1_DEFAULT_SAMPLE_MASK = 0xffffffff;
+const float D3D10_1_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6;
+const float D3D10_1_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6;
+const unsigned int D3D10_1_GS_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
+const unsigned int D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
+const unsigned int D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
+const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
+const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
+const unsigned int D3D10_1_SHADER_MAJOR_VERSION = 4;
+const unsigned int D3D10_1_SHADER_MINOR_VERSION = 1;
+const unsigned int D3D10_1_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
+const unsigned int D3D10_1_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 256;
+const unsigned int D3D10_1_SO_BUFFER_SLOT_COUNT = 4;
+const unsigned int D3D10_1_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER = 1;
+const unsigned int D3D10_1_SO_SINGLE_BUFFER_COMPONENT_LIMIT = 64;
+const unsigned int D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT = 32;
+const unsigned int D3D10_1_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
+const unsigned int D3D10_1_VS_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D10_1_VS_OUTPUT_REGISTER_COUNT = 32;
+cpp_quote("#endif")
+
+typedef enum D3D10_FEATURE_LEVEL1
+{
+ D3D10_FEATURE_LEVEL_10_0 = 0xa000,
+ D3D10_FEATURE_LEVEL_10_1 = 0xa100,
+ D3D10_FEATURE_LEVEL_9_1 = 0x9100,
+ D3D10_FEATURE_LEVEL_9_2 = 0x9200,
+ D3D10_FEATURE_LEVEL_9_3 = 0x9300
+} D3D10_FEATURE_LEVEL1;
+
+typedef struct D3D10_RENDER_TARGET_BLEND_DESC1
+{
+ BOOL BlendEnable;
+ D3D10_BLEND SrcBlend;
+ D3D10_BLEND DestBlend;
+ D3D10_BLEND_OP BlendOp;
+ D3D10_BLEND SrcBlendAlpha;
+ D3D10_BLEND DestBlendAlpha;
+ D3D10_BLEND_OP BlendOpAlpha;
+ UINT8 RenderTargetWriteMask;
+} D3D10_RENDER_TARGET_BLEND_DESC1;
+
+typedef struct D3D10_BLEND_DESC1
+{
+ BOOL AlphaToCoverageEnable;
+ BOOL IndependentBlendEnable;
+ D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[8];
+} D3D10_BLEND_DESC1;
+
+typedef struct D3D10_TEXCUBE_ARRAY_SRV1
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+ UINT First2DArrayFace;
+ UINT NumCubes;
+} D3D10_TEXCUBE_ARRAY_SRV1;
+
+typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION1;
+
+typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1
+{
+ DXGI_FORMAT Format;
+ D3D10_SRV_DIMENSION1 ViewDimension;
+ union
+ {
+ D3D10_BUFFER_SRV Buffer;
+ D3D10_TEX1D_SRV Texture1D;
+ D3D10_TEX1D_ARRAY_SRV Texture1DArray;
+ D3D10_TEX2D_SRV Texture2D;
+ D3D10_TEX2D_ARRAY_SRV Texture2DArray;
+ D3D10_TEX2DMS_SRV Texture2DMS;
+ D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray;
+ D3D10_TEX3D_SRV Texture3D;
+ D3D10_TEXCUBE_SRV TextureCube;
+ D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray;
+ } ;
+} D3D10_SHADER_RESOURCE_VIEW_DESC1;
+
+typedef enum D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS
+{
+ D3D10_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff,
+ D3D10_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe
+} D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS;
+
+[object, local, uuid("EDAD8D99-8A35-4d6d-8566-2EA276CDE161")]
+interface ID3D10BlendState1 : ID3D10BlendState
+{
+ void GetDesc1(
+ [out] D3D10_BLEND_DESC1 *pDesc
+ );
+};
+
+[object, local, uuid("9B7E4C87-342C-4106-A19F-4F2704F689F0")]
+interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView
+{
+ void GetDesc1(
+ [out] D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc
+ );
+};
+
+[object, local, uuid("9B7E4C8F-342C-4106-A19F-4F2704F689F0")]
+interface ID3D10Device1 : ID3D10Device
+{
+ HRESULT CreateShaderResourceView1(
+ [in] ID3D10Resource *pResource,
+ [in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc,
+ [out,optional] ID3D10ShaderResourceView1 **ppSRView
+ );
+
+ HRESULT CreateBlendState1(
+ [in] const D3D10_BLEND_DESC1 *pBlendStateDesc,
+ [out, optional] ID3D10BlendState1 **ppBlendState
+ );
+
+ D3D10_FEATURE_LEVEL1 GetFeatureLevel();
+};
+
+//cpp_quote("#include \"d3d10_1shader.h\"")
+
+typedef enum D3D10_DRIVER_TYPE D3D10_DRIVER_TYPE;
+
+HRESULT D3D10CreateDevice1(
+ [in,optional] IDXGIAdapter* pAdapter,
+ [in] D3D10_DRIVER_TYPE DriverType,
+ [in] HMODULE Software,
+ [in] UINT Flags,
+ [in] D3D10_FEATURE_LEVEL1 HardwareLevel,
+ [in] UINT SDKVersion,
+ [out,optional] ID3D10Device1** ppDevice
+);
+
+typedef HRESULT (* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1)(
+ [in,optional] IDXGIAdapter*,
+ D3D10_DRIVER_TYPE,
+ HMODULE,
+ UINT,
+ D3D10_FEATURE_LEVEL1 HardwareLevels,
+ UINT,
+ [in, optional] DXGI_SWAP_CHAIN_DESC*,
+ [out,optional] IDXGISwapChain**,
+ [out,optional] ID3D10Device1**
+);
+
+HRESULT D3D10CreateDeviceAndSwapChain1(
+ [in,optional] IDXGIAdapter* pAdapter,
+ [in] D3D10_DRIVER_TYPE DriverType,
+ [in] HMODULE Software,
+ [in] UINT Flags,
+ [in] D3D10_FEATURE_LEVEL1 HardwareLevel,
+ [in] UINT SDKVersion,
+ [in,optional] DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,
+ [out,optional] IDXGISwapChain** ppSwapChain,
+ [out,optional] ID3D10Device1** ppDevice
+);
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h
new file mode 100644
index 00000000000..d2241e643e2
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2008 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __D3D10MISC_H__
+#define __D3D10MISC_H__
+
+#include "d3d10.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum D3D10_DRIVER_TYPE {
+ D3D10_DRIVER_TYPE_HARDWARE = 0,
+ D3D10_DRIVER_TYPE_REFERENCE = 1,
+ D3D10_DRIVER_TYPE_NULL = 2,
+ D3D10_DRIVER_TYPE_SOFTWARE = 3,
+ D3D10_DRIVER_TYPE_WARP = 5, // added by Luca Barbieri in Sep 2010
+} D3D10_DRIVER_TYPE;
+
+HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,
+ HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device);
+
+HRESULT WINAPI D3D10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type,
+ HMODULE swrast, UINT flags, UINT sdk_version, DXGI_SWAP_CHAIN_DESC *swapchain_desc,
+ IDXGISwapChain **swapchain, ID3D10Device **device);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __D3D10MISC_H__ */
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl
new file mode 100644
index 00000000000..c4668a87dd2
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl
@@ -0,0 +1,269 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+import "d3d10.idl";
+
+cpp_quote("#define D3D10_TX_VERSION(a, b) (('T' << 24) | ('X' << 16) | ((a) << 8) | (b)))")
+
+const unsigned int D3D10_SHADER_DEBUG = (1 << 0);
+const unsigned int D3D10_SHADER_SKIP_VALIDATION = (1 << 1);
+const unsigned int D3D10_SHADER_SKIP_OPTIMIZATION = (1 << 2);
+const unsigned int D3D10_SHADER_PACK_MATRIX_ROW_MAJOR = (1 << 3);
+const unsigned int D3D10_SHADER_PACK_MATRIX_COLUMN_MAJOR = (1 << 4);
+const unsigned int D3D10_SHADER_PARTIAL_PRECISION = (1 << 5);
+const unsigned int D3D10_SHADER_FORCE_VS_SOFTWARE_NO_OPT = (1 << 6);
+const unsigned int D3D10_SHADER_FORCE_PS_SOFTWARE_NO_OPT = (1 << 7);
+const unsigned int D3D10_SHADER_NO_PRESHADER = (1 << 8);
+const unsigned int D3D10_SHADER_AVOID_FLOW_CONTROL = (1 << 9);
+const unsigned int D3D10_SHADER_PREFER_FLOW_CONTROL = (1 << 10);
+const unsigned int D3D10_SHADER_ENABLE_STRICTNESS = (1 << 11);
+const unsigned int D3D10_SHADER_ENABLE_BACKWARDS_COMPATIBILITY = (1 << 12);
+const unsigned int D3D10_SHADER_IEEE_STRICTNESS = (1 << 13);
+const unsigned int D3D10_SHADER_WARNINGS_ARE_ERRORS = (1 << 18);
+
+
+const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL0 = (1 << 14);
+const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL1 = 0;
+const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL2 = ((1 << 14) | (1 << 15));
+const unsigned int D3D10_SHADER_OPTIMIZATION_LEVEL3 = (1 << 15);
+
+typedef D3D_SHADER_MACRO D3D10_SHADER_MACRO;
+typedef D3D10_SHADER_MACRO* LPD3D10_SHADER_MACRO;
+
+
+typedef D3D_SHADER_VARIABLE_CLASS D3D10_SHADER_VARIABLE_CLASS;
+typedef D3D10_SHADER_VARIABLE_CLASS* LPD3D10_SHADER_VARIABLE_CLASS;
+typedef D3D_SHADER_VARIABLE_FLAGS D3D10_SHADER_VARIABLE_FLAGS;
+typedef D3D10_SHADER_VARIABLE_FLAGS* LPD3D10_SHADER_VARIABLE_FLAGS;
+typedef D3D_SHADER_VARIABLE_TYPE D3D10_SHADER_VARIABLE_TYPE;
+typedef D3D10_SHADER_VARIABLE_TYPE* LPD3D10_SHADER_VARIABLE_TYPE;
+typedef D3D_SHADER_INPUT_FLAGS D3D10_SHADER_INPUT_FLAGS;
+typedef D3D10_SHADER_INPUT_FLAGS* LPD3D10_SHADER_INPUT_FLAGS;
+typedef D3D_SHADER_INPUT_TYPE D3D10_SHADER_INPUT_TYPE;
+typedef D3D10_SHADER_INPUT_TYPE* LPD3D10_SHADER_INPUT_TYPE;
+typedef D3D_SHADER_CBUFFER_FLAGS D3D10_SHADER_CBUFFER_FLAGS;
+typedef D3D10_SHADER_CBUFFER_FLAGS* LPD3D10_SHADER_CBUFFER_FLAGS;
+typedef D3D_CBUFFER_TYPE D3D10_CBUFFER_TYPE;
+typedef D3D10_CBUFFER_TYPE* LPD3D10_CBUFFER_TYPE;
+typedef D3D_NAME D3D10_NAME;
+typedef D3D_RESOURCE_RETURN_TYPE D3D10_RESOURCE_RETURN_TYPE;
+typedef D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_TYPE;
+typedef D3D_INCLUDE_TYPE D3D10_INCLUDE_TYPE;
+typedef ID3DInclude* LPD3D10INCLUDE;
+
+cpp_quote("#define D3D10_SHVER_GET_TYPE(v) (((v) >> 16) & 0xffff)")
+cpp_quote("#define D3D10_SHVER_GET_MAJOR(v) (((v) >> 4) & 0xf)")
+cpp_quote("#define D3D10_SHVER_GET_MINOR(v) (((v) >> 0) & 0xf)")
+
+typedef struct _D3D10_SIGNATURE_PARAMETER_DESC
+{
+ LPCSTR SemanticName;
+ UINT SemanticIndex;
+ UINT Register;
+ D3D_NAME SystemValueType;
+ D3D_REGISTER_COMPONENT_TYPE ComponentType;
+ BYTE Mask;
+ BYTE ReadWriteMask;
+} D3D10_SIGNATURE_PARAMETER_DESC;
+
+typedef struct _D3D10_SHADER_BUFFER_DESC
+{
+ LPCSTR Name;
+ D3D_CBUFFER_TYPE Type;
+ UINT Variables;
+ UINT Size;
+ UINT uFlags;
+} D3D10_SHADER_BUFFER_DESC;
+
+typedef struct _D3D10_SHADER_VARIABLE_DESC
+{
+ LPCSTR Name;
+ UINT StartOffset;
+ UINT Size;
+ UINT uFlags;
+ LPVOID DefaultValue;
+ UINT StartTexture;
+ UINT TextureSize;
+ UINT StartSampler;
+ UINT SamplerSize;
+} D3D10_SHADER_VARIABLE_DESC;
+
+typedef struct _D3D10_SHADER_TYPE_DESC
+{
+ D3D_SHADER_VARIABLE_CLASS Class;
+ D3D_SHADER_VARIABLE_TYPE Type;
+ UINT Rows;
+ UINT Columns;
+ UINT Elements;
+ UINT Members;
+ UINT Offset;
+ LPCSTR Name;
+} D3D10_SHADER_TYPE_DESC;
+
+typedef D3D_TESSELLATOR_DOMAIN D3D10_TESSELLATOR_DOMAIN;
+typedef D3D_TESSELLATOR_PARTITIONING D3D10_TESSELLATOR_PARTITIONING;
+typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D10_TESSELLATOR_OUTPUT_PRIMITIVE;
+
+typedef struct _D3D10_SHADER_DESC
+{
+ UINT Version;
+ LPCSTR Creator;
+ UINT Flags;
+
+ UINT ConstantBuffers;
+ UINT BoundResources;
+ UINT InputParameters;
+ UINT OutputParameters;
+
+ UINT InstructionCount;
+ UINT TempRegisterCount;
+ UINT TempArrayCount;
+ UINT DefCount;
+ UINT DclCount;
+ UINT TextureNormalInstructions;
+ UINT TextureLoadInstructions;
+ UINT TextureCompInstructions;
+ UINT TextureBiasInstructions;
+ UINT TextureGradientInstructions;
+ UINT FloatInstructionCount;
+ UINT IntInstructionCount;
+ UINT UintInstructionCount;
+ UINT StaticFlowControlCount;
+ UINT DynamicFlowControlCount;
+ UINT MacroInstructionCount;
+ UINT ArrayInstructionCount;
+ UINT CutInstructionCount;
+ UINT EmitInstructionCount;
+ D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
+ UINT GSMaxOutputVertexCount;
+} D3D10_SHADER_DESC;
+
+typedef struct _D3D10_SHADER_INPUT_BIND_DESC
+{
+ LPCSTR Name;
+ D3D_SHADER_INPUT_TYPE Type;
+ UINT BindPoint;
+ UINT BindCount;
+
+ UINT uFlags;
+ D3D_RESOURCE_RETURN_TYPE ReturnType;
+ D3D_SRV_DIMENSION Dimension;
+ UINT NumSamples;
+} D3D10_SHADER_INPUT_BIND_DESC;
+
+[local, object, uuid("C530AD7D-9B16-4395-A979-BA2ECFF83ADD")]
+interface ID3D10ShaderReflectionType
+{
+ HRESULT GetDesc(
+ [out] D3D10_SHADER_TYPE_DESC *pDesc
+ );
+
+ ID3D10ShaderReflectionType* GetMemberTypeByIndex(
+ [in] UINT Index
+ );
+
+ ID3D10ShaderReflectionType* GetMemberTypeByName(
+ [in] LPCSTR Name
+ );
+
+ LPCSTR GetMemberTypeName(
+ [in] UINT Index
+ );
+};
+
+interface ID3D10ShaderReflectionConstantBuffer;
+
+[object, local, uuid("1BF63C95-2650-405d-99C1-3636BD1DA0A1")]
+interface ID3D10ShaderReflectionVariable
+{
+ HRESULT GetDesc(
+ [out] D3D10_SHADER_VARIABLE_DESC *pDesc
+ );
+
+ ID3D10ShaderReflectionType* GetType();
+};
+
+[object, local, uuid("66C66A94-DDDD-4b62-A66A-F0DA33C2B4D0")]
+interface ID3D10ShaderReflectionConstantBuffer
+{
+ HRESULT GetDesc(
+ [out] D3D10_SHADER_BUFFER_DESC *pDesc
+ );
+
+ ID3D10ShaderReflectionVariable* GetVariableByIndex(
+ [in] UINT Index
+ );
+
+ ID3D10ShaderReflectionVariable* GetVariableByName(
+ [in] LPCSTR Name
+ );
+};
+
+[object,local,uuid("D40E20B6-F8F7-42ad-AB20-4BAF8F15DFAA")]
+interface ID3D10ShaderReflection : IUnknown
+{
+ HRESULT GetDesc(
+ [out] D3D10_SHADER_DESC *pDesc
+ );
+
+ ID3D10ShaderReflectionConstantBuffer* GetConstantBufferByIndex(
+ [in] UINT Index
+ );
+
+ ID3D10ShaderReflectionConstantBuffer* GetConstantBufferByName(
+ [in] LPCSTR Name
+ );
+
+ HRESULT GetResourceBindingDesc(
+ [in] UINT ResourceIndex,
+ [out] D3D10_SHADER_INPUT_BIND_DESC *pDesc
+ );
+
+ HRESULT GetInputParameterDesc(
+ [in] UINT ParameterIndex,
+ [out] D3D10_SIGNATURE_PARAMETER_DESC *pDesc
+ );
+
+ HRESULT GetOutputParameterDesc
+ (
+ [in] UINT ParameterIndex,
+ [out] D3D10_SIGNATURE_PARAMETER_DESC *pDesc
+ );
+};
+
+HRESULT D3D10CompileShader(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, const D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude,
+ LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs);
+HRESULT D3D10DisassembleShader(const void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, LPCSTR pComments, ID3D10Blob** ppDisassembly);
+LPCSTR D3D10GetPixelShaderProfile(ID3D10Device *pDevice);
+LPCSTR D3D10GetVertexShaderProfile(ID3D10Device *pDevice);
+LPCSTR D3D10GetGeometryShaderProfile(ID3D10Device *pDevice);
+HRESULT D3D10ReflectShader(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10ShaderReflection **ppReflector);
+HRESULT D3D10PreprocessShader(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, const D3D10_SHADER_MACRO* pDefines,
+ LPD3D10INCLUDE pInclude, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs);
+HRESULT D3D10GetInputSignatureBlob(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob);
+HRESULT D3D10GetOutputSignatureBlob(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob);
+HRESULT D3D10GetInputAndOutputSignatureBlob(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob);
+HRESULT D3D10GetShaderDebugInfo(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob** ppDebugInfo);
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl
new file mode 100644
index 00000000000..5a57da36ee7
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl
@@ -0,0 +1,2492 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+import "oaidl.idl";
+import "ocidl.idl";
+import "dxgi.idl";
+import "d3dcommon.idl";
+
+const unsigned int D3D11_SDK_VERSION = 7;
+
+cpp_quote("#ifndef _D3D11_CONSTANTS")
+cpp_quote("#define _D3D11_CONSTANTS")
+const unsigned int D3D11_16BIT_INDEX_STRIP_CUT_VALUE = 0xffff;
+const unsigned int D3D11_32BIT_INDEX_STRIP_CUT_VALUE = 0xffffffff;
+const unsigned int D3D11_8BIT_INDEX_STRIP_CUT_VALUE = 0xff;
+const unsigned int D3D11_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9;
+const unsigned int D3D11_CLIP_OR_CULL_DISTANCE_COUNT = 8;
+const unsigned int D3D11_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64;
+const unsigned int D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1;
+const unsigned int D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128;
+const unsigned int D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128;
+const unsigned int D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16;
+const unsigned int D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT = 16;
+const unsigned int D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32;
+const unsigned int D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_COMMONSHADER_TEMP_REGISTER_COUNT = 4096;
+const unsigned int D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3;
+const unsigned int D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3;
+const unsigned int D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10;
+const int D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10;
+const int D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8;
+const unsigned int D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7;
+const unsigned int D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 256;
+const unsigned int D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = 64;
+const unsigned int D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 240;
+const unsigned int D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = 68;
+const unsigned int D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 224;
+const unsigned int D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = 72;
+const unsigned int D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 208;
+const unsigned int D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = 76;
+const unsigned int D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 192;
+const unsigned int D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = 84;
+const unsigned int D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 176;
+const unsigned int D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = 92;
+const unsigned int D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 160;
+const unsigned int D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = 100;
+const unsigned int D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 144;
+const unsigned int D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = 112;
+const unsigned int D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 128;
+const unsigned int D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = 128;
+const unsigned int D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 112;
+const unsigned int D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = 144;
+const unsigned int D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 96;
+const unsigned int D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = 168;
+const unsigned int D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 80;
+const unsigned int D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = 204;
+const unsigned int D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 64;
+const unsigned int D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = 256;
+const unsigned int D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 48;
+const unsigned int D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = 340;
+const unsigned int D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 32;
+const unsigned int D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = 512;
+const unsigned int D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 16;
+const unsigned int D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = 768;
+const unsigned int D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = 1;
+const unsigned int D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = 256;
+const unsigned int D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = 768;
+const unsigned int D3D11_CS_4_X_THREAD_GROUP_MAX_X = 768;
+const unsigned int D3D11_CS_4_X_THREAD_GROUP_MAX_Y = 768;
+const unsigned int D3D11_CS_4_X_UAV_REGISTER_COUNT = 1;
+const unsigned int D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = 65535;
+const unsigned int D3D11_CS_TGSM_REGISTER_COUNT = 8192;
+const unsigned int D3D11_CS_TGSM_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = 1024;
+const unsigned int D3D11_CS_THREAD_GROUP_MAX_X = 1024;
+const unsigned int D3D11_CS_THREAD_GROUP_MAX_Y = 1024;
+const unsigned int D3D11_CS_THREAD_GROUP_MAX_Z = 64;
+const unsigned int D3D11_CS_THREAD_GROUP_MIN_X = 1;
+const unsigned int D3D11_CS_THREAD_GROUP_MIN_Y = 1;
+const unsigned int D3D11_CS_THREAD_GROUP_MIN_Z = 1;
+const unsigned int D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = 16384;
+const float D3D11_DEFAULT_BLEND_FACTOR_ALPHA = 1.0;
+const float D3D11_DEFAULT_BLEND_FACTOR_BLUE = 1.0;
+const float D3D11_DEFAULT_BLEND_FACTOR_GREEN = 1.0;
+const float D3D11_DEFAULT_BLEND_FACTOR_RED = 1.0;
+const float D3D11_DEFAULT_BORDER_COLOR_COMPONENT = 0.0;
+const unsigned int D3D11_DEFAULT_DEPTH_BIAS = 0;
+const float D3D11_DEFAULT_DEPTH_BIAS_CLAMP = 0.0;
+const unsigned int D3D11_DEFAULT_MAX_ANISOTROPY = 16;
+const float D3D11_DEFAULT_MIP_LOD_BIAS = 0.0;
+const unsigned int D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0;
+const unsigned int D3D11_DEFAULT_SAMPLE_MASK = 0xffffffff;
+const unsigned int D3D11_DEFAULT_SCISSOR_ENDX = 0;
+const unsigned int D3D11_DEFAULT_SCISSOR_ENDY = 0;
+const unsigned int D3D11_DEFAULT_SCISSOR_STARTX = 0;
+const unsigned int D3D11_DEFAULT_SCISSOR_STARTY = 0;
+const float D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0;
+const unsigned int D3D11_DEFAULT_STENCIL_READ_MASK = 0xff;
+const unsigned int D3D11_DEFAULT_STENCIL_REFERENCE = 0;
+const unsigned int D3D11_DEFAULT_STENCIL_WRITE_MASK = 0xff;
+const unsigned int D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0;
+const unsigned int D3D11_DEFAULT_VIEWPORT_HEIGHT = 0;
+const float D3D11_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0;
+const float D3D11_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0;
+const unsigned int D3D11_DEFAULT_VIEWPORT_TOPLEFTX = 0;
+const unsigned int D3D11_DEFAULT_VIEWPORT_TOPLEFTY = 0;
+const unsigned int D3D11_DEFAULT_VIEWPORT_WIDTH = 0;
+const unsigned int D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = 32;
+const unsigned int D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
+const unsigned int D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = 3;
+const unsigned int D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = 1;
+const unsigned int D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
+const unsigned int D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_DS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_DS_OUTPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6;
+const float D3D11_FLOAT32_MAX = 3.402823466e+38;
+const float D3D11_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6;
+const float D3D11_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 2.4;
+const float D3D11_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 1.0;
+const float D3D11_FLOAT_TO_SRGB_OFFSET = 0.055;
+const float D3D11_FLOAT_TO_SRGB_SCALE_1 = 12.92;
+const float D3D11_FLOAT_TO_SRGB_SCALE_2 = 1.055;
+const float D3D11_FLOAT_TO_SRGB_THRESHOLD = 0.0031308;
+const float D3D11_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999;
+const float D3D11_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999;
+const float D3D11_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999;
+const float D3D11_FTOU_INSTRUCTION_MIN_INPUT = 0.0;
+const unsigned int D3D11_GS_INPUT_INSTANCE_ID_READ_PORTS = 1;
+const unsigned int D3D11_GS_INPUT_INSTANCE_ID_READS_PER_INST = 2;
+const unsigned int D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = 1;
+const unsigned int D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1;
+const unsigned int D3D11_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_GS_INPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_GS_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_GS_INPUT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_GS_INPUT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_GS_INPUT_REGISTER_VERTICES = 32;
+const unsigned int D3D11_GS_MAX_INSTANCE_COUNT = 32;
+const unsigned int D3D11_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = 1024;
+const unsigned int D3D11_GS_OUTPUT_ELEMENTS = 32;
+const unsigned int D3D11_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_GS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_GS_OUTPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_HS_CONTROL_POINT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_HS_CONTROL_POINT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_HS_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xffffffff;
+const unsigned int D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = 1;
+const unsigned int D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = 1;
+const unsigned int D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
+const unsigned int D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xffffffff;
+const float D3D11_HS_MAXTESSFACTOR_LOWER_BOUND = 1.0;
+const float D3D11_HS_MAXTESSFACTOR_UPPER_BOUND = 64.0;
+const unsigned int D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = 1;
+const unsigned int D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
+const unsigned int D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
+const unsigned int D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0;
+const unsigned int D3D11_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0;
+const unsigned int D3D11_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0;
+const unsigned int D3D11_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1;
+const unsigned int D3D11_IA_INSTANCE_ID_BIT_COUNT = 32;
+const unsigned int D3D11_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32;
+const unsigned int D3D11_IA_PATCH_MAX_CONTROL_POINT_COUNT = 32;
+const unsigned int D3D11_IA_PRIMITIVE_ID_BIT_COUNT = 32;
+const unsigned int D3D11_IA_VERTEX_ID_BIT_COUNT = 32;
+const unsigned int D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
+const unsigned int D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
+const unsigned int D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
+const unsigned int D3D11_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xffffffff;
+const unsigned int D3D11_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xffffffff;
+const unsigned int D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = 0xffffffff;
+const unsigned int D3D11_KEEP_UNORDERED_ACCESS_VIEWS = 0xffffffff;
+const float D3D11_LINEAR_GAMMA = 1.0;
+const unsigned int D3D11_MAJOR_VERSION = 11;
+const float D3D11_MAX_BORDER_COLOR_COMPONENT = 1.0;
+const float D3D11_MAX_DEPTH = 1.0;
+const unsigned int D3D11_MAX_MAXANISOTROPY = 16;
+const unsigned int D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT = 32;
+const float D3D11_MAX_POSITION_VALUE = 3.402823466e+34;
+const unsigned int D3D11_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17;
+const float D3D11_MIN_BORDER_COLOR_COMPONENT = 0.0;
+const float D3D11_MIN_DEPTH = 0.0;
+const unsigned int D3D11_MIN_MAXANISOTROPY = 0;
+const unsigned int D3D11_MINOR_VERSION = 0;
+const float D3D11_MIP_LOD_BIAS_MAX = 15.99;
+const float D3D11_MIP_LOD_BIAS_MIN = -16.0;
+const unsigned int D3D11_MIP_LOD_FRACTIONAL_BIT_COUNT = 8;
+const unsigned int D3D11_MIP_LOD_RANGE_BIT_COUNT = 8;
+const float D3D11_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4;
+const unsigned int D3D11_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0;
+const unsigned int D3D11_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15;
+const unsigned int D3D11_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16;
+const unsigned int D3D11_PS_CS_UAV_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_PS_CS_UAV_REGISTER_COUNT = 8;
+const unsigned int D3D11_PS_CS_UAV_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_PS_CS_UAV_REGISTER_READS_PER_INST = 1;
+const unsigned int D3D11_PS_FRONTFACING_DEFAULT_VALUE = 0xffffffff;
+const unsigned int D3D11_PS_FRONTFACING_FALSE_VALUE = 0;
+const unsigned int D3D11_PS_FRONTFACING_TRUE_VALUE = 0xffffffff;
+const unsigned int D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_PS_INPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_PS_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_PS_INPUT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_PS_INPUT_REGISTER_READS_PER_INST = 2;
+const float D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0;
+const unsigned int D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1;
+const unsigned int D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
+const unsigned int D3D11_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
+const unsigned int D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_PS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_PS_OUTPUT_REGISTER_COUNT = 8;
+const float D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5;
+const unsigned int D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT = 16;
+const unsigned int D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = 4096;
+const unsigned int D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27;
+const unsigned int D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
+const unsigned int D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = 4096;
+const unsigned int D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32;
+const unsigned int D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32;
+const unsigned int D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 16384;
+const unsigned int D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024;
+const unsigned int D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
+const unsigned int D3D11_REQ_MAXANISOTROPY = 16;
+const unsigned int D3D11_REQ_MIP_LEVELS = 15;
+const unsigned int D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048;
+const unsigned int D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = 4096;
+const unsigned int D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 16384;
+const unsigned int D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = 128;
+const float D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = 0.25;
+const unsigned int D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = 20;
+const unsigned int D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = 4096;
+const unsigned int D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048;
+const unsigned int D3D11_REQ_TEXTURE1D_U_DIMENSION = 16384;
+const unsigned int D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048;
+const unsigned int D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384;
+const unsigned int D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048;
+const unsigned int D3D11_REQ_TEXTURECUBE_DIMENSION = 16384;
+const unsigned int D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0;
+const unsigned int D3D11_SHADER_MAJOR_VERSION = 5;
+const unsigned int D3D11_SHADER_MAX_INSTANCES = 65535;
+const unsigned int D3D11_SHADER_MAX_INTERFACE_CALL_SITES = 4096;
+const unsigned int D3D11_SHADER_MAX_INTERFACES = 253;
+const unsigned int D3D11_SHADER_MAX_TYPES = 65535;
+const unsigned int D3D11_SHADER_MINOR_VERSION = 0;
+const unsigned int D3D11_SHIFT_INSTRUCTION_PAD_VALUE = 0;
+const unsigned int D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5;
+const unsigned int D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
+const unsigned int D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
+const unsigned int D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 512;
+const unsigned int D3D11_SO_BUFFER_SLOT_COUNT = 4;
+const unsigned int D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff;
+const unsigned int D3D11_SO_NO_RASTERIZED_STREAM = 0xffffffff;
+const unsigned int D3D11_SO_OUTPUT_COMPONENT_COUNT = 128;
+const unsigned int D3D11_SO_STREAM_COUNT = 4;
+const unsigned int D3D11_SPEC_DATE_DAY = 04;
+const unsigned int D3D11_SPEC_DATE_MONTH = 06;
+const unsigned int D3D11_SPEC_DATE_YEAR = 2009;
+const unsigned int D3D11_SPEC_VERSION = 1.0;
+const float D3D11_SRGB_GAMMA = 2.2;
+const float D3D11_SRGB_TO_FLOAT_DENOMINATOR_1 = 12.92;
+const float D3D11_SRGB_TO_FLOAT_DENOMINATOR_2 = 1.055;
+const float D3D11_SRGB_TO_FLOAT_EXPONENT = 2.4;
+const float D3D11_SRGB_TO_FLOAT_OFFSET = 0.055;
+const float D3D11_SRGB_TO_FLOAT_THRESHOLD = 0.04045;
+const float D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 0.5;
+const unsigned int D3D11_STANDARD_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64;
+const unsigned int D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4;
+const unsigned int D3D11_STANDARD_PIXEL_COMPONENT_COUNT = 128;
+const unsigned int D3D11_STANDARD_PIXEL_ELEMENT_COUNT = 32;
+const unsigned int D3D11_STANDARD_VECTOR_SIZE = 4;
+const unsigned int D3D11_STANDARD_VERTEX_ELEMENT_COUNT = 32;
+const unsigned int D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64;
+const unsigned int D3D11_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
+const unsigned int D3D11_SUBTEXEL_FRACTIONAL_BIT_COUNT = 8;
+const unsigned int D3D11_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = 64;
+const unsigned int D3D11_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = 64;
+const unsigned int D3D11_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = 63;
+const unsigned int D3D11_TESSELLATOR_MAX_TESSELLATION_FACTOR = 64;
+const unsigned int D3D11_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = 2;
+const unsigned int D3D11_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = 1;
+const unsigned int D3D11_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = 1;
+const unsigned int D3D11_TEXEL_ADDRESS_RANGE_BIT_COUNT = 16;
+const unsigned int D3D11_UNBOUND_MEMORY_ACCESS_RESULT = 0;
+const unsigned int D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15;
+const unsigned int D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16;
+const unsigned int D3D11_VIEWPORT_BOUNDS_MAX = 32767;
+const int D3D11_VIEWPORT_BOUNDS_MIN = -32768;
+const unsigned int D3D11_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_VS_INPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_VS_INPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_VS_INPUT_REGISTER_READ_PORTS = 1;
+const unsigned int D3D11_VS_INPUT_REGISTER_READS_PER_INST = 2;
+const unsigned int D3D11_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
+const unsigned int D3D11_VS_OUTPUT_REGISTER_COMPONENTS = 4;
+const unsigned int D3D11_VS_OUTPUT_REGISTER_COUNT = 32;
+const unsigned int D3D11_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10;
+const unsigned int D3D11_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25;
+const unsigned int D3D11_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25;
+cpp_quote("#endif")
+
+const unsigned int _FACD3D11 = 0x87C;
+const unsigned int _FACD3D11DEBUG = _FACD3D11 + 1;
+
+cpp_quote("#define MAKE_D3D11_HRESULT(c) MAKE_HRESULT(1, _FACD3D11, (c))")
+cpp_quote("#define MAKE_D3D11_STATUS(c) MAKE_HRESULT(0, _FACD3D11, (c))")
+cpp_quote("#define D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D11_HRESULT(1)")
+cpp_quote("#define D3D11_ERROR_FILE_NOT_FOUND MAKE_D3D11_HRESULT(2)")
+cpp_quote("#define D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS MAKE_D3D11_HRESULT(3)")
+cpp_quote("#define D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD MAKE_D3D11_HRESULT(4)")
+
+typedef enum D3D11_INPUT_CLASSIFICATION
+{
+ D3D11_INPUT_PER_VERTEX_DATA,
+ D3D11_INPUT_PER_INSTANCE_DATA
+} D3D11_INPUT_CLASSIFICATION;
+
+const unsigned int D3D11_APPEND_ALIGNED_ELEMENT = 0xffffffff;
+
+typedef struct D3D11_INPUT_ELEMENT_DESC
+{
+ LPCSTR SemanticName;
+ UINT SemanticIndex;
+ DXGI_FORMAT Format;
+ UINT InputSlot;
+ UINT AlignedByteOffset;
+ D3D11_INPUT_CLASSIFICATION InputSlotClass;
+ UINT InstanceDataStepRate;
+} D3D11_INPUT_ELEMENT_DESC;
+
+typedef enum D3D11_FILL_MODE
+{
+ D3D11_FILL_WIREFRAME = 2,
+ D3D11_FILL_SOLID = 3
+} D3D11_FILL_MODE;
+
+typedef D3D_PRIMITIVE_TOPOLOGY D3D11_PRIMITIVE_TOPOLOGY;
+
+typedef D3D_PRIMITIVE D3D11_PRIMITIVE;
+
+typedef enum D3D11_CULL_MODE
+{
+ D3D11_CULL_NONE = 1,
+ D3D11_CULL_FRONT = 2,
+ D3D11_CULL_BACK = 3
+} D3D11_CULL_MODE;
+
+typedef struct D3D11_SO_DECLARATION_ENTRY
+{
+ UINT Stream;
+ LPCSTR SemanticName;
+ UINT SemanticIndex;
+ BYTE StartComponent;
+ BYTE ComponentCount;
+ BYTE OutputSlot;
+} D3D11_SO_DECLARATION_ENTRY;
+
+typedef struct D3D11_VIEWPORT
+{
+ FLOAT TopLeftX;
+ FLOAT TopLeftY;
+ FLOAT Width;
+ FLOAT Height;
+ FLOAT MinDepth;
+ FLOAT MaxDepth;
+} D3D11_VIEWPORT;
+
+typedef enum D3D11_RESOURCE_DIMENSION
+{
+ D3D11_RESOURCE_DIMENSION_UNKNOWN,
+ D3D11_RESOURCE_DIMENSION_BUFFER,
+ D3D11_RESOURCE_DIMENSION_TEXTURE1D,
+ D3D11_RESOURCE_DIMENSION_TEXTURE2D,
+ D3D11_RESOURCE_DIMENSION_TEXTURE3D,
+} D3D11_RESOURCE_DIMENSION;
+
+typedef D3D_SRV_DIMENSION D3D11_SRV_DIMENSION;
+
+typedef enum D3D11_DSV_DIMENSION
+{
+ D3D11_DSV_DIMENSION_UNKNOWN,
+ D3D11_DSV_DIMENSION_TEXTURE1D,
+ D3D11_DSV_DIMENSION_TEXTURE1DARRAY,
+ D3D11_DSV_DIMENSION_TEXTURE2D,
+ D3D11_DSV_DIMENSION_TEXTURE2DARRAY,
+ D3D11_DSV_DIMENSION_TEXTURE2DMS,
+ D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY,
+} D3D11_DSV_DIMENSION;
+
+
+typedef enum D3D11_RTV_DIMENSION
+{
+ D3D11_RTV_DIMENSION_UNKNOWN,
+ D3D11_RTV_DIMENSION_BUFFER,
+ D3D11_RTV_DIMENSION_TEXTURE1D,
+ D3D11_RTV_DIMENSION_TEXTURE1DARRAY,
+ D3D11_RTV_DIMENSION_TEXTURE2D,
+ D3D11_RTV_DIMENSION_TEXTURE2DARRAY,
+ D3D11_RTV_DIMENSION_TEXTURE2DMS,
+ D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY,
+ D3D11_RTV_DIMENSION_TEXTURE3D
+} D3D11_RTV_DIMENSION;
+
+typedef enum D3D11_UAV_DIMENSION
+{
+ D3D11_UAV_DIMENSION_UNKNOWN,
+ D3D11_UAV_DIMENSION_BUFFER,
+ D3D11_UAV_DIMENSION_TEXTURE1D,
+ D3D11_UAV_DIMENSION_TEXTURE1DARRAY,
+ D3D11_UAV_DIMENSION_TEXTURE2D,
+ D3D11_UAV_DIMENSION_TEXTURE2DARRAY,
+ D3D11_UAV_DIMENSION_TEXTURE3D = 8
+} D3D11_UAV_DIMENSION;
+
+typedef enum D3D11_USAGE
+{
+ D3D11_USAGE_DEFAULT,
+ D3D11_USAGE_IMMUTABLE,
+ D3D11_USAGE_DYNAMIC,
+ D3D11_USAGE_STAGING
+} D3D11_USAGE;
+
+typedef enum D3D11_BIND_FLAG
+{
+ D3D11_BIND_VERTEX_BUFFER = 1,
+ D3D11_BIND_INDEX_BUFFER = 2,
+ D3D11_BIND_CONSTANT_BUFFER = 4,
+ D3D11_BIND_SHADER_RESOURCE = 8,
+ D3D11_BIND_STREAM_OUTPUT = 0x10,
+ D3D11_BIND_RENDER_TARGET = 0x20,
+ D3D11_BIND_DEPTH_STENCIL = 0x40,
+ D3D11_BIND_UNORDERED_ACCESS = 0x80
+} D3D11_BIND_FLAG;
+
+typedef enum D3D11_CPU_ACCESS_FLAG
+{
+ D3D11_CPU_ACCESS_WRITE = 0x10000,
+ D3D11_CPU_ACCESS_READ = 0x20000
+} D3D11_CPU_ACCESS_FLAG;
+
+typedef enum D3D11_RESOURCE_MISC_FLAG
+{
+ D3D11_RESOURCE_MISC_GENERATE_MIPS = 1,
+ D3D11_RESOURCE_MISC_SHARED = 2,
+ D3D11_RESOURCE_MISC_TEXTURECUBE = 4,
+ D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x10,
+ D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20,
+ D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = 0x40,
+ D3D11_RESOURCE_MISC_RESOURCE_CLAMP = 0x80,
+ D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x100,
+ D3D11_RESOURCE_MISC_GDI_COMPATIBLE = 0x200
+} D3D11_RESOURCE_MISC_FLAG;
+
+typedef enum D3D11_MAP
+{
+ D3D11_MAP_READ = 1,
+ D3D11_MAP_WRITE,
+ D3D11_MAP_READ_WRITE,
+ D3D11_MAP_WRITE_DISCARD,
+ D3D11_MAP_WRITE_NO_OVERWRITE
+} D3D11_MAP;
+
+typedef enum D3D11_MAP_FLAG
+{
+ D3D11_MAP_FLAG_DO_NOT_WAIT = 0x100000
+} D3D11_MAP_FLAG;
+
+typedef enum D3D11_RAISE_FLAG
+{
+ D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR = 1
+} D3D11_RAISE_FLAG;
+
+typedef
+enum D3D11_CLEAR_FLAG
+{
+ D3D11_CLEAR_DEPTH = 1,
+ D3D11_CLEAR_STENCIL = 2
+} D3D11_CLEAR_FLAG;
+
+typedef RECT D3D11_RECT;
+
+typedef struct D3D11_BOX
+{
+ UINT left;
+ UINT top;
+ UINT front;
+ UINT right;
+ UINT bottom;
+ UINT back;
+} D3D11_BOX;
+
+typedef enum D3D11_COMPARISON_FUNC
+{
+ D3D11_COMPARISON_NEVER = 1,
+ D3D11_COMPARISON_LESS,
+ D3D11_COMPARISON_EQUAL,
+ D3D11_COMPARISON_LESS_EQUAL,
+ D3D11_COMPARISON_GREATER,
+ D3D11_COMPARISON_NOT_EQUAL,
+ D3D11_COMPARISON_GREATER_EQUAL,
+ D3D11_COMPARISON_ALWAYS
+} D3D11_COMPARISON_FUNC;
+
+typedef enum D3D11_DEPTH_WRITE_MASK
+{
+ D3D11_DEPTH_WRITE_MASK_ZERO,
+ D3D11_DEPTH_WRITE_MASK_ALL
+} D3D11_DEPTH_WRITE_MASK;
+
+typedef enum D3D11_STENCIL_OP
+{
+ D3D11_STENCIL_OP_KEEP = 1,
+ D3D11_STENCIL_OP_ZERO,
+ D3D11_STENCIL_OP_REPLACE,
+ D3D11_STENCIL_OP_INCR_SAT,
+ D3D11_STENCIL_OP_DECR_SAT,
+ D3D11_STENCIL_OP_INVERT,
+ D3D11_STENCIL_OP_INCR,
+ D3D11_STENCIL_OP_DECR
+} D3D11_STENCIL_OP;
+
+typedef struct D3D11_DEPTH_STENCILOP_DESC
+{
+ D3D11_STENCIL_OP StencilFailOp;
+ D3D11_STENCIL_OP StencilDepthFailOp;
+ D3D11_STENCIL_OP StencilPassOp;
+ D3D11_COMPARISON_FUNC StencilFunc;
+} D3D11_DEPTH_STENCILOP_DESC;
+
+typedef struct D3D11_DEPTH_STENCIL_DESC
+{
+ BOOL DepthEnable;
+ D3D11_DEPTH_WRITE_MASK DepthWriteMask;
+ D3D11_COMPARISON_FUNC DepthFunc;
+ BOOL StencilEnable;
+ UINT8 StencilReadMask;
+ UINT8 StencilWriteMask;
+ D3D11_DEPTH_STENCILOP_DESC FrontFace;
+ D3D11_DEPTH_STENCILOP_DESC BackFace;
+} D3D11_DEPTH_STENCIL_DESC;
+
+
+typedef enum D3D11_BLEND
+{
+ D3D11_BLEND_ZERO = 1,
+ D3D11_BLEND_ONE,
+ D3D11_BLEND_SRC_COLOR,
+ D3D11_BLEND_INV_SRC_COLOR,
+ D3D11_BLEND_SRC_ALPHA,
+ D3D11_BLEND_INV_SRC_ALPHA,
+ D3D11_BLEND_DEST_ALPHA,
+ D3D11_BLEND_INV_DEST_ALPHA,
+ D3D11_BLEND_DEST_COLOR,
+ D3D11_BLEND_INV_DEST_COLOR ,
+ D3D11_BLEND_SRC_ALPHA_SAT,
+
+ D3D11_BLEND_BLEND_FACTOR = 14,
+ D3D11_BLEND_INV_BLEND_FACTOR,
+ D3D11_BLEND_SRC1_COLOR,
+ D3D11_BLEND_INV_SRC1_COLOR ,
+ D3D11_BLEND_SRC1_ALPHA,
+ D3D11_BLEND_INV_SRC1_ALPHA
+} D3D11_BLEND;
+
+typedef enum D3D11_BLEND_OP
+{
+ D3D11_BLEND_OP_ADD = 1,
+ D3D11_BLEND_OP_SUBTRACT,
+ D3D11_BLEND_OP_REV_SUBTRACT,
+ D3D11_BLEND_OP_MIN,
+ D3D11_BLEND_OP_MAX
+} D3D11_BLEND_OP;
+
+typedef enum D3D11_COLOR_WRITE_ENABLE
+{
+ D3D11_COLOR_WRITE_ENABLE_RED = 1,
+ D3D11_COLOR_WRITE_ENABLE_GREEN = 2,
+ D3D11_COLOR_WRITE_ENABLE_BLUE = 4,
+ D3D11_COLOR_WRITE_ENABLE_ALPHA = 8,
+ D3D11_COLOR_WRITE_ENABLE_ALL = 0xf
+} D3D11_COLOR_WRITE_ENABLE;
+
+typedef struct D3D11_RENDER_TARGET_BLEND_DESC
+{
+ BOOL BlendEnable;
+ D3D11_BLEND SrcBlend;
+ D3D11_BLEND DestBlend;
+ D3D11_BLEND_OP BlendOp;
+ D3D11_BLEND SrcBlendAlpha;
+ D3D11_BLEND DestBlendAlpha;
+ D3D11_BLEND_OP BlendOpAlpha;
+ UINT8 RenderTargetWriteMask;
+} D3D11_RENDER_TARGET_BLEND_DESC;
+
+typedef struct D3D11_BLEND_DESC
+{
+ BOOL AlphaToCoverageEnable;
+ BOOL IndependentBlendEnable;
+ D3D11_RENDER_TARGET_BLEND_DESC RenderTarget[8];
+} D3D11_BLEND_DESC;
+
+typedef struct D3D11_RASTERIZER_DESC
+{
+ D3D11_FILL_MODE FillMode;
+ D3D11_CULL_MODE CullMode;
+ BOOL FrontCounterClockwise;
+ INT DepthBias;
+ FLOAT DepthBiasClamp;
+ FLOAT SlopeScaledDepthBias;
+ BOOL DepthClipEnable;
+ BOOL ScissorEnable;
+ BOOL MultisampleEnable;
+ BOOL AntialiasedLineEnable;
+} D3D11_RASTERIZER_DESC;
+
+typedef struct D3D11_SUBRESOURCE_DATA
+{
+ const void *pSysMem;
+ UINT SysMemPitch;
+ UINT SysMemSlicePitch;
+} D3D11_SUBRESOURCE_DATA;
+
+typedef struct D3D11_MAPPED_SUBRESOURCE
+{
+ void *pData;
+ UINT RowPitch;
+ UINT DepthPitch;
+} D3D11_MAPPED_SUBRESOURCE;
+
+typedef struct D3D11_BUFFER_DESC
+{
+ UINT ByteWidth;
+ D3D11_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+ UINT StructureByteStride;
+} D3D11_BUFFER_DESC;
+
+typedef struct D3D11_TEXTURE1D_DESC
+{
+ UINT Width;
+ UINT MipLevels;
+ UINT ArraySize;
+ DXGI_FORMAT Format;
+ D3D11_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D11_TEXTURE1D_DESC;
+
+typedef struct D3D11_TEXTURE2D_DESC
+{
+ UINT Width;
+ UINT Height;
+ UINT MipLevels;
+ UINT ArraySize;
+ DXGI_FORMAT Format;
+ DXGI_SAMPLE_DESC SampleDesc;
+ D3D11_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D11_TEXTURE2D_DESC;
+
+typedef struct D3D11_TEXTURE3D_DESC
+{
+ UINT Width;
+ UINT Height;
+ UINT Depth;
+ UINT MipLevels;
+ DXGI_FORMAT Format;
+ D3D11_USAGE Usage;
+ UINT BindFlags;
+ UINT CPUAccessFlags;
+ UINT MiscFlags;
+} D3D11_TEXTURE3D_DESC;
+
+typedef enum D3D11_TEXTURECUBE_FACE
+{
+ D3D11_TEXTURECUBE_FACE_POSITIVE_X,
+ D3D11_TEXTURECUBE_FACE_NEGATIVE_X,
+ D3D11_TEXTURECUBE_FACE_POSITIVE_Y,
+ D3D11_TEXTURECUBE_FACE_NEGATIVE_Y,
+ D3D11_TEXTURECUBE_FACE_POSITIVE_Z,
+ D3D11_TEXTURECUBE_FACE_NEGATIVE_Z
+} D3D11_TEXTURECUBE_FACE;
+
+typedef struct D3D11_BUFFER_SRV
+{
+ union
+ {
+ UINT FirstElement;
+ UINT ElementOffset;
+ };
+ union
+ {
+ UINT NumElements;
+ UINT ElementWidth;
+ };
+} D3D11_BUFFER_SRV;
+
+typedef enum D3D11_BUFFEREX_SRV_FLAG
+{
+ D3D11_BUFFEREX_SRV_FLAG_RAW = 1
+} D3D11_BUFFEREX_SRV_FLAG;
+
+typedef struct D3D11_BUFFEREX_SRV
+{
+ UINT FirstElement;
+ UINT NumElements;
+ UINT Flags;
+} D3D11_BUFFEREX_SRV;
+
+typedef struct D3D11_TEX1D_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D11_TEX1D_SRV;
+
+typedef struct D3D11_TEX1D_ARRAY_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX1D_ARRAY_SRV;
+
+typedef struct D3D11_TEX2D_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D11_TEX2D_SRV;
+
+typedef struct D3D11_TEX2D_ARRAY_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2D_ARRAY_SRV;
+
+typedef struct D3D11_TEX3D_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D11_TEX3D_SRV;
+
+typedef struct D3D11_TEXCUBE_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+} D3D11_TEXCUBE_SRV;
+
+typedef struct D3D11_TEXCUBE_ARRAY_SRV
+{
+ UINT MostDetailedMip;
+ UINT MipLevels;
+ UINT First2DArrayFace;
+ UINT NumCubes;
+} D3D11_TEXCUBE_ARRAY_SRV;
+
+typedef struct D3D11_TEX2DMS_SRV
+{
+ UINT UnusedField_NothingToDefine;
+} D3D11_TEX2DMS_SRV;
+
+typedef struct D3D11_TEX2DMS_ARRAY_SRV
+{
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2DMS_ARRAY_SRV;
+
+typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC
+{
+ DXGI_FORMAT Format;
+ D3D11_SRV_DIMENSION ViewDimension;
+ union
+ {
+ D3D11_BUFFER_SRV Buffer;
+ D3D11_TEX1D_SRV Texture1D;
+ D3D11_TEX1D_ARRAY_SRV Texture1DArray;
+ D3D11_TEX2D_SRV Texture2D;
+ D3D11_TEX2D_ARRAY_SRV Texture2DArray;
+ D3D11_TEX2DMS_SRV Texture2DMS;
+ D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray;
+ D3D11_TEX3D_SRV Texture3D;
+ D3D11_TEXCUBE_SRV TextureCube;
+ D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray;
+ D3D11_BUFFEREX_SRV BufferEx;
+ };
+} D3D11_SHADER_RESOURCE_VIEW_DESC;
+
+
+typedef struct D3D11_BUFFER_RTV
+{
+ union
+ {
+ UINT FirstElement;
+ UINT ElementOffset;
+ };
+ union
+ {
+ UINT NumElements;
+ UINT ElementWidth;
+ };
+} D3D11_BUFFER_RTV;
+
+typedef struct D3D11_TEX1D_RTV
+{
+ UINT MipSlice;
+} D3D11_TEX1D_RTV;
+
+typedef struct D3D11_TEX1D_ARRAY_RTV
+{
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX1D_ARRAY_RTV;
+
+typedef struct D3D11_TEX2D_RTV
+{
+ UINT MipSlice;
+} D3D11_TEX2D_RTV;
+
+typedef struct D3D11_TEX2DMS_RTV
+{
+ UINT UnusedField_NothingToDefine;
+} D3D11_TEX2DMS_RTV;
+
+typedef struct D3D11_TEX2D_ARRAY_RTV
+{
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2D_ARRAY_RTV;
+
+typedef struct D3D11_TEX2DMS_ARRAY_RTV
+{
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2DMS_ARRAY_RTV;
+
+typedef struct D3D11_TEX3D_RTV
+{
+ UINT MipSlice;
+ UINT FirstWSlice;
+ UINT WSize;
+} D3D11_TEX3D_RTV;
+
+typedef struct D3D11_RENDER_TARGET_VIEW_DESC
+{
+ DXGI_FORMAT Format;
+ D3D11_RTV_DIMENSION ViewDimension;
+ union
+ {
+ D3D11_BUFFER_RTV Buffer;
+ D3D11_TEX1D_RTV Texture1D;
+ D3D11_TEX1D_ARRAY_RTV Texture1DArray;
+ D3D11_TEX2D_RTV Texture2D;
+ D3D11_TEX2D_ARRAY_RTV Texture2DArray;
+ D3D11_TEX2DMS_RTV Texture2DMS;
+ D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray;
+ D3D11_TEX3D_RTV Texture3D;
+ };
+} D3D11_RENDER_TARGET_VIEW_DESC;
+
+typedef struct D3D11_TEX1D_DSV
+{
+ UINT MipSlice;
+} D3D11_TEX1D_DSV;
+
+typedef struct D3D11_TEX1D_ARRAY_DSV
+{
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX1D_ARRAY_DSV;
+
+typedef struct D3D11_TEX2D_DSV
+{
+ UINT MipSlice;
+} D3D11_TEX2D_DSV;
+
+typedef struct D3D11_TEX2D_ARRAY_DSV
+{
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2D_ARRAY_DSV;
+
+typedef struct D3D11_TEX2DMS_DSV
+{
+ UINT UnusedField_NothingToDefine;
+} D3D11_TEX2DMS_DSV;
+
+typedef struct D3D11_TEX2DMS_ARRAY_DSV
+{
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2DMS_ARRAY_DSV;
+
+typedef enum D3D11_DSV_FLAG
+{
+ D3D11_DSV_READ_ONLY_DEPTH = 1L,
+ D3D11_DSV_READ_ONLY_STENCIL = 2L
+} D3D11_DSV_FLAG;
+
+typedef struct D3D11_DEPTH_STENCIL_VIEW_DESC
+{
+ DXGI_FORMAT Format;
+ D3D11_DSV_DIMENSION ViewDimension;
+ UINT Flags;
+ union
+ {
+ D3D11_TEX1D_DSV Texture1D;
+ D3D11_TEX1D_ARRAY_DSV Texture1DArray;
+ D3D11_TEX2D_DSV Texture2D;
+ D3D11_TEX2D_ARRAY_DSV Texture2DArray;
+ D3D11_TEX2DMS_DSV Texture2DMS;
+ D3D11_TEX2DMS_ARRAY_DSV Texture2DMSArray;
+ };
+} D3D11_DEPTH_STENCIL_VIEW_DESC;
+
+typedef enum D3D11_BUFFER_UAV_FLAG
+{
+ D3D11_BUFFER_UAV_FLAG_RAW = 1,
+ D3D11_BUFFER_UAV_FLAG_APPEND = 2,
+ D3D11_BUFFER_UAV_FLAG_COUNTER = 4
+} D3D11_BUFFER_UAV_FLAG;
+
+typedef struct D3D11_BUFFER_UAV
+{
+ UINT FirstElement;
+ UINT NumElements;
+ UINT Flags;
+} D3D11_BUFFER_UAV;
+
+typedef struct D3D11_TEX1D_UAV
+{
+ UINT MipSlice;
+} D3D11_TEX1D_UAV;
+
+typedef struct D3D11_TEX1D_ARRAY_UAV
+{
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX1D_ARRAY_UAV;
+
+typedef struct D3D11_TEX2D_UAV
+{
+ UINT MipSlice;
+} D3D11_TEX2D_UAV;
+
+typedef struct D3D11_TEX2D_ARRAY_UAV
+{
+ UINT MipSlice;
+ UINT FirstArraySlice;
+ UINT ArraySize;
+} D3D11_TEX2D_ARRAY_UAV;
+
+typedef struct D3D11_TEX3D_UAV
+{
+ UINT MipSlice;
+ UINT FirstWSlice;
+ UINT WSize;
+} D3D11_TEX3D_UAV;
+
+typedef struct D3D11_UNORDERED_ACCESS_VIEW_DESC
+{
+ DXGI_FORMAT Format;
+ D3D11_UAV_DIMENSION ViewDimension;
+ union
+ {
+ D3D11_BUFFER_UAV Buffer;
+ D3D11_TEX1D_UAV Texture1D;
+ D3D11_TEX1D_ARRAY_UAV Texture1DArray;
+ D3D11_TEX2D_UAV Texture2D;
+ D3D11_TEX2D_ARRAY_UAV Texture2DArray;
+ D3D11_TEX3D_UAV Texture3D;
+ };
+} D3D11_UNORDERED_ACCESS_VIEW_DESC;
+
+typedef enum D3D11_FILTER
+{
+ D3D11_FILTER_MIN_MAG_MIP_POINT = 0,
+ D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 1,
+ D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 4,
+ D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 5,
+ D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
+ D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
+ D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
+ D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
+ D3D11_FILTER_ANISOTROPIC = 0x55,
+ D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
+ D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
+ D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
+ D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
+ D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
+ D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
+ D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
+ D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
+ D3D11_FILTER_COMPARISON_ANISOTROPIC = 0xd5
+} D3D11_FILTER;
+
+typedef enum D3D11_FILTER_TYPE
+{
+ D3D11_FILTER_TYPE_POINT,
+ D3D11_FILTER_TYPE_LINEAR
+} D3D11_FILTER_TYPE;
+
+const unsigned int D3D11_FILTER_TYPE_MASK = 3;
+const unsigned int D3D11_MIN_FILTER_SHIFT = 4;
+const unsigned int D3D11_MAG_FILTER_SHIFT = 2;
+const unsigned int D3D11_MIP_FILTER_SHIFT = 0;
+const unsigned int D3D11_COMPARISON_FILTERING_BIT = 0x80;
+const unsigned int D3D11_ANISOTROPIC_FILTERING_BIT = 0x40;
+
+cpp_quote("#define D3D11_ENCODE_BASIC_FILTER(min, mag, mip, comp) ((D3D11_FILTER) (((comp) ? D3D11_COMPARISON_FILTERING_BIT : 0 ) | (((min) & D3D11_FILTER_TYPE_MASK ) << D3D11_MIN_FILTER_SHIFT ) | (((mag) & D3D11_FILTER_TYPE_MASK ) << D3D11_MAG_FILTER_SHIFT ) | (((mip) & D3D11_FILTER_TYPE_MASK) << D3D11_MIP_FILTER_SHIFT)))")
+cpp_quote("#define D3D11_ENCODE_ANISOTROPIC_FILTER(comp) ((D3D11_FILTER)(D3D11_ANISOTROPIC_FILTERING_BIT | D3D11_ENCODE_BASIC_FILTER(D3D11_FILTER_TYPE_LINEAR, D3D11_FILTER_TYPE_LINEAR, D3D11_FILTER_TYPE_LINEAR, comp)))")
+cpp_quote("#define D3D11_DECODE_MIN_FILTER(f) ((D3D11_FILTER_TYPE)(((f) >> D3D11_MIN_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))")
+cpp_quote("#define D3D11_DECODE_MAG_FILTER(f) ((D3D11_FILTER_TYPE)(((f) >> D3D11_MAG_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))")
+cpp_quote("#define D3D11_DECODE_MIP_FILTER(f) ((D3D11_FILTER_TYPE)(((f) >> D3D11_MIP_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))")
+cpp_quote("#define D3D11_DECODE_IS_COMPARISON_FILTER(f) ((f) & D3D11_COMPARISON_FILTERING_BIT)")
+cpp_quote("#define D3D11_DECODE_IS_ANISOTROPIC_FILTER(f) (((f) & D3D11_ANISOTROPIC_FILTERING_BIT) && (D3D11_DECODE_MIN_FILTER(f) == D3D11_FILTER_TYPE_LINEAR) && (D3D11_DECODE_MAG_FILTER(f) == D3D11_FILTER_TYPE_LINEAR) && (D3D11_DECODE_MIP_FILTER( f ) == D3D11_FILTER_TYPE_LINEAR))")
+
+typedef enum D3D11_TEXTURE_ADDRESS_MODE
+{
+ D3D11_TEXTURE_ADDRESS_WRAP = 1,
+ D3D11_TEXTURE_ADDRESS_MIRROR = 2,
+ D3D11_TEXTURE_ADDRESS_CLAMP = 3,
+ D3D11_TEXTURE_ADDRESS_BORDER = 4,
+ D3D11_TEXTURE_ADDRESS_MIRROR_ONCE = 5
+} D3D11_TEXTURE_ADDRESS_MODE;
+
+typedef struct D3D11_SAMPLER_DESC
+{
+ D3D11_FILTER Filter;
+ D3D11_TEXTURE_ADDRESS_MODE AddressU;
+ D3D11_TEXTURE_ADDRESS_MODE AddressV;
+ D3D11_TEXTURE_ADDRESS_MODE AddressW;
+ FLOAT MipLODBias;
+ UINT MaxAnisotropy;
+ D3D11_COMPARISON_FUNC ComparisonFunc;
+ FLOAT BorderColor[ 4 ];
+ FLOAT MinLOD;
+ FLOAT MaxLOD;
+} D3D11_SAMPLER_DESC;
+
+typedef enum D3D11_FORMAT_SUPPORT
+{
+ D3D11_FORMAT_SUPPORT_BUFFER = 0x1,
+ D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2,
+ D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4,
+ D3D11_FORMAT_SUPPORT_SO_BUFFER = 0x8,
+ D3D11_FORMAT_SUPPORT_TEXTURE1D = 0x10,
+ D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x20,
+ D3D11_FORMAT_SUPPORT_TEXTURE3D = 0x40,
+ D3D11_FORMAT_SUPPORT_TEXTURECUBE = 0x80,
+ D3D11_FORMAT_SUPPORT_SHADER_LOAD = 0x100,
+ D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200,
+ D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400,
+ D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800,
+ D3D11_FORMAT_SUPPORT_MIP = 0x1000,
+ D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000,
+ D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x4000,
+ D3D11_FORMAT_SUPPORT_BLENDABLE = 0x8000,
+ D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000,
+ D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000,
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000,
+ D3D11_FORMAT_SUPPORT_DISPLAY = 0x80000,
+ D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000,
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000,
+ D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000,
+ D3D11_FORMAT_SUPPORT_SHADER_GATHER = 0x800000,
+ D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000,
+ D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000,
+ D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x4000000
+} D3D11_FORMAT_SUPPORT;
+
+typedef enum D3D11_FORMAT_SUPPORT2
+{
+ D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 1,
+ D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 2,
+ D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 4,
+ D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 8,
+ D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10,
+ D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20,
+ D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40,
+ D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80
+} D3D11_FORMAT_SUPPORT2;
+
+typedef enum D3D11_ASYNC_GETDATA_FLAG
+{
+ D3D11_ASYNC_GETDATA_DONOTFLUSH = 1
+} D3D11_ASYNC_GETDATA_FLAG;
+
+typedef enum D3D11_QUERY
+{
+ D3D11_QUERY_EVENT,
+ D3D11_QUERY_OCCLUSION,
+ D3D11_QUERY_TIMESTAMP,
+ D3D11_QUERY_TIMESTAMP_DISJOINT,
+ D3D11_QUERY_PIPELINE_STATISTICS,
+ D3D11_QUERY_OCCLUSION_PREDICATE,
+ D3D11_QUERY_SO_STATISTICS,
+ D3D11_QUERY_SO_OVERFLOW_PREDICATE,
+ D3D11_QUERY_SO_STATISTICS_STREAM0,
+ D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0,
+ D3D11_QUERY_SO_STATISTICS_STREAM1,
+ D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1,
+ D3D11_QUERY_SO_STATISTICS_STREAM2,
+ D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2,
+ D3D11_QUERY_SO_STATISTICS_STREAM3,
+ D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3,
+} D3D11_QUERY;
+
+typedef enum D3D11_QUERY_MISC_FLAG
+{
+ D3D11_QUERY_MISC_PREDICATEHINT = 1
+} D3D11_QUERY_MISC_FLAG;
+
+typedef struct D3D11_QUERY_DESC
+{
+ D3D11_QUERY Query;
+ UINT MiscFlags;
+} D3D11_QUERY_DESC;
+
+typedef struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT
+{
+ UINT64 Frequency;
+ BOOL Disjoint;
+} D3D11_QUERY_DATA_TIMESTAMP_DISJOINT;
+
+typedef struct D3D11_QUERY_DATA_PIPELINE_STATISTICS
+{
+ UINT64 IAVertices;
+ UINT64 IAPrimitives;
+ UINT64 VSInvocations;
+ UINT64 GSInvocations;
+ UINT64 GSPrimitives;
+ UINT64 CInvocations;
+ UINT64 CPrimitives;
+ UINT64 PSInvocations;
+ UINT64 HSInvocations;
+ UINT64 DSInvocations;
+ UINT64 CSInvocations;
+} D3D11_QUERY_DATA_PIPELINE_STATISTICS;
+
+typedef struct D3D11_QUERY_DATA_SO_STATISTICS
+{
+ UINT64 NumPrimitivesWritten;
+ UINT64 PrimitivesStorageNeeded;
+} D3D11_QUERY_DATA_SO_STATISTICS;
+
+typedef enum D3D11_COUNTER
+{
+ D3D11_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000
+} D3D11_COUNTER;
+
+typedef enum D3D11_COUNTER_TYPE
+{
+ D3D11_COUNTER_TYPE_FLOAT32,
+ D3D11_COUNTER_TYPE_UINT16,
+ D3D11_COUNTER_TYPE_UINT32,
+ D3D11_COUNTER_TYPE_UINT64,
+} D3D11_COUNTER_TYPE;
+
+typedef struct D3D11_COUNTER_DESC
+{
+ D3D11_COUNTER Counter;
+ UINT MiscFlags;
+} D3D11_COUNTER_DESC;
+
+typedef struct D3D11_COUNTER_INFO
+{
+ D3D11_COUNTER LastDeviceDependentCounter;
+ UINT NumSimultaneousCounters;
+ UINT8 NumDetectableParallelUnits;
+} D3D11_COUNTER_INFO;
+
+typedef enum D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS
+{
+ D3D11_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff,
+ D3D11_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe
+} D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS;
+
+typedef enum D3D11_DEVICE_CONTEXT_TYPE
+{
+ D3D11_DEVICE_CONTEXT_IMMEDIATE,
+ D3D11_DEVICE_CONTEXT_DEFERRED,
+} D3D11_DEVICE_CONTEXT_TYPE;
+
+typedef struct D3D11_CLASS_INSTANCE_DESC
+{
+ UINT InstanceId;
+ UINT InstanceIndex;
+ UINT TypeId;
+ UINT ConstantBuffer;
+ UINT BaseConstantBufferOffset;
+ UINT BaseTexture;
+ UINT BaseSampler;
+ BOOL Created;
+} D3D11_CLASS_INSTANCE_DESC;
+
+typedef enum D3D11_FEATURE
+{
+ D3D11_FEATURE_THREADING,
+ D3D11_FEATURE_DOUBLES,
+ D3D11_FEATURE_FORMAT_SUPPORT,
+ D3D11_FEATURE_FORMAT_SUPPORT2,
+ D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS,
+} D3D11_FEATURE;
+
+typedef struct D3D11_FEATURE_DATA_THREADING
+{
+ BOOL DriverConcurrentCreates;
+ BOOL DriverCommandLists;
+} D3D11_FEATURE_DATA_THREADING;
+
+typedef struct D3D11_FEATURE_DATA_DOUBLES
+{
+ BOOL DoublePrecisionFloatShaderOps;
+} D3D11_FEATURE_DATA_DOUBLES;
+
+typedef struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
+{
+ DXGI_FORMAT InFormat;
+ UINT OutFormatSupport;
+} D3D11_FEATURE_DATA_FORMAT_SUPPORT;
+
+typedef struct D3D11_FEATURE_DATA_FORMAT_SUPPORT2
+{
+ DXGI_FORMAT InFormat;
+ UINT OutFormatSupport2;
+} D3D11_FEATURE_DATA_FORMAT_SUPPORT2;
+
+typedef struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS
+{
+ BOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
+} D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS;
+
+interface ID3D11Device;
+
+[object, local, uuid("1841e5c8-16b0-489b-bcc8-44cfb0d5deae")]
+interface ID3D11DeviceChild : IUnknown {
+ void GetDevice(
+ [out] ID3D11Device **ppDevice
+ );
+
+ HRESULT GetPrivateData(
+ [in] REFGUID guid,
+ [in, out] UINT *pDataSize,
+ [out] void *pData
+ );
+
+ HRESULT SetPrivateData(
+ [in] REFGUID guid,
+ [in] UINT DataSize,
+ [in] const void *pData
+ );
+
+ HRESULT SetPrivateDataInterface(
+ [in] REFGUID guid,
+ [in] const IUnknown *pData
+ );
+};
+
+[object, local, uuid("e4819ddc-4cf0-4025-bd26-5de82a3e07b7")]
+interface ID3D11InputLayout : ID3D11DeviceChild
+{
+};
+
+[object, local, uuid("03823efb-8d8f-4e1c-9aa2-f64bb2cbfdf1")]
+interface ID3D11DepthStencilState : ID3D11DeviceChild {
+ void GetDesc(
+ [out] D3D11_DEPTH_STENCIL_DESC *pDesc
+ );
+};
+
+[object, local, uuid("75b68faa-347d-4159-8f45-a0640f01cd9a")]
+interface ID3D11BlendState : ID3D11DeviceChild {
+ void GetDesc(
+ [out] D3D11_BLEND_DESC *pDesc
+ );
+};
+
+[object, local, uuid("9bb4ab81-ab1a-4d8f-b506-fc04200b6ee7")]
+interface ID3D11RasterizerState : ID3D11DeviceChild {
+ void GetDesc(
+ [out] D3D11_RASTERIZER_DESC *pDesc
+ );
+};
+
+[object, local, uuid("da6fea51-564c-4487-9810-f0d0f9b4e3a5")]
+interface ID3D11SamplerState : ID3D11DeviceChild
+{
+ void GetDesc(
+ [out] D3D11_SAMPLER_DESC *pDesc
+ );
+
+};
+
+[object, local, uuid("dc8e63f3-d12b-4952-b47b-5e45026a862d")]
+interface ID3D11Resource : ID3D11DeviceChild {
+ void GetType(
+ [out] D3D11_RESOURCE_DIMENSION *pResourceDimension
+ );
+
+ void SetEvictionPriority(
+ [in] UINT EvictionPriority
+ );
+
+ UINT GetEvictionPriority(
+ );
+};
+
+[object, local, uuid("48570b85-d1ee-4fcd-a250-eb350722b037")]
+interface ID3D11Buffer : ID3D11Resource {
+ void GetDesc(
+ [out] D3D11_BUFFER_DESC *pDesc
+ );
+
+};
+
+[object, local, uuid("f8fb5c27-c6b3-4f75-a4c8-439af2ef564c")]
+interface ID3D11Texture1D : ID3D11Resource {
+ void GetDesc(
+ [out] D3D11_TEXTURE1D_DESC *pDesc
+ );
+};
+
+[object, local, uuid("6f15aaf2-d208-4e89-9ab4-489535d34f9c")]
+interface ID3D11Texture2D : ID3D11Resource {
+ void GetDesc(
+ [out] D3D11_TEXTURE2D_DESC *pDesc
+ );
+};
+
+[object, local, uuid("037e866e-f56d-4357-a8af-9dabbe6e250e")]
+interface ID3D11Texture3D : ID3D11Resource {
+ void GetDesc(
+ [out] D3D11_TEXTURE3D_DESC *pDesc
+ );
+};
+
+[object, local, uuid("839d1216-bb2e-412b-b7f4-a9dbebe08ed1")]
+interface ID3D11View : ID3D11DeviceChild {
+ void GetResource(
+ [out] ID3D11Resource **ppResource
+ );
+
+};
+
+[object, local, uuid("b0e06fe0-8192-4e1a-b1ca-36d7414710b2")]
+interface ID3D11ShaderResourceView : ID3D11View {
+ void GetDesc(
+ [out] D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc
+ );
+};
+
+[object, local, uuid("dfdba067-0b8d-4865-875b-d7b4516cc164")]
+interface ID3D11RenderTargetView : ID3D11View
+{
+ void GetDesc(
+ [out] D3D11_RENDER_TARGET_VIEW_DESC *pDesc
+ );
+};
+
+[object, local, uuid("9fdac92a-1876-48c3-afad-25b94f84a9b6")]
+interface ID3D11DepthStencilView : ID3D11View
+{
+ void GetDesc(
+ [out] D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc
+ );
+};
+
+[object, local, uuid("28acf509-7f5c-48f6-8611-f316010a6380")]
+interface ID3D11UnorderedAccessView : ID3D11View
+{
+ void GetDesc(
+ [out] D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc
+ );
+};
+
+[object, local, uuid("3b301d64-d678-4289-8897-22f8928b72f3")]
+interface ID3D11VertexShader : ID3D11DeviceChild
+{
+};
+
+[object, local, uuid("8e5c6061-628a-4c8e-8264-bbe45cb3d5dd")]
+interface ID3D11HullShader : ID3D11DeviceChild
+{
+};
+
+[object, local, uuid("f582c508-0f36-490c-9977-31eece268cfa")]
+interface ID3D11DomainShader : ID3D11DeviceChild
+{
+};
+
+
+[object, local, uuid("38325b96-effb-4022-ba02-2e795b70275c")]
+interface ID3D11GeometryShader : ID3D11DeviceChild
+{
+};
+
+[object, local, uuid("ea82e40d-51dc-4f33-93d4-db7c9125ae8c")]
+interface ID3D11PixelShader : ID3D11DeviceChild
+{
+};
+
+[object, local, uuid("4f5b196e-c2bd-495e-bd01-1fded38e4969")]
+interface ID3D11ComputeShader : ID3D11DeviceChild
+{
+};
+
+[object, local, uuid("4b35d0cd-1e15-4258-9c98-1b1333f6dd3b")]
+interface ID3D11Asynchronous : ID3D11DeviceChild
+{
+ UINT GetDataSize();
+};
+
+[object, local, uuid("d6c00747-87b7-425e-b84d-44d108560afd")]
+interface ID3D11Query : ID3D11Asynchronous
+{
+ void GetDesc(
+ [out] D3D11_QUERY_DESC *pDesc
+ );
+};
+
+[object, local, uuid("9eb576dd-9f77-4d86-81aa-8bab5fe490e2")]
+interface ID3D11Predicate : ID3D11Query
+{
+};
+
+[object, local, uuid("6e8c49fb-a371-4770-b440-29086022b741")]
+interface ID3D11Counter : ID3D11Asynchronous
+{
+ void GetDesc(
+ [out] D3D11_COUNTER_DESC *pDesc
+ );
+};
+
+interface ID3D11ClassLinkage;
+
+[object, local, uuid("a6cd7faa-b0b7-4a2f-9436-8662a65797cb")]
+interface ID3D11ClassInstance : ID3D11DeviceChild
+{
+ void GetClassLinkage(
+ [out] ID3D11ClassLinkage **ppLinkage
+ );
+
+ void GetDesc(
+ [out] D3D11_CLASS_INSTANCE_DESC *pDesc
+ );
+
+ void GetInstanceName(
+ [out] LPSTR pInstanceName,
+ [in, out] SIZE_T *pBufferLength
+ );
+
+ void GetTypeName(
+ [out] LPSTR pTypeName,
+ [in, out] SIZE_T *pBufferLength
+ );
+};
+
+[object, local, uuid("ddf57cba-9543-46e4-a12b-f207a0fe7fed")]
+interface ID3D11ClassLinkage : ID3D11DeviceChild
+{
+ HRESULT GetClassInstance(
+ [in] LPCSTR pClassInstanceName,
+ [in] UINT InstanceIndex,
+ [out] ID3D11ClassInstance **ppInstance
+ );
+
+ HRESULT CreateClassInstance(
+ [in] LPCSTR pClassTypeName,
+ [in] UINT ConstantBufferOffset,
+ [in] UINT ConstantVectorOffset,
+ [in] UINT TextureOffset,
+ [in] UINT SamplerOffset,
+ [out] ID3D11ClassInstance **ppInstance
+ );
+};
+
+[object, local, uuid("a24bc4d1-769e-43f7-8013-98ff566c18e2")]
+interface ID3D11CommandList : ID3D11DeviceChild
+{
+ UINT GetContextFlags();
+};
+
+interface ID3D11DeviceContext;
+
+[object, local, uuid("db6f6ddb-ac77-4e88-8253-819df9bbf140")]
+interface ID3D11Device : IUnknown
+{
+ HRESULT CreateBuffer(
+ [in] const D3D11_BUFFER_DESC *pDesc,
+ [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D11Buffer **ppBuffer
+ );
+
+ HRESULT CreateTexture1D(
+ [in] const D3D11_TEXTURE1D_DESC *pDesc,
+ [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D11Texture1D **ppTexture1D
+ );
+
+ HRESULT CreateTexture2D(
+ [in] const D3D11_TEXTURE2D_DESC *pDesc,
+ [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D11Texture2D **ppTexture2D
+ );
+
+ HRESULT CreateTexture3D(
+ [in] const D3D11_TEXTURE3D_DESC *pDesc,
+ [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
+ [out] ID3D11Texture3D **ppTexture3D
+ );
+
+ HRESULT CreateShaderResourceView(
+ [in] ID3D11Resource *pResource,
+ [in] const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
+ [out] ID3D11ShaderResourceView **ppSRView
+ );
+
+ HRESULT CreateUnorderedAccessView(
+ [in] ID3D11Resource *pResource,
+ [in] const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
+ [out] ID3D11UnorderedAccessView **ppUAView
+ );
+
+ HRESULT CreateRenderTargetView(
+ [in] ID3D11Resource *pResource,
+ [in] const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
+ [out] ID3D11RenderTargetView **ppRTView
+ );
+
+ HRESULT CreateDepthStencilView(
+ [in] ID3D11Resource *pResource,
+ [in] const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
+ [out] ID3D11DepthStencilView **ppDepthStencilView
+ );
+
+ HRESULT CreateInputLayout(
+ [in] const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
+ [in] UINT NumElements,
+ [in] const void *pShaderBytecodeWithInputSignature,
+ [in] SIZE_T BytecodeLength,
+ [out] ID3D11InputLayout **ppInputLayout
+ );
+
+ HRESULT CreateVertexShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11VertexShader **ppVertexShader
+ );
+
+ HRESULT CreateGeometryShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11GeometryShader **ppGeometryShader
+ );
+
+ HRESULT CreateGeometryShaderWithStreamOutput(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
+ [in] UINT NumEntries,
+ [in] const UINT *pBufferStrides,
+ [in] UINT NumStrides,
+ [in] UINT RasterizedStream,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11GeometryShader **ppGeometryShader
+ );
+
+ HRESULT CreatePixelShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11PixelShader **ppPixelShader
+ );
+
+ HRESULT CreateHullShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11HullShader **ppHullShader
+ );
+
+ HRESULT CreateDomainShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11DomainShader **ppDomainShader
+ );
+
+ HRESULT CreateComputeShader(
+ [in] const void *pShaderBytecode,
+ [in] SIZE_T BytecodeLength,
+ [in] ID3D11ClassLinkage *pClassLinkage,
+ [out] ID3D11ComputeShader **ppComputeShader
+ );
+
+ HRESULT CreateClassLinkage(
+ [out] ID3D11ClassLinkage **ppLinkage
+ );
+
+ HRESULT CreateBlendState(
+ [in] const D3D11_BLEND_DESC *pBlendStateDesc,
+ [out] ID3D11BlendState **ppBlendState
+ );
+
+ HRESULT CreateDepthStencilState(
+ [in] const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
+ [out] ID3D11DepthStencilState **ppDepthStencilState
+ );
+
+ HRESULT CreateRasterizerState(
+ [in] const D3D11_RASTERIZER_DESC *pRasterizerDesc,
+ [out] ID3D11RasterizerState **ppRasterizerState
+ );
+
+ HRESULT CreateSamplerState(
+ [in] const D3D11_SAMPLER_DESC *pSamplerDesc,
+ [out] ID3D11SamplerState **ppSamplerState
+ );
+
+ HRESULT CreateQuery(
+ [in] const D3D11_QUERY_DESC *pQueryDesc,
+ [out] ID3D11Query **ppQuery
+ );
+
+ HRESULT CreatePredicate(
+ [in] const D3D11_QUERY_DESC *pPredicateDesc,
+ [out] ID3D11Predicate **ppPredicate
+ );
+
+ HRESULT CreateCounter(
+ [in] const D3D11_COUNTER_DESC *pCounterDesc,
+ [out] ID3D11Counter **ppCounter
+ );
+
+ HRESULT CreateDeferredContext(
+ [in] UINT ContextFlags,
+ [out] ID3D11DeviceContext **ppDeferredContext
+ );
+
+ HRESULT OpenSharedResource(
+ [in] HANDLE hResource,
+ [in] REFIID ReturnedInterface,
+ [out] void **ppResource
+ );
+
+ HRESULT CheckFormatSupport(
+ [in] DXGI_FORMAT Format,
+ [out] UINT *pFormatSupport
+ );
+
+ HRESULT CheckMultisampleQualityLevels(
+ [in] DXGI_FORMAT Format,
+ [in] UINT SampleCount,
+ [out] UINT *pNumQualityLevels
+ );
+
+ void CheckCounterInfo(
+ [out] D3D11_COUNTER_INFO *pCounterInfo
+ );
+
+ HRESULT CheckCounter(
+ [in] const D3D11_COUNTER_DESC *pDesc,
+ [out] D3D11_COUNTER_TYPE *pType,
+ [out] UINT *pActiveCounters,
+ [out] LPSTR szName,
+ [in, out, optional] UINT *pNameLength,
+ [out] LPSTR szUnits,
+ [in, out, optional] UINT *pUnitsLength,
+ [out] LPSTR szDescription,
+ [in, out, optional] UINT *pDescriptionLength
+ );
+
+ HRESULT CheckFeatureSupport(
+ [in] D3D11_FEATURE Feature,
+ [out] void *pFeatureSupportData,
+ [in] UINT FeatureSupportDataSize
+ );
+
+ HRESULT GetPrivateData(
+ [in] REFGUID guid,
+ [in, out] UINT *pDataSize,
+ [out] void *pData
+ );
+
+ HRESULT SetPrivateData(
+ [in] REFGUID guid,
+ [in] UINT DataSize,
+ [in] const void *pData
+ );
+
+ HRESULT SetPrivateDataInterface(
+ [in] REFGUID guid,
+ [in] const IUnknown *pData
+ );
+
+ D3D_FEATURE_LEVEL GetFeatureLevel();
+
+ UINT GetCreationFlags();
+
+ HRESULT GetDeviceRemovedReason();
+
+ void GetImmediateContext(
+ [out] ID3D11DeviceContext **ppImmediateContext
+ );
+
+ HRESULT SetExceptionMode(
+ [in] UINT RaiseFlags
+ );
+
+ UINT GetExceptionMode();
+};
+
+[object, local, uuid("c0bfa96c-e089-44fb-8eaf-26f8796190da")]
+interface ID3D11DeviceContext : ID3D11DeviceChild
+{
+ void VSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppConstantBuffers
+ );
+
+ void PSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D11ShaderResourceView *const *ppShaderResourceViews
+ );
+
+ void PSSetShader(
+ [in] ID3D11PixelShader *pPixelShader,
+ [in] ID3D11ClassInstance *const *ppClassInstances,
+ [in] UINT NumClassInstances
+ );
+
+ void PSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D11SamplerState *const *ppSamplers
+ );
+
+ void VSSetShader(
+ [in] ID3D11VertexShader *pVertexShader,
+ [in] ID3D11ClassInstance *const *ppClassInstances,
+ [in] UINT NumClassInstances
+ );
+
+ void DrawIndexed(
+ [in] UINT IndexCount,
+ [in] UINT StartIndexLocation,
+ [in] INT BaseVertexLocation
+ );
+
+ void Draw(
+ [in] UINT VertexCount,
+ [in] UINT StartVertexLocation
+ );
+
+ HRESULT Map(
+ [in] ID3D11Resource *pResource,
+ [in] UINT Subresource,
+ [in] D3D11_MAP MapType,
+ [in] UINT MapFlags,
+ [out] D3D11_MAPPED_SUBRESOURCE *pMappedResource
+ );
+
+ void Unmap(
+ [in] ID3D11Resource *pResource,
+ [in] UINT Subresource
+ );
+
+ void PSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppConstantBuffers
+ );
+
+ void IASetInputLayout(
+ [in] ID3D11InputLayout *pInputLayout
+ );
+
+ void IASetVertexBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppVertexBuffers,
+ [in] const UINT *pStrides,
+ [in] const UINT *pOffsets
+ );
+
+ void IASetIndexBuffer(
+ [in] ID3D11Buffer *pIndexBuffer,
+ [in] DXGI_FORMAT Format,
+ [in] UINT Offset
+ );
+
+ void DrawIndexedInstanced(
+ [in] UINT IndexCountPerInstance,
+ [in] UINT InstanceCount,
+ [in] UINT StartIndexLocation,
+ [in] INT BaseVertexLocation,
+ [in] UINT StartInstanceLocation
+ );
+
+ void DrawInstanced(
+ [in] UINT VertexCountPerInstance,
+ [in] UINT InstanceCount,
+ [in] UINT StartVertexLocation,
+ [in] UINT StartInstanceLocation
+ );
+
+ void GSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppConstantBuffers
+ );
+
+ void GSSetShader(
+ [in] ID3D11GeometryShader *pShader,
+ [in] ID3D11ClassInstance *const *ppClassInstances,
+ [in] UINT NumClassInstances
+ );
+
+ void IASetPrimitiveTopology(
+ [in] D3D11_PRIMITIVE_TOPOLOGY Topology
+ );
+
+ void VSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D11ShaderResourceView *const *ppShaderResourceViews
+ );
+
+ void VSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D11SamplerState *const *ppSamplers
+ );
+
+ void Begin(
+ [in] ID3D11Asynchronous *pAsync
+ );
+
+ void End(
+ [in] ID3D11Asynchronous *pAsync
+ );
+
+ HRESULT GetData(
+ [in] ID3D11Asynchronous *pAsync,
+ [out] void *pData,
+ [in] UINT DataSize,
+ [in] UINT GetDataFlags
+ );
+
+ void SetPredication(
+ [in] ID3D11Predicate *pPredicate,
+ [in] BOOL PredicateValue
+ );
+
+ void GSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D11ShaderResourceView *const *ppShaderResourceViews
+ );
+
+ void GSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D11SamplerState *const *ppSamplers
+ );
+
+ void OMSetRenderTargets(
+ [in] UINT NumViews,
+ [in] ID3D11RenderTargetView *const *ppRenderTargetViews,
+ [in] ID3D11DepthStencilView *pDepthStencilView
+ );
+
+ void OMSetRenderTargetsAndUnorderedAccessViews(
+ [in] UINT NumRTVs,
+ [in] ID3D11RenderTargetView *const *ppRenderTargetViews,
+ [in] ID3D11DepthStencilView *pDepthStencilView,
+ [in] UINT UAVStartSlot,
+ [in] UINT NumUAVs,
+ [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
+ [in] const UINT *pUAVInitialCounts
+ );
+
+ void OMSetBlendState(
+ [in] ID3D11BlendState *pBlendState,
+ [in] const FLOAT BlendFactor[ 4 ],
+ [in] UINT SampleMask
+ );
+
+ void OMSetDepthStencilState(
+ [in] ID3D11DepthStencilState *pDepthStencilState,
+ [in] UINT StencilRef
+ );
+
+ void SOSetTargets(
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppSOTargets,
+ [in] const UINT *pOffsets
+ );
+
+ void DrawAuto(
+ );
+
+ void DrawIndexedInstancedIndirect(
+ [in] ID3D11Buffer *pBufferForArgs,
+ [in] UINT AlignedByteOffsetForArgs
+ );
+
+ void DrawInstancedIndirect(
+ [in] ID3D11Buffer *pBufferForArgs,
+ [in] UINT AlignedByteOffsetForArgs
+ );
+
+ void Dispatch(
+ [in] UINT ThreadGroupCountX,
+ [in] UINT ThreadGroupCountY,
+ [in] UINT ThreadGroupCountZ
+ );
+
+ void DispatchIndirect(
+ [in] ID3D11Buffer *pBufferForArgs,
+ [in] UINT AlignedByteOffsetForArgs
+ );
+
+ void RSSetState(
+ [in] ID3D11RasterizerState *pRasterizerState
+ );
+
+ void RSSetViewports(
+ [in] UINT NumViewports,
+ [in] const D3D11_VIEWPORT *pViewports
+ );
+
+ void RSSetScissorRects(
+ [in] UINT NumRects,
+ [in] const D3D11_RECT *pRects
+ );
+
+ void CopySubresourceRegion(
+ [in] ID3D11Resource *pDstResource,
+ [in] UINT DstSubresource,
+ [in] UINT DstX,
+ [in] UINT DstY,
+ [in] UINT DstZ,
+ [in] ID3D11Resource *pSrcResource,
+ [in] UINT SrcSubresource,
+ [in] const D3D11_BOX *pSrcBox
+ );
+
+ void CopyResource(
+ [in] ID3D11Resource *pDstResource,
+ [in] ID3D11Resource *pSrcResource
+ );
+
+ void UpdateSubresource(
+ [in] ID3D11Resource *pDstResource,
+ [in] UINT DstSubresource,
+ [in] const D3D11_BOX *pDstBox,
+ [in] const void *pSrcData,
+ [in] UINT SrcRowPitch,
+ [in] UINT SrcDepthPitch
+ );
+
+ void CopyStructureCount(
+ [in] ID3D11Buffer *pDstBuffer,
+ [in] UINT DstAlignedByteOffset,
+ [in] ID3D11UnorderedAccessView *pSrcView
+ );
+
+ void ClearRenderTargetView(
+ [in] ID3D11RenderTargetView *pRenderTargetView,
+ [in] const FLOAT ColorRGBA[ 4 ]
+ );
+
+ void ClearUnorderedAccessViewUint(
+ [in] ID3D11UnorderedAccessView *pUnorderedAccessView,
+ [in] const UINT Values[ 4 ]
+ );
+
+ void ClearUnorderedAccessViewFloat(
+ [in] ID3D11UnorderedAccessView *pUnorderedAccessView,
+ [in] const FLOAT Values[ 4 ]
+ );
+
+ void ClearDepthStencilView(
+ [in] ID3D11DepthStencilView *pDepthStencilView,
+ [in] UINT ClearFlags,
+ [in] FLOAT Depth,
+ [in] UINT8 Stencil
+ );
+
+ void GenerateMips(
+ [in] ID3D11ShaderResourceView *pShaderResourceView
+ );
+
+ void SetResourceMinLOD(
+ [in] ID3D11Resource *pResource,
+ [in] FLOAT MinLOD
+ );
+
+ FLOAT GetResourceMinLOD(
+ [in] ID3D11Resource *pResource
+ );
+
+ void ResolveSubresource(
+ [in] ID3D11Resource *pDstResource,
+ [in] UINT DstSubresource,
+ [in] ID3D11Resource *pSrcResource,
+ [in] UINT SrcSubresource,
+ [in] DXGI_FORMAT Format
+ );
+
+ void ExecuteCommandList(
+ [in] ID3D11CommandList *pCommandList,
+ [in] BOOL RestoreContextState
+ );
+
+ void HSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D11ShaderResourceView *const *ppShaderResourceViews
+ );
+
+ void HSSetShader(
+ [in] ID3D11HullShader *pHullShader,
+ [in] ID3D11ClassInstance *const *ppClassInstances,
+ [in] UINT NumClassInstances
+ );
+
+ void HSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D11SamplerState *const *ppSamplers
+ );
+
+ void HSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppConstantBuffers
+ );
+
+ void DSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D11ShaderResourceView *const *ppShaderResourceViews
+ );
+
+ void DSSetShader(
+ [in] ID3D11DomainShader *pDomainShader,
+ [in] ID3D11ClassInstance *const *ppClassInstances,
+ [in] UINT NumClassInstances
+ );
+
+ void DSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D11SamplerState *const *ppSamplers
+ );
+
+ void DSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppConstantBuffers
+ );
+
+ void CSSetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [in] ID3D11ShaderResourceView *const *ppShaderResourceViews
+ );
+
+ void CSSetUnorderedAccessViews(
+ [in] UINT StartSlot,
+ [in] UINT NumUAVs,
+ [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
+ [in] const UINT *pUAVInitialCounts
+ );
+
+ void CSSetShader(
+ [in] ID3D11ComputeShader *pComputeShader,
+ [in] ID3D11ClassInstance *const *ppClassInstances,
+ [in] UINT NumClassInstances
+ );
+
+ void CSSetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [in] ID3D11SamplerState *const *ppSamplers
+ );
+
+ void CSSetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [in] ID3D11Buffer *const *ppConstantBuffers
+ );
+
+ void VSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppConstantBuffers
+ );
+
+ void PSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D11ShaderResourceView **ppShaderResourceViews
+ );
+
+ void PSGetShader(
+ [out] ID3D11PixelShader **ppPixelShader,
+ [out] ID3D11ClassInstance **ppClassInstances,
+ [in, out, optional] UINT *pNumClassInstances
+ );
+
+ void PSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D11SamplerState **ppSamplers
+ );
+
+ void VSGetShader(
+ [out] ID3D11VertexShader **ppVertexShader,
+ [out] ID3D11ClassInstance **ppClassInstances,
+ [in, out, optional] UINT *pNumClassInstances
+ );
+
+ void PSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppConstantBuffers
+ );
+
+ void IAGetInputLayout(
+ [out] ID3D11InputLayout **ppInputLayout
+ );
+
+ void IAGetVertexBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppVertexBuffers,
+ [out] UINT *pStrides,
+ [out] UINT *pOffsets
+ );
+
+ void IAGetIndexBuffer(
+ [out] ID3D11Buffer **pIndexBuffer,
+ [out] DXGI_FORMAT *Format,
+ [out] UINT *Offset
+ );
+
+ void GSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppConstantBuffers
+ );
+
+ void GSGetShader(
+ [out] ID3D11GeometryShader **ppGeometryShader,
+ [out] ID3D11ClassInstance **ppClassInstances,
+ [in, out, optional] UINT *pNumClassInstances
+ );
+
+ void IAGetPrimitiveTopology(
+ [out] D3D11_PRIMITIVE_TOPOLOGY *pTopology
+ );
+
+ void VSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D11ShaderResourceView **ppShaderResourceViews
+ );
+
+ void VSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D11SamplerState **ppSamplers
+ );
+
+ void GetPredication(
+ [out] ID3D11Predicate **ppPredicate,
+ [out] BOOL *pPredicateValue
+ );
+
+ void GSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D11ShaderResourceView **ppShaderResourceViews
+ );
+
+ void GSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D11SamplerState **ppSamplers
+ );
+
+ void OMGetRenderTargets(
+ [in] UINT NumViews,
+ [out] ID3D11RenderTargetView **ppRenderTargetViews,
+ [out] ID3D11DepthStencilView **ppDepthStencilView
+ );
+
+ void OMGetRenderTargetsAndUnorderedAccessViews(
+ [in] UINT NumRTVs,
+ [out] ID3D11RenderTargetView **ppRenderTargetViews,
+ [out] ID3D11DepthStencilView **ppDepthStencilView,
+ [in] UINT UAVStartSlot,
+ [in] UINT NumUAVs,
+ [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews
+ );
+
+ void OMGetBlendState(
+ [out] ID3D11BlendState **ppBlendState,
+ [out] FLOAT BlendFactor[ 4 ],
+ [out] UINT *pSampleMask
+ );
+
+ void OMGetDepthStencilState(
+ [out] ID3D11DepthStencilState **ppDepthStencilState,
+ [out] UINT *pStencilRef
+ );
+
+ void SOGetTargets(
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppSOTargets
+ );
+
+ void RSGetState(
+ [out] ID3D11RasterizerState **ppRasterizerState
+ );
+
+ void RSGetViewports(
+ [in, out] /*_range*/ UINT *pNumViewports,
+ [out] D3D11_VIEWPORT *pViewports
+ );
+
+ void RSGetScissorRects(
+ [in, out] /*_range*/ UINT *pNumRects,
+ [out] D3D11_RECT *pRects
+ );
+
+ void HSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D11ShaderResourceView **ppShaderResourceViews
+ );
+
+ void HSGetShader(
+ [out] ID3D11HullShader **ppHullShader,
+ [out] ID3D11ClassInstance **ppClassInstances,
+ [in, out, optional] UINT *pNumClassInstances
+ );
+
+ void HSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D11SamplerState **ppSamplers
+ );
+
+ void HSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppConstantBuffers
+ );
+
+ void DSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D11ShaderResourceView **ppShaderResourceViews
+ );
+
+ void DSGetShader(
+ [out] ID3D11DomainShader **ppDomainShader,
+ [out] ID3D11ClassInstance **ppClassInstances,
+ [in, out, optional] UINT *pNumClassInstances
+ );
+
+ void DSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D11SamplerState **ppSamplers
+ );
+
+ void DSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppConstantBuffers
+ );
+
+ void CSGetShaderResources(
+ [in] UINT StartSlot,
+ [in] UINT NumViews,
+ [out] ID3D11ShaderResourceView **ppShaderResourceViews
+ );
+
+ void CSGetUnorderedAccessViews(
+ [in] UINT StartSlot,
+ [in] UINT NumUAVs,
+ [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews
+ );
+
+ void CSGetShader(
+ [out] ID3D11ComputeShader **ppComputeShader,
+ [out] ID3D11ClassInstance **ppClassInstances,
+ [in, out, optional] UINT *pNumClassInstances
+ );
+
+ void CSGetSamplers(
+ [in] UINT StartSlot,
+ [in] UINT NumSamplers,
+ [out] ID3D11SamplerState **ppSamplers
+ );
+
+ void CSGetConstantBuffers(
+ [in] UINT StartSlot,
+ [in] UINT NumBuffers,
+ [out] ID3D11Buffer **ppConstantBuffers
+ );
+
+ void ClearState();
+
+ void Flush();
+
+ D3D11_DEVICE_CONTEXT_TYPE GetType();
+
+ UINT GetContextFlags();
+
+ HRESULT FinishCommandList(
+ [in] BOOL RestoreDeferredContextState,
+ [out] ID3D11CommandList **ppCommandList
+ );
+};
+
+cpp_quote("#include \"d3d10_1.h\"")
+cpp_quote("#include \"d3d10shader.h\"")
+cpp_quote("#include \"d3d10effect.h\"")
+/*cpp_quote("#include \"d3d10_1shader.h\"") */
+
+typedef enum D3D11_CREATE_DEVICE_FLAG
+{
+ D3D11_CREATE_DEVICE_SINGLETHREADED = 1,
+ D3D11_CREATE_DEVICE_DEBUG = 2,
+ D3D11_CREATE_DEVICE_SWITCH_TO_REF = 4,
+ D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 8,
+ D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0x20
+} D3D11_CREATE_DEVICE_FLAG;
+
+
+HRESULT D3D11CreateDevice(
+ [in,optional] IDXGIAdapter* pAdapter,
+ [in] D3D_DRIVER_TYPE DriverType,
+ [in] HMODULE Software,
+ [in] UINT Flags,
+ [in,optional] const D3D_FEATURE_LEVEL* pFeatureLevels,
+ [in] UINT FeatureLevels,
+ [in] UINT SDKVersion,
+ [out,optional] ID3D11Device** ppDevice,
+ [out,optional] D3D_FEATURE_LEVEL* pFeatureLevel,
+ [out,optional] ID3D11DeviceContext** ppImmediateContext
+);
+
+typedef HRESULT (* PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)(
+ [in,optional] IDXGIAdapter*,
+ D3D_DRIVER_TYPE,
+ HMODULE,
+ UINT,
+ [in,optional] const D3D_FEATURE_LEVEL*,
+ UINT FeatureLevels,
+ UINT,
+ [in, optional] const DXGI_SWAP_CHAIN_DESC*,
+ [out,optional] IDXGISwapChain**,
+ [out,optional] ID3D11Device**,
+ [out,optional] D3D_FEATURE_LEVEL*,
+ [out,optional] ID3D11DeviceContext**
+);
+
+HRESULT D3D11CreateDeviceAndSwapChain(
+ [in,optional] IDXGIAdapter* pAdapter,
+ [in] D3D_DRIVER_TYPE DriverType,
+ [in] HMODULE Software,
+ [in] UINT Flags,
+ [in,optional] const D3D_FEATURE_LEVEL* pFeatureLevels,
+ [in] UINT FeatureLevels,
+ [in] UINT SDKVersion,
+ [in,optional] const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,
+ [out,optional] IDXGISwapChain** ppSwapChain,
+ [out,optional] ID3D11Device** ppDevice,
+ [out,optional] D3D_FEATURE_LEVEL* pFeatureLevel,
+ [out,optional] ID3D11DeviceContext** ppImmediateContext
+);
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl
new file mode 100644
index 00000000000..09588a02f5a
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl
@@ -0,0 +1,287 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+import "d3dcommon.idl";
+
+typedef enum D3D11_SHADER_VERSION_TYPE
+{
+ D3D11_SHVER_PIXEL_SHADER,
+ D3D11_SHVER_VERTEX_SHADER,
+ D3D11_SHVER_GEOMETRY_SHADER,
+
+ D3D11_SHVER_HULL_SHADER,
+ D3D11_SHVER_DOMAIN_SHADER,
+ D3D11_SHVER_COMPUTE_SHADER,
+} D3D11_SHADER_VERSION_TYPE;
+
+cpp_quote("#define D3D11_SHVER_GET_TYPE(v) (((v) >> 16) & 0xffff)")
+cpp_quote("#define D3D11_SHVER_GET_MAJOR(v) (((v) >> 4) & 0xf)")
+cpp_quote("#define D3D11_SHVER_GET_MINOR(v) (((v) >> 0) & 0xf)")
+
+typedef D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE;
+typedef D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE;
+
+typedef struct _D3D11_SIGNATURE_PARAMETER_DESC
+{
+ LPCSTR SemanticName;
+ UINT SemanticIndex;
+ UINT Register;
+ D3D_NAME SystemValueType;
+ D3D_REGISTER_COMPONENT_TYPE ComponentType;
+ BYTE Mask;
+ BYTE ReadWriteMask;
+ UINT Stream;
+} D3D11_SIGNATURE_PARAMETER_DESC;
+
+typedef struct _D3D11_SHADER_BUFFER_DESC
+{
+ LPCSTR Name;
+ D3D_CBUFFER_TYPE Type;
+ UINT Variables;
+ UINT Size;
+ UINT uFlags;
+} D3D11_SHADER_BUFFER_DESC;
+
+typedef struct _D3D11_SHADER_VARIABLE_DESC
+{
+ LPCSTR Name;
+ UINT StartOffset;
+ UINT Size;
+ UINT uFlags;
+ LPVOID DefaultValue;
+ UINT StartTexture;
+ UINT TextureSize;
+ UINT StartSampler;
+ UINT SamplerSize;
+} D3D11_SHADER_VARIABLE_DESC;
+
+typedef struct _D3D11_SHADER_TYPE_DESC
+{
+ D3D_SHADER_VARIABLE_CLASS Class;
+ D3D_SHADER_VARIABLE_TYPE Type;
+ UINT Rows;
+ UINT Columns;
+ UINT Elements;
+ UINT Members;
+ UINT Offset;
+ LPCSTR Name;
+} D3D11_SHADER_TYPE_DESC;
+
+typedef D3D_TESSELLATOR_DOMAIN D3D11_TESSELLATOR_DOMAIN;
+typedef D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING;
+typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE;
+
+typedef struct _D3D11_SHADER_DESC
+{
+ UINT Version;
+ LPCSTR Creator;
+ UINT Flags;
+
+ UINT ConstantBuffers;
+ UINT BoundResources;
+ UINT InputParameters;
+ UINT OutputParameters;
+
+ UINT InstructionCount;
+ UINT TempRegisterCount;
+ UINT TempArrayCount;
+ UINT DefCount;
+ UINT DclCount;
+ UINT TextureNormalInstructions;
+ UINT TextureLoadInstructions;
+ UINT TextureCompInstructions;
+ UINT TextureBiasInstructions;
+ UINT TextureGradientInstructions;
+ UINT FloatInstructionCount;
+ UINT IntInstructionCount;
+ UINT UintInstructionCount;
+ UINT StaticFlowControlCount;
+ UINT DynamicFlowControlCount;
+ UINT MacroInstructionCount;
+ UINT ArrayInstructionCount;
+ UINT CutInstructionCount;
+ UINT EmitInstructionCount;
+ D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
+ UINT GSMaxOutputVertexCount;
+ D3D_PRIMITIVE InputPrimitive;
+ UINT PatchConstantParameters;
+ UINT cGSInstanceCount;
+ UINT cControlPoints;
+ D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive;
+ D3D_TESSELLATOR_PARTITIONING HSPartitioning;
+ D3D_TESSELLATOR_DOMAIN TessellatorDomain;
+
+ UINT cBarrierInstructions;
+ UINT cInterlockedInstructions;
+ UINT cTextureStoreInstructions;
+} D3D11_SHADER_DESC;
+
+typedef struct _D3D11_SHADER_INPUT_BIND_DESC
+{
+ LPCSTR Name;
+ D3D_SHADER_INPUT_TYPE Type;
+ UINT BindPoint;
+ UINT BindCount;
+
+ UINT uFlags;
+ D3D_RESOURCE_RETURN_TYPE ReturnType;
+ D3D_SRV_DIMENSION Dimension;
+ UINT NumSamples;
+} D3D11_SHADER_INPUT_BIND_DESC;
+
+[local, object, uuid("6e6ffa6a-9bae-4613-a51e-91652d508c21")]
+interface ID3D11ShaderReflectionType
+{
+ HRESULT GetDesc(
+ [out] D3D11_SHADER_TYPE_DESC *pDesc
+ );
+
+ ID3D11ShaderReflectionType* GetMemberTypeByIndex(
+ [in] UINT Index
+ );
+
+ ID3D11ShaderReflectionType* GetMemberTypeByName(
+ [in] LPCSTR Name
+ );
+
+ LPCSTR GetMemberTypeName(
+ [in] UINT Index
+ );
+
+ HRESULT IsEqual(
+ [in] ID3D11ShaderReflectionType* pType
+ );
+ ID3D11ShaderReflectionType* GetSubType();
+ ID3D11ShaderReflectionType* GetBaseClass();
+ UINT GetNumInterfaces();
+ ID3D11ShaderReflectionType* GetInterfaceByIndex(
+ [in] UINT uIndex
+ );
+ HRESULT IsOfType(
+ [in] ID3D11ShaderReflectionType* pType
+ );
+ HRESULT ImplementsInterface(
+ [in] ID3D11ShaderReflectionType* pBase
+ );
+};
+
+interface ID3D11ShaderReflectionConstantBuffer;
+
+[object, local, uuid("51f23923-f3e5-4bd1-91cb-606177d8db4c")]
+interface ID3D11ShaderReflectionVariable
+{
+ HRESULT GetDesc(
+ [out] D3D11_SHADER_VARIABLE_DESC *pDesc
+ );
+
+ ID3D11ShaderReflectionType* GetType();
+ ID3D11ShaderReflectionConstantBuffer* GetBuffer();
+
+ UINT GetInterfaceSlot(
+ [in] UINT uArrayIndex
+ );
+};
+
+[object, local, uuid("eb62d63d-93dd-4318-8ae8-c6f83ad371b8")]
+interface ID3D11ShaderReflectionConstantBuffer
+{
+ HRESULT GetDesc(
+ [out] D3D11_SHADER_BUFFER_DESC *pDesc
+ );
+
+ ID3D11ShaderReflectionVariable* GetVariableByIndex(
+ [in] UINT Index
+ );
+
+ ID3D11ShaderReflectionVariable* GetVariableByName(
+ [in] LPCSTR Name
+ );
+};
+
+[object,local,uuid("0a233719-3960-4578-9d7c-203b8b1d9cc1")]
+interface ID3D11ShaderReflection
+{
+ HRESULT GetDesc(
+ [out] D3D11_SHADER_DESC *pDesc
+ );
+
+ ID3D11ShaderReflectionConstantBuffer* GetConstantBufferByIndex(
+ [in] UINT Index
+ );
+
+ ID3D11ShaderReflectionConstantBuffer* GetConstantBufferByName(
+ [in] LPCSTR Name
+ );
+
+ HRESULT GetResourceBindingDesc(
+ [in] UINT ResourceIndex,
+ [out] D3D11_SHADER_INPUT_BIND_DESC *pDesc
+ );
+
+ HRESULT GetInputParameterDesc(
+ [in] UINT ParameterIndex,
+ [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc
+ );
+
+ HRESULT GetOutputParameterDesc
+ (
+ [in] UINT ParameterIndex,
+ [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc
+ );
+
+ HRESULT GetPatchConstantParameterDesc(
+ [in] UINT ParameterIndex,
+ [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc
+ );
+
+ ID3D11ShaderReflectionVariable* GetVariableByName(
+ [in] LPCSTR Name
+ );
+
+ HRESULT GetResourceBindingDescByName(
+ [in] LPCSTR Name,
+ [out] D3D11_SHADER_INPUT_BIND_DESC *pDesc
+ );
+
+ UINT GetMovInstructionCount();
+ UINT GetMovcInstructionCount();
+ UINT GetConversionInstructionCount();
+ UINT GetBitwiseInstructionCount();
+ D3D_PRIMITIVE GetGSInputPrimitive();
+ BOOL IsSampleFrequencyShader();
+ UINT GetNumInterfaceSlots();
+
+ HRESULT GetMinFeatureLevel(
+ [out] D3D_FEATURE_LEVEL* pLevel
+ );
+
+ UINT GetThreadGroupSize(
+ [out,optional] UINT* pSizeX,
+ [out,optional] UINT* pSizeY,
+ [out,optional] UINT* pSizeZ
+ );
+};
+
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl
new file mode 100644
index 00000000000..3594bf58f8c
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl
@@ -0,0 +1,700 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+typedef const void* LPCVOID;
+
+typedef enum D3D_DRIVER_TYPE
+{
+ D3D_DRIVER_TYPE_UNKNOWN,
+ D3D_DRIVER_TYPE_HARDWARE,
+ D3D_DRIVER_TYPE_REFERENCE,
+ D3D_DRIVER_TYPE_NULL,
+ D3D_DRIVER_TYPE_SOFTWARE,
+ D3D_DRIVER_TYPE_WARP,
+} D3D_DRIVER_TYPE;
+
+typedef enum D3D_FEATURE_LEVEL
+{
+ D3D_FEATURE_LEVEL_9_1 = 0x9100,
+ D3D_FEATURE_LEVEL_9_2 = 0x9200,
+ D3D_FEATURE_LEVEL_9_3 = 0x9300,
+ D3D_FEATURE_LEVEL_10_0 = 0xa000,
+ D3D_FEATURE_LEVEL_10_1 = 0xa100,
+ D3D_FEATURE_LEVEL_11_0 = 0xb000
+} D3D_FEATURE_LEVEL;
+
+typedef enum D3D_PRIMITIVE_TOPOLOGY
+{
+ D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
+ D3D_PRIMITIVE_TOPOLOGY_POINTLIST,
+ D3D_PRIMITIVE_TOPOLOGY_LINELIST,
+ D3D_PRIMITIVE_TOPOLOGY_LINESTRIP,
+ D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
+ D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
+
+ D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
+ D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
+ D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
+ D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
+
+ D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33,
+ D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
+ D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST,
+
+ D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
+ D3D10_PRIMITIVE_TOPOLOGY_POINTLIST,
+ D3D10_PRIMITIVE_TOPOLOGY_LINELIST,
+ D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP,
+ D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
+ D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
+
+ D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
+ D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
+ D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
+ D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
+
+ D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
+ D3D11_PRIMITIVE_TOPOLOGY_POINTLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_LINELIST,
+ D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP,
+ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
+ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
+
+ D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
+ D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
+ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
+ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
+
+ D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33,
+ D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
+ D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST,
+} D3D_PRIMITIVE_TOPOLOGY;
+
+typedef enum D3D_PRIMITIVE
+{
+ D3D_PRIMITIVE_UNDEFINED = 0,
+ D3D_PRIMITIVE_POINT,
+ D3D_PRIMITIVE_LINE,
+ D3D_PRIMITIVE_TRIANGLE,
+
+ D3D_PRIMITIVE_LINE_ADJ = 6,
+ D3D_PRIMITIVE_TRIANGLE_ADJ,
+
+ D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8,
+ D3D_PRIMITIVE_2_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_3_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_4_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_5_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_6_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_7_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_8_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_9_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_10_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_11_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_12_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_13_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_14_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_15_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_16_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_17_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_18_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_19_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_20_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_21_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_22_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_23_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_24_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_25_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_26_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_27_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_28_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_29_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_30_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_31_CONTROL_POINT_PATCH,
+ D3D_PRIMITIVE_32_CONTROL_POINT_PATCH,
+
+ D3D10_PRIMITIVE_UNDEFINED = 0,
+ D3D10_PRIMITIVE_POINT,
+ D3D10_PRIMITIVE_LINE,
+ D3D10_PRIMITIVE_TRIANGLE,
+
+ D3D10_PRIMITIVE_LINE_ADJ = 6,
+ D3D10_PRIMITIVE_TRIANGLE_ADJ,
+
+ D3D11_PRIMITIVE_UNDEFINED = 0,
+ D3D11_PRIMITIVE_POINT,
+ D3D11_PRIMITIVE_LINE,
+ D3D11_PRIMITIVE_TRIANGLE,
+
+ D3D11_PRIMITIVE_LINE_ADJ = 6,
+ D3D11_PRIMITIVE_TRIANGLE_ADJ,
+
+ D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH = 8,
+ D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH,
+ D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH,
+} D3D_PRIMITIVE;
+
+typedef enum D3D_SRV_DIMENSION
+{
+ D3D_SRV_DIMENSION_UNKNOWN = 0,
+ D3D_SRV_DIMENSION_BUFFER,
+ D3D_SRV_DIMENSION_TEXTURE1D,
+ D3D_SRV_DIMENSION_TEXTURE1DARRAY,
+ D3D_SRV_DIMENSION_TEXTURE2D,
+ D3D_SRV_DIMENSION_TEXTURE2DARRAY,
+ D3D_SRV_DIMENSION_TEXTURE2DMS,
+ D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
+ D3D_SRV_DIMENSION_TEXTURE3D,
+ D3D_SRV_DIMENSION_TEXTURECUBE,
+ D3D_SRV_DIMENSION_TEXTURECUBEARRAY,
+ D3D_SRV_DIMENSION_BUFFEREX,
+
+ D3D10_SRV_DIMENSION_UNKNOWN = 0,
+ D3D10_SRV_DIMENSION_BUFFER,
+ D3D10_SRV_DIMENSION_TEXTURE1D,
+ D3D10_SRV_DIMENSION_TEXTURE1DARRAY,
+ D3D10_SRV_DIMENSION_TEXTURE2D,
+ D3D10_SRV_DIMENSION_TEXTURE2DARRAY,
+ D3D10_SRV_DIMENSION_TEXTURE2DMS,
+ D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY,
+ D3D10_SRV_DIMENSION_TEXTURE3D,
+ D3D10_SRV_DIMENSION_TEXTURECUBE,
+
+ D3D10_1_SRV_DIMENSION_UNKNOWN = 0,
+ D3D10_1_SRV_DIMENSION_BUFFER,
+ D3D10_1_SRV_DIMENSION_TEXTURE1D,
+ D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY,
+ D3D10_1_SRV_DIMENSION_TEXTURE2D,
+ D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY,
+ D3D10_1_SRV_DIMENSION_TEXTURE2DMS,
+ D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY,
+ D3D10_1_SRV_DIMENSION_TEXTURE3D,
+ D3D10_1_SRV_DIMENSION_TEXTURECUBE,
+ D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY,
+
+ D3D11_SRV_DIMENSION_UNKNOWN = 0,
+ D3D11_SRV_DIMENSION_BUFFER,
+ D3D11_SRV_DIMENSION_TEXTURE1D,
+ D3D11_SRV_DIMENSION_TEXTURE1DARRAY,
+ D3D11_SRV_DIMENSION_TEXTURE2D,
+ D3D11_SRV_DIMENSION_TEXTURE2DARRAY,
+ D3D11_SRV_DIMENSION_TEXTURE2DMS,
+ D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY,
+ D3D11_SRV_DIMENSION_TEXTURE3D,
+ D3D11_SRV_DIMENSION_TEXTURECUBE,
+ D3D11_SRV_DIMENSION_TEXTURECUBEARRAY,
+ D3D11_SRV_DIMENSION_BUFFEREX,
+} D3D_SRV_DIMENSION;
+
+typedef struct _D3D_SHADER_MACRO
+{
+ LPCSTR Name;
+ LPCSTR Definition;
+} D3D_SHADER_MACRO;
+
+typedef struct _D3D_SHADER_MACRO *LPD3D_SHADER_MACRO;
+
+[object, local, uuid(8ba5fb08-5195-40e2-ac58-0d989c3a0102)]
+interface ID3D10Blob : IUnknown
+{
+ LPVOID GetBufferPointer();
+ SIZE_T GetBufferSize();
+};
+
+typedef enum _D3D_INCLUDE_TYPE
+{
+ D3D_INCLUDE_LOCAL = 0,
+ D3D_INCLUDE_SYSTEM,
+
+ D3D10_INCLUDE_LOCAL = 0,
+ D3D10_INCLUDE_SYSTEM,
+
+ D3D_INCLUDE_FORCE_DWORD = 0x7fffffff,
+} D3D_INCLUDE_TYPE;
+
+[object, local]
+interface ID3DInclude : IUnknown
+{
+ HRESULT Open(
+ [in] D3D_INCLUDE_TYPE IncludeType,
+ [in] LPCSTR pFileName,
+ [in] LPCVOID pParentData,
+ [out] LPCVOID *ppData,
+ [in] UINT *pBytes
+ );
+ HRESULT Close(
+ [in] LPCVOID pData
+ );
+};
+
+typedef enum _D3D_SHADER_VARIABLE_CLASS
+{
+ D3D_SVC_SCALAR = 0,
+ D3D_SVC_VECTOR,
+ D3D_SVC_MATRIX_ROWS,
+ D3D_SVC_MATRIX_COLUMNS,
+ D3D_SVC_OBJECT,
+ D3D_SVC_STRUCT,
+ D3D_SVC_INTERFACE_CLASS,
+ D3D_SVC_INTERFACE_POINTER,
+
+ D3D10_SVC_SCALAR = 0,
+ D3D10_SVC_VECTOR,
+ D3D10_SVC_MATRIX_ROWS,
+ D3D10_SVC_MATRIX_COLUMNS,
+ D3D10_SVC_OBJECT,
+ D3D10_SVC_STRUCT,
+ D3D11_SVC_INTERFACE_CLASS,
+ D3D11_SVC_INTERFACE_POINTER,
+ D3D_SVC_FORCE_DWORD = 0x7fffffff
+} D3D_SHADER_VARIABLE_CLASS;
+
+typedef enum _D3D_SHADER_VARIABLE_FLAGS
+{
+ D3D_SVF_USERPACKED = 1,
+ D3D_SVF_USED = 2,
+ D3D_SVF_INTERFACE_POINTER = 4,
+ D3D_SVF_INTERFACE_PARAMETER = 8,
+
+ D3D10_SVF_USERPACKED = 1,
+ D3D10_SVF_USED = 2,
+ D3D10_SVF_INTERFACE_POINTER = 4,
+ D3D10_SVF_INTERFACE_PARAMETER = 8,
+
+ D3D_SVF_FORCE_DWORD = 0x7fffffff
+} D3D_SHADER_VARIABLE_FLAGS;
+
+typedef enum _D3D_SHADER_VARIABLE_TYPE
+{
+ D3D_SVT_VOID = 0,
+ D3D_SVT_BOOL,
+ D3D_SVT_INT,
+ D3D_SVT_FLOAT,
+ D3D_SVT_STRING,
+ D3D_SVT_TEXTURE,
+ D3D_SVT_TEXTURE1D,
+ D3D_SVT_TEXTURE2D,
+ D3D_SVT_TEXTURE3D,
+ D3D_SVT_TEXTURECUBE,
+ D3D_SVT_SAMPLER,
+ D3D_SVT_SAMPLER1D,
+ D3D_SVT_SAMPLER2D,
+ D3D_SVT_SAMPLER3D,
+ D3D_SVT_SAMPLERCUBE,
+ D3D_SVT_PIXELSHADER,
+ D3D_SVT_VERTEXSHADER,
+ D3D_SVT_PIXELFRAGMENT,
+ D3D_SVT_VERTEXFRAGMENT,
+ D3D_SVT_UINT,
+ D3D_SVT_UINT8,
+ D3D_SVT_GEOMETRYSHADER,
+ D3D_SVT_RASTERIZER,
+ D3D_SVT_DEPTHSTENCIL,
+ D3D_SVT_BLEND,
+ D3D_SVT_BUFFER,
+ D3D_SVT_CBUFFER,
+ D3D_SVT_TBUFFER,
+ D3D_SVT_TEXTURE1DARRAY,
+ D3D_SVT_TEXTURE2DARRAY,
+ D3D_SVT_RENDERTARGETVIEW,
+ D3D_SVT_DEPTHSTENCILVIEW,
+ D3D_SVT_TEXTURE2DMS,
+ D3D_SVT_TEXTURE2DMSARRAY,
+ D3D_SVT_TEXTURECUBEARRAY,
+ D3D_SVT_HULLSHADER,
+ D3D_SVT_DOMAINSHADER,
+ D3D_SVT_INTERFACE_POINTER,
+ D3D_SVT_COMPUTESHADER,
+ D3D_SVT_DOUBLE,
+ D3D_SVT_RWTEXTURE1D,
+ D3D_SVT_RWTEXTURE1DARRAY,
+ D3D_SVT_RWTEXTURE2D,
+ D3D_SVT_RWTEXTURE2DARRAY,
+ D3D_SVT_RWTEXTURE3D,
+ D3D_SVT_RWBUFFER,
+ D3D_SVT_BYTEADDRESS_BUFFER,
+ D3D_SVT_RWBYTEADDRESS_BUFFER,
+ D3D_SVT_STRUCTURED_BUFFER,
+ D3D_SVT_RWSTRUCTURED_BUFFER,
+ D3D_SVT_APPEND_STRUCTURED_BUFFER,
+ D3D_SVT_CONSUME_STRUCTURED_BUFFER,
+
+ D3D10_SVT_VOID = 0,
+ D3D10_SVT_BOOL,
+ D3D10_SVT_INT,
+ D3D10_SVT_FLOAT,
+ D3D10_SVT_STRING,
+ D3D10_SVT_TEXTURE,
+ D3D10_SVT_TEXTURE1D,
+ D3D10_SVT_TEXTURE2D,
+ D3D10_SVT_TEXTURE3D,
+ D3D10_SVT_TEXTURECUBE,
+ D3D10_SVT_SAMPLER,
+ D3D10_SVT_SAMPLER1D,
+ D3D10_SVT_SAMPLER2D,
+ D3D10_SVT_SAMPLER3D,
+ D3D10_SVT_SAMPLERCUBE,
+ D3D10_SVT_PIXELSHADER,
+ D3D10_SVT_VERTEXSHADER,
+ D3D10_SVT_PIXELFRAGMENT,
+ D3D10_SVT_VERTEXFRAGMENT,
+ D3D10_SVT_UINT,
+ D3D10_SVT_UINT8,
+ D3D10_SVT_GEOMETRYSHADER,
+ D3D10_SVT_RASTERIZER,
+ D3D10_SVT_DEPTHSTENCIL,
+ D3D10_SVT_BLEND,
+ D3D10_SVT_BUFFER,
+ D3D10_SVT_CBUFFER,
+ D3D10_SVT_TBUFFER,
+ D3D10_SVT_TEXTURE1DARRAY,
+ D3D10_SVT_TEXTURE2DARRAY,
+ D3D10_SVT_RENDERTARGETVIEW,
+ D3D10_SVT_DEPTHSTENCILVIEW,
+ D3D10_SVT_TEXTURE2DMS,
+ D3D10_SVT_TEXTURE2DMSARRAY,
+ D3D10_SVT_TEXTURECUBEARRAY,
+
+ D3D11_SVT_HULLSHADER,
+ D3D11_SVT_DOMAINSHADER,
+ D3D11_SVT_INTERFACE_POINTER,
+ D3D11_SVT_COMPUTESHADER,
+ D3D11_SVT_DOUBLE,
+ D3D11_SVT_RWTEXTURE1D,
+ D3D11_SVT_RWTEXTURE1DARRAY,
+ D3D11_SVT_RWTEXTURE2D,
+ D3D11_SVT_RWTEXTURE2DARRAY,
+ D3D11_SVT_RWTEXTURE3D,
+ D3D11_SVT_RWBUFFER,
+ D3D11_SVT_BYTEADDRESS_BUFFER,
+ D3D11_SVT_RWBYTEADDRESS_BUFFER,
+ D3D11_SVT_STRUCTURED_BUFFER,
+ D3D11_SVT_RWSTRUCTURED_BUFFER,
+ D3D11_SVT_APPEND_STRUCTURED_BUFFER,
+ D3D11_SVT_CONSUME_STRUCTURED_BUFFER,
+
+ D3D_SVT_FORCE_DWORD = 0x7fffffff
+} D3D_SHADER_VARIABLE_TYPE;
+
+typedef enum _D3D_SHADER_INPUT_FLAGS
+{
+ D3D_SIF_USERPACKED = 1,
+ D3D_SIF_COMPARISON_SAMPLER = 2,
+ D3D_SIF_TEXTURE_COMPONENT_0 = 4,
+ D3D_SIF_TEXTURE_COMPONENT_1 = 8,
+ D3D_SIF_TEXTURE_COMPONENTS = 12,
+
+ D3D10_SIF_USERPACKED = 1,
+ D3D10_SIF_COMPARISON_SAMPLER = 2,
+ D3D10_SIF_TEXTURE_COMPONENT_0 = 4,
+ D3D10_SIF_TEXTURE_COMPONENT_1 = 8,
+ D3D10_SIF_TEXTURE_COMPONENTS = 12,
+
+ D3D_SIF_FORCE_DWORD = 0x7fffffff
+ } D3D_SHADER_INPUT_FLAGS;
+
+typedef enum _D3D_SHADER_INPUT_TYPE
+{
+ D3D_SIT_CBUFFER = 0,
+ D3D_SIT_TBUFFER,
+ D3D_SIT_TEXTURE,
+ D3D_SIT_SAMPLER,
+ D3D_SIT_UAV_RWTYPED,
+ D3D_SIT_STRUCTURED,
+ D3D_SIT_UAV_RWSTRUCTURED,
+ D3D_SIT_BYTEADDRESS,
+ D3D_SIT_UAV_RWBYTEADDRESS,
+ D3D_SIT_UAV_APPEND_STRUCTURED,
+ D3D_SIT_UAV_CONSUME_STRUCTURED,
+ D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER,
+
+ D3D10_SIT_CBUFFER = 0,
+ D3D10_SIT_TBUFFER,
+ D3D10_SIT_TEXTURE,
+ D3D10_SIT_SAMPLER,
+
+ D3D11_SIT_UAV_RWTYPED,
+ D3D11_SIT_STRUCTURED,
+ D3D11_SIT_UAV_RWSTRUCTURED,
+ D3D11_SIT_BYTEADDRESS,
+ D3D11_SIT_UAV_RWBYTEADDRESS,
+ D3D11_SIT_UAV_APPEND_STRUCTURED,
+ D3D11_SIT_UAV_CONSUME_STRUCTURED,
+ D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER,
+ } D3D_SHADER_INPUT_TYPE;
+
+typedef enum _D3D_SHADER_CBUFFER_FLAGS
+{
+ D3D_CBF_USERPACKED = 1,
+
+ D3D10_CBF_USERPACKED = 1,
+
+ D3D_CBF_FORCE_DWORD = 0x7fffffff
+} D3D_SHADER_CBUFFER_FLAGS;
+
+typedef enum _D3D_CBUFFER_TYPE
+{
+ D3D_CT_CBUFFER = 0,
+ D3D_CT_TBUFFER,
+ D3D_CT_INTERFACE_POINTERS,
+ D3D_CT_RESOURCE_BIND_INFO,
+
+ D3D10_CT_CBUFFER = 0,
+ D3D10_CT_TBUFFER,
+
+ D3D11_CT_CBUFFER = 0,
+ D3D11_CT_TBUFFER,
+ D3D11_CT_INTERFACE_POINTERS,
+ D3D11_CT_RESOURCE_BIND_INFO,
+} D3D_CBUFFER_TYPE;
+
+typedef enum D3D_NAME
+{
+ D3D_NAME_UNDEFINED = 0,
+ D3D_NAME_POSITION,
+ D3D_NAME_CLIP_DISTANCE,
+ D3D_NAME_CULL_DISTANCE,
+ D3D_NAME_RENDER_TARGET_ARRAY_INDEX,
+ D3D_NAME_VIEWPORT_ARRAY_INDEX,
+ D3D_NAME_VERTEX_ID,
+ D3D_NAME_PRIMITIVE_ID,
+ D3D_NAME_INSTANCE_ID,
+ D3D_NAME_IS_FRONT_FACE,
+ D3D_NAME_SAMPLE_INDEX,
+ D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR,
+ D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR,
+ D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR,
+ D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR,
+ D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR,
+ D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR,
+
+ D3D_NAME_TARGET = 64,
+ D3D_NAME_DEPTH,
+ D3D_NAME_COVERAGE,
+ D3D_NAME_DEPTH_GREATER_EQUAL,
+ D3D_NAME_DEPTH_LESS_EQUAL,
+
+ D3D10_NAME_UNDEFINED = 0,
+ D3D10_NAME_POSITION,
+ D3D10_NAME_CLIP_DISTANCE,
+ D3D10_NAME_CULL_DISTANCE,
+ D3D10_NAME_RENDER_TARGET_ARRAY_INDEX,
+ D3D10_NAME_VIEWPORT_ARRAY_INDEX,
+ D3D10_NAME_VERTEX_ID,
+ D3D10_NAME_PRIMITIVE_ID,
+ D3D10_NAME_INSTANCE_ID,
+ D3D10_NAME_IS_FRONT_FACE,
+ D3D10_NAME_SAMPLE_INDEX,
+
+ D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR,
+ D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR,
+ D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR,
+ D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR,
+ D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR,
+ D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR,
+
+ D3D10_NAME_TARGET = 64,
+ D3D10_NAME_DEPTH ,
+ D3D10_NAME_COVERAGE,
+
+ D3D11_NAME_DEPTH_GREATER_EQUAL,
+ D3D11_NAME_DEPTH_LESS_EQUAL,
+} D3D_NAME;
+
+typedef enum D3D_RESOURCE_RETURN_TYPE
+{
+ D3D_RETURN_TYPE_UNORM = 1,
+ D3D_RETURN_TYPE_SNORM,
+ D3D_RETURN_TYPE_SINT,
+ D3D_RETURN_TYPE_UINT,
+ D3D_RETURN_TYPE_FLOAT,
+ D3D_RETURN_TYPE_MIXED,
+ D3D_RETURN_TYPE_DOUBLE,
+ D3D_RETURN_TYPE_CONTINUED,
+
+ D3D10_RETURN_TYPE_UNORM = 1,
+ D3D10_RETURN_TYPE_SNORM,
+ D3D10_RETURN_TYPE_SINT,
+ D3D10_RETURN_TYPE_UINT,
+ D3D10_RETURN_TYPE_FLOAT,
+ D3D10_RETURN_TYPE_MIXED,
+
+ D3D11_RETURN_TYPE_UNORM = 1,
+ D3D11_RETURN_TYPE_SNORM,
+ D3D11_RETURN_TYPE_SINT,
+ D3D11_RETURN_TYPE_UINT,
+ D3D11_RETURN_TYPE_FLOAT,
+ D3D11_RETURN_TYPE_MIXED,
+ D3D11_RETURN_TYPE_DOUBLE,
+ D3D11_RETURN_TYPE_CONTINUED,
+} D3D_RESOURCE_RETURN_TYPE;
+
+typedef enum D3D_REGISTER_COMPONENT_TYPE
+{
+ D3D_REGISTER_COMPONENT_UNKNOWN = 0,
+ D3D_REGISTER_COMPONENT_UINT32,
+ D3D_REGISTER_COMPONENT_SINT32,
+ D3D_REGISTER_COMPONENT_FLOAT32,
+
+ D3D10_REGISTER_COMPONENT_UNKNOWN = 0,
+ D3D10_REGISTER_COMPONENT_UINT32,
+ D3D10_REGISTER_COMPONENT_SINT32,
+ D3D10_REGISTER_COMPONENT_FLOAT32,
+} D3D_REGISTER_COMPONENT_TYPE;
+
+typedef enum D3D_TESSELLATOR_DOMAIN
+{
+ D3D_TESSELLATOR_DOMAIN_UNDEFINED = 0,
+ D3D_TESSELLATOR_DOMAIN_ISOLINE,
+ D3D_TESSELLATOR_DOMAIN_TRI,
+ D3D_TESSELLATOR_DOMAIN_QUAD,
+
+ D3D11_TESSELLATOR_DOMAIN_UNDEFINED = 0,
+ D3D11_TESSELLATOR_DOMAIN_ISOLINE,
+ D3D11_TESSELLATOR_DOMAIN_TRI,
+ D3D11_TESSELLATOR_DOMAIN_QUAD,
+} D3D_TESSELLATOR_DOMAIN;
+
+typedef enum D3D_TESSELLATOR_PARTITIONING
+{
+ D3D_TESSELLATOR_PARTITIONING_UNDEFINED = 0,
+ D3D_TESSELLATOR_PARTITIONING_INTEGER,
+ D3D_TESSELLATOR_PARTITIONING_POW2,
+ D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD,
+ D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN,
+
+ D3D11_TESSELLATOR_PARTITIONING_UNDEFINED = 0,
+ D3D11_TESSELLATOR_PARTITIONING_INTEGER,
+ D3D11_TESSELLATOR_PARTITIONING_POW2,
+ D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD,
+ D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN,
+} D3D_TESSELLATOR_PARTITIONING;
+
+typedef enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE
+{
+ D3D_TESSELLATOR_OUTPUT_UNDEFINED = 0,
+ D3D_TESSELLATOR_OUTPUT_POINT,
+ D3D_TESSELLATOR_OUTPUT_LINE,
+ D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW,
+ D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW,
+
+ D3D11_TESSELLATOR_OUTPUT_UNDEFINED = 0,
+ D3D11_TESSELLATOR_OUTPUT_POINT,
+ D3D11_TESSELLATOR_OUTPUT_LINE,
+ D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW,
+ D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW,
+} D3D_TESSELLATOR_OUTPUT_PRIMITIVE;
+
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl b/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl
new file mode 100644
index 00000000000..d268e43c0dd
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl
@@ -0,0 +1,470 @@
+/*
+ * Copyright 2007 Andras Kovacs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*DXGI 1.1 IDL, and missing DXGI 1.0 parts added by Luca Barbieri on Sep 2010 */
+
+import "dxgitype.idl";
+
+const UINT _FACDXGI = 0x87a;
+
+cpp_quote("#define MAKE_DXGI_STATUS(x) MAKE_HRESULT(0, _FACDXGI, x)")
+cpp_quote("#define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1)")
+cpp_quote("#define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2)")
+cpp_quote("#define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4)")
+cpp_quote("#define DXGI_STATUS_NO_DESKTOP_ACCESS MAKE_DXGI_STATUS(5)")
+cpp_quote("#define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6)")
+cpp_quote("#define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7)")
+cpp_quote("#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8)")
+
+cpp_quote("#define MAKE_DXGI_HRESULT(x) MAKE_HRESULT(1, _FACDXGI, x)")
+cpp_quote("#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1)")
+cpp_quote("#define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2)")
+cpp_quote("#define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3)")
+cpp_quote("#define DXGI_ERROR_UNSUPPORTED MAKE_DXGI_HRESULT(4)")
+cpp_quote("#define DXGI_ERROR_DEVICE_REMOVED MAKE_DXGI_HRESULT(5)")
+cpp_quote("#define DXGI_ERROR_DEVICE_HUNG MAKE_DXGI_HRESULT(6)")
+cpp_quote("#define DXGI_ERROR_DEVICE_RESET MAKE_DXGI_HRESULT(7)")
+cpp_quote("#define DXGI_ERROR_WAS_STILL_DRAWING MAKE_DXGI_HRESULT(10)")
+cpp_quote("#define DXGI_ERROR_FRAME_STATISTICS_DISJOINT MAKE_DXGI_HRESULT(11)")
+cpp_quote("#define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12)")
+cpp_quote("#define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32)")
+cpp_quote("#define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33)")
+cpp_quote("#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34)")
+
+cpp_quote("#if 0")
+typedef HANDLE HMONITOR;
+typedef struct _LUID {
+ DWORD LowPart;
+ LONG HighPart;
+} LUID, *PLUID;
+cpp_quote("#endif")
+
+typedef UINT DXGI_USAGE;
+const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L;
+const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L;
+const DXGI_USAGE DXGI_USAGE_BACK_BUFFER = 0x40L;
+const DXGI_USAGE DXGI_USAGE_SHARED = 0x80L;
+const DXGI_USAGE DXGI_USAGE_READ_ONLY = 0x100L;
+
+typedef enum DXGI_SWAP_EFFECT {
+ DXGI_SWAP_EFFECT_DISCARD = 0,
+ DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
+} DXGI_SWAP_EFFECT;
+
+typedef enum DXGI_RESIDENCY {
+ DXGI_RESIDENCY_FULLY_RESIDENT = 1,
+ DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2,
+ DXGI_RESIDENCY_EVICTED_TO_DISK = 3,
+} DXGI_RESIDENCY;
+
+typedef struct DXGI_SURFACE_DESC {
+ UINT Width;
+ UINT Height;
+ DXGI_FORMAT Format;
+ DXGI_SAMPLE_DESC SampleDesc;
+} DXGI_SURFACE_DESC;
+
+typedef struct DXGI_MAPPED_RECT {
+ INT Pitch;
+ BYTE *pBits;
+} DXGI_MAPPED_RECT;
+
+typedef struct DXGI_OUTPUT_DESC {
+ WCHAR DeviceName[32];
+ RECT DesktopCoordinates;
+ BOOL AttachedToDesktop;
+ DXGI_MODE_ROTATION Rotation;
+ HMONITOR Monitor;
+} DXGI_OUTPUT_DESC;
+
+typedef struct DXGI_FRAME_STATISTICS {
+ UINT PresentCount;
+ UINT PresentRefreshCount;
+ UINT SyncRefreshCount;
+ LARGE_INTEGER SyncQPCTime;
+ LARGE_INTEGER SyncGPUTime;
+} DXGI_FRAME_STATISTICS;
+
+typedef struct DXGI_ADAPTER_DESC {
+ WCHAR Description[128];
+ UINT VendorId;
+ UINT DeviceId;
+ UINT SubSysId;
+ UINT Revision;
+ SIZE_T DedicatedVideoMemory;
+ SIZE_T DedicatedSystemMemory;
+ SIZE_T SharedSystemMemory;
+ LUID AdapterLuid;
+} DXGI_ADAPTER_DESC;
+
+typedef struct DXGI_SWAP_CHAIN_DESC {
+ DXGI_MODE_DESC BufferDesc;
+ DXGI_SAMPLE_DESC SampleDesc;
+ DXGI_USAGE BufferUsage;
+ UINT BufferCount;
+ HWND OutputWindow;
+ BOOL Windowed;
+ DXGI_SWAP_EFFECT SwapEffect;
+ UINT Flags;
+} DXGI_SWAP_CHAIN_DESC;
+
+typedef struct DXGI_SHARED_RESOURCE {
+ HANDLE Handle;
+} DXGI_SHARED_RESOURCE;
+
+[
+ object,
+ local,
+ uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e)
+]
+interface IDXGIObject : IUnknown
+{
+ HRESULT SetPrivateData(
+ [in] REFGUID guid,
+ [in] UINT data_size,
+ [in] const void *data
+ );
+ HRESULT SetPrivateDataInterface(
+ [in] REFGUID guid,
+ [in] const IUnknown *object
+ );
+ HRESULT GetPrivateData(
+ [in] REFGUID guid,
+ [in, out] UINT *data_size,
+ [out] void *data
+ );
+ HRESULT GetParent(
+ [in] REFIID riid,
+ [out] void **parent
+ );
+}
+
+[
+ object,
+ local,
+ uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6)
+]
+interface IDXGIDeviceSubObject : IDXGIObject
+{
+ HRESULT GetDevice(
+ [in] REFIID riid,
+ [out] void **device
+ );
+}
+
+[
+ object,
+ local,
+ uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec)
+]
+interface IDXGISurface : IDXGIDeviceSubObject
+{
+ HRESULT GetDesc(
+ [out] DXGI_SURFACE_DESC *desc
+ );
+ HRESULT Map(
+ [out] DXGI_MAPPED_RECT *mapped_rect,
+ [in] UINT flags
+ );
+ HRESULT Unmap(
+ );
+}
+
+[
+ object,
+ local,
+ uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa)
+]
+interface IDXGIOutput : IDXGIObject
+{
+ HRESULT GetDesc(
+ [out] DXGI_OUTPUT_DESC *desc
+ );
+ HRESULT GetDisplayModeList(
+ [in] DXGI_FORMAT format,
+ [in] UINT flags,
+ [in, out] UINT *mode_count,
+ [out] DXGI_MODE_DESC *desc
+ );
+ HRESULT FindClosestMatchingMode(
+ [in] const DXGI_MODE_DESC *mode,
+ [out] DXGI_MODE_DESC *closest_match,
+ [in] IUnknown *device
+ );
+ HRESULT WaitForVBlank(
+ );
+ HRESULT TakeOwnership(
+ [in] IUnknown *device,
+ [in] BOOL exclusive
+ );
+ void ReleaseOwnership(
+ );
+ HRESULT GetGammaControlCapabilities(
+ [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps
+ );
+ HRESULT SetGammaControl(
+ [in] const DXGI_GAMMA_CONTROL *gamma_control
+ );
+ HRESULT GetGammaControl(
+ [out] DXGI_GAMMA_CONTROL *gamma_control
+ );
+ HRESULT SetDisplaySurface(
+ [in] IDXGISurface *surface
+ );
+ HRESULT GetDisplaySurfaceData(
+ [in] IDXGISurface *surface
+ );
+ HRESULT GetFrameStatistics(
+ [out] DXGI_FRAME_STATISTICS *stats
+ );
+}
+
+[
+ object,
+ local,
+ uuid(2411e7e1-12ac-4ccf-bd14-9798e8534dc0)
+]
+interface IDXGIAdapter : IDXGIObject
+{
+ HRESULT EnumOutputs(
+ [in] UINT output_idx,
+ [in, out] IDXGIOutput **output
+ );
+ HRESULT GetDesc(
+ [out] DXGI_ADAPTER_DESC *desc
+ );
+ HRESULT CheckInterfaceSupport(
+ [in] REFGUID guid,
+ [out] LARGE_INTEGER *umd_version
+ );
+}
+
+[
+ object,
+ local,
+ uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a)
+]
+interface IDXGISwapChain : IDXGIDeviceSubObject
+{
+ HRESULT Present(
+ [in] UINT sync_interval,
+ [in] UINT flags
+ );
+ HRESULT GetBuffer(
+ [in] UINT buffer_idx,
+ [in] REFIID riid,
+ [in, out] void **surface
+ );
+ HRESULT SetFullscreenState(
+ [in] BOOL fullscreen,
+ [in] IDXGIOutput *target
+ );
+ HRESULT GetFullscreenState(
+ [out] BOOL *fullscreen,
+ [out] IDXGIOutput **target
+ );
+ HRESULT GetDesc(
+ [out] DXGI_SWAP_CHAIN_DESC *desc
+ );
+ HRESULT ResizeBuffers(
+ [in] UINT buffer_count,
+ [in] UINT width,
+ [in] UINT height,
+ [in] DXGI_FORMAT format,
+ [in] UINT flags
+ );
+ HRESULT ResizeTarget(
+ [in] const DXGI_MODE_DESC *target_mode_desc
+ );
+ HRESULT GetContainingOutput(
+ [out] IDXGIOutput **output
+ );
+ HRESULT GetFrameStatistics(
+ [out] DXGI_FRAME_STATISTICS *stats
+ );
+ HRESULT GetLastPresentCount(
+ [out] UINT *last_present_count
+ );
+}
+
+[
+ object,
+ local,
+ uuid(7b7166ec-21c7-44ae-b21a-c9ae321ae369)
+]
+interface IDXGIFactory : IDXGIObject
+{
+ HRESULT EnumAdapters(
+ [in] UINT adapter_idx,
+ [out] IDXGIAdapter **adapter
+ );
+ HRESULT MakeWindowAssociation(
+ [in] HWND window,
+ [in] UINT flags
+ );
+ HRESULT GetWindowAssociation(
+ [in] HWND *window
+ );
+ HRESULT CreateSwapChain(
+ [in] IUnknown *device,
+ [in] DXGI_SWAP_CHAIN_DESC *desc,
+ [out] IDXGISwapChain **swapchain
+ );
+ HRESULT CreateSoftwareAdapter(
+ [in] HMODULE swrast,
+ [out] IDXGIAdapter **adapter
+ );
+}
+
+[local] HRESULT CreateDXGIFactory(REFIID riid, void **factory);
+
+[
+ object,
+ local,
+ uuid(54ec77fa-1377-44e6-8c32-88fd5f44c84c)
+]
+interface IDXGIDevice : IDXGIObject
+{
+ HRESULT GetAdapter(
+ [out] IDXGIAdapter **adapter
+ );
+ HRESULT CreateSurface(
+ [in] const DXGI_SURFACE_DESC *desc,
+ [in] UINT surface_count,
+ [in] DXGI_USAGE usage,
+ [in] const DXGI_SHARED_RESOURCE *shared_resource,
+ [out] IDXGISurface **surface
+ );
+ HRESULT QueryResourceResidency(
+ [in] IUnknown *const *resources,
+ [out] DXGI_RESIDENCY *residency,
+ [in] UINT resource_count
+ );
+ HRESULT SetGPUThreadPriority(
+ [in] INT priority
+ );
+ HRESULT GetGPUThreadPriority(
+ [out] INT *priority
+ );
+}
+
+
+// BEGIN parts added for Gallium
+
+const unsigned int DXGI_MAP_READ = 1;
+const unsigned int DXGI_MAP_WRITE = 2;
+const unsigned int DXGI_MAP_DISCARD = 4;
+
+const unsigned int DXGI_CPU_ACCESS_NONE = 0;
+const unsigned int DXGI_CPU_ACCESS_DYNAMIC = 1;
+const unsigned int DXGI_CPU_ACCESS_READ_WRITE = 2;
+const unsigned int DXGI_CPU_ACCESS_SCRATCH = 3;
+const unsigned int DXGI_CPU_ACCESS_FIELD = 15;
+const unsigned int DXGI_USAGE_DISCARD_ON_PRESENT = 0x200;
+const unsigned int DXGI_USAGE_UNORDERED_ACCESS = 0x400;
+
+const unsigned int DXGI_PRESENT_TEST = 1;
+const unsigned int DXGI_PRESENT_DO_NOT_SEQUENCE = 2;
+const unsigned int DXGI_PRESENT_RESTART = 4;
+
+typedef enum DXGI_SWAP_CHAIN_FLAG
+{
+ DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1,
+ DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2,
+ DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4
+} DXGI_SWAP_CHAIN_FLAG;
+
+typedef struct DXGI_ADAPTER_DESC1
+{
+ WCHAR Description[128];
+ UINT VendorId;
+ UINT DeviceId;
+ UINT SubSysId;
+ UINT Revision;
+ SIZE_T DedicatedVideoMemory;
+ SIZE_T DedicatedSystemMemory;
+ SIZE_T SharedSystemMemory;
+ LUID AdapterLuid;
+ UINT Flags;
+} DXGI_ADAPTER_DESC1;
+
+[object, local, uuid("035f3ab4-482e-4e50-b41f-8a7f8bd8960b")]
+interface IDXGIResource : IDXGIDeviceSubObject
+{
+ HRESULT GetSharedHandle(
+ [out] HANDLE *pSharedHandle
+ );
+
+ HRESULT GetUsage(
+ [out] DXGI_USAGE *pUsage
+ );
+
+ HRESULT SetEvictionPriority(
+ [in] UINT EvictionPriority
+ );
+
+ HRESULT GetEvictionPriority(
+ [out] UINT *pEvictionPriority
+ );
+};
+
+[object, local, uuid("4AE63092-6327-4c1b-80AE-BFE12EA32B86")]
+interface IDXGISurface1 : IDXGISurface
+{
+ HRESULT GetDC(
+ [in] BOOL Discard,
+ [out] HDC *phdc
+ );
+
+ HRESULT ReleaseDC(
+ [in, optional] RECT *pDirtyRect
+ );
+ };
+
+[object, local, uuid("77db970f-6276-48ba-ba28-070143b4392c")]
+interface IDXGIDevice1 : IDXGIDevice
+{
+ HRESULT SetMaximumFrameLatency(
+ [in] UINT MaxLatency
+ );
+
+ HRESULT GetMaximumFrameLatency(
+ [out] UINT *pMaxLatency
+ );
+};
+
+[object, local, uuid("29038f61-3839-4626-91fd-086879011a05")]
+interface IDXGIAdapter1 : IDXGIAdapter
+{
+ HRESULT GetDesc1(
+ [out] DXGI_ADAPTER_DESC1 *pDesc
+ );
+};
+
+[object, local, uuid("770aae78-f26f-4dba-a829-253c83d1b387")]
+interface IDXGIFactory1 : IDXGIFactory
+{
+ HRESULT EnumAdapters1(
+ [in] UINT Adapter,
+ [out] IDXGIAdapter1 **ppAdapter
+ );
+
+ BOOL IsCurrent();
+};
+
+[local] HRESULT CreateDXGIFactory1(REFIID riid, void **factory);
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/dxgiformat.idl b/src/gallium/state_trackers/d3d1x/d3dapi/dxgiformat.idl
new file mode 100644
index 00000000000..28846e96014
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/dxgiformat.idl
@@ -0,0 +1,129 @@
+/**************************************************************************
+ *
+ * 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.
+ *
+ **************************************************************************/
+
+typedef enum DXGI_FORMAT {
+ DXGI_FORMAT_UNKNOWN,
+ DXGI_FORMAT_R32G32B32A32_TYPELESS,
+ DXGI_FORMAT_R32G32B32A32_FLOAT,
+ DXGI_FORMAT_R32G32B32A32_UINT,
+ DXGI_FORMAT_R32G32B32A32_SINT,
+ DXGI_FORMAT_R32G32B32_TYPELESS,
+ DXGI_FORMAT_R32G32B32_FLOAT,
+ DXGI_FORMAT_R32G32B32_UINT,
+ DXGI_FORMAT_R32G32B32_SINT,
+ DXGI_FORMAT_R16G16B16A16_TYPELESS,
+ DXGI_FORMAT_R16G16B16A16_FLOAT,
+ DXGI_FORMAT_R16G16B16A16_UNORM,
+ DXGI_FORMAT_R16G16B16A16_UINT,
+ DXGI_FORMAT_R16G16B16A16_SNORM,
+ DXGI_FORMAT_R16G16B16A16_SINT,
+ DXGI_FORMAT_R32G32_TYPELESS,
+ DXGI_FORMAT_R32G32_FLOAT,
+ DXGI_FORMAT_R32G32_UINT,
+ DXGI_FORMAT_R32G32_SINT,
+ DXGI_FORMAT_R32G8X24_TYPELESS,
+ DXGI_FORMAT_D32_FLOAT_S8X24_UINT,
+ DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS,
+ DXGI_FORMAT_X32_TYPELESS_G8X24_UINT,
+ DXGI_FORMAT_R10G10B10A2_TYPELESS,
+ DXGI_FORMAT_R10G10B10A2_UNORM,
+ DXGI_FORMAT_R10G10B10A2_UINT,
+ DXGI_FORMAT_R11G11B10_FLOAT,
+ DXGI_FORMAT_R8G8B8A8_TYPELESS,
+ DXGI_FORMAT_R8G8B8A8_UNORM,
+ DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
+ DXGI_FORMAT_R8G8B8A8_UINT,
+ DXGI_FORMAT_R8G8B8A8_SNORM,
+ DXGI_FORMAT_R8G8B8A8_SINT,
+ DXGI_FORMAT_R16G16_TYPELESS,
+ DXGI_FORMAT_R16G16_FLOAT,
+ DXGI_FORMAT_R16G16_UNORM,
+ DXGI_FORMAT_R16G16_UINT,
+ DXGI_FORMAT_R16G16_SNORM,
+ DXGI_FORMAT_R16G16_SINT,
+ DXGI_FORMAT_R32_TYPELESS,
+ DXGI_FORMAT_D32_FLOAT,
+ DXGI_FORMAT_R32_FLOAT,
+ DXGI_FORMAT_R32_UINT,
+ DXGI_FORMAT_R32_SINT,
+ DXGI_FORMAT_R24G8_TYPELESS,
+ DXGI_FORMAT_D24_UNORM_S8_UINT,
+ DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
+ DXGI_FORMAT_X24_TYPELESS_G8_UINT,
+ DXGI_FORMAT_R8G8_TYPELESS,
+ DXGI_FORMAT_R8G8_UNORM,
+ DXGI_FORMAT_R8G8_UINT,
+ DXGI_FORMAT_R8G8_SNORM,
+ DXGI_FORMAT_R8G8_SINT,
+ DXGI_FORMAT_R16_TYPELESS,
+ DXGI_FORMAT_R16_FLOAT,
+ DXGI_FORMAT_D16_UNORM,
+ DXGI_FORMAT_R16_UNORM,
+ DXGI_FORMAT_R16_UINT,
+ DXGI_FORMAT_R16_SNORM,
+ DXGI_FORMAT_R16_SINT,
+ DXGI_FORMAT_R8_TYPELESS,
+ DXGI_FORMAT_R8_UNORM,
+ DXGI_FORMAT_R8_UINT,
+ DXGI_FORMAT_R8_SNORM,
+ DXGI_FORMAT_R8_SINT,
+ DXGI_FORMAT_A8_UNORM,
+ DXGI_FORMAT_R1_UNORM,
+ DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
+ DXGI_FORMAT_R8G8_B8G8_UNORM,
+ DXGI_FORMAT_G8R8_G8B8_UNORM,
+ DXGI_FORMAT_BC1_TYPELESS,
+ DXGI_FORMAT_BC1_UNORM,
+ DXGI_FORMAT_BC1_UNORM_SRGB,
+ DXGI_FORMAT_BC2_TYPELESS,
+ DXGI_FORMAT_BC2_UNORM,
+ DXGI_FORMAT_BC2_UNORM_SRGB,
+ DXGI_FORMAT_BC3_TYPELESS,
+ DXGI_FORMAT_BC3_UNORM,
+ DXGI_FORMAT_BC3_UNORM_SRGB,
+ DXGI_FORMAT_BC4_TYPELESS,
+ DXGI_FORMAT_BC4_UNORM,
+ DXGI_FORMAT_BC4_SNORM,
+ DXGI_FORMAT_BC5_TYPELESS,
+ DXGI_FORMAT_BC5_UNORM,
+ DXGI_FORMAT_BC5_SNORM,
+ DXGI_FORMAT_B5G6R5_UNORM,
+ DXGI_FORMAT_B5G5R5A1_UNORM,
+ DXGI_FORMAT_B8G8R8A8_UNORM,
+ DXGI_FORMAT_B8G8R8X8_UNORM,
+ DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM,
+ DXGI_FORMAT_B8G8R8A8_TYPELESS,
+ DXGI_FORMAT_B8G8R8A8_UNORM_SRGB,
+ DXGI_FORMAT_B8G8R8X8_TYPELESS,
+ DXGI_FORMAT_B8G8R8X8_UNORM_SRGB,
+ DXGI_FORMAT_BC6H_TYPELESS,
+ DXGI_FORMAT_BC6H_UF16,
+ DXGI_FORMAT_BC6H_SF16,
+ DXGI_FORMAT_BC7_TYPELESS,
+ DXGI_FORMAT_BC7_UNORM,
+ DXGI_FORMAT_BC7_UNORM_SRGB,
+ DXGI_FORMAT_FORCE_UINT = 0xffffffff
+} DXGI_FORMAT;
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl b/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl
new file mode 100644
index 00000000000..95844076936
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2007 Andras Kovacs
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* DXGI 1.1 IDL, and missing DXGI 1.0 parts added by Luca Barbieri on Sep 2010 */
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+import "dxgiformat.idl";
+
+typedef struct DXGI_SAMPLE_DESC {
+ UINT Count;
+ UINT Quality;
+} DXGI_SAMPLE_DESC;
+
+typedef enum DXGI_MODE_ROTATION {
+ DXGI_MODE_ROTATION_UNSPECIFIED = 0,
+ DXGI_MODE_ROTATION_IDENTITY = 1,
+ DXGI_MODE_ROTATION_ROTATE90 = 2,
+ DXGI_MODE_ROTATION_ROTATE180 = 3,
+ DXGI_MODE_ROTATION_ROTATE270 = 4,
+} DXGI_MODE_ROTATION;
+
+typedef enum DXGI_MODE_SCANLINE_ORDER {
+ DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0,
+ DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1,
+ DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2,
+ DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3,
+} DXGI_MODE_SCANLINE_ORDER;
+
+typedef enum DXGI_MODE_SCALING {
+ DXGI_MODE_SCALING_UNSPECIFIED = 0,
+ DXGI_MODE_SCALING_CENTERED = 1,
+ DXGI_MODE_SCALING_STRETCHED = 2,
+} DXGI_MODE_SCALING;
+
+typedef struct DXGI_RATIONAL {
+ UINT Numerator;
+ UINT Denominator;
+} DXGI_RATIONAL;
+
+typedef struct DXGI_MODE_DESC {
+ UINT Width;
+ UINT Height;
+ DXGI_RATIONAL RefreshRate;
+ DXGI_FORMAT Format;
+ DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
+ DXGI_MODE_SCALING Scaling;
+} DXGI_MODE_DESC;
+
+typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES {
+ BOOL ScaleAndOffsetSupported;
+ float MaxConvertedValue;
+ float MinConvertedValue;
+ UINT NumGammaControlPoints;
+ float ControlPointPositions[1025];
+} DXGI_GAMMA_CONTROL_CAPABILITIES;
+
+typedef struct DXGI_RGB {
+ float Red;
+ float Green;
+ float Blue;
+} DXGI_RGB;
+
+typedef struct DXGI_GAMMA_CONTROL {
+ DXGI_RGB Scale;
+ DXGI_RGB Offset;
+ DXGI_RGB GammaCurve[1025];
+} DXGI_GAMMA_CONTROL;
diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/specstrings.h b/src/gallium/state_trackers/d3d1x/d3dapi/specstrings.h
new file mode 100644
index 00000000000..fbd390fbd39
--- /dev/null
+++ b/src/gallium/state_trackers/d3d1x/d3dapi/specstrings.h
@@ -0,0 +1,25 @@
+#ifndef SPECSTRINGS_H
+#define SPECSTRINGS_H
+
+#define __in
+#define __in_opt
+#define __out
+#define __out_opt
+#define __inout
+#define __inout_opt
+#define __in_bcount(...)
+#define __in_bcount_opt(...)
+#define __in_ecount(...)
+#define __in_ecount_opt(...)
+#define __in_xcount(...)
+#define __in_xcount_opt(...)
+#define __out_bcount(...)
+#define __out_bcount_opt(...)
+#define __out_ecount(...)
+#define __out_ecount_opt(...)
+#define __out_ecount_part_opt(...)
+#define __in_range(...)
+#define __inout_range(...)
+#define __out_range(...)
+
+#endif