1 module directx.d3d11;
2 /*-------------------------------------------------------------------------------------
3  *
4  * Copyright (c) Microsoft Corporation
5  *
6  *-------------------------------------------------------------------------------------*/
7 
8 public import directx.dxgi;
9 public import directx.d3dcommon;
10 
11 enum D3D11_16BIT_INDEX_STRIP_CUT_VALUE = ( 0xffff );
12 enum D3D11_32BIT_INDEX_STRIP_CUT_VALUE = ( 0xffffffff );
13 enum D3D11_8BIT_INDEX_STRIP_CUT_VALUE = ( 0xff );
14 enum D3D11_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = ( 9 );
15 enum D3D11_CLIP_OR_CULL_DISTANCE_COUNT = ( 8 );
16 enum D3D11_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = ( 2 );
17 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = ( 14 );
18 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = ( 4 );
19 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = ( 32 );
20 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = ( 15 );
21 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = ( 4 );
22 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = ( 15 );
23 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = ( 1 );
24 enum D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = ( 1 );
25 enum D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = ( 64 );
26 enum D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = ( 4 );
27 enum D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = ( 1 );
28 enum D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = ( 1 );
29 enum D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = ( 1 );
30 enum D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = ( 32 );
31 enum D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = ( 1 );
32 enum D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = ( 128 );
33 enum D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = ( 1 );
34 enum D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = ( 1 );
35 enum D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = ( 128 );
36 enum D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = ( 1 );
37 enum D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT = ( 16 );
38 enum D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = ( 1 );
39 enum D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = ( 1 );
40 enum D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT = ( 16 );
41 enum D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = ( 32 );
42 enum D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS = ( 4 );
43 enum D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
44 enum D3D11_COMMONSHADER_TEMP_REGISTER_COUNT = ( 4096 );
45 enum D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = ( 3 );
46 enum D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS = ( 3 );
47 enum D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = ( 10 );
48 enum D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = ( -10 );
49 enum D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = ( -8 );
50 enum D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = ( 7 );
51 enum D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 256 );
52 enum D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = ( 64 );
53 enum D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 240 );
54 enum D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = ( 68 );
55 enum D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 224 );
56 enum D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = ( 72 );
57 enum D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 208 );
58 enum D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = ( 76 );
59 enum D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 192 );
60 enum D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = ( 84 );
61 enum D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 176 );
62 enum D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = ( 92 );
63 enum D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 160 );
64 enum D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = ( 100 );
65 enum D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 144 );
66 enum D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = ( 112 );
67 enum D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 128 );
68 enum D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = ( 128 );
69 enum D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 112 );
70 enum D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = ( 144 );
71 enum D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 96 );
72 enum D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = ( 168 );
73 enum D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 80 );
74 enum D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = ( 204 );
75 enum D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 64 );
76 enum D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = ( 256 );
77 enum D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 48 );
78 enum D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = ( 340 );
79 enum D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 32 );
80 enum D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = ( 512 );
81 enum D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = ( 16 );
82 enum D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = ( 768 );
83 enum D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = ( 1 );
84 enum D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = ( 256 );
85 enum D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = ( 768 );
86 enum D3D11_CS_4_X_THREAD_GROUP_MAX_X = ( 768 );
87 enum D3D11_CS_4_X_THREAD_GROUP_MAX_Y = ( 768 );
88 enum D3D11_CS_4_X_UAV_REGISTER_COUNT = ( 1 );
89 enum D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = ( 65535 );
90 enum D3D11_CS_TGSM_REGISTER_COUNT = ( 8192 );
91 enum D3D11_CS_TGSM_REGISTER_READS_PER_INST = ( 1 );
92 enum D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = ( 1 );
93 enum D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = ( 1 );
94 enum D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = ( 1024 );
95 enum D3D11_CS_THREAD_GROUP_MAX_X = ( 1024 );
96 enum D3D11_CS_THREAD_GROUP_MAX_Y = ( 1024 );
97 enum D3D11_CS_THREAD_GROUP_MAX_Z = ( 64 );
98 enum D3D11_CS_THREAD_GROUP_MIN_X = ( 1 );
99 enum D3D11_CS_THREAD_GROUP_MIN_Y = ( 1 );
100 enum D3D11_CS_THREAD_GROUP_MIN_Z = ( 1 );
101 enum D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = ( 16384 );
102 enum D3D11_DEFAULT_BLEND_FACTOR_ALPHA = ( 1.0f );
103 enum D3D11_DEFAULT_BLEND_FACTOR_BLUE = ( 1.0f );
104 enum D3D11_DEFAULT_BLEND_FACTOR_GREEN = ( 1.0f );
105 enum D3D11_DEFAULT_BLEND_FACTOR_RED = ( 1.0f );
106 enum D3D11_DEFAULT_BORDER_COLOR_COMPONENT = ( 0.0f );
107 enum D3D11_DEFAULT_DEPTH_BIAS = ( 0 );
108 enum D3D11_DEFAULT_DEPTH_BIAS_CLAMP = ( 0.0f );
109 enum D3D11_DEFAULT_MAX_ANISOTROPY = ( 16 );
110 enum D3D11_DEFAULT_MIP_LOD_BIAS = ( 0.0f );
111 enum D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX = ( 0 );
112 enum D3D11_DEFAULT_SAMPLE_MASK = ( 0xffffffff );
113 enum D3D11_DEFAULT_SCISSOR_ENDX = ( 0 );
114 enum D3D11_DEFAULT_SCISSOR_ENDY = ( 0 );
115 enum D3D11_DEFAULT_SCISSOR_STARTX = ( 0 );
116 enum D3D11_DEFAULT_SCISSOR_STARTY = ( 0 );
117 enum D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = ( 0.0f );
118 enum D3D11_DEFAULT_STENCIL_READ_MASK = ( 0xff );
119 enum D3D11_DEFAULT_STENCIL_REFERENCE = ( 0 );
120 enum D3D11_DEFAULT_STENCIL_WRITE_MASK = ( 0xff );
121 enum D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = ( 0 );
122 enum D3D11_DEFAULT_VIEWPORT_HEIGHT = ( 0 );
123 enum D3D11_DEFAULT_VIEWPORT_MAX_DEPTH = ( 0.0f );
124 enum D3D11_DEFAULT_VIEWPORT_MIN_DEPTH = ( 0.0f );
125 enum D3D11_DEFAULT_VIEWPORT_TOPLEFTX = ( 0 );
126 enum D3D11_DEFAULT_VIEWPORT_TOPLEFTY = ( 0 );
127 enum D3D11_DEFAULT_VIEWPORT_WIDTH = ( 0 );
128 enum D3D11_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = ( 3968 );
129 enum D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = ( 4 );
130 enum D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
131 enum D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = ( 32 );
132 enum D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = ( 2 );
133 enum D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = ( 1 );
134 enum D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = ( 3 );
135 enum D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
136 enum D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = ( 1 );
137 enum D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = ( 2 );
138 enum D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = ( 1 );
139 enum D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = ( 4 );
140 enum D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
141 enum D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = ( 32 );
142 enum D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = ( 2 );
143 enum D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = ( 1 );
144 enum D3D11_DS_OUTPUT_REGISTER_COMPONENTS = ( 4 );
145 enum D3D11_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
146 enum D3D11_DS_OUTPUT_REGISTER_COUNT = ( 32 );
147 enum D3D11_FLOAT16_FUSED_TOLERANCE_IN_ULP = ( 0.6 );
148 enum D3D11_FLOAT32_MAX	= ( 3.402823466e+38f );
149 enum D3D11_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = ( 0.6f );
150 enum D3D11_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = ( 2.4f );
151 enum D3D11_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = ( 1.0f );
152 enum D3D11_FLOAT_TO_SRGB_OFFSET = ( 0.055f );
153 enum D3D11_FLOAT_TO_SRGB_SCALE_1 = ( 12.92f );
154 enum D3D11_FLOAT_TO_SRGB_SCALE_2 = ( 1.055f );
155 enum D3D11_FLOAT_TO_SRGB_THRESHOLD = ( 0.0031308f );
156 enum D3D11_FTOI_INSTRUCTION_MAX_INPUT = ( 2147483647.999f );
157 enum D3D11_FTOI_INSTRUCTION_MIN_INPUT = ( -2147483648.999f );
158 enum D3D11_FTOU_INSTRUCTION_MAX_INPUT = ( 4294967295.999f );
159 enum D3D11_FTOU_INSTRUCTION_MIN_INPUT = ( 0.0f );
160 enum D3D11_GS_INPUT_INSTANCE_ID_READS_PER_INST = ( 2 );
161 enum D3D11_GS_INPUT_INSTANCE_ID_READ_PORTS = ( 1 );
162 enum D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = ( 1 );
163 enum D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
164 enum D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = ( 1 );
165 enum D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = ( 1 );
166 enum D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
167 enum D3D11_GS_INPUT_PRIM_CONST_REGISTER_COUNT = ( 1 );
168 enum D3D11_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = ( 2 );
169 enum D3D11_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = ( 1 );
170 enum D3D11_GS_INPUT_REGISTER_COMPONENTS = ( 4 );
171 enum D3D11_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
172 enum D3D11_GS_INPUT_REGISTER_COUNT = ( 32 );
173 enum D3D11_GS_INPUT_REGISTER_READS_PER_INST = ( 2 );
174 enum D3D11_GS_INPUT_REGISTER_READ_PORTS = ( 1 );
175 enum D3D11_GS_INPUT_REGISTER_VERTICES = ( 32 );
176 enum D3D11_GS_MAX_INSTANCE_COUNT = ( 32 );
177 enum D3D11_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = ( 1024 );
178 enum D3D11_GS_OUTPUT_ELEMENTS = ( 32 );
179 enum D3D11_GS_OUTPUT_REGISTER_COMPONENTS = ( 4 );
180 enum D3D11_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
181 enum D3D11_GS_OUTPUT_REGISTER_COUNT = ( 32 );
182 enum D3D11_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = ( 32 );
183 enum D3D11_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = ( 32 );
184 enum D3D11_HS_CONTROL_POINT_REGISTER_COMPONENTS = ( 4 );
185 enum D3D11_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
186 enum D3D11_HS_CONTROL_POINT_REGISTER_READS_PER_INST = ( 2 );
187 enum D3D11_HS_CONTROL_POINT_REGISTER_READ_PORTS = ( 1 );
188 enum D3D11_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = ( 0xffffffff );
189 enum D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = ( 1 );
190 enum D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
191 enum D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = ( 1 );
192 enum D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = ( 2 );
193 enum D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = ( 1 );
194 enum D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = ( 1 );
195 enum D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
196 enum D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = ( 1 );
197 enum D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = ( 2 );
198 enum D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = ( 1 );
199 enum D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = ( 1 );
200 enum D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
201 enum D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = ( 1 );
202 enum D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = ( 2 );
203 enum D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = ( 1 );
204 enum D3D11_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = ( 0xffffffff );
205 enum D3D11_HS_MAXTESSFACTOR_LOWER_BOUND = ( 1.0f );
206 enum D3D11_HS_MAXTESSFACTOR_UPPER_BOUND = ( 64.0f );
207 enum D3D11_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = ( 3968 );
208 enum D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = ( 1 );
209 enum D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
210 enum D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = ( 1 );
211 enum D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = ( 2 );
212 enum D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = ( 1 );
213 enum D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = ( 4 );
214 enum D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
215 enum D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = ( 32 );
216 enum D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = ( 2 );
217 enum D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = ( 1 );
218 enum D3D11_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = ( 0 );
219 enum D3D11_IA_DEFAULT_PRIMITIVE_TOPOLOGY = ( 0 );
220 enum D3D11_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = ( 0 );
221 enum D3D11_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = ( 1 );
222 enum D3D11_IA_INSTANCE_ID_BIT_COUNT = ( 32 );
223 enum D3D11_IA_INTEGER_ARITHMETIC_BIT_COUNT = ( 32 );
224 enum D3D11_IA_PATCH_MAX_CONTROL_POINT_COUNT = ( 32 );
225 enum D3D11_IA_PRIMITIVE_ID_BIT_COUNT = ( 32 );
226 enum D3D11_IA_VERTEX_ID_BIT_COUNT = ( 32 );
227 enum D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = ( 32 );
228 enum D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = ( 128 );
229 enum D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = ( 32 );
230 enum D3D11_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = ( 0xffffffff );
231 enum D3D11_INTEGER_DIVIDE_BY_ZERO_REMAINDER = ( 0xffffffff );
232 enum D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = ( 0xffffffff );
233 enum D3D11_KEEP_UNORDERED_ACCESS_VIEWS = ( 0xffffffff );
234 enum D3D11_LINEAR_GAMMA = ( 1.0f );
235 enum D3D11_MAJOR_VERSION = ( 11 );
236 enum D3D11_MAX_BORDER_COLOR_COMPONENT = ( 1.0f );
237 enum D3D11_MAX_DEPTH = ( 1.0f );
238 enum D3D11_MAX_MAXANISOTROPY = ( 16 );
239 enum D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT = ( 32 );
240 enum D3D11_MAX_POSITION_VALUE = ( 3.402823466e+34f );
241 enum D3D11_MAX_TEXTURE_DIMENSION_2_TO_EXP = ( 17 );
242 enum D3D11_MINOR_VERSION = ( 0 );
243 enum D3D11_MIN_BORDER_COLOR_COMPONENT = ( 0.0f );
244 enum D3D11_MIN_DEPTH = ( 0.0f );
245 enum D3D11_MIN_MAXANISOTROPY = ( 0 );
246 enum D3D11_MIP_LOD_BIAS_MAX = ( 15.99f );
247 enum D3D11_MIP_LOD_BIAS_MIN = ( -16.0f );
248 enum D3D11_MIP_LOD_FRACTIONAL_BIT_COUNT = ( 8 );
249 enum D3D11_MIP_LOD_RANGE_BIT_COUNT = ( 8 );
250 enum D3D11_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = ( 1.4f );
251 enum D3D11_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = ( 0 );
252 enum D3D11_PIXEL_ADDRESS_RANGE_BIT_COUNT = ( 15 );
253 enum D3D11_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = ( 16 );
254 enum D3D11_PS_CS_UAV_REGISTER_COMPONENTS = ( 1 );
255 enum D3D11_PS_CS_UAV_REGISTER_COUNT = ( 8 );
256 enum D3D11_PS_CS_UAV_REGISTER_READS_PER_INST = ( 1 );
257 enum D3D11_PS_CS_UAV_REGISTER_READ_PORTS = ( 1 );
258 enum D3D11_PS_FRONTFACING_DEFAULT_VALUE = ( 0xffffffff );
259 enum D3D11_PS_FRONTFACING_FALSE_VALUE = ( 0 );
260 enum D3D11_PS_FRONTFACING_TRUE_VALUE = ( 0xffffffff );
261 enum D3D11_PS_INPUT_REGISTER_COMPONENTS = ( 4 );
262 enum D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
263 enum D3D11_PS_INPUT_REGISTER_COUNT = ( 32 );
264 enum D3D11_PS_INPUT_REGISTER_READS_PER_INST = ( 2 );
265 enum D3D11_PS_INPUT_REGISTER_READ_PORTS = ( 1 );
266 enum D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = ( 0.0f );
267 enum D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = ( 1 );
268 enum D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
269 enum D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT = ( 1 );
270 enum D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS = ( 1 );
271 enum D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
272 enum D3D11_PS_OUTPUT_MASK_REGISTER_COUNT = ( 1 );
273 enum D3D11_PS_OUTPUT_REGISTER_COMPONENTS = ( 4 );
274 enum D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
275 enum D3D11_PS_OUTPUT_REGISTER_COUNT = ( 8 );
276 enum D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = ( 0.5f );
277 enum D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT = ( 16 );
278 enum D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = ( 4096 );
279 enum D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = ( 27 );
280 enum D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = ( 4096 );
281 enum D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = ( 4096 );
282 enum D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = ( 32 );
283 enum D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = ( 32 );
284 enum D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = ( 16384 );
285 enum D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = ( 1024 );
286 enum D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = ( 4096 );
287 enum D3D11_REQ_MAXANISOTROPY = ( 16 );
288 enum D3D11_REQ_MIP_LEVELS = ( 15 );
289 enum D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = ( 2048 );
290 enum D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = ( 4096 );
291 enum D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = ( 16384 );
292 enum D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = ( 128 );
293 enum D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = ( 0.25f );
294 enum D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = ( 20 );
295 enum D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = ( 4096 );
296 enum D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = ( 2048 );
297 enum D3D11_REQ_TEXTURE1D_U_DIMENSION = ( 16384 );
298 enum D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = ( 2048 );
299 enum D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION = ( 16384 );
300 enum D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = ( 2048 );
301 enum D3D11_REQ_TEXTURECUBE_DIMENSION = ( 16384 );
302 enum D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = ( 0 );
303 enum D3D11_SHADER_MAJOR_VERSION = ( 5 );
304 enum D3D11_SHADER_MAX_INSTANCES = ( 65535 );
305 enum D3D11_SHADER_MAX_INTERFACES = ( 253 );
306 enum D3D11_SHADER_MAX_INTERFACE_CALL_SITES = ( 4096 );
307 enum D3D11_SHADER_MAX_TYPES = ( 65535 );
308 enum D3D11_SHADER_MINOR_VERSION = ( 0 );
309 enum D3D11_SHIFT_INSTRUCTION_PAD_VALUE = ( 0 );
310 enum D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = ( 5 );
311 enum D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT = ( 8 );
312 enum D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES = ( 2048 );
313 enum D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = ( 512 );
314 enum D3D11_SO_BUFFER_SLOT_COUNT = ( 4 );
315 enum D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP = ( 0xffffffff );
316 enum D3D11_SO_NO_RASTERIZED_STREAM = ( 0xffffffff );
317 enum D3D11_SO_OUTPUT_COMPONENT_COUNT = ( 128 );
318 enum D3D11_SO_STREAM_COUNT = ( 4 );
319 enum D3D11_SPEC_DATE_DAY = ( 04 );
320 enum D3D11_SPEC_DATE_MONTH = ( 06 );
321 enum D3D11_SPEC_DATE_YEAR = ( 2009 );
322 enum D3D11_SPEC_VERSION = ( 1.0 );
323 enum D3D11_SRGB_GAMMA = ( 2.2f );
324 enum D3D11_SRGB_TO_FLOAT_DENOMINATOR_1 = ( 12.92f );
325 enum D3D11_SRGB_TO_FLOAT_DENOMINATOR_2 = ( 1.055f );
326 enum D3D11_SRGB_TO_FLOAT_EXPONENT = ( 2.4f );
327 enum D3D11_SRGB_TO_FLOAT_OFFSET = ( 0.055f );
328 enum D3D11_SRGB_TO_FLOAT_THRESHOLD = ( 0.04045f );
329 enum D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = ( 0.5f );
330 enum D3D11_STANDARD_COMPONENT_BIT_COUNT = ( 32 );
331 enum D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = ( 64 );
332 enum D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = ( 4 );
333 enum D3D11_STANDARD_PIXEL_COMPONENT_COUNT = ( 128 );
334 enum D3D11_STANDARD_PIXEL_ELEMENT_COUNT = ( 32 );
335 enum D3D11_STANDARD_VECTOR_SIZE = ( 4 );
336 enum D3D11_STANDARD_VERTEX_ELEMENT_COUNT = ( 32 );
337 enum D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = ( 64 );
338 enum D3D11_SUBPIXEL_FRACTIONAL_BIT_COUNT = ( 8 );
339 enum D3D11_SUBTEXEL_FRACTIONAL_BIT_COUNT = ( 8 );
340 enum D3D11_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = ( 64 );
341 enum D3D11_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = ( 64 );
342 enum D3D11_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = ( 63 );
343 enum D3D11_TESSELLATOR_MAX_TESSELLATION_FACTOR = ( 64 );
344 enum D3D11_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = ( 2 );
345 enum D3D11_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = ( 1 );
346 enum D3D11_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = ( 1 );
347 enum D3D11_TEXEL_ADDRESS_RANGE_BIT_COUNT = ( 16 );
348 enum D3D11_UNBOUND_MEMORY_ACCESS_RESULT = ( 0 );
349 enum D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = ( 15 );
350 enum D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = ( 16 );
351 enum D3D11_VIEWPORT_BOUNDS_MAX = ( 32767 );
352 enum D3D11_VIEWPORT_BOUNDS_MIN = ( -32768 );
353 enum D3D11_VS_INPUT_REGISTER_COMPONENTS = ( 4 );
354 enum D3D11_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
355 enum D3D11_VS_INPUT_REGISTER_COUNT = ( 32 );
356 enum D3D11_VS_INPUT_REGISTER_READS_PER_INST = ( 2 );
357 enum D3D11_VS_INPUT_REGISTER_READ_PORTS = ( 1 );
358 enum D3D11_VS_OUTPUT_REGISTER_COMPONENTS = ( 4 );
359 enum D3D11_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = ( 32 );
360 enum D3D11_VS_OUTPUT_REGISTER_COUNT = ( 32 );
361 enum D3D11_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = ( 10 );
362 enum D3D11_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = ( 25 );
363 enum D3D11_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = ( 25 );
364 
365 enum D3D11_1_UAV_SLOT_COUNT = ( 64 );
366 
367 enum D3D11_2_TILED_RESOURCE_TILE_SIZE_IN_BYTES = ( 65536 );
368 
369 enum _FACD3D11 = 0x87c;
370 enum _FACD3D11DEBUG	= _FACD3D11 + 1;
371 
372 HRESULT MAKE_D3D11_HRESULT(T)(T code) {
373 	return MAKE_HRESULT(1, _FACD3D11, code);
374 }
375 
376 HRESULT MAKE_D3D11_STATUS(T)(T code) {
377 	return MAKE_HRESULT(0, _FACD3D11, code);
378 }
379 
380 enum D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS  = MAKE_D3D11_HRESULT(1);
381 enum D3D11_ERROR_FILE_NOT_FOUND = MAKE_D3D11_HRESULT(2);
382 enum D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS = MAKE_D3D11_HRESULT(3);
383 enum D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD = MAKE_D3D11_HRESULT(4);
384 
385 
386 // TODO: move all externs to each symbols where needed, block is error-prone
387 extern(C):
388 
389 alias D3D11_INPUT_CLASSIFICATION = int;
390 enum : D3D11_INPUT_CLASSIFICATION
391 {
392 	D3D11_INPUT_PER_VERTEX_DATA = 0,
393 	D3D11_INPUT_PER_INSTANCE_DATA = 1
394 }
395 
396 enum D3D11_APPEND_ALIGNED_ELEMENT = ( 0xffffffff );
397 
398 struct D3D11_INPUT_ELEMENT_DESC
399 {
400 	LPCSTR SemanticName;
401 	UINT SemanticIndex;
402 	DXGI_FORMAT Format;
403 	UINT InputSlot;
404 	UINT AlignedByteOffset;
405 	D3D11_INPUT_CLASSIFICATION InputSlotClass;
406 	UINT InstanceDataStepRate;
407 }
408 
409 alias D3D11_FILL_MODE = int;
410 enum : D3D11_FILL_MODE
411 {
412 	D3D11_FILL_WIREFRAME	= 2,
413 	D3D11_FILL_SOLID	= 3
414 }
415 
416 alias D3D_PRIMITIVE_TOPOLOGY D3D11_PRIMITIVE_TOPOLOGY;
417 
418 alias D3D_PRIMITIVE D3D11_PRIMITIVE;
419 
420 alias D3D11_CULL_MODE = int;
421 enum : D3D11_CULL_MODE
422 {
423 	D3D11_CULL_NONE	= 1,
424 	D3D11_CULL_FRONT	= 2,
425 	D3D11_CULL_BACK	= 3
426 }
427 
428 struct D3D11_SO_DECLARATION_ENTRY
429 {
430 	UINT Stream;
431 	LPCSTR SemanticName;
432 	UINT SemanticIndex;
433 	BYTE StartComponent;
434 	BYTE ComponentCount;
435 	BYTE OutputSlot;
436 }
437 
438 struct D3D11_VIEWPORT
439 {
440 	FLOAT TopLeftX;
441 	FLOAT TopLeftY;
442 	FLOAT Width;
443 	FLOAT Height;
444 	FLOAT MinDepth = D3D11_MIN_DEPTH;
445 	FLOAT MaxDepth = D3D11_MAX_DEPTH;
446 }
447 
448 alias D3D11_RESOURCE_DIMENSION = int;
449 enum : D3D11_RESOURCE_DIMENSION
450 {
451 	D3D11_RESOURCE_DIMENSION_UNKNOWN	= 0,
452 	D3D11_RESOURCE_DIMENSION_BUFFER	= 1,
453 	D3D11_RESOURCE_DIMENSION_TEXTURE1D	= 2,
454 	D3D11_RESOURCE_DIMENSION_TEXTURE2D	= 3,
455 	D3D11_RESOURCE_DIMENSION_TEXTURE3D	= 4
456 }
457 
458 alias D3D11_SRV_DIMENSION = D3D_SRV_DIMENSION;
459 
460 alias D3D11_DSV_DIMENSION = int;
461 enum : D3D11_DSV_DIMENSION
462 {
463 	D3D11_DSV_DIMENSION_UNKNOWN	= 0,
464 	D3D11_DSV_DIMENSION_TEXTURE1D	= 1,
465 	D3D11_DSV_DIMENSION_TEXTURE1DARRAY	= 2,
466 	D3D11_DSV_DIMENSION_TEXTURE2D	= 3,
467 	D3D11_DSV_DIMENSION_TEXTURE2DARRAY	= 4,
468 	D3D11_DSV_DIMENSION_TEXTURE2DMS	= 5,
469 	D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY	= 6
470 }
471 
472 alias D3D11_RTV_DIMENSION = int;
473 enum : D3D11_RTV_DIMENSION
474 {
475 	D3D11_RTV_DIMENSION_UNKNOWN	= 0,
476 	D3D11_RTV_DIMENSION_BUFFER	= 1,
477 	D3D11_RTV_DIMENSION_TEXTURE1D	= 2,
478 	D3D11_RTV_DIMENSION_TEXTURE1DARRAY	= 3,
479 	D3D11_RTV_DIMENSION_TEXTURE2D	= 4,
480 	D3D11_RTV_DIMENSION_TEXTURE2DARRAY	= 5,
481 	D3D11_RTV_DIMENSION_TEXTURE2DMS	= 6,
482 	D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY	= 7,
483 	D3D11_RTV_DIMENSION_TEXTURE3D	= 8
484 }
485 
486 alias D3D11_UAV_DIMENSION = int;
487 enum : D3D11_UAV_DIMENSION
488 {
489 	D3D11_UAV_DIMENSION_UNKNOWN	= 0,
490 	D3D11_UAV_DIMENSION_BUFFER	= 1,
491 	D3D11_UAV_DIMENSION_TEXTURE1D	= 2,
492 	D3D11_UAV_DIMENSION_TEXTURE1DARRAY	= 3,
493 	D3D11_UAV_DIMENSION_TEXTURE2D	= 4,
494 	D3D11_UAV_DIMENSION_TEXTURE2DARRAY	= 5,
495 	D3D11_UAV_DIMENSION_TEXTURE3D	= 8
496 }
497 
498 alias D3D11_USAGE = int;
499 enum : D3D11_USAGE
500 {
501 	D3D11_USAGE_DEFAULT	= 0,
502 	D3D11_USAGE_IMMUTABLE	= 1,
503 	D3D11_USAGE_DYNAMIC	= 2,
504 	D3D11_USAGE_STAGING	= 3
505 }
506 
507 alias D3D11_BIND_FLAG = int;
508 enum : D3D11_BIND_FLAG
509 {
510 	D3D11_BIND_VERTEX_BUFFER	= 0x1L,
511 	D3D11_BIND_INDEX_BUFFER	= 0x2L,
512 	D3D11_BIND_CONSTANT_BUFFER	= 0x4L,
513 	D3D11_BIND_SHADER_RESOURCE	= 0x8L,
514 	D3D11_BIND_STREAM_OUTPUT	= 0x10L,
515 	D3D11_BIND_RENDER_TARGET	= 0x20L,
516 	D3D11_BIND_DEPTH_STENCIL	= 0x40L,
517 	D3D11_BIND_UNORDERED_ACCESS	= 0x80L
518 }
519 
520 alias D3D11_CPU_ACCESS_FLAG = int;
521 enum : D3D11_CPU_ACCESS_FLAG
522 {
523 	D3D11_CPU_ACCESS_WRITE	= 0x10000L,
524 	D3D11_CPU_ACCESS_READ	= 0x20000L
525 }
526 
527 alias D3D11_RESOURCE_MISC_FLAG = int;
528 enum : D3D11_RESOURCE_MISC_FLAG
529 {
530 	D3D11_RESOURCE_MISC_GENERATE_MIPS	= 0x1L,
531 	D3D11_RESOURCE_MISC_SHARED	= 0x2L,
532 	D3D11_RESOURCE_MISC_TEXTURECUBE	= 0x4L,
533 	D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS	= 0x10L,
534 	D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS	= 0x20L,
535 	D3D11_RESOURCE_MISC_BUFFER_STRUCTURED	= 0x40L,
536 	D3D11_RESOURCE_MISC_RESOURCE_CLAMP	= 0x80L,
537 	D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX	= 0x100L,
538 	D3D11_RESOURCE_MISC_GDI_COMPATIBLE	= 0x200L
539 }
540 
541 alias D3D11_MAP = int;
542 enum : D3D11_MAP
543 {
544 	D3D11_MAP_READ	= 1,
545 	D3D11_MAP_WRITE	= 2,
546 	D3D11_MAP_READ_WRITE	= 3,
547 	D3D11_MAP_WRITE_DISCARD	= 4,
548 	D3D11_MAP_WRITE_NO_OVERWRITE	= 5
549 }
550 
551 alias D3D11_MAP_FLAG = int;
552 enum : D3D11_MAP_FLAG
553 {
554 	D3D11_MAP_FLAG_DO_NOT_WAIT	= 0x100000L
555 }
556 
557 alias D3D11_RAISE_FLAG = int;
558 enum : D3D11_RAISE_FLAG
559 {
560 	D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR	= 0x1L
561 }
562 
563 alias D3D11_CLEAR_FLAG = int;
564 enum : D3D11_CLEAR_FLAG
565 {
566 	D3D11_CLEAR_DEPTH	= 0x1L,
567 	D3D11_CLEAR_STENCIL	= 0x2L
568 }
569 
570 alias RECT D3D11_RECT;
571 
572 struct D3D11_BOX
573 {
574 	UINT left;
575 	UINT top;
576 	UINT front;
577 	UINT right;
578 	UINT bottom;
579 	UINT back;
580 }
581 
582 
583 mixin( uuid!(ID3D11DeviceChild, "1841e5c8-16b0-489b-bcc8-44cfb0d5deae") );
584 interface ID3D11DeviceChild : IUnknown
585 {
586     extern(Windows):
587 	void GetDevice( 
588 				ID3D11Device* ppDevice);
589 
590 	HRESULT  GetPrivateData( 
591 				REFGUID guid,
592 				UINT* pDataSize,
593 				void* pData);
594 
595 	HRESULT SetPrivateData( 
596 				REFGUID guid,
597 				UINT DataSize,
598 				const void* pData);
599 
600 	HRESULT SetPrivateDataInterface( 
601 				REFGUID guid,
602 				const(IUnknown) pData);
603         
604 }
605     
606 
607 alias D3D11_COMPARISON_FUNC = int;
608 enum : D3D11_COMPARISON_FUNC
609 {
610 	D3D11_COMPARISON_NEVER	= 1,
611 	D3D11_COMPARISON_LESS	= 2,
612 	D3D11_COMPARISON_EQUAL	= 3,
613 	D3D11_COMPARISON_LESS_EQUAL	= 4,
614 	D3D11_COMPARISON_GREATER	= 5,
615 	D3D11_COMPARISON_NOT_EQUAL	= 6,
616 	D3D11_COMPARISON_GREATER_EQUAL	= 7,
617 	D3D11_COMPARISON_ALWAYS	= 8
618 }
619 
620 alias D3D11_DEPTH_WRITE_MASK = int;
621 enum : D3D11_DEPTH_WRITE_MASK
622 {
623 	D3D11_DEPTH_WRITE_MASK_ZERO	= 0,
624 	D3D11_DEPTH_WRITE_MASK_ALL	= 1
625 }
626 
627 alias D3D11_STENCIL_OP = int;
628 enum : D3D11_STENCIL_OP
629 {
630 	D3D11_STENCIL_OP_KEEP	= 1,
631 	D3D11_STENCIL_OP_ZERO	= 2,
632 	D3D11_STENCIL_OP_REPLACE	= 3,
633 	D3D11_STENCIL_OP_INCR_SAT	= 4,
634 	D3D11_STENCIL_OP_DECR_SAT	= 5,
635 	D3D11_STENCIL_OP_INVERT	= 6,
636 	D3D11_STENCIL_OP_INCR	= 7,
637 	D3D11_STENCIL_OP_DECR	= 8
638 }
639 
640 struct D3D11_DEPTH_STENCILOP_DESC
641 {
642     D3D11_STENCIL_OP StencilFailOp;
643     D3D11_STENCIL_OP StencilDepthFailOp;
644     D3D11_STENCIL_OP StencilPassOp;
645     D3D11_COMPARISON_FUNC StencilFunc;
646 }
647 
648 struct D3D11_DEPTH_STENCIL_DESC
649 {
650 	BOOL DepthEnable = TRUE;
651 	D3D11_DEPTH_WRITE_MASK DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
652 	D3D11_COMPARISON_FUNC DepthFunc = D3D11_COMPARISON_LESS;
653 	BOOL StencilEnable = FALSE;
654 	UINT8 StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK;
655 	UINT8 StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK;
656 	D3D11_DEPTH_STENCILOP_DESC FrontFace = { D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS };
657 	D3D11_DEPTH_STENCILOP_DESC BackFace = { D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS };
658 }
659 
660 
661 mixin( uuid!(ID3D11DepthStencilState, "03823efb-8d8f-4e1c-9aa2-f64bb2cbfdf1") );
662 interface ID3D11DepthStencilState : ID3D11DeviceChild
663 {
664 	extern(Windows):
665 	void GetDesc( 
666 				D3D11_DEPTH_STENCIL_DESC* pDesc);
667 }
668 
669 
670 alias D3D11_BLEND = int;
671 enum : D3D11_BLEND
672 {
673 	D3D11_BLEND_ZERO	= 1,
674 	D3D11_BLEND_ONE	= 2,
675 	D3D11_BLEND_SRC_COLOR	= 3,
676 	D3D11_BLEND_INV_SRC_COLOR	= 4,
677 	D3D11_BLEND_SRC_ALPHA	= 5,
678 	D3D11_BLEND_INV_SRC_ALPHA	= 6,
679 	D3D11_BLEND_DEST_ALPHA	= 7,
680 	D3D11_BLEND_INV_DEST_ALPHA	= 8,
681 	D3D11_BLEND_DEST_COLOR	= 9,
682 	D3D11_BLEND_INV_DEST_COLOR	= 10,
683 	D3D11_BLEND_SRC_ALPHA_SAT	= 11,
684 	D3D11_BLEND_BLEND_FACTOR	= 14,
685 	D3D11_BLEND_INV_BLEND_FACTOR	= 15,
686 	D3D11_BLEND_SRC1_COLOR	= 16,
687 	D3D11_BLEND_INV_SRC1_COLOR	= 17,
688 	D3D11_BLEND_SRC1_ALPHA	= 18,
689 	D3D11_BLEND_INV_SRC1_ALPHA	= 19
690 }
691 
692 alias D3D11_BLEND_OP = int;
693 enum : D3D11_BLEND_OP
694 {
695 	D3D11_BLEND_OP_ADD	= 1,
696 	D3D11_BLEND_OP_SUBTRACT	= 2,
697 	D3D11_BLEND_OP_REV_SUBTRACT	= 3,
698 	D3D11_BLEND_OP_MIN	= 4,
699 	D3D11_BLEND_OP_MAX	= 5
700 }
701 
702 alias D3D11_COLOR_WRITE_ENABLE = int;
703 enum : D3D11_COLOR_WRITE_ENABLE
704 {
705 	D3D11_COLOR_WRITE_ENABLE_RED	= 1,
706 	D3D11_COLOR_WRITE_ENABLE_GREEN	= 2,
707 	D3D11_COLOR_WRITE_ENABLE_BLUE	= 4,
708 	D3D11_COLOR_WRITE_ENABLE_ALPHA	= 8,
709 	D3D11_COLOR_WRITE_ENABLE_ALL	= ( ( ( D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN )  | D3D11_COLOR_WRITE_ENABLE_BLUE )  | D3D11_COLOR_WRITE_ENABLE_ALPHA ) 
710 }
711 
712 struct D3D11_RENDER_TARGET_BLEND_DESC
713 {
714 	BOOL BlendEnable;
715 	D3D11_BLEND SrcBlend;
716 	D3D11_BLEND DestBlend;
717 	D3D11_BLEND_OP BlendOp;
718 	D3D11_BLEND SrcBlendAlpha;
719 	D3D11_BLEND DestBlendAlpha;
720 	D3D11_BLEND_OP BlendOpAlpha;
721 	UINT8 RenderTargetWriteMask;
722 }
723 
724 // TODO: move Init() to CTFE and assign its result to RenderTarget initializer
725 struct D3D11_BLEND_DESC
726 {
727 	BOOL AlphaToCoverageEnable = FALSE;
728 	BOOL IndependentBlendEnable = FALSE;
729 	D3D11_RENDER_TARGET_BLEND_DESC[8] RenderTarget;
730 
731 	// hack:
732 	// default ctor not allowed in structs
733 	void Init() @property
734 	{
735 		const D3D11_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc = {
736 		FALSE,
737 		D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD,
738 		D3D11_BLEND_ONE, D3D11_BLEND_ZERO, D3D11_BLEND_OP_ADD,
739 		D3D11_COLOR_WRITE_ENABLE_ALL,
740 		};
741 		for (UINT i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
742 			RenderTarget[ i ] = defaultRenderTargetBlendDesc;
743 	}
744 }
745 
746 
747 mixin( uuid!(ID3D11BlendState, "75b68faa-347d-4159-8f45-a0640f01cd9a") );
748 interface ID3D11BlendState : ID3D11DeviceChild
749 {
750 	extern(Windows):
751 	void GetDesc( 
752 				D3D11_BLEND_DESC *pDesc);
753 }
754 
755 struct D3D11_RASTERIZER_DESC
756 {
757 	D3D11_FILL_MODE FillMode = D3D11_FILL_SOLID;
758 	D3D11_CULL_MODE CullMode = D3D11_CULL_BACK;
759 	BOOL FrontCounterClockwise = FALSE;
760 	INT DepthBias = D3D11_DEFAULT_DEPTH_BIAS;
761 	FLOAT DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP;
762 	FLOAT SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
763 	BOOL DepthClipEnable = TRUE;
764 	BOOL ScissorEnable = FALSE;
765 	BOOL MultisampleEnable = FALSE;
766 	BOOL AntialiasedLineEnable = FALSE;
767 }
768 
769 
770  mixin( uuid!(ID3D11RasterizerState, "9bb4ab81-ab1a-4d8f-b506-fc04200b6ee7") );
771  interface ID3D11RasterizerState : ID3D11DeviceChild
772  {
773 	extern(Windows):
774 	void GetDesc( 
775 				D3D11_RASTERIZER_DESC* pDesc);
776 }
777 
778 struct D3D11_SUBRESOURCE_DATA
779 {
780 	/*const*/ void* pSysMem; // const causes problems in real code
781 	UINT SysMemPitch;
782 	UINT SysMemSlicePitch;
783 }
784 
785 struct D3D11_MAPPED_SUBRESOURCE
786 {
787 	void* pData;
788 	UINT RowPitch;
789 	UINT DepthPitch;
790 }
791 
792 
793 mixin( uuid!(ID3D11Resource, "dc8e63f3-d12b-4952-b47b-5e45026a862d") );
794 interface ID3D11Resource : ID3D11DeviceChild
795 {
796 	extern(Windows):
797 	void GetType( 
798 				D3D11_RESOURCE_DIMENSION* pResourceDimension);
799 
800 	void SetEvictionPriority( 
801 				UINT EvictionPriority);
802 
803 	UINT GetEvictionPriority();
804 }
805     
806 struct D3D11_BUFFER_DESC
807 {
808 	UINT ByteWidth;
809 	D3D11_USAGE Usage = D3D11_USAGE_DEFAULT;
810 	UINT BindFlags;
811 	UINT CPUAccessFlags;
812 	UINT MiscFlags;
813 	UINT StructureByteStride;
814 }
815 
816 
817 mixin( uuid!(ID3D11Buffer, "48570b85-d1ee-4fcd-a250-eb350722b037") );
818 interface ID3D11Buffer : ID3D11Resource
819 {
820 	extern(Windows):
821 	void GetDesc( 
822 				D3D11_BUFFER_DESC* pDesc);
823 }
824     
825 struct D3D11_TEXTURE1D_DESC
826 {
827 	UINT Width;
828 	UINT MipLevels;
829 	UINT ArraySize = 1;
830 	DXGI_FORMAT Format;
831 	D3D11_USAGE Usage = D3D11_USAGE_DEFAULT;
832 	UINT BindFlags = D3D11_BIND_SHADER_RESOURCE;
833 	UINT CPUAccessFlags;
834 	UINT MiscFlags;
835 }
836 
837 
838 mixin( uuid!(ID3D11Texture1D, "f8fb5c27-c6b3-4f75-a4c8-439af2ef564c") );
839 interface ID3D11Texture1D : ID3D11Resource
840 {
841 	extern(Windows):
842 	void GetDesc( 
843 				D3D11_TEXTURE1D_DESC* pDesc);
844 
845 }
846     
847 struct D3D11_TEXTURE2D_DESC
848 {
849 	UINT Width;
850 	UINT Height;
851 	UINT MipLevels;
852 	UINT ArraySize = 1;
853 	DXGI_FORMAT Format;
854 	DXGI_SAMPLE_DESC SampleDesc = {Quality: 0, Count: 1};
855 	D3D11_USAGE Usage = D3D11_USAGE_DEFAULT;
856 	UINT BindFlags = D3D11_BIND_SHADER_RESOURCE;
857 	UINT CPUAccessFlags;
858 	UINT MiscFlags;
859 }
860 
861 
862 mixin( uuid!(ID3D11Texture2D, "6f15aaf2-d208-4e89-9ab4-489535d34f9c") );
863 interface ID3D11Texture2D : ID3D11Resource
864 {
865 	extern(Windows):
866 	void GetDesc( 
867 				D3D11_TEXTURE2D_DESC* pDesc);
868 }
869   
870 struct D3D11_TEXTURE3D_DESC
871 {
872 	UINT Width;
873 	UINT Height;
874 	UINT Depth;
875 	UINT MipLevels;
876 	DXGI_FORMAT Format;
877 	D3D11_USAGE Usage = D3D11_USAGE_DEFAULT;
878 	UINT BindFlags = D3D11_BIND_SHADER_RESOURCE;
879 	UINT CPUAccessFlags;
880 	UINT MiscFlags;
881 }
882 
883 
884 mixin( uuid!(ID3D11Texture3D, "037e866e-f56d-4357-a8af-9dabbe6e250e") );
885 interface ID3D11Texture3D : ID3D11Resource
886 {
887 	extern(Windows):
888 	void GetDesc( 
889 				D3D11_TEXTURE3D_DESC* pDesc);
890 }
891     
892 alias D3D11_TEXTURECUBE_FACE = int;
893 enum : D3D11_TEXTURECUBE_FACE
894 {
895 	D3D11_TEXTURECUBE_FACE_POSITIVE_X	= 0,
896 	D3D11_TEXTURECUBE_FACE_NEGATIVE_X	= 1,
897 	D3D11_TEXTURECUBE_FACE_POSITIVE_Y	= 2,
898 	D3D11_TEXTURECUBE_FACE_NEGATIVE_Y	= 3,
899 	D3D11_TEXTURECUBE_FACE_POSITIVE_Z	= 4,
900 	D3D11_TEXTURECUBE_FACE_NEGATIVE_Z	= 5
901 }
902 
903 
904 mixin( uuid!( ID3D11View, "839d1216-bb2e-412b-b7f4-a9dbebe08ed1") );
905 interface ID3D11View : ID3D11DeviceChild
906 {
907 	extern(Windows):
908 	void GetResource( 
909 				ID3D11Resource* ppResource);
910 }
911 
912     
913 struct D3D11_BUFFER_SRV
914 {
915 	union 
916 	{
917 		UINT FirstElement;
918 		UINT ElementOffset;
919 	}
920 	union 
921 	{
922 		UINT NumElements;
923 		UINT ElementWidth;
924 	}
925 }
926 
927 
928 alias D3D11_BUFFEREX_SRV_FLAG = int;
929 enum : D3D11_BUFFEREX_SRV_FLAG
930 {
931 	D3D11_BUFFEREX_SRV_FLAG_RAW	= 0x1
932 }
933 
934 
935 struct D3D11_BUFFEREX_SRV
936 {
937 	UINT FirstElement;
938 	UINT NumElements;
939 	UINT Flags;
940 }
941 
942 
943 struct D3D11_TEX1D_SRV
944 {
945 	UINT MostDetailedMip;
946 	UINT MipLevels;
947 }
948 
949 
950 struct D3D11_TEX1D_ARRAY_SRV
951 {
952 	UINT MostDetailedMip;
953 	UINT MipLevels;
954 	UINT FirstArraySlice;
955 	UINT ArraySize;
956 }
957 
958 struct D3D11_TEX2D_SRV
959 {
960 	UINT MostDetailedMip;
961 	UINT MipLevels;
962 }
963 
964 struct D3D11_TEX2D_ARRAY_SRV
965 {
966 	UINT MostDetailedMip;
967 	UINT MipLevels;
968 	UINT FirstArraySlice;
969 	UINT ArraySize;
970 }
971 
972 struct D3D11_TEX3D_SRV
973 {
974 	UINT MostDetailedMip;
975 	UINT MipLevels;
976 }
977 
978 struct D3D11_TEXCUBE_SRV
979 {
980 	UINT MostDetailedMip;
981 	UINT MipLevels;
982 }
983 
984 struct D3D11_TEXCUBE_ARRAY_SRV
985 {
986 	UINT MostDetailedMip;
987 	UINT MipLevels;
988 	UINT First2DArrayFace;
989 	UINT NumCubes;
990 }
991 
992 struct D3D11_TEX2DMS_SRV
993 {
994 	UINT UnusedField_NothingToDefine;
995 }
996 
997 struct D3D11_TEX2DMS_ARRAY_SRV
998 {
999 	UINT FirstArraySlice;
1000 	UINT ArraySize;
1001 }
1002 
1003 struct D3D11_SHADER_RESOURCE_VIEW_DESC
1004 {
1005 	DXGI_FORMAT Format = DXGI_FORMAT_UNKNOWN;
1006 	D3D11_SRV_DIMENSION ViewDimension;
1007 	union 
1008 	{
1009 		D3D11_BUFFER_SRV Buffer;
1010 		D3D11_TEX1D_SRV Texture1D;
1011 		D3D11_TEX1D_ARRAY_SRV Texture1DArray;
1012 		D3D11_TEX2D_SRV Texture2D;
1013 		D3D11_TEX2D_ARRAY_SRV Texture2DArray;
1014 		D3D11_TEX2DMS_SRV Texture2DMS;
1015 		D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray;
1016 		D3D11_TEX3D_SRV Texture3D;
1017 		D3D11_TEXCUBE_SRV TextureCube;
1018 		D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray;
1019 		D3D11_BUFFEREX_SRV BufferEx;
1020 	}
1021 
1022 	this(
1023 		 D3D11_SRV_DIMENSION viewDimension,
1024 	     DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
1025 	     UINT mostDetailedMip = 0, // FirstElement for BUFFER
1026 	     UINT mipLevels = -1, // NumElements for BUFFER
1027 	     UINT firstArraySlice = 0, // First2DArrayFace for TEXTURECUBEARRAY
1028 	     UINT arraySize = -1, // NumCubes for TEXTURECUBEARRAY
1029 	     UINT flags = 0 ) // BUFFEREX only
1030 	{
1031 		Format = format;
1032 		ViewDimension = viewDimension;
1033 		switch (viewDimension)
1034 		{
1035 			case D3D11_SRV_DIMENSION_BUFFER:
1036 				Buffer.FirstElement = mostDetailedMip;
1037 				Buffer.NumElements = mipLevels;
1038 				break;
1039 			case D3D11_SRV_DIMENSION_TEXTURE1D:
1040 				Texture1D.MostDetailedMip = mostDetailedMip;
1041 				Texture1D.MipLevels = mipLevels;
1042 				break;
1043 			case D3D11_SRV_DIMENSION_TEXTURE1DARRAY:
1044 				Texture1DArray.MostDetailedMip = mostDetailedMip;
1045 				Texture1DArray.MipLevels = mipLevels;
1046 				Texture1DArray.FirstArraySlice = firstArraySlice;
1047 				Texture1DArray.ArraySize = arraySize;
1048 				break;
1049 			case D3D11_SRV_DIMENSION_TEXTURE2D:
1050 				Texture2D.MostDetailedMip = mostDetailedMip;
1051 				Texture2D.MipLevels = mipLevels;
1052 				break;
1053 			case D3D11_SRV_DIMENSION_TEXTURE2DARRAY:
1054 				Texture2DArray.MostDetailedMip = mostDetailedMip;
1055 				Texture2DArray.MipLevels = mipLevels;
1056 				Texture2DArray.FirstArraySlice = firstArraySlice;
1057 				Texture2DArray.ArraySize = arraySize;
1058 				break;
1059 			case D3D11_SRV_DIMENSION_TEXTURE2DMS:
1060 				break;
1061 			case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY:
1062 				Texture2DMSArray.FirstArraySlice = firstArraySlice;
1063 				Texture2DMSArray.ArraySize = arraySize;
1064 				break;
1065 			case D3D11_SRV_DIMENSION_TEXTURE3D:
1066 				Texture3D.MostDetailedMip = mostDetailedMip;
1067 				Texture3D.MipLevels = mipLevels;
1068 				break;
1069 			case D3D11_SRV_DIMENSION_TEXTURECUBE:
1070 				TextureCube.MostDetailedMip = mostDetailedMip;
1071 				TextureCube.MipLevels = mipLevels;
1072 				break;
1073 			case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY:
1074 				TextureCubeArray.MostDetailedMip = mostDetailedMip;
1075 				TextureCubeArray.MipLevels = mipLevels;
1076 				TextureCubeArray.First2DArrayFace = firstArraySlice;
1077 				TextureCubeArray.NumCubes = arraySize;
1078 				break;
1079 			case D3D11_SRV_DIMENSION_BUFFEREX:
1080 				BufferEx.FirstElement = mostDetailedMip;
1081 				BufferEx.NumElements = mipLevels;
1082 				BufferEx.Flags = flags;
1083 				break;
1084 			default: break;
1085 		}
1086 	}
1087 }
1088 
1089 
1090 mixin( uuid!(ID3D11ShaderResourceView, "b0e06fe0-8192-4e1a-b1ca-36d7414710b2") );
1091 interface ID3D11ShaderResourceView : ID3D11View
1092 {
1093 	extern(Windows):
1094 	void GetDesc( 
1095 				D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc);
1096 }
1097 
1098 
1099 struct D3D11_BUFFER_RTV
1100 {
1101 	union 
1102     {
1103 		UINT FirstElement;
1104 		UINT ElementOffset;
1105 	}
1106     union 
1107 	{
1108 		UINT NumElements;
1109 		UINT ElementWidth;
1110 	}
1111 }
1112 
1113 struct D3D11_TEX1D_RTV
1114 {
1115 	UINT MipSlice;
1116 }
1117 
1118 struct D3D11_TEX1D_ARRAY_RTV
1119 {
1120 	UINT MipSlice;
1121 	UINT FirstArraySlice;
1122 	UINT ArraySize;
1123 }
1124 
1125 struct D3D11_TEX2D_RTV
1126 {
1127 	UINT MipSlice;
1128 }
1129 
1130 struct D3D11_TEX2DMS_RTV
1131 {
1132 	UINT UnusedField_NothingToDefine;
1133 }
1134 
1135 struct D3D11_TEX2D_ARRAY_RTV
1136 {
1137 	UINT MipSlice;
1138 	UINT FirstArraySlice;
1139 	UINT ArraySize;
1140 }
1141 
1142 struct D3D11_TEX2DMS_ARRAY_RTV
1143 {
1144 	UINT FirstArraySlice;
1145 	UINT ArraySize;
1146 }
1147 
1148 struct D3D11_TEX3D_RTV
1149 {
1150 	UINT MipSlice;
1151 	UINT FirstWSlice;
1152 	UINT WSize;
1153 }
1154 
1155 struct D3D11_RENDER_TARGET_VIEW_DESC
1156 {
1157 	DXGI_FORMAT Format = DXGI_FORMAT_UNKNOWN;
1158 	D3D11_RTV_DIMENSION ViewDimension;
1159 	union 
1160 	{
1161 		D3D11_BUFFER_RTV Buffer;
1162 		D3D11_TEX1D_RTV Texture1D;
1163 		D3D11_TEX1D_ARRAY_RTV Texture1DArray;
1164 		D3D11_TEX2D_RTV Texture2D;
1165 		D3D11_TEX2D_ARRAY_RTV Texture2DArray;
1166 		D3D11_TEX2DMS_RTV Texture2DMS;
1167 		D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray;
1168 		D3D11_TEX3D_RTV Texture3D;
1169 	}
1170 
1171 	this(
1172 		D3D11_RTV_DIMENSION viewDimension,
1173 		DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
1174 		UINT mipSlice = 0, // FirstElement for BUFFER
1175 		UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D
1176 		UINT arraySize = -1 ) // WSize for TEXTURE3D
1177 	{
1178 		Format = format;
1179 		ViewDimension = viewDimension;
1180 		switch (viewDimension)
1181 		{
1182 			case D3D11_RTV_DIMENSION_BUFFER:
1183 				Buffer.FirstElement = mipSlice;
1184 				Buffer.NumElements = firstArraySlice;
1185 				break;
1186 			case D3D11_RTV_DIMENSION_TEXTURE1D:
1187 				Texture1D.MipSlice = mipSlice;
1188 				break;
1189 			case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
1190 				Texture1DArray.MipSlice = mipSlice;
1191 				Texture1DArray.FirstArraySlice = firstArraySlice;
1192 				Texture1DArray.ArraySize = arraySize;
1193 				break;
1194 			case D3D11_RTV_DIMENSION_TEXTURE2D:
1195 				Texture2D.MipSlice = mipSlice;
1196 				break;
1197 			case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
1198 				Texture2DArray.MipSlice = mipSlice;
1199 				Texture2DArray.FirstArraySlice = firstArraySlice;
1200 				Texture2DArray.ArraySize = arraySize;
1201 				break;
1202 			case D3D11_RTV_DIMENSION_TEXTURE2DMS:
1203 				break;
1204 			case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
1205 				Texture2DMSArray.FirstArraySlice = firstArraySlice;
1206 				Texture2DMSArray.ArraySize = arraySize;
1207 				break;
1208 			case D3D11_RTV_DIMENSION_TEXTURE3D:
1209 				Texture3D.MipSlice = mipSlice;
1210 				Texture3D.FirstWSlice = firstArraySlice;
1211 				Texture3D.WSize = arraySize;
1212 				break;
1213 			default: break;
1214 		}
1215 	}
1216 }
1217 
1218 
1219 mixin( uuid!(ID3D11RenderTargetView, "dfdba067-0b8d-4865-875b-d7b4516cc164") );
1220 interface ID3D11RenderTargetView : ID3D11View
1221 {
1222 	extern(Windows):
1223 	void GetDesc( 
1224 				D3D11_RENDER_TARGET_VIEW_DESC* pDesc);
1225 }
1226     
1227 struct D3D11_TEX1D_DSV
1228 {
1229 	UINT MipSlice;
1230 }
1231 
1232 struct D3D11_TEX1D_ARRAY_DSV
1233 {
1234 	UINT MipSlice;
1235 	UINT FirstArraySlice;
1236 	UINT ArraySize;
1237 }
1238 
1239 struct D3D11_TEX2D_DSV
1240 {
1241 	UINT MipSlice;
1242 }
1243 
1244 struct D3D11_TEX2D_ARRAY_DSV
1245 {
1246 	UINT MipSlice;
1247 	UINT FirstArraySlice;
1248 	UINT ArraySize;
1249 }
1250 
1251 struct D3D11_TEX2DMS_DSV
1252 {
1253 	UINT UnusedField_NothingToDefine;
1254 }
1255 
1256 struct D3D11_TEX2DMS_ARRAY_DSV
1257 {
1258 	UINT FirstArraySlice;
1259 	UINT ArraySize;
1260 }
1261 
1262 
1263 alias D3D11_DSV_FLAG = int;
1264 enum : D3D11_DSV_FLAG
1265 {
1266 	D3D11_DSV_READ_ONLY_DEPTH	= 0x1L,
1267 	D3D11_DSV_READ_ONLY_STENCIL	= 0x2L
1268 }
1269 
1270 struct D3D11_DEPTH_STENCIL_VIEW_DESC
1271 {
1272 	DXGI_FORMAT Format = DXGI_FORMAT_UNKNOWN;
1273 	D3D11_DSV_DIMENSION ViewDimension;
1274 	UINT Flags;
1275 	union 
1276 	{
1277 		D3D11_TEX1D_DSV Texture1D;
1278 		D3D11_TEX1D_ARRAY_DSV Texture1DArray;
1279 		D3D11_TEX2D_DSV Texture2D;
1280 		D3D11_TEX2D_ARRAY_DSV Texture2DArray;
1281 		D3D11_TEX2DMS_DSV Texture2DMS;
1282 		D3D11_TEX2DMS_ARRAY_DSV Texture2DMSArray;
1283 	}
1284 
1285 	this(
1286 		D3D11_DSV_DIMENSION viewDimension,
1287 		DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
1288 		UINT mipSlice = 0,
1289 		UINT firstArraySlice = 0,
1290 		UINT arraySize = -1,
1291 		UINT flags = 0 )
1292 	{
1293 		Format = format;
1294 		ViewDimension = viewDimension;
1295 		Flags = flags;
1296 		switch (viewDimension)
1297 		{
1298 			case D3D11_DSV_DIMENSION_TEXTURE1D:
1299 				Texture1D.MipSlice = mipSlice;
1300 				break;
1301 			case D3D11_DSV_DIMENSION_TEXTURE1DARRAY:
1302 				Texture1DArray.MipSlice = mipSlice;
1303 				Texture1DArray.FirstArraySlice = firstArraySlice;
1304 				Texture1DArray.ArraySize = arraySize;
1305 				break;
1306 			case D3D11_DSV_DIMENSION_TEXTURE2D:
1307 				Texture2D.MipSlice = mipSlice;
1308 				break;
1309 			case D3D11_DSV_DIMENSION_TEXTURE2DARRAY:
1310 				Texture2DArray.MipSlice = mipSlice;
1311 				Texture2DArray.FirstArraySlice = firstArraySlice;
1312 				Texture2DArray.ArraySize = arraySize;
1313 				break;
1314 			case D3D11_DSV_DIMENSION_TEXTURE2DMS:
1315 				break;
1316 			case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY:
1317 				Texture2DMSArray.FirstArraySlice = firstArraySlice;
1318 				Texture2DMSArray.ArraySize = arraySize;
1319 				break;
1320 			default: break;
1321 		}
1322 	}
1323 }
1324 
1325 
1326 mixin( uuid!(ID3D11DepthStencilView, "9fdac92a-1876-48c3-afad-25b94f84a9b6") );
1327 interface ID3D11DepthStencilView : ID3D11View
1328 {
1329 	extern(Windows):
1330     void GetDesc( 
1331 				D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc);
1332 }
1333 
1334 
1335 alias D3D11_BUFFER_UAV_FLAG = int;
1336 enum : D3D11_BUFFER_UAV_FLAG
1337 {
1338 	D3D11_BUFFER_UAV_FLAG_RAW	= 0x1,
1339 	D3D11_BUFFER_UAV_FLAG_APPEND	= 0x2,
1340 	D3D11_BUFFER_UAV_FLAG_COUNTER	= 0x4
1341 }
1342 
1343 struct D3D11_BUFFER_UAV
1344 {
1345 	UINT FirstElement;
1346 	UINT NumElements;
1347 	UINT Flags;
1348 }
1349 
1350 struct D3D11_TEX1D_UAV
1351 {
1352     UINT MipSlice;
1353 }
1354 
1355 struct D3D11_TEX1D_ARRAY_UAV
1356 {
1357 	UINT MipSlice;
1358 	UINT FirstArraySlice;
1359 	UINT ArraySize;
1360 }
1361 
1362 struct D3D11_TEX2D_UAV
1363 {
1364 	UINT MipSlice;
1365 }
1366 
1367 struct D3D11_TEX2D_ARRAY_UAV
1368 {
1369 	UINT MipSlice;
1370 	UINT FirstArraySlice;
1371 	UINT ArraySize;
1372 }
1373 
1374 struct D3D11_TEX3D_UAV
1375 {
1376 	UINT MipSlice;
1377 	UINT FirstWSlice;
1378 	UINT WSize;
1379 }
1380 
1381 struct D3D11_UNORDERED_ACCESS_VIEW_DESC
1382 {
1383 	DXGI_FORMAT Format = DXGI_FORMAT_UNKNOWN;
1384 	D3D11_UAV_DIMENSION ViewDimension;
1385 	union 
1386 	{
1387 		D3D11_BUFFER_UAV Buffer;
1388 		D3D11_TEX1D_UAV Texture1D;
1389 		D3D11_TEX1D_ARRAY_UAV Texture1DArray;
1390 		D3D11_TEX2D_UAV Texture2D;
1391 		D3D11_TEX2D_ARRAY_UAV Texture2DArray;
1392 		D3D11_TEX3D_UAV Texture3D;
1393 	}
1394 
1395 	this(
1396 		D3D11_UAV_DIMENSION viewDimension,
1397 		DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
1398 		UINT mipSlice = 0, // FirstElement for BUFFER
1399 		UINT firstArraySlice = 0, // NumElements for BUFFER, FirstWSlice for TEXTURE3D
1400 		UINT arraySize = -1, // WSize for TEXTURE3D
1401 		UINT flags = 0 ) // BUFFER only
1402 	{
1403 		Format = format;
1404 		ViewDimension = viewDimension;
1405 		switch (viewDimension)
1406 		{
1407 			case D3D11_UAV_DIMENSION_BUFFER:
1408 				Buffer.FirstElement = mipSlice;
1409 				Buffer.NumElements = firstArraySlice;
1410 				Buffer.Flags = flags;
1411 				break;
1412 			case D3D11_UAV_DIMENSION_TEXTURE1D:
1413 				Texture1D.MipSlice = mipSlice;
1414 				break;
1415 			case D3D11_UAV_DIMENSION_TEXTURE1DARRAY:
1416 				Texture1DArray.MipSlice = mipSlice;
1417 				Texture1DArray.FirstArraySlice = firstArraySlice;
1418 				Texture1DArray.ArraySize = arraySize;
1419 				break;
1420 			case D3D11_UAV_DIMENSION_TEXTURE2D:
1421 				Texture2D.MipSlice = mipSlice;
1422 				break;
1423 			case D3D11_UAV_DIMENSION_TEXTURE2DARRAY:
1424 				Texture2DArray.MipSlice = mipSlice;
1425 				Texture2DArray.FirstArraySlice = firstArraySlice;
1426 				Texture2DArray.ArraySize = arraySize;
1427 				break;
1428 			case D3D11_UAV_DIMENSION_TEXTURE3D:
1429 				Texture3D.MipSlice = mipSlice;
1430 				Texture3D.FirstWSlice = firstArraySlice;
1431 				Texture3D.WSize = arraySize;
1432 				break;
1433 			default: break;
1434 		}
1435 	}
1436 }
1437 
1438 
1439 mixin( uuid!( ID3D11UnorderedAccessView, "28acf509-7f5c-48f6-8611-f316010a6380") );
1440 interface ID3D11UnorderedAccessView : ID3D11View
1441 {
1442 	extern(Windows):
1443 	void GetDesc( 
1444 				D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc);
1445 }
1446    
1447 
1448 mixin( uuid!(ID3D11VertexShader, "3b301d64-d678-4289-8897-22f8928b72f3") );
1449 interface ID3D11VertexShader : ID3D11DeviceChild
1450 {
1451 	extern(Windows):
1452 }
1453     
1454 
1455 mixin( uuid!(ID3D11HullShader, "8e5c6061-628a-4c8e-8264-bbe45cb3d5dd") );
1456 interface ID3D11HullShader : ID3D11DeviceChild
1457 {
1458 	extern(Windows):
1459 }
1460 
1461 
1462 mixin( uuid!(ID3D11DomainShader, "f582c508-0f36-490c-9977-31eece268cfa") );
1463 interface ID3D11DomainShader : ID3D11DeviceChild
1464 {
1465 	extern(Windows):
1466 }
1467 
1468 
1469 mixin( uuid!( ID3D11GeometryShader, "38325b96-effb-4022-ba02-2e795b70275c") );
1470 interface ID3D11GeometryShader : ID3D11DeviceChild
1471 {
1472 	extern(Windows):
1473 }
1474 
1475 
1476 mixin( uuid!(ID3D11PixelShader, "ea82e40d-51dc-4f33-93d4-db7c9125ae8c") );
1477 interface ID3D11PixelShader : ID3D11DeviceChild
1478 {
1479 	extern(Windows):
1480 }
1481 
1482 
1483 mixin( uuid!( ID3D11ComputeShader, "4f5b196e-c2bd-495e-bd01-1fded38e4969") );
1484 interface ID3D11ComputeShader : ID3D11DeviceChild
1485 {
1486 	extern(Windows):
1487 }
1488 
1489 
1490 mixin( uuid!( ID3D11InputLayout, "e4819ddc-4cf0-4025-bd26-5de82a3e07b7") );
1491 interface ID3D11InputLayout : ID3D11DeviceChild
1492 {
1493 	extern(Windows):
1494 }
1495 
1496 
1497 alias D3D11_FILTER = int;
1498 enum : D3D11_FILTER
1499 {
1500 	D3D11_FILTER_MIN_MAG_MIP_POINT	= 0,
1501 	D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR	= 0x1,
1502 	D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT	= 0x4,
1503 	D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR	= 0x5,
1504 	D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT	= 0x10,
1505 	D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR	= 0x11,
1506 	D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT	= 0x14,
1507 	D3D11_FILTER_MIN_MAG_MIP_LINEAR	= 0x15,
1508 	D3D11_FILTER_ANISOTROPIC	= 0x55,
1509 	D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT	= 0x80,
1510 	D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR	= 0x81,
1511 	D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT	= 0x84,
1512 	D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR	= 0x85,
1513 	D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT	= 0x90,
1514 	D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR	= 0x91,
1515 	D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT	= 0x94,
1516 	D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR	= 0x95,
1517 	D3D11_FILTER_COMPARISON_ANISOTROPIC	= 0xd5
1518 }
1519 
1520 
1521 alias D3D11_FILTER_TYPE = int;
1522 enum : D3D11_FILTER_TYPE
1523 {
1524 	D3D11_FILTER_TYPE_POINT	= 0,
1525 	D3D11_FILTER_TYPE_LINEAR	= 1
1526 }
1527 
1528 enum D3D11_FILTER_TYPE_MASK = ( 0x3 );
1529 enum D3D11_MIN_FILTER_SHIFT = ( 4 );
1530 enum D3D11_MAG_FILTER_SHIFT = ( 2 );
1531 enum D3D11_MIP_FILTER_SHIFT = ( 0 );
1532 enum D3D11_COMPARISON_FILTERING_BIT = ( 0x80 );
1533 enum D3D11_ANISOTROPIC_FILTERING_BIT = ( 0x40 );
1534 
1535 D3D11_FILTER D3D11_ENCODE_BASIC_FILTER(T0, T1, T2, T3)( T0 min, T1 mag, T2 mip, T3 bComparison ){
1536     return ( cast( D3D11_FILTER ) (                                                   
1537     ( ( bComparison ) ? D3D11_COMPARISON_FILTERING_BIT : 0 ) |             
1538     ( ( ( min ) & D3D11_FILTER_TYPE_MASK ) << D3D11_MIN_FILTER_SHIFT ) |   
1539     ( ( ( mag ) & D3D11_FILTER_TYPE_MASK ) << D3D11_MAG_FILTER_SHIFT ) |
1540     ( ( ( mip ) & D3D11_FILTER_TYPE_MASK ) << D3D11_MIP_FILTER_SHIFT ) ) );
1541 }
1542 
1543 D3D11_FILTER D3D11_ENCODE_ANISOTROPIC_FILTER(T)(T bComparison ){
1544     return ( cast( D3D11_FILTER ) (
1545     D3D11_ANISOTROPIC_FILTERING_BIT |
1546     D3D11_ENCODE_BASIC_FILTER( D3D11_FILTER_TYPE.D3D11_FILTER_TYPE_LINEAR,
1547                             D3D11_FILTER_TYPE.D3D11_FILTER_TYPE_LINEAR,
1548                             D3D11_FILTER_TYPE.D3D11_FILTER_TYPE_LINEAR,
1549                             bComparison )));
1550 }
1551 
1552 
1553 D3D11_FILTER_TYPE D3D11_DECODE_MAG_FILTER(T)( d3d11Filter ){
1554     return ( cast( D3D11_FILTER_TYPE )
1555             ( ( ( d3d11Filter ) >> D3D11_MAG_FILTER_SHIFT ) & D3D11_FILTER_TYPE_MASK ) ) ;
1556 }
1557 
1558 
1559 D3D11_FILTER_TYPE D3D11_DECODE_MIN_FILTER(T)(T d3d11Filter ){                                                             
1560     return ( cast( D3D11_FILTER_TYPE )                                                    
1561             ( ( ( d3d11Filter ) >> D3D11_MIN_FILTER_SHIFT ) & D3D11_FILTER_TYPE_MASK ) );
1562 }
1563     
1564 bool D3D11_DECODE_IS_COMPARISON_FILTER(T)(T d3d11Filter ){
1565     return cast(bool)( ( d3d11Filter ) & D3D11_COMPARISON_FILTERING_BIT );
1566 }
1567 bool D3D11_DECODE_IS_ANISOTROPIC_FILTER(T)(T d3d11Filter ){
1568     return cast(bool)( ( ( d3d11Filter ) & D3D11_ANISOTROPIC_FILTERING_BIT ) &&
1569                       ( D3D11_FILTER_TYPE.D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIN_FILTER( d3d11Filter ) ) &&
1570                       ( D3D11_FILTER_TYPE.D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MAG_FILTER( d3d11Filter ) ) &&
1571                       ( D3D11_FILTER_TYPE.D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIP_FILTER( d3d11Filter ) ) );
1572 }
1573 
1574 
1575 alias D3D11_TEXTURE_ADDRESS_MODE = int;
1576 enum : D3D11_TEXTURE_ADDRESS_MODE
1577 {
1578 	D3D11_TEXTURE_ADDRESS_WRAP	= 1,
1579 	D3D11_TEXTURE_ADDRESS_MIRROR	= 2,
1580 	D3D11_TEXTURE_ADDRESS_CLAMP	= 3,
1581 	D3D11_TEXTURE_ADDRESS_BORDER	= 4,
1582 	D3D11_TEXTURE_ADDRESS_MIRROR_ONCE	= 5
1583 }
1584 
1585 struct D3D11_SAMPLER_DESC
1586 {
1587 	D3D11_FILTER Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
1588 	D3D11_TEXTURE_ADDRESS_MODE AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
1589 	D3D11_TEXTURE_ADDRESS_MODE AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
1590 	D3D11_TEXTURE_ADDRESS_MODE AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
1591 	FLOAT MipLODBias = 0;
1592 	UINT MaxAnisotropy = 1;
1593 	D3D11_COMPARISON_FUNC ComparisonFunc = D3D11_COMPARISON_NEVER;
1594 	FLOAT[ 4 ] BorderColor = [1.0f, 1.0f, 1.0f, 1.0f];
1595 	FLOAT MinLOD = -3.402823466e+38F;
1596 	FLOAT MaxLOD = 3.402823466e+38F;
1597 }
1598 
1599 	
1600 mixin( uuid!( ID3D11SamplerState, "da6fea51-564c-4487-9810-f0d0f9b4e3a5") );
1601 interface ID3D11SamplerState : ID3D11DeviceChild
1602 {
1603 	extern(Windows):
1604 	void GetDesc( 
1605 				D3D11_SAMPLER_DESC* pDesc);
1606 }
1607 
1608 
1609 alias D3D11_FORMAT_SUPPORT = int;
1610 enum : D3D11_FORMAT_SUPPORT
1611 {
1612 	D3D11_FORMAT_SUPPORT_BUFFER	= 0x1,
1613 	D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER	= 0x2,
1614 	D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER	= 0x4,
1615 	D3D11_FORMAT_SUPPORT_SO_BUFFER	= 0x8,
1616 	D3D11_FORMAT_SUPPORT_TEXTURE1D	= 0x10,
1617 	D3D11_FORMAT_SUPPORT_TEXTURE2D	= 0x20,
1618 	D3D11_FORMAT_SUPPORT_TEXTURE3D	= 0x40,
1619 	D3D11_FORMAT_SUPPORT_TEXTURECUBE	= 0x80,
1620 	D3D11_FORMAT_SUPPORT_SHADER_LOAD	= 0x100,
1621 	D3D11_FORMAT_SUPPORT_SHADER_SAMPLE	= 0x200,
1622 	D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON	= 0x400,
1623 	D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT	= 0x800,
1624 	D3D11_FORMAT_SUPPORT_MIP	= 0x1000,
1625 	D3D11_FORMAT_SUPPORT_MIP_AUTOGEN	= 0x2000,
1626 	D3D11_FORMAT_SUPPORT_RENDER_TARGET	= 0x4000,
1627 	D3D11_FORMAT_SUPPORT_BLENDABLE	= 0x8000,
1628 	D3D11_FORMAT_SUPPORT_DEPTH_STENCIL	= 0x10000,
1629 	D3D11_FORMAT_SUPPORT_CPU_LOCKABLE	= 0x20000,
1630 	D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE	= 0x40000,
1631 	D3D11_FORMAT_SUPPORT_DISPLAY	= 0x80000,
1632 	D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT	= 0x100000,
1633 	D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET	= 0x200000,
1634 	D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD	= 0x400000,
1635 	D3D11_FORMAT_SUPPORT_SHADER_GATHER	= 0x800000,
1636 	D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST	= 0x1000000,
1637 	D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW	= 0x2000000,
1638 	D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON	= 0x4000000
1639 }
1640 
1641 
1642 alias D3D11_FORMAT_SUPPORT2 = int;
1643 enum : D3D11_FORMAT_SUPPORT2
1644 {
1645 	D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD	= 0x1,
1646 	D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS	= 0x2,
1647 	D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE	= 0x4,
1648 	D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE	= 0x8,
1649 	D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX	= 0x10,
1650 	D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX	= 0x20,
1651 	D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD	= 0x40,
1652 	D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE	= 0x80
1653 }
1654 
1655 
1656 mixin( uuid!(ID3D11Asynchronous, "4b35d0cd-1e15-4258-9c98-1b1333f6dd3b") );
1657 interface ID3D11Asynchronous : ID3D11DeviceChild
1658 {
1659 	extern(Windows):
1660 				UINT GetDataSize();
1661 }
1662 
1663 
1664 alias D3D11_ASYNC_GETDATA_FLAG = int;
1665 enum : D3D11_ASYNC_GETDATA_FLAG
1666 {
1667 	D3D11_ASYNC_GETDATA_DONOTFLUSH	= 0x1
1668 }
1669 
1670 
1671 alias D3D11_QUERY = int;
1672 enum : D3D11_QUERY
1673 {
1674 	D3D11_QUERY_EVENT	= 0,
1675 	D3D11_QUERY_OCCLUSION	= ( D3D11_QUERY_EVENT + 1 ) ,
1676 	D3D11_QUERY_TIMESTAMP	= ( D3D11_QUERY_OCCLUSION + 1 ) ,
1677 	D3D11_QUERY_TIMESTAMP_DISJOINT	= ( D3D11_QUERY_TIMESTAMP + 1 ) ,
1678 	D3D11_QUERY_PIPELINE_STATISTICS	= ( D3D11_QUERY_TIMESTAMP_DISJOINT + 1 ) ,
1679 	D3D11_QUERY_OCCLUSION_PREDICATE	= ( D3D11_QUERY_PIPELINE_STATISTICS + 1 ) ,
1680 	D3D11_QUERY_SO_STATISTICS	= ( D3D11_QUERY_OCCLUSION_PREDICATE + 1 ) ,
1681 	D3D11_QUERY_SO_OVERFLOW_PREDICATE	= ( D3D11_QUERY_SO_STATISTICS + 1 ) ,
1682 	D3D11_QUERY_SO_STATISTICS_STREAM0	= ( D3D11_QUERY_SO_OVERFLOW_PREDICATE + 1 ) ,
1683 	D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0	= ( D3D11_QUERY_SO_STATISTICS_STREAM0 + 1 ) ,
1684 	D3D11_QUERY_SO_STATISTICS_STREAM1	= ( D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 + 1 ) ,
1685 	D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1	= ( D3D11_QUERY_SO_STATISTICS_STREAM1 + 1 ) ,
1686 	D3D11_QUERY_SO_STATISTICS_STREAM2	= ( D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 + 1 ) ,
1687 	D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2	= ( D3D11_QUERY_SO_STATISTICS_STREAM2 + 1 ) ,
1688 	D3D11_QUERY_SO_STATISTICS_STREAM3	= ( D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 + 1 ) ,
1689 	D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3	= ( D3D11_QUERY_SO_STATISTICS_STREAM3 + 1 ) 
1690 }
1691 
1692 
1693 alias D3D11_QUERY_MISC_FLAG = int;
1694 enum : D3D11_QUERY_MISC_FLAG
1695 {
1696 	D3D11_QUERY_MISC_PREDICATEHINT	= 0x1
1697 }
1698 
1699 struct D3D11_QUERY_DESC
1700 {
1701 	D3D11_QUERY Query;
1702 	UINT MiscFlags;
1703 }
1704 
1705 	
1706 mixin( uuid!(ID3D11Query, "d6c00747-87b7-425e-b84d-44d108560afd") );
1707 interface ID3D11Query : ID3D11Asynchronous
1708 {
1709 	extern(Windows):
1710 	void GetDesc( 
1711 				D3D11_QUERY_DESC* pDesc);
1712 }
1713 
1714 
1715 mixin( uuid!(ID3D11Predicate, "9eb576dd-9f77-4d86-81aa-8bab5fe490e2") );
1716 interface ID3D11Predicate : ID3D11Query
1717 {
1718 	extern(Windows):
1719 }
1720     
1721 
1722 struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT
1723 {
1724 	UINT64 Frequency;
1725 	BOOL Disjoint;
1726 }
1727 
1728 struct D3D11_QUERY_DATA_PIPELINE_STATISTICS
1729 {
1730 	UINT64 IAVertices;
1731 	UINT64 IAPrimitives;
1732 	UINT64 VSInvocations;
1733 	UINT64 GSInvocations;
1734 	UINT64 GSPrimitives;
1735 	UINT64 CInvocations;
1736 	UINT64 CPrimitives;
1737 	UINT64 PSInvocations;
1738 	UINT64 HSInvocations;
1739 	UINT64 DSInvocations;
1740 	UINT64 CSInvocations;
1741 }
1742 
1743 struct D3D11_QUERY_DATA_SO_STATISTICS
1744 {
1745 	UINT64 NumPrimitivesWritten;
1746 	UINT64 PrimitivesStorageNeeded;
1747 }
1748 
1749 
1750 alias D3D11_COUNTER = int;
1751 enum : D3D11_COUNTER
1752 {
1753 	D3D11_COUNTER_DEVICE_DEPENDENT_0	= 0x40000000
1754 }
1755 
1756 
1757 alias D3D11_COUNTER_TYPE = int;
1758 enum : D3D11_COUNTER_TYPE
1759 {
1760 	D3D11_COUNTER_TYPE_FLOAT32	= 0,
1761 	D3D11_COUNTER_TYPE_UINT16	= ( D3D11_COUNTER_TYPE_FLOAT32 + 1 ) ,
1762 	D3D11_COUNTER_TYPE_UINT32	= ( D3D11_COUNTER_TYPE_UINT16 + 1 ) ,
1763 	D3D11_COUNTER_TYPE_UINT64	= ( D3D11_COUNTER_TYPE_UINT32 + 1 ) 
1764 }
1765 
1766 struct D3D11_COUNTER_DESC
1767 {
1768 	D3D11_COUNTER Counter;
1769 	UINT MiscFlags;
1770 }
1771 
1772 	
1773 struct D3D11_COUNTER_INFO
1774 {
1775 	D3D11_COUNTER LastDeviceDependentCounter;
1776 	UINT NumSimultaneousCounters;
1777 	UINT8 NumDetectableParallelUnits;
1778 }
1779 
1780 
1781 mixin( uuid!(ID3D11Counter, "6e8c49fb-a371-4770-b440-29086022b741") );
1782 interface ID3D11Counter : ID3D11Asynchronous
1783 {
1784 	extern(Windows):
1785 	void GetDesc( 
1786 				D3D11_COUNTER_DESC* pDesc);
1787 }
1788 
1789 
1790 alias D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS = int;
1791 enum : D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS
1792 {	
1793 	D3D11_STANDARD_MULTISAMPLE_PATTERN	= 0xffffffff,
1794 	D3D11_CENTER_MULTISAMPLE_PATTERN	= 0xfffffffe
1795 }
1796 
1797 
1798 alias D3D11_DEVICE_CONTEXT_TYPE = int;
1799 enum : D3D11_DEVICE_CONTEXT_TYPE
1800 {
1801 	D3D11_DEVICE_CONTEXT_IMMEDIATE	= 0,
1802 	D3D11_DEVICE_CONTEXT_DEFERRED	= ( D3D11_DEVICE_CONTEXT_IMMEDIATE + 1 ) 
1803 }
1804 
1805 struct D3D11_CLASS_INSTANCE_DESC
1806 {
1807 	UINT InstanceId;
1808 	UINT InstanceIndex;
1809 	UINT TypeId;
1810 	UINT ConstantBuffer;
1811 	UINT BaseConstantBufferOffset;
1812 	UINT BaseTexture;
1813 	UINT BaseSampler;
1814 	BOOL Created;
1815 }
1816 
1817 
1818 mixin( uuid!(ID3D11ClassInstance, "a6cd7faa-b0b7-4a2f-9436-8662a65797cb") );
1819 interface ID3D11ClassInstance : ID3D11DeviceChild
1820 {
1821 	extern(Windows):
1822 	void GetClassLinkage( 
1823 				ID3D11ClassLinkage* ppLinkage);
1824 
1825 	void GetDesc( 
1826 				D3D11_CLASS_INSTANCE_DESC* pDesc);
1827         
1828 	void GetInstanceName( 
1829 				LPSTR pInstanceName,
1830 				SIZE_T* pBufferLength);
1831 
1832 	void GetTypeName( 
1833 				LPSTR pTypeName,
1834 				SIZE_T* pBufferLength);
1835 }
1836     
1837 
1838 mixin( uuid!(ID3D11ClassLinkage, "ddf57cba-9543-46e4-a12b-f207a0fe7fed") );
1839 interface ID3D11ClassLinkage : ID3D11DeviceChild
1840 {
1841 	extern(Windows):
1842 	HRESULT GetClassInstance( 
1843 				LPCSTR pClassInstanceName,
1844 				UINT InstanceIndex,
1845 				ID3D11ClassInstance* ppInstance);
1846 
1847 	HRESULT CreateClassInstance( 
1848 				LPCSTR pClassTypeName,
1849 				UINT ConstantBufferOffset,
1850 				UINT ConstantVectorOffset,
1851 				UINT TextureOffset,
1852 				UINT SamplerOffset,
1853 				ID3D11ClassInstance* ppInstance);
1854 }
1855     
1856 
1857 mixin( uuid!(ID3D11CommandList, "a24bc4d1-769e-43f7-8013-98ff566c18e2") );
1858 interface ID3D11CommandList : ID3D11DeviceChild
1859 {
1860 	extern(Windows):
1861 				UINT GetContextFlags();
1862 }
1863     
1864 
1865 alias D3D11_FEATURE = int;
1866 enum : D3D11_FEATURE
1867 {
1868 	D3D11_FEATURE_THREADING	= 0,
1869 	D3D11_FEATURE_DOUBLES	= ( D3D11_FEATURE_THREADING + 1 ) ,
1870 	D3D11_FEATURE_FORMAT_SUPPORT	= ( D3D11_FEATURE_DOUBLES + 1 ) ,
1871 	D3D11_FEATURE_FORMAT_SUPPORT2	= ( D3D11_FEATURE_FORMAT_SUPPORT + 1 ) ,
1872 	D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS	= ( D3D11_FEATURE_FORMAT_SUPPORT2 + 1 ) 
1873 }
1874 
1875 struct D3D11_FEATURE_DATA_THREADING
1876 {
1877     BOOL DriverConcurrentCreates;
1878     BOOL DriverCommandLists;
1879 }
1880 
1881 struct D3D11_FEATURE_DATA_DOUBLES
1882 {
1883 	BOOL DoublePrecisionFloatShaderOps;
1884 }
1885 
1886 struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
1887 {
1888 	DXGI_FORMAT InFormat;
1889 	UINT OutFormatSupport;
1890 }
1891 
1892 struct D3D11_FEATURE_DATA_FORMAT_SUPPORT2
1893 {
1894 	DXGI_FORMAT InFormat;
1895 	UINT OutFormatSupport2;
1896 }
1897 
1898 struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS
1899 {
1900 	BOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
1901 }
1902 
1903 
1904 mixin( uuid!(ID3D11DeviceContext, "c0bfa96c-e089-44fb-8eaf-26f8796190da") );
1905 interface ID3D11DeviceContext : ID3D11DeviceChild
1906 {
1907 	extern(Windows):
1908 	void VSSetConstantBuffers( 
1909 				UINT StartSlot,
1910 				UINT NumBuffers,
1911 				const(ID3D11Buffer)* ppConstantBuffers);
1912 
1913 	void PSSetShaderResources( 
1914 				UINT StartSlot,
1915 				UINT NumViews,
1916 				const(ID3D11ShaderResourceView)* ppShaderResourceViews);
1917         
1918 	void PSSetShader( 
1919 				ID3D11PixelShader pPixelShader,
1920 				const(ID3D11ClassInstance)* ppClassInstances,
1921 				UINT NumClassInstances);
1922         
1923 	void PSSetSamplers( 
1924 				UINT StartSlot,
1925 				UINT NumSamplers,
1926 				const(ID3D11SamplerState)* ppSamplers);
1927         
1928 	void VSSetShader( 
1929 				ID3D11VertexShader pVertexShader,
1930 				const(ID3D11ClassInstance)* ppClassInstances,
1931 				UINT NumClassInstances);
1932         
1933 	void DrawIndexed( 
1934 				UINT IndexCount,
1935 				UINT StartIndexLocation,
1936 				INT BaseVertexLocation);
1937 
1938 	void Draw( 
1939 				UINT VertexCount,
1940 				UINT StartVertexLocation);
1941 
1942 	HRESULT Map( 
1943 				ID3D11Resource pResource,
1944 				UINT Subresource,
1945 				D3D11_MAP MapType,
1946 				UINT MapFlags,
1947 				D3D11_MAPPED_SUBRESOURCE* pMappedResource);
1948 
1949 	void Unmap( 
1950 				ID3D11Resource pResource,
1951 				UINT Subresource);
1952 
1953 	void PSSetConstantBuffers( 
1954 				UINT StartSlot,
1955 				UINT NumBuffers,
1956 				const(ID3D11Buffer)* ppConstantBuffers);
1957 
1958 	void IASetInputLayout( 
1959 				ID3D11InputLayout pInputLayout);
1960 
1961 	void IASetVertexBuffers( 
1962 				UINT StartSlot,
1963 				UINT NumBuffers,
1964 				const(ID3D11Buffer)* ppVertexBuffers,
1965 				const(UINT)* pStrides,
1966 				const(UINT)* pOffsets);
1967 
1968 	void IASetIndexBuffer( 
1969 				ID3D11Buffer pIndexBuffer,
1970 				DXGI_FORMAT Format,
1971 				UINT Offset);
1972 
1973 	void DrawIndexedInstanced( 
1974 				UINT IndexCountPerInstance,
1975 				UINT InstanceCount,
1976 				UINT StartIndexLocation,
1977 				INT BaseVertexLocation,
1978 				UINT StartInstanceLocation);
1979 
1980 	void DrawInstanced( 
1981 				UINT VertexCountPerInstance,
1982 				UINT InstanceCount,
1983 				UINT StartVertexLocation,
1984 				UINT StartInstanceLocation);
1985 
1986 	void GSSetConstantBuffers( 
1987 				UINT StartSlot,
1988 				UINT NumBuffers,
1989 				const(ID3D11Buffer)* ppConstantBuffers);
1990 
1991 	void GSSetShader( 
1992 				ID3D11GeometryShader pShader,
1993 				const(ID3D11ClassInstance)* ppClassInstances,
1994 				UINT NumClassInstances);
1995 
1996 	void IASetPrimitiveTopology( 
1997 				D3D11_PRIMITIVE_TOPOLOGY Topology);
1998 
1999 	void VSSetShaderResources( 
2000 				UINT StartSlot,
2001 				UINT NumViews,
2002 				const(ID3D11ShaderResourceView)* ppShaderResourceViews);
2003 
2004 	void VSSetSamplers( 
2005 				UINT StartSlot,
2006 				UINT NumSamplers,
2007 				const(ID3D11SamplerState)* ppSamplers);
2008 
2009 	void Begin( 
2010 				ID3D11Asynchronous pAsync);
2011 
2012 	void End( 
2013 				ID3D11Asynchronous pAsync);
2014         
2015 	HRESULT GetData( 
2016 				ID3D11Asynchronous pAsync,
2017 				void* pData,
2018 				UINT DataSize,
2019 				UINT GetDataFlags);
2020 
2021 	void SetPredication( 
2022 				ID3D11Predicate pPredicate,
2023 				BOOL PredicateValue);
2024 
2025 	void GSSetShaderResources( 
2026 				UINT StartSlot,
2027 				UINT NumViews,
2028 				const(ID3D11ShaderResourceView)* ppShaderResourceViews);
2029 
2030 	void GSSetSamplers( 
2031 				UINT StartSlot,
2032 				UINT NumSamplers,
2033 				const(ID3D11SamplerState)* ppSamplers);
2034 
2035 	void OMSetRenderTargets( 
2036 				UINT NumViews,
2037 				const(ID3D11RenderTargetView)* ppRenderTargetViews,
2038 				ID3D11DepthStencilView pDepthStencilView);
2039 
2040 	void OMSetRenderTargetsAndUnorderedAccessViews( 
2041 				UINT NumRTVs,
2042 				const(ID3D11RenderTargetView)* ppRenderTargetViews,
2043 				ID3D11DepthStencilView pDepthStencilView,
2044 				UINT UAVStartSlot,
2045 				UINT NumUAVs,
2046 				const(ID3D11UnorderedAccessView)* ppUnorderedAccessViews,
2047 				const(UINT)* pUAVInitialCounts);
2048 
2049 	void OMSetBlendState( 
2050 				ID3D11BlendState pBlendState,
2051 				FLOAT* BlendFactor, //FLOAT[ 4 ] BlendFactor
2052 				UINT SampleMask);
2053 
2054 	void OMSetDepthStencilState( 
2055 				ID3D11DepthStencilState pDepthStencilState,
2056 				UINT StencilRef);
2057 
2058 	void SOSetTargets( 
2059 				UINT NumBuffers,
2060 				const(ID3D11Buffer)* ppSOTargets,
2061 				const(UINT)* pOffsets);
2062 
2063 	void DrawAuto();
2064 
2065 	void DrawIndexedInstancedIndirect( 
2066 				ID3D11Buffer pBufferForArgs,
2067 				UINT AlignedByteOffsetForArgs);
2068 
2069 	void DrawInstancedIndirect( 
2070 				ID3D11Buffer pBufferForArgs,
2071 				UINT AlignedByteOffsetForArgs);
2072 
2073 	void Dispatch( 
2074 				UINT ThreadGroupCountX,
2075 				UINT ThreadGroupCountY,
2076 				UINT ThreadGroupCountZ);
2077 
2078 	void DispatchIndirect( 
2079 				ID3D11Buffer pBufferForArgs,
2080 				UINT AlignedByteOffsetForArgs);
2081 
2082 	void RSSetState( 
2083 				ID3D11RasterizerState pRasterizerState);
2084 
2085 	void RSSetViewports( 
2086 				UINT NumViewports,
2087 				const(D3D11_VIEWPORT)* pViewports);
2088 
2089 	void RSSetScissorRects( 
2090 				UINT NumRects,
2091 				const(D3D11_RECT)* pRects);
2092 
2093 	void CopySubresourceRegion( 
2094 				ID3D11Resource pDstResource,
2095 				UINT DstSubresource,
2096 				UINT DstX,
2097 				UINT DstY,
2098 				UINT DstZ,
2099 				ID3D11Resource pSrcResource,
2100 				UINT SrcSubresource,
2101 				const(D3D11_BOX)* pSrcBox);
2102 
2103 	void CopyResource( 
2104 				ID3D11Resource pDstResource,
2105 				ID3D11Resource pSrcResource);
2106 
2107 	void UpdateSubresource( 
2108 				ID3D11Resource pDstResource,
2109 				UINT DstSubresource,
2110 				const(D3D11_BOX)* pDstBox,
2111 				const void* pSrcData,
2112 				UINT SrcRowPitch,
2113 				UINT SrcDepthPitch);
2114 
2115 	void CopyStructureCount( 
2116 				ID3D11Buffer pDstBuffer,
2117 				UINT DstAlignedByteOffset,
2118 				ID3D11UnorderedAccessView pSrcView);
2119 
2120 	void ClearRenderTargetView( 
2121 				ID3D11RenderTargetView pRenderTargetView,
2122 				FLOAT* ColorRGBA); //FLOAT[ 4 ] ColorRGBA);
2123 
2124 	void ClearUnorderedAccessViewUint( 
2125 				ID3D11UnorderedAccessView pUnorderedAccessView,
2126 				UINT* Values); //UINT[ 4 ] Values);
2127 
2128 	void ClearUnorderedAccessViewFloat( 
2129 				ID3D11UnorderedAccessView pUnorderedAccessView,
2130 				FLOAT* Values); //FLOAT[ 4 ] Values);
2131 
2132 	void ClearDepthStencilView( 
2133 				ID3D11DepthStencilView pDepthStencilView,
2134 				UINT ClearFlags,
2135 				FLOAT Depth,
2136 				UINT8 Stencil);
2137 
2138 	void GenerateMips( 
2139 				ID3D11ShaderResourceView pShaderResourceView);
2140 
2141 	void SetResourceMinLOD( 
2142 				ID3D11Resource pResource,
2143 				FLOAT MinLOD);
2144 
2145 	FLOAT GetResourceMinLOD( 
2146 				ID3D11Resource pResource);
2147 
2148 	void ResolveSubresource( 
2149 				ID3D11Resource pDstResource,
2150 				UINT DstSubresource,
2151 				ID3D11Resource pSrcResource,
2152 				UINT SrcSubresource,
2153 				DXGI_FORMAT Format);
2154 
2155 	void ExecuteCommandList( 
2156 				ID3D11CommandList pCommandList,
2157 				BOOL RestoreContextState);
2158 
2159 	void HSSetShaderResources( 
2160 				UINT StartSlot,
2161 				UINT NumViews,
2162 				const(ID3D11ShaderResourceView)* ppShaderResourceViews);
2163 
2164 	void HSSetShader( 
2165 				ID3D11HullShader pHullShader,
2166 				const(ID3D11ClassInstance)* ppClassInstances,
2167 				UINT NumClassInstances);
2168 
2169 	void HSSetSamplers( 
2170 				UINT StartSlot,
2171 				UINT NumSamplers,
2172 				const(ID3D11SamplerState)* ppSamplers);
2173 
2174 	void HSSetConstantBuffers( 
2175 				UINT StartSlot,
2176 				UINT NumBuffers,
2177 				const(ID3D11Buffer)* ppConstantBuffers);
2178 
2179 	void DSSetShaderResources( 
2180 				UINT StartSlot,
2181 				UINT NumViews,
2182 				const(ID3D11ShaderResourceView)* ppShaderResourceViews);
2183 
2184 	void DSSetShader( 
2185 				ID3D11DomainShader pDomainShader,
2186 				const(ID3D11ClassInstance)* ppClassInstances,
2187 				UINT NumClassInstances);
2188 
2189 	void DSSetSamplers( 
2190 				UINT StartSlot,
2191 				UINT NumSamplers,
2192 				const(ID3D11SamplerState)* ppSamplers);
2193 
2194 	void DSSetConstantBuffers( 
2195 				UINT StartSlot,
2196 				UINT NumBuffers,
2197 				const(ID3D11Buffer)* ppConstantBuffers);
2198 
2199 	void CSSetShaderResources( 
2200 				UINT StartSlot,
2201 				UINT NumViews,
2202 				const(ID3D11ShaderResourceView)* ppShaderResourceViews);
2203 
2204 	void CSSetUnorderedAccessViews( 
2205 				UINT StartSlot,
2206 				UINT NumUAVs,
2207 				const(ID3D11UnorderedAccessView)* ppUnorderedAccessViews,
2208 				const(UINT)* pUAVInitialCounts);
2209 
2210 	void CSSetShader( 
2211 				ID3D11ComputeShader pComputeShader,
2212 				const(ID3D11ClassInstance)* ppClassInstances,
2213 				UINT NumClassInstances);
2214 
2215 	void CSSetSamplers( 
2216 				UINT StartSlot,
2217 				UINT NumSamplers,
2218 				const(ID3D11SamplerState)* ppSamplers);
2219         
2220 	void CSSetConstantBuffers( 
2221 				UINT StartSlot,
2222 				UINT NumBuffers,
2223 				const(ID3D11Buffer)* ppConstantBuffers);
2224         
2225 	void VSGetConstantBuffers( 
2226 				UINT StartSlot,
2227 				UINT NumBuffers,
2228 				ID3D11Buffer* ppConstantBuffers);
2229 
2230 	void PSGetShaderResources( 
2231 				UINT StartSlot,
2232 				UINT NumViews,
2233 				ID3D11ShaderResourceView* ppShaderResourceViews);
2234 
2235 	void PSGetShader( 
2236 				ID3D11PixelShader* ppPixelShader,
2237 				const(ID3D11ClassInstance)* ppClassInstances,
2238 				UINT* pNumClassInstances);
2239 
2240 	void PSGetSamplers( 
2241 				UINT StartSlot,
2242 				UINT NumSamplers,
2243 				ID3D11SamplerState* ppSamplers);
2244 
2245 	void VSGetShader( 
2246 				ID3D11VertexShader* ppVertexShader,
2247 				const(ID3D11ClassInstance)* ppClassInstances,
2248 				UINT* pNumClassInstances);
2249 
2250 	void PSGetConstantBuffers( 
2251 				UINT StartSlot,
2252 				UINT NumBuffers,
2253 				ID3D11Buffer* ppConstantBuffers);
2254 
2255 	void IAGetInputLayout( 
2256 				ID3D11InputLayout* ppInputLayout);
2257 
2258 	void IAGetVertexBuffers( 
2259 				UINT StartSlot,
2260 				UINT NumBuffers,
2261 				ID3D11Buffer* ppVertexBuffers,
2262 				UINT* pStrides,
2263 				UINT* pOffsets);
2264 
2265 	void IAGetIndexBuffer( 
2266 				ID3D11Buffer* pIndexBuffer,
2267 				DXGI_FORMAT* Format,
2268 				UINT* Offset);
2269 
2270 	void GSGetConstantBuffers( 
2271 				UINT StartSlot,
2272 				UINT NumBuffers,
2273 				ID3D11Buffer* ppConstantBuffers);
2274 
2275 	void GSGetShader( 
2276 				ID3D11GeometryShader* ppGeometryShader,
2277 				const(ID3D11ClassInstance)* ppClassInstances,
2278 				UINT* pNumClassInstances);
2279 
2280 	void IAGetPrimitiveTopology( 
2281 				D3D11_PRIMITIVE_TOPOLOGY* pTopology);
2282 
2283 	void VSGetShaderResources( 
2284 				UINT StartSlot,
2285 				UINT NumViews,
2286 				ID3D11ShaderResourceView* ppShaderResourceViews);
2287 
2288 	void VSGetSamplers( 
2289 				UINT StartSlot,
2290 				UINT NumSamplers,
2291 				ID3D11SamplerState* ppSamplers);
2292 
2293 	void GetPredication( 
2294 				ID3D11Predicate* ppPredicate,
2295 				BOOL* pPredicateValue);
2296 
2297 	void GSGetShaderResources( 
2298 				UINT StartSlot,
2299 				UINT NumViews,
2300 				ID3D11ShaderResourceView* ppShaderResourceViews);
2301 
2302 	void GSGetSamplers( 
2303 				UINT StartSlot,
2304 				UINT NumSamplers,
2305 				ID3D11SamplerState* ppSamplers);
2306 
2307 	void OMGetRenderTargets( 
2308 				UINT NumViews,
2309 				ID3D11RenderTargetView* ppRenderTargetViews,
2310 				ID3D11DepthStencilView* ppDepthStencilView);
2311 
2312 	void OMGetRenderTargetsAndUnorderedAccessViews( 
2313 				UINT NumRTVs,
2314 				ID3D11RenderTargetView* ppRenderTargetViews,
2315 				ID3D11DepthStencilView* ppDepthStencilView,
2316 				UINT UAVStartSlot,
2317 				UINT NumUAVs,
2318 				ID3D11UnorderedAccessView* ppUnorderedAccessViews);
2319 
2320 	void OMGetBlendState( 
2321 				ID3D11BlendState* ppBlendState,
2322 				FLOAT* BlendFactor, //FLOAT[ 4 ] BlendFactor,
2323 				UINT* pSampleMask);
2324 
2325 	void OMGetDepthStencilState( 
2326 				ID3D11DepthStencilState* ppDepthStencilState,
2327 				UINT* pStencilRef);
2328 
2329 	void SOGetTargets( 
2330 				UINT NumBuffers,
2331 				ID3D11Buffer* ppSOTargets);
2332 
2333 	void RSGetState( 
2334 				ID3D11RasterizerState* ppRasterizerState);
2335 
2336 	void RSGetViewports( 
2337 				UINT* pNumViewports,
2338 				D3D11_VIEWPORT* pViewports);
2339 
2340 	void RSGetScissorRects( 
2341 				UINT* pNumRects,
2342 				D3D11_RECT* pRects);
2343 
2344 	void HSGetShaderResources( 
2345 				UINT StartSlot,
2346 				UINT NumViews,
2347 				ID3D11ShaderResourceView* ppShaderResourceViews);
2348 
2349 	void HSGetShader( 
2350 				ID3D11HullShader* ppHullShader,
2351 				ID3D11ClassInstance* ppClassInstances,
2352 				UINT* pNumClassInstances);
2353 
2354 	void HSGetSamplers( 
2355 				UINT StartSlot,
2356 				UINT NumSamplers,
2357 				ID3D11SamplerState* ppSamplers);
2358 
2359 	void HSGetConstantBuffers( 
2360 				UINT StartSlot,
2361 				UINT NumBuffers,
2362 				ID3D11Buffer* ppConstantBuffers);
2363 
2364 	void DSGetShaderResources( 
2365 				UINT StartSlot,
2366 				UINT NumViews,
2367 				ID3D11ShaderResourceView* ppShaderResourceViews);
2368 
2369 	void DSGetShader( 
2370 				ID3D11DomainShader* ppDomainShader,
2371 				ID3D11ClassInstance* ppClassInstances,
2372 				UINT* pNumClassInstances);
2373 
2374 	void DSGetSamplers( 
2375 				UINT StartSlot,
2376 				UINT NumSamplers,
2377 				ID3D11SamplerState* ppSamplers);
2378 
2379 	void DSGetConstantBuffers( 
2380 				UINT StartSlot,
2381 				UINT NumBuffers,
2382 				ID3D11Buffer* ppConstantBuffers);
2383 
2384 	void CSGetShaderResources( 
2385 				UINT StartSlot,
2386 				UINT NumViews,
2387 				ID3D11ShaderResourceView* ppShaderResourceViews);
2388 
2389 	void CSGetUnorderedAccessViews( 
2390 				UINT StartSlot,
2391 				UINT NumUAVs,
2392 				ID3D11UnorderedAccessView* ppUnorderedAccessViews);
2393 
2394 	void CSGetShader( 
2395 				ID3D11ComputeShader* ppComputeShader,
2396 				ID3D11ClassInstance* ppClassInstances,
2397 				UINT* pNumClassInstances);
2398 
2399 	void CSGetSamplers( 
2400 				UINT StartSlot,
2401 				UINT NumSamplers,
2402 				ID3D11SamplerState* ppSamplers);
2403 
2404 	void CSGetConstantBuffers( 
2405 				UINT StartSlot,
2406 				UINT NumBuffers,
2407 				ID3D11Buffer* ppConstantBuffers);
2408 
2409 	void ClearState();
2410 
2411 	void Flush();
2412 
2413 	D3D11_DEVICE_CONTEXT_TYPE GetType();
2414 
2415 	UINT GetContextFlags();
2416 
2417 	HRESULT FinishCommandList( 
2418 				BOOL RestoreDeferredContextState,
2419 				ID3D11CommandList* ppCommandList);
2420 }
2421 
2422 
2423 mixin( uuid!(ID3D11Device, "db6f6ddb-ac77-4e88-8253-819df9bbf140") );
2424 interface ID3D11Device : IUnknown
2425 {
2426 	extern(Windows):
2427 	HRESULT CreateBuffer( 
2428 				const(D3D11_BUFFER_DESC)* pDesc,
2429 				const(D3D11_SUBRESOURCE_DATA)* pInitialData,
2430 				ID3D11Buffer* ppBuffer);
2431 
2432 	HRESULT CreateTexture1D( 
2433 				const(D3D11_TEXTURE1D_DESC)* pDesc,
2434 				const(D3D11_SUBRESOURCE_DATA)* pInitialData,
2435 				ID3D11Texture1D* ppTexture1D);
2436 
2437 	HRESULT CreateTexture2D( 
2438 				const(D3D11_TEXTURE2D_DESC)* pDesc,
2439 				const(D3D11_SUBRESOURCE_DATA)* pInitialData,
2440 				ID3D11Texture2D* ppTexture2D);
2441 
2442 	HRESULT CreateTexture3D( 
2443 				const(D3D11_TEXTURE3D_DESC)* pDesc,
2444 				const(D3D11_SUBRESOURCE_DATA)* pInitialData,
2445 				ID3D11Texture3D* ppTexture3D);
2446 
2447 	HRESULT CreateShaderResourceView( 
2448 				ID3D11Resource pResource,
2449 				const(D3D11_SHADER_RESOURCE_VIEW_DESC)* pDesc,
2450 				ID3D11ShaderResourceView* ppSRView);
2451 
2452 	HRESULT CreateUnorderedAccessView( 
2453 				ID3D11Resource pResource,
2454 				const(D3D11_UNORDERED_ACCESS_VIEW_DESC)* pDesc,
2455 				ID3D11UnorderedAccessView* ppUAView);
2456 
2457 	HRESULT CreateRenderTargetView( 
2458 				ID3D11Resource pResource,
2459 				const(D3D11_RENDER_TARGET_VIEW_DESC)* pDesc,
2460 				ID3D11RenderTargetView* ppRTView);
2461 
2462 	HRESULT CreateDepthStencilView( 
2463 				ID3D11Resource pResource,
2464 				const(D3D11_DEPTH_STENCIL_VIEW_DESC)* pDesc,
2465 				ID3D11DepthStencilView* ppDepthStencilView);
2466 
2467 	HRESULT CreateInputLayout( 
2468 				const(D3D11_INPUT_ELEMENT_DESC)* pInputElementDescs,
2469 				UINT NumElements,
2470 				const void* pShaderBytecodeWithInputSignature,
2471 				SIZE_T BytecodeLength,
2472 				ID3D11InputLayout* ppInputLayout);
2473 
2474 	HRESULT CreateVertexShader( 
2475 				const void* pShaderBytecode,
2476 				SIZE_T BytecodeLength,
2477 				ID3D11ClassLinkage pClassLinkage,
2478 				ID3D11VertexShader* ppVertexShader);
2479 
2480 	HRESULT CreateGeometryShader( 
2481 				const void* pShaderBytecode,
2482 				SIZE_T BytecodeLength,
2483 				ID3D11ClassLinkage pClassLinkage,
2484 				ID3D11GeometryShader* ppGeometryShader);
2485 
2486 	HRESULT CreateGeometryShaderWithStreamOutput( 
2487 				const void* pShaderBytecode,
2488 				SIZE_T BytecodeLength,
2489 				const(D3D11_SO_DECLARATION_ENTRY)* pSODeclaration,
2490 				UINT NumEntries,
2491 				const(UINT)* pBufferStrides,
2492 				UINT NumStrides,
2493 				UINT RasterizedStream,
2494 				ID3D11ClassLinkage pClassLinkage,
2495 				ID3D11GeometryShader* ppGeometryShader);
2496 
2497 	HRESULT CreatePixelShader( 
2498 				const void* pShaderBytecode,
2499 				SIZE_T BytecodeLength,
2500 				ID3D11ClassLinkage pClassLinkage,
2501 				ID3D11PixelShader* ppPixelShader);
2502 
2503 	HRESULT CreateHullShader( 
2504 				const void* pShaderBytecode,
2505 				SIZE_T BytecodeLength,
2506 				ID3D11ClassLinkage pClassLinkage,
2507 				ID3D11HullShader* ppHullShader);
2508 
2509 	HRESULT CreateDomainShader( 
2510 				const void* pShaderBytecode,
2511 				SIZE_T BytecodeLength,
2512 				ID3D11ClassLinkage pClassLinkage,
2513 				ID3D11DomainShader* ppDomainShader);
2514 
2515 	HRESULT CreateComputeShader( 
2516 				const void* pShaderBytecode,
2517 				SIZE_T BytecodeLength,
2518 				ID3D11ClassLinkage pClassLinkage,
2519 				ID3D11ComputeShader* ppComputeShader);
2520 
2521 	HRESULT CreateClassLinkage( 
2522 				ID3D11ClassLinkage* ppLinkage);
2523         
2524 	HRESULT CreateBlendState( 
2525 				const(D3D11_BLEND_DESC)* pBlendStateDesc,
2526 				ID3D11BlendState* ppBlendState);
2527 
2528 	HRESULT CreateDepthStencilState( 
2529 				const(D3D11_DEPTH_STENCIL_DESC)* pDepthStencilDesc,
2530 				ID3D11DepthStencilState* ppDepthStencilState);
2531 
2532 	HRESULT CreateRasterizerState( 
2533 				const(D3D11_RASTERIZER_DESC)* pRasterizerDesc,
2534 				ID3D11RasterizerState* ppRasterizerState);
2535 
2536 	HRESULT CreateSamplerState( 
2537 				const(D3D11_SAMPLER_DESC)* pSamplerDesc,
2538 				ID3D11SamplerState* ppSamplerState);
2539 
2540 	HRESULT CreateQuery( 
2541 				const(D3D11_QUERY_DESC)* pQueryDesc,
2542 				ID3D11Query* ppQuery);
2543 
2544 	HRESULT CreatePredicate( 
2545 				const(D3D11_QUERY_DESC)* pPredicateDesc,
2546 				ID3D11Predicate* ppPredicate);
2547 
2548 	HRESULT CreateCounter( 
2549 				const(D3D11_COUNTER_DESC)* pCounterDesc,
2550 				ID3D11Counter* ppCounter);
2551 
2552 	HRESULT CreateDeferredContext( 
2553 				UINT ContextFlags,
2554 				ID3D11DeviceContext* ppDeferredContext);
2555 
2556 	HRESULT OpenSharedResource( 
2557 				HANDLE hResource,
2558 				REFIID ReturnedInterface,
2559 				void** ppResource);
2560 
2561 	HRESULT CheckFormatSupport( 
2562 				DXGI_FORMAT Format,
2563 				UINT* pFormatSupport);
2564 
2565 	HRESULT CheckMultisampleQualityLevels( 
2566 				DXGI_FORMAT Format,
2567 				UINT SampleCount,
2568 				UINT* pNumQualityLevels);
2569 
2570 	void CheckCounterInfo( 
2571 				D3D11_COUNTER_INFO *pCounterInfo);
2572 
2573 	HRESULT CheckCounter( 
2574 				const(D3D11_COUNTER_DESC)* pDesc,
2575 				D3D11_COUNTER_TYPE* pType,
2576 				UINT* pActiveCounters,
2577 				LPSTR szName,
2578 				UINT* pNameLength,
2579 				LPSTR szUnits,
2580 				UINT* pUnitsLength,
2581 				LPSTR szDescription,
2582 				UINT* pDescriptionLength);
2583 
2584 	HRESULT CheckFeatureSupport( 
2585 				D3D11_FEATURE Feature,
2586 				void* pFeatureSupportData,
2587 				UINT FeatureSupportDataSize);
2588 
2589 	HRESULT GetPrivateData( 
2590 				REFGUID guid,
2591 				UINT* pDataSize,
2592 				void* pData);
2593 
2594 	HRESULT SetPrivateData( 
2595 				REFGUID guid,
2596 				UINT DataSize,
2597 				const void* pData);
2598 
2599 	HRESULT SetPrivateDataInterface( 
2600 				REFGUID guid,
2601 				const IUnknown pData);
2602 
2603 	D3D_FEATURE_LEVEL GetFeatureLevel();
2604 
2605 	UINT GetCreationFlags();
2606 
2607 	HRESULT GetDeviceRemovedReason();
2608 
2609 	void GetImmediateContext( 
2610 				ID3D11DeviceContext* ppImmediateContext);
2611 
2612 	HRESULT SetExceptionMode( 
2613 				UINT RaiseFlags);
2614 
2615 	UINT GetExceptionMode();
2616 }
2617 
2618 alias D3D11_CREATE_DEVICE_FLAG = int;
2619 enum : D3D11_CREATE_DEVICE_FLAG
2620 {
2621 	D3D11_CREATE_DEVICE_SINGLETHREADED	= 0x1,
2622 	D3D11_CREATE_DEVICE_DEBUG	= 0x2,
2623 	D3D11_CREATE_DEVICE_SWITCH_TO_REF	= 0x4,
2624 	D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS	= 0x8,
2625 	D3D11_CREATE_DEVICE_BGRA_SUPPORT	= 0x20
2626 }
2627 
2628 enum D3D11_SDK_VERSION = ( 7 );
2629 
2630 ///////////////////////////////////////////////////////////////////////////
2631 // D3D11CreateDevice
2632 // ------------------
2633 //
2634 // pAdapter
2635 //      If NULL, D3D11CreateDevice will choose the primary adapter and
2636 //      create a new instance from a temporarily created IDXGIFactory.
2637 //      If non-NULL, D3D11CreateDevice will register the appropriate
2638 //      device, if necessary (via IDXGIAdapter::RegisterDrver), before
2639 //      creating the device.
2640 // DriverType
2641 //      Specifies the driver type to be created: hardware, reference or
2642 //      null.
2643 // Software
2644 //      HMODULE of a DLL implementing a software rasterizer. Must be NULL for
2645 //      non-Software driver types.
2646 // Flags
2647 //      Any of those documented for D3D11CreateDeviceAndSwapChain.
2648 // pFeatureLevels
2649 //      Any of those documented for D3D11CreateDeviceAndSwapChain.
2650 // FeatureLevels
2651 //      Size of feature levels array.
2652 // SDKVersion
2653 //      SDK version. Use the D3D11_SDK_VERSION macro.
2654 // ppDevice
2655 //      Pointer to returned interface. May be NULL.
2656 // pFeatureLevel
2657 //      Pointer to returned feature level. May be NULL.
2658 // ppImmediateContext
2659 //      Pointer to returned interface. May be NULL.
2660 //
2661 // Return Values
2662 //  Any of those documented for 
2663 //          CreateDXGIFactory1
2664 //          IDXGIFactory::EnumAdapters
2665 //          IDXGIAdapter::RegisterDriver
2666 //          D3D11CreateDevice
2667 //
2668 ///////////////////////////////////////////////////////////////////////////
2669 extern (Windows) nothrow
2670 HRESULT D3D11CreateDevice(IDXGIAdapter        pAdapter,
2671                                                  D3D_DRIVER_TYPE     DriverType,
2672                                                  HMODULE             Software,
2673                                                  UINT                Flags,
2674                                                  const(D3D_FEATURE_LEVEL)* pFeatureLevels,
2675                                                  UINT                FeatureLevels,
2676                                                  UINT                SDKVersion,
2677                                                  ID3D11Device        *ppDevice,
2678                                                  D3D_FEATURE_LEVEL   *pFeatureLevel,
2679                                                  ID3D11DeviceContext *ppImmediateContext);
2680 
2681 
2682 alias PFN_D3D11_CREATE_DEVICE = extern (Windows) nothrow HRESULT function(IDXGIAdapter        pAdapter,
2683                                                  D3D_DRIVER_TYPE     DriverType,
2684                                                  HMODULE             Software,
2685                                                  UINT                Flags,
2686                                                  const(D3D_FEATURE_LEVEL)* pFeatureLevels,
2687                                                  UINT                FeatureLevels,
2688                                                  UINT                SDKVersion,
2689                                                  ID3D11Device        *ppDevice,
2690                                                  D3D_FEATURE_LEVEL   *pFeatureLevel,
2691                                                  ID3D11DeviceContext *ppImmediateContext);
2692 
2693 ///////////////////////////////////////////////////////////////////////////
2694 // D3D11CreateDeviceAndSwapChain
2695 // ------------------------------
2696 //
2697 // ppAdapter
2698 //      If NULL, D3D11CreateDevice will choose the primary adapter and 
2699 //      create a new instance from a temporarily created IDXGIFactory.
2700 //      If non-NULL, D3D11CreateDevice will register the appropriate
2701 //      device, if necessary (via IDXGIAdapter::RegisterDrver), before
2702 //      creating the device.
2703 // DriverType
2704 //      Specifies the driver type to be created: hardware, reference or
2705 //      null.
2706 // Software
2707 //      HMODULE of a DLL implementing a software rasterizer. Must be NULL for
2708 //      non-Software driver types.
2709 // Flags
2710 //      Any of those documented for D3D11CreateDevice.
2711 // pFeatureLevels
2712 //      Array of any of the following:
2713 //          D3D_FEATURE_LEVEL_11_0
2714 //          D3D_FEATURE_LEVEL_10_1
2715 //          D3D_FEATURE_LEVEL_10_0
2716 //          D3D_FEATURE_LEVEL_9_3
2717 //          D3D_FEATURE_LEVEL_9_2
2718 //          D3D_FEATURE_LEVEL_9_1
2719 //      Order indicates sequence in which instantiation will be attempted. If
2720 //      NULL, then the implied order is the same as previously listed (i.e. 
2721 //      prefer most features available). 
2722 // FeatureLevels
2723 //      Size of feature levels array.
2724 // SDKVersion
2725 //      SDK version. Use the D3D11_SDK_VERSION macro.
2726 // pSwapChainDesc
2727 //      Swap chain description, may be NULL.
2728 // ppSwapChain
2729 //      Pointer to returned interface. May be NULL.
2730 // ppDevice
2731 //      Pointer to returned interface. May be NULL.
2732 // pFeatureLevel
2733 //      Pointer to returned feature level. May be NULL.
2734 // ppImmediateContext
2735 //      Pointer to returned interface. May be NULL.
2736 //
2737 // Return Values
2738 //  Any of those documented for 
2739 //          CreateDXGIFactory1
2740 //          IDXGIFactory::EnumAdapters
2741 //          IDXGIAdapter::RegisterDriver
2742 //          D3D11CreateDevice
2743 //          IDXGIFactory::CreateSwapChain
2744 //
2745 ///////////////////////////////////////////////////////////////////////////
2746 
2747 
2748 extern(Windows) nothrow
2749 HRESULT D3D11CreateDeviceAndSwapChain(
2750     IDXGIAdapter pAdapter,
2751     D3D_DRIVER_TYPE DriverType,
2752     HMODULE Software,
2753     UINT Flags,
2754     const(D3D_FEATURE_LEVEL)* pFeatureLevels,
2755     UINT FeatureLevels,
2756     UINT SDKVersion,
2757     const(DXGI_SWAP_CHAIN_DESC)* pSwapChainDesc,
2758     IDXGISwapChain* ppSwapChain,
2759     ID3D11Device* ppDevice,
2760     D3D_FEATURE_LEVEL* pFeatureLevel,
2761     ID3D11DeviceContext* ppImmediateContext);
2762 
2763 alias PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN = extern(Windows) nothrow HRESULT function(
2764     IDXGIAdapter pAdapter,
2765     D3D_DRIVER_TYPE DriverType,
2766     HMODULE Software,
2767     UINT Flags,
2768     const(D3D_FEATURE_LEVEL)* pFeatureLevels,
2769     UINT FeatureLevels,
2770     UINT SDKVersion,
2771     const(DXGI_SWAP_CHAIN_DESC)* pSwapChainDesc,
2772     IDXGISwapChain* ppSwapChain,
2773     ID3D11Device* ppDevice,
2774     D3D_FEATURE_LEVEL* pFeatureLevel,
2775     ID3D11DeviceContext* ppImmediateContext);