1 module aurora.directx.d3d.d3dcommon;
2 
3 version(Windows):
4 
5 public import aurora.directx.com;
6 
7 public:
8 
9 ///
10 /// Constants
11 ///
12 
13 enum int D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION = 2048;
14 enum int D3D_FL9_3_REQ_TEXTURE1D_U_DIMENSION = 4096;
15 enum int D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION = 2048;
16 enum int D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION = 4096;
17 enum int D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION = 512;
18 enum int D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION = 4096;
19 enum int D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 256;
20 enum int D3D_FL9_1_DEFAULT_MAX_ANISOTROPY = 2;
21 enum int D3D_FL9_1_IA_MAX_COUNT = 65535;
22 enum int D3D_FL9_2_IA_MAX_COUNT = 1048575;
23 enum int D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT = 1;
24 enum int D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT = 4;
25 enum int D3D_FL9_1_MAX_TEXTURE_REPEAT = 128;
26 enum int D3D_FL9_2_MAX_TEXTURE_REPEAT = 2048;
27 enum int D3D_FL9_3_MAX_TEXTURE_REPEAT = 8192;
28 
29 ///
30 /// Functions
31 ///
32 
33 ///
34 /// Enumerations
35 ///
36 
37 enum D3D_DRIVER_TYPE
38 {
39     UNKNOWN	= 0,
40     HARDWARE = ( UNKNOWN + 1 ) ,
41     REFERENCE = ( HARDWARE + 1 ) ,
42     NULL = ( REFERENCE + 1 ) ,
43     SOFTWARE = ( NULL + 1 ) ,
44     WARP = ( SOFTWARE + 1 ) 
45 }
46 
47 enum D3D_FEATURE_LEVEL
48 {
49     LEVEL_9_1	= 0x9100,
50     LEVEL_9_2	= 0x9200,
51     LEVEL_9_3	= 0x9300,
52     LEVEL_10_0	= 0xa000,
53     LEVEL_10_1	= 0xa100,
54     LEVEL_11_0	= 0xb000,
55     LEVEL_11_1	= 0xb100,
56     LEVEL_12_0	= 0xc000,
57     LEVEL_12_1	= 0xc100
58 }
59 
60 enum D3D_PRIMITIVE_TOPOLOGY
61 {
62     D3D_UNDEFINED	= 0,
63     D3D_POINTLIST	= 1,
64     D3D_LINELIST	= 2,
65     D3D_LINESTRIP	= 3,
66     D3D_TRIANGLELIST	= 4,
67     D3D_TRIANGLESTRIP	= 5,
68     D3D_LINELIST_ADJ	= 10,
69     D3D_LINESTRIP_ADJ	= 11,
70     D3D_TRIANGLELIST_ADJ	= 12,
71     D3D_TRIANGLESTRIP_ADJ	= 13,
72     D3D_1_CONTROL_POINT_PATCHLIST	= 33,
73     D3D_2_CONTROL_POINT_PATCHLIST	= 34,
74     D3D_3_CONTROL_POINT_PATCHLIST	= 35,
75     D3D_4_CONTROL_POINT_PATCHLIST	= 36,
76     D3D_5_CONTROL_POINT_PATCHLIST	= 37,
77     D3D_6_CONTROL_POINT_PATCHLIST	= 38,
78     D3D_7_CONTROL_POINT_PATCHLIST	= 39,
79     D3D_8_CONTROL_POINT_PATCHLIST	= 40,
80     D3D_9_CONTROL_POINT_PATCHLIST	= 41,
81     D3D_10_CONTROL_POINT_PATCHLIST	= 42,
82     D3D_11_CONTROL_POINT_PATCHLIST	= 43,
83     D3D_12_CONTROL_POINT_PATCHLIST	= 44,
84     D3D_13_CONTROL_POINT_PATCHLIST	= 45,
85     D3D_14_CONTROL_POINT_PATCHLIST	= 46,
86     D3D_15_CONTROL_POINT_PATCHLIST	= 47,
87     D3D_16_CONTROL_POINT_PATCHLIST	= 48,
88     D3D_17_CONTROL_POINT_PATCHLIST	= 49,
89     D3D_18_CONTROL_POINT_PATCHLIST	= 50,
90     D3D_19_CONTROL_POINT_PATCHLIST	= 51,
91     D3D_20_CONTROL_POINT_PATCHLIST	= 52,
92     D3D_21_CONTROL_POINT_PATCHLIST	= 53,
93     D3D_22_CONTROL_POINT_PATCHLIST	= 54,
94     D3D_23_CONTROL_POINT_PATCHLIST	= 55,
95     D3D_24_CONTROL_POINT_PATCHLIST	= 56,
96     D3D_25_CONTROL_POINT_PATCHLIST	= 57,
97     D3D_26_CONTROL_POINT_PATCHLIST	= 58,
98     D3D_27_CONTROL_POINT_PATCHLIST	= 59,
99     D3D_28_CONTROL_POINT_PATCHLIST	= 60,
100     D3D_29_CONTROL_POINT_PATCHLIST	= 61,
101     D3D_30_CONTROL_POINT_PATCHLIST	= 62,
102     D3D_31_CONTROL_POINT_PATCHLIST	= 63,
103     D3D_32_CONTROL_POINT_PATCHLIST	= 64,
104     D3D10_UNDEFINED	= D3D_UNDEFINED,
105     D3D10_POINTLIST	= D3D_POINTLIST,
106     D3D10_LINELIST	= D3D_LINELIST,
107     D3D10_LINESTRIP	= D3D_LINESTRIP,
108     D3D10_TRIANGLELIST	= D3D_TRIANGLELIST,
109     D3D10_TRIANGLESTRIP	= D3D_TRIANGLESTRIP,
110     D3D10_LINELIST_ADJ	= D3D_LINELIST_ADJ,
111     D3D10_LINESTRIP_ADJ	= D3D_LINESTRIP_ADJ,
112     D3D10_TRIANGLELIST_ADJ	= D3D_TRIANGLELIST_ADJ,
113     D3D10_TRIANGLESTRIP_ADJ	= D3D_TRIANGLESTRIP_ADJ,
114     D3D11_UNDEFINED	= D3D_UNDEFINED,
115     D3D11_POINTLIST	= D3D_POINTLIST,
116     D3D11_LINELIST	= D3D_LINELIST,
117     D3D11_LINESTRIP	= D3D_LINESTRIP,
118     D3D11_TRIANGLELIST	= D3D_TRIANGLELIST,
119     D3D11_TRIANGLESTRIP	= D3D_TRIANGLESTRIP,
120     D3D11_LINELIST_ADJ	= D3D_LINELIST_ADJ,
121     D3D11_LINESTRIP_ADJ	= D3D_LINESTRIP_ADJ,
122     D3D11_TRIANGLELIST_ADJ	= D3D_TRIANGLELIST_ADJ,
123     D3D11_TRIANGLESTRIP_ADJ	= D3D_TRIANGLESTRIP_ADJ,
124     D3D11_1_CONTROL_POINT_PATCHLIST	= D3D_1_CONTROL_POINT_PATCHLIST,
125     D3D11_2_CONTROL_POINT_PATCHLIST	= D3D_2_CONTROL_POINT_PATCHLIST,
126     D3D11_3_CONTROL_POINT_PATCHLIST	= D3D_3_CONTROL_POINT_PATCHLIST,
127     D3D11_4_CONTROL_POINT_PATCHLIST	= D3D_4_CONTROL_POINT_PATCHLIST,
128     D3D11_5_CONTROL_POINT_PATCHLIST	= D3D_5_CONTROL_POINT_PATCHLIST,
129     D3D11_6_CONTROL_POINT_PATCHLIST	= D3D_6_CONTROL_POINT_PATCHLIST,
130     D3D11_7_CONTROL_POINT_PATCHLIST	= D3D_7_CONTROL_POINT_PATCHLIST,
131     D3D11_8_CONTROL_POINT_PATCHLIST	= D3D_8_CONTROL_POINT_PATCHLIST,
132     D3D11_9_CONTROL_POINT_PATCHLIST	= D3D_9_CONTROL_POINT_PATCHLIST,
133     D3D11_10_CONTROL_POINT_PATCHLIST	= D3D_10_CONTROL_POINT_PATCHLIST,
134     D3D11_11_CONTROL_POINT_PATCHLIST	= D3D_11_CONTROL_POINT_PATCHLIST,
135     D3D11_12_CONTROL_POINT_PATCHLIST	= D3D_12_CONTROL_POINT_PATCHLIST,
136     D3D11_13_CONTROL_POINT_PATCHLIST	= D3D_13_CONTROL_POINT_PATCHLIST,
137     D3D11_14_CONTROL_POINT_PATCHLIST	= D3D_14_CONTROL_POINT_PATCHLIST,
138     D3D11_15_CONTROL_POINT_PATCHLIST	= D3D_15_CONTROL_POINT_PATCHLIST,
139     D3D11_16_CONTROL_POINT_PATCHLIST	= D3D_16_CONTROL_POINT_PATCHLIST,
140     D3D11_17_CONTROL_POINT_PATCHLIST	= D3D_17_CONTROL_POINT_PATCHLIST,
141     D3D11_18_CONTROL_POINT_PATCHLIST	= D3D_18_CONTROL_POINT_PATCHLIST,
142     D3D11_19_CONTROL_POINT_PATCHLIST	= D3D_19_CONTROL_POINT_PATCHLIST,
143     D3D11_20_CONTROL_POINT_PATCHLIST	= D3D_20_CONTROL_POINT_PATCHLIST,
144     D3D11_21_CONTROL_POINT_PATCHLIST	= D3D_21_CONTROL_POINT_PATCHLIST,
145     D3D11_22_CONTROL_POINT_PATCHLIST	= D3D_22_CONTROL_POINT_PATCHLIST,
146     D3D11_23_CONTROL_POINT_PATCHLIST	= D3D_23_CONTROL_POINT_PATCHLIST,
147     D3D11_24_CONTROL_POINT_PATCHLIST	= D3D_24_CONTROL_POINT_PATCHLIST,
148     D3D11_25_CONTROL_POINT_PATCHLIST	= D3D_25_CONTROL_POINT_PATCHLIST,
149     D3D11_26_CONTROL_POINT_PATCHLIST	= D3D_26_CONTROL_POINT_PATCHLIST,
150     D3D11_27_CONTROL_POINT_PATCHLIST	= D3D_27_CONTROL_POINT_PATCHLIST,
151     D3D11_28_CONTROL_POINT_PATCHLIST	= D3D_28_CONTROL_POINT_PATCHLIST,
152     D3D11_29_CONTROL_POINT_PATCHLIST	= D3D_29_CONTROL_POINT_PATCHLIST,
153     D3D11_30_CONTROL_POINT_PATCHLIST	= D3D_30_CONTROL_POINT_PATCHLIST,
154     D3D11_31_CONTROL_POINT_PATCHLIST	= D3D_31_CONTROL_POINT_PATCHLIST,
155     D3D11_32_CONTROL_POINT_PATCHLIST	= D3D_32_CONTROL_POINT_PATCHLIST
156 }
157 
158 enum D3D_PRIMITIVE
159 {
160     D3D_UNDEFINED	= 0,
161     D3D_POINT	= 1,
162     D3D_LINE	= 2,
163     D3D_TRIANGLE	= 3,
164     D3D_LINE_ADJ	= 6,
165     D3D_TRIANGLE_ADJ	= 7,
166     D3D_1_CONTROL_POINT_PATCH	= 8,
167     D3D_2_CONTROL_POINT_PATCH	= 9,
168     D3D_3_CONTROL_POINT_PATCH	= 10,
169     D3D_4_CONTROL_POINT_PATCH	= 11,
170     D3D_5_CONTROL_POINT_PATCH	= 12,
171     D3D_6_CONTROL_POINT_PATCH	= 13,
172     D3D_7_CONTROL_POINT_PATCH	= 14,
173     D3D_8_CONTROL_POINT_PATCH	= 15,
174     D3D_9_CONTROL_POINT_PATCH	= 16,
175     D3D_10_CONTROL_POINT_PATCH	= 17,
176     D3D_11_CONTROL_POINT_PATCH	= 18,
177     D3D_12_CONTROL_POINT_PATCH	= 19,
178     D3D_13_CONTROL_POINT_PATCH	= 20,
179     D3D_14_CONTROL_POINT_PATCH	= 21,
180     D3D_15_CONTROL_POINT_PATCH	= 22,
181     D3D_16_CONTROL_POINT_PATCH	= 23,
182     D3D_17_CONTROL_POINT_PATCH	= 24,
183     D3D_18_CONTROL_POINT_PATCH	= 25,
184     D3D_19_CONTROL_POINT_PATCH	= 26,
185     D3D_20_CONTROL_POINT_PATCH	= 27,
186     D3D_21_CONTROL_POINT_PATCH	= 28,
187     D3D_22_CONTROL_POINT_PATCH	= 29,
188     D3D_23_CONTROL_POINT_PATCH	= 30,
189     D3D_24_CONTROL_POINT_PATCH	= 31,
190     D3D_25_CONTROL_POINT_PATCH	= 32,
191     D3D_26_CONTROL_POINT_PATCH	= 33,
192     D3D_27_CONTROL_POINT_PATCH	= 34,
193     D3D_28_CONTROL_POINT_PATCH	= 35,
194     D3D_29_CONTROL_POINT_PATCH	= 36,
195     D3D_30_CONTROL_POINT_PATCH	= 37,
196     D3D_31_CONTROL_POINT_PATCH	= 38,
197     D3D_32_CONTROL_POINT_PATCH	= 39,
198     D3D10_UNDEFINED	= D3D_UNDEFINED,
199     D3D10_POINT	= D3D_POINT,
200     D3D10_LINE	= D3D_LINE,
201     D3D10_TRIANGLE	= D3D_TRIANGLE,
202     D3D10_LINE_ADJ	= D3D_LINE_ADJ,
203     D3D10_TRIANGLE_ADJ	= D3D_TRIANGLE_ADJ,
204     D3D11_UNDEFINED	= D3D_UNDEFINED,
205     D3D11_POINT	= D3D_POINT,
206     D3D11_LINE	= D3D_LINE,
207     D3D11_TRIANGLE	= D3D_TRIANGLE,
208     D3D11_LINE_ADJ	= D3D_LINE_ADJ,
209     D3D11_TRIANGLE_ADJ	= D3D_TRIANGLE_ADJ,
210     D3D11_1_CONTROL_POINT_PATCH	= D3D_1_CONTROL_POINT_PATCH,
211     D3D11_2_CONTROL_POINT_PATCH	= D3D_2_CONTROL_POINT_PATCH,
212     D3D11_3_CONTROL_POINT_PATCH	= D3D_3_CONTROL_POINT_PATCH,
213     D3D11_4_CONTROL_POINT_PATCH	= D3D_4_CONTROL_POINT_PATCH,
214     D3D11_5_CONTROL_POINT_PATCH	= D3D_5_CONTROL_POINT_PATCH,
215     D3D11_6_CONTROL_POINT_PATCH	= D3D_6_CONTROL_POINT_PATCH,
216     D3D11_7_CONTROL_POINT_PATCH	= D3D_7_CONTROL_POINT_PATCH,
217     D3D11_8_CONTROL_POINT_PATCH	= D3D_8_CONTROL_POINT_PATCH,
218     D3D11_9_CONTROL_POINT_PATCH	= D3D_9_CONTROL_POINT_PATCH,
219     D3D11_10_CONTROL_POINT_PATCH	= D3D_10_CONTROL_POINT_PATCH,
220     D3D11_11_CONTROL_POINT_PATCH	= D3D_11_CONTROL_POINT_PATCH,
221     D3D11_12_CONTROL_POINT_PATCH	= D3D_12_CONTROL_POINT_PATCH,
222     D3D11_13_CONTROL_POINT_PATCH	= D3D_13_CONTROL_POINT_PATCH,
223     D3D11_14_CONTROL_POINT_PATCH	= D3D_14_CONTROL_POINT_PATCH,
224     D3D11_15_CONTROL_POINT_PATCH	= D3D_15_CONTROL_POINT_PATCH,
225     D3D11_16_CONTROL_POINT_PATCH	= D3D_16_CONTROL_POINT_PATCH,
226     D3D11_17_CONTROL_POINT_PATCH	= D3D_17_CONTROL_POINT_PATCH,
227     D3D11_18_CONTROL_POINT_PATCH	= D3D_18_CONTROL_POINT_PATCH,
228     D3D11_19_CONTROL_POINT_PATCH	= D3D_19_CONTROL_POINT_PATCH,
229     D3D11_20_CONTROL_POINT_PATCH	= D3D_20_CONTROL_POINT_PATCH,
230     D3D11_21_CONTROL_POINT_PATCH	= D3D_21_CONTROL_POINT_PATCH,
231     D3D11_22_CONTROL_POINT_PATCH	= D3D_22_CONTROL_POINT_PATCH,
232     D3D11_23_CONTROL_POINT_PATCH	= D3D_23_CONTROL_POINT_PATCH,
233     D3D11_24_CONTROL_POINT_PATCH	= D3D_24_CONTROL_POINT_PATCH,
234     D3D11_25_CONTROL_POINT_PATCH	= D3D_25_CONTROL_POINT_PATCH,
235     D3D11_26_CONTROL_POINT_PATCH	= D3D_26_CONTROL_POINT_PATCH,
236     D3D11_27_CONTROL_POINT_PATCH	= D3D_27_CONTROL_POINT_PATCH,
237     D3D11_28_CONTROL_POINT_PATCH	= D3D_28_CONTROL_POINT_PATCH,
238     D3D11_29_CONTROL_POINT_PATCH	= D3D_29_CONTROL_POINT_PATCH,
239     D3D11_30_CONTROL_POINT_PATCH	= D3D_30_CONTROL_POINT_PATCH,
240     D3D11_31_CONTROL_POINT_PATCH	= D3D_31_CONTROL_POINT_PATCH,
241     D3D11_32_CONTROL_POINT_PATCH	= D3D_32_CONTROL_POINT_PATCH
242 }
243 
244 enum D3D_SRV_DIMENSION
245 {
246     D3D_UNKNOWN	= 0,
247     D3D_BUFFER	= 1,
248     D3D_TEXTURE1D	= 2,
249     D3D_TEXTURE1DARRAY	= 3,
250     D3D_TEXTURE2D	= 4,
251     D3D_TEXTURE2DARRAY	= 5,
252     D3D_TEXTURE2DMS	= 6,
253     D3D_TEXTURE2DMSARRAY	= 7,
254     D3D_TEXTURE3D	= 8,
255     D3D_TEXTURECUBE	= 9,
256     D3D_TEXTURECUBEARRAY	= 10,
257     D3D_BUFFEREX	= 11,
258     D3D10_UNKNOWN	= D3D_UNKNOWN,
259     D3D10_BUFFER	= D3D_BUFFER,
260     D3D10_TEXTURE1D	= D3D_TEXTURE1D,
261     D3D10_TEXTURE1DARRAY	= D3D_TEXTURE1DARRAY,
262     D3D10_TEXTURE2D	= D3D_TEXTURE2D,
263     D3D10_TEXTURE2DARRAY	= D3D_TEXTURE2DARRAY,
264     D3D10_TEXTURE2DMS	= D3D_TEXTURE2DMS,
265     D3D10_TEXTURE2DMSARRAY	= D3D_TEXTURE2DMSARRAY,
266     D3D10_TEXTURE3D	= D3D_TEXTURE3D,
267     D3D10_TEXTURECUBE	= D3D_TEXTURECUBE,
268     D3D10_1_UNKNOWN	= D3D_UNKNOWN,
269     D3D10_1_BUFFER	= D3D_BUFFER,
270     D3D10_1_TEXTURE1D	= D3D_TEXTURE1D,
271     D3D10_1_TEXTURE1DARRAY	= D3D_TEXTURE1DARRAY,
272     D3D10_1_TEXTURE2D	= D3D_TEXTURE2D,
273     D3D10_1_TEXTURE2DARRAY	= D3D_TEXTURE2DARRAY,
274     D3D10_1_TEXTURE2DMS	= D3D_TEXTURE2DMS,
275     D3D10_1_TEXTURE2DMSARRAY	= D3D_TEXTURE2DMSARRAY,
276     D3D10_1_TEXTURE3D	= D3D_TEXTURE3D,
277     D3D10_1_TEXTURECUBE	= D3D_TEXTURECUBE,
278     D3D10_1_TEXTURECUBEARRAY	= D3D_TEXTURECUBEARRAY,
279     D3D11_UNKNOWN	= D3D_UNKNOWN,
280     D3D11_BUFFER	= D3D_BUFFER,
281     D3D11_TEXTURE1D	= D3D_TEXTURE1D,
282     D3D11_TEXTURE1DARRAY	= D3D_TEXTURE1DARRAY,
283     D3D11_TEXTURE2D	= D3D_TEXTURE2D,
284     D3D11_TEXTURE2DARRAY	= D3D_TEXTURE2DARRAY,
285     D3D11_TEXTURE2DMS	= D3D_TEXTURE2DMS,
286     D3D11_TEXTURE2DMSARRAY	= D3D_TEXTURE2DMSARRAY,
287     D3D11_TEXTURE3D	= D3D_TEXTURE3D,
288     D3D11_TEXTURECUBE	= D3D_TEXTURECUBE,
289     D3D11_TEXTURECUBEARRAY	= D3D_TEXTURECUBEARRAY,
290     D3D11_BUFFEREX	= D3D_BUFFEREX
291 }
292 
293 enum D3D_INCLUDE_TYPE
294 {
295     D3D_LOCAL	= 0,
296     D3D_SYSTEM	= ( D3D_LOCAL + 1 ) ,
297     D3D10_LOCAL	= D3D_LOCAL,
298     D3D10_SYSTEM	= D3D_SYSTEM,
299     D3D_FORCE_DWORD	= 0x7fffffff
300 }
301 
302 enum D3D_SHADER_VARIABLE_CLASS
303 {
304     D3D_SCALAR	= 0,
305     D3D_VECTOR	= ( D3D_SCALAR + 1 ) ,
306     D3D_MATRIX_ROWS	= ( D3D_VECTOR + 1 ) ,
307     D3D_MATRIX_COLUMNS	= ( D3D_MATRIX_ROWS + 1 ) ,
308     D3D_OBJECT	= ( D3D_MATRIX_COLUMNS + 1 ) ,
309     D3D_STRUCT	= ( D3D_OBJECT + 1 ) ,
310     D3D_INTERFACE_CLASS	= ( D3D_STRUCT + 1 ) ,
311     D3D_INTERFACE_POINTER	= ( D3D_INTERFACE_CLASS + 1 ) ,
312     D3D10_SCALAR	= D3D_SCALAR,
313     D3D10_VECTOR	= D3D_VECTOR,
314     D3D10_MATRIX_ROWS	= D3D_MATRIX_ROWS,
315     D3D10_MATRIX_COLUMNS	= D3D_MATRIX_COLUMNS,
316     D3D10_OBJECT	= D3D_OBJECT,
317     D3D10_STRUCT	= D3D_STRUCT,
318     D3D11_INTERFACE_CLASS	= D3D_INTERFACE_CLASS,
319     D3D11_INTERFACE_POINTER	= D3D_INTERFACE_POINTER,
320     D3D_FORCE_DWORD	= 0x7fffffff
321 }
322 
323 enum D3D_SHADER_VARIABLE_FLAGS
324 {
325     D3D_USERPACKED	= 1,
326     D3D_USED	= 2,
327     D3D_INTERFACE_POINTER	= 4,
328     D3D_INTERFACE_PARAMETER	= 8,
329     D3D10_USERPACKED	= D3D_USERPACKED,
330     D3D10_USED	= D3D_USED,
331     D3D11_INTERFACE_POINTER	= D3D_INTERFACE_POINTER,
332     D3D11_INTERFACE_PARAMETER	= D3D_INTERFACE_PARAMETER,
333     D3D_FORCE_DWORD	= 0x7fffffff
334 }
335 
336 enum D3D_SHADER_VARIABLE_TYPE
337 {
338     D3D_VOID	= 0,
339     D3D_BOOL	= 1,
340     D3D_INT	= 2,
341     D3D_FLOAT	= 3,
342     D3D_STRING	= 4,
343     D3D_TEXTURE	= 5,
344     D3D_TEXTURE1D	= 6,
345     D3D_TEXTURE2D	= 7,
346     D3D_TEXTURE3D	= 8,
347     D3D_TEXTURECUBE	= 9,
348     D3D_SAMPLER	= 10,
349     D3D_SAMPLER1D	= 11,
350     D3D_SAMPLER2D	= 12,
351     D3D_SAMPLER3D	= 13,
352     D3D_SAMPLERCUBE	= 14,
353     D3D_PIXELSHADER	= 15,
354     D3D_VERTEXSHADER	= 16,
355     D3D_PIXELFRAGMENT	= 17,
356     D3D_VERTEXFRAGMENT	= 18,
357     D3D_UINT	= 19,
358     D3D_UINT8	= 20,
359     D3D_GEOMETRYSHADER	= 21,
360     D3D_RASTERIZER	= 22,
361     D3D_DEPTHSTENCIL	= 23,
362     D3D_BLEND	= 24,
363     D3D_BUFFER	= 25,
364     D3D_CBUFFER	= 26,
365     D3D_TBUFFER	= 27,
366     D3D_TEXTURE1DARRAY	= 28,
367     D3D_TEXTURE2DARRAY	= 29,
368     D3D_RENDERTARGETVIEW	= 30,
369     D3D_DEPTHSTENCILVIEW	= 31,
370     D3D_TEXTURE2DMS	= 32,
371     D3D_TEXTURE2DMSARRAY	= 33,
372     D3D_TEXTURECUBEARRAY	= 34,
373     D3D_HULLSHADER	= 35,
374     D3D_DOMAINSHADER	= 36,
375     D3D_INTERFACE_POINTER	= 37,
376     D3D_COMPUTESHADER	= 38,
377     D3D_DOUBLE	= 39,
378     D3D_RWTEXTURE1D	= 40,
379     D3D_RWTEXTURE1DARRAY	= 41,
380     D3D_RWTEXTURE2D	= 42,
381     D3D_RWTEXTURE2DARRAY	= 43,
382     D3D_RWTEXTURE3D	= 44,
383     D3D_RWBUFFER	= 45,
384     D3D_BYTEADDRESS_BUFFER	= 46,
385     D3D_RWBYTEADDRESS_BUFFER	= 47,
386     D3D_STRUCTURED_BUFFER	= 48,
387     D3D_RWSTRUCTURED_BUFFER	= 49,
388     D3D_APPEND_STRUCTURED_BUFFER	= 50,
389     D3D_CONSUME_STRUCTURED_BUFFER	= 51,
390     D3D_MIN8FLOAT	= 52,
391     D3D_MIN10FLOAT	= 53,
392     D3D_MIN16FLOAT	= 54,
393     D3D_MIN12INT	= 55,
394     D3D_MIN16INT	= 56,
395     D3D_MIN16UINT	= 57,
396     D3D10_VOID	= D3D_VOID,
397     D3D10_BOOL	= D3D_BOOL,
398     D3D10_INT	= D3D_INT,
399     D3D10_FLOAT	= D3D_FLOAT,
400     D3D10_STRING	= D3D_STRING,
401     D3D10_TEXTURE	= D3D_TEXTURE,
402     D3D10_TEXTURE1D	= D3D_TEXTURE1D,
403     D3D10_TEXTURE2D	= D3D_TEXTURE2D,
404     D3D10_TEXTURE3D	= D3D_TEXTURE3D,
405     D3D10_TEXTURECUBE	= D3D_TEXTURECUBE,
406     D3D10_SAMPLER	= D3D_SAMPLER,
407     D3D10_SAMPLER1D	= D3D_SAMPLER1D,
408     D3D10_SAMPLER2D	= D3D_SAMPLER2D,
409     D3D10_SAMPLER3D	= D3D_SAMPLER3D,
410     D3D10_SAMPLERCUBE	= D3D_SAMPLERCUBE,
411     D3D10_PIXELSHADER	= D3D_PIXELSHADER,
412     D3D10_VERTEXSHADER	= D3D_VERTEXSHADER,
413     D3D10_PIXELFRAGMENT	= D3D_PIXELFRAGMENT,
414     D3D10_VERTEXFRAGMENT	= D3D_VERTEXFRAGMENT,
415     D3D10_UINT	= D3D_UINT,
416     D3D10_UINT8	= D3D_UINT8,
417     D3D10_GEOMETRYSHADER	= D3D_GEOMETRYSHADER,
418     D3D10_RASTERIZER	= D3D_RASTERIZER,
419     D3D10_DEPTHSTENCIL	= D3D_DEPTHSTENCIL,
420     D3D10_BLEND	= D3D_BLEND,
421     D3D10_BUFFER	= D3D_BUFFER,
422     D3D10_CBUFFER	= D3D_CBUFFER,
423     D3D10_TBUFFER	= D3D_TBUFFER,
424     D3D10_TEXTURE1DARRAY	= D3D_TEXTURE1DARRAY,
425     D3D10_TEXTURE2DARRAY	= D3D_TEXTURE2DARRAY,
426     D3D10_RENDERTARGETVIEW	= D3D_RENDERTARGETVIEW,
427     D3D10_DEPTHSTENCILVIEW	= D3D_DEPTHSTENCILVIEW,
428     D3D10_TEXTURE2DMS	= D3D_TEXTURE2DMS,
429     D3D10_TEXTURE2DMSARRAY	= D3D_TEXTURE2DMSARRAY,
430     D3D10_TEXTURECUBEARRAY	= D3D_TEXTURECUBEARRAY,
431     D3D11_HULLSHADER	= D3D_HULLSHADER,
432     D3D11_DOMAINSHADER	= D3D_DOMAINSHADER,
433     D3D11_INTERFACE_POINTER	= D3D_INTERFACE_POINTER,
434     D3D11_COMPUTESHADER	= D3D_COMPUTESHADER,
435     D3D11_DOUBLE	= D3D_DOUBLE,
436     D3D11_RWTEXTURE1D	= D3D_RWTEXTURE1D,
437     D3D11_RWTEXTURE1DARRAY	= D3D_RWTEXTURE1DARRAY,
438     D3D11_RWTEXTURE2D	= D3D_RWTEXTURE2D,
439     D3D11_RWTEXTURE2DARRAY	= D3D_RWTEXTURE2DARRAY,
440     D3D11_RWTEXTURE3D	= D3D_RWTEXTURE3D,
441     D3D11_RWBUFFER	= D3D_RWBUFFER,
442     D3D11_BYTEADDRESS_BUFFER	= D3D_BYTEADDRESS_BUFFER,
443     D3D11_RWBYTEADDRESS_BUFFER	= D3D_RWBYTEADDRESS_BUFFER,
444     D3D11_STRUCTURED_BUFFER	= D3D_STRUCTURED_BUFFER,
445     D3D11_RWSTRUCTURED_BUFFER	= D3D_RWSTRUCTURED_BUFFER,
446     D3D11_APPEND_STRUCTURED_BUFFER	= D3D_APPEND_STRUCTURED_BUFFER,
447     D3D11_CONSUME_STRUCTURED_BUFFER	= D3D_CONSUME_STRUCTURED_BUFFER,
448     D3D_FORCE_DWORD	= 0x7fffffff
449 }
450 
451 enum D3D_SHADER_INPUT_FLAGS
452 {
453     D3D_USERPACKED	= 0x1,
454     D3D_COMPARISON_SAMPLER	= 0x2,
455     D3D_TEXTURE_COMPONENT_0	= 0x4,
456     D3D_TEXTURE_COMPONENT_1	= 0x8,
457     D3D_TEXTURE_COMPONENTS	= 0xc,
458     D3D_UNUSED	= 0x10,
459     D3D10_USERPACKED	= D3D_USERPACKED,
460     D3D10_COMPARISON_SAMPLER	= D3D_COMPARISON_SAMPLER,
461     D3D10_TEXTURE_COMPONENT_0	= D3D_TEXTURE_COMPONENT_0,
462     D3D10_TEXTURE_COMPONENT_1	= D3D_TEXTURE_COMPONENT_1,
463     D3D10_TEXTURE_COMPONENTS	= D3D_TEXTURE_COMPONENTS,
464     D3D_FORCE_DWORD	= 0x7fffffff
465 }
466 
467 enum D3D_SHADER_INPUT_TYPE
468 {
469     D3D_CBUFFER	= 0,
470     D3D_TBUFFER	= ( D3D_CBUFFER + 1 ) ,
471     D3D_TEXTURE	= ( D3D_TBUFFER + 1 ) ,
472     D3D_SAMPLER	= ( D3D_TEXTURE + 1 ) ,
473     D3D_UAV_RWTYPED	= ( D3D_SAMPLER + 1 ) ,
474     D3D_STRUCTURED	= ( D3D_UAV_RWTYPED + 1 ) ,
475     D3D_UAV_RWSTRUCTURED	= ( D3D_STRUCTURED + 1 ) ,
476     D3D_BYTEADDRESS	= ( D3D_UAV_RWSTRUCTURED + 1 ) ,
477     D3D_UAV_RWBYTEADDRESS	= ( D3D_BYTEADDRESS + 1 ) ,
478     D3D_UAV_APPEND_STRUCTURED	= ( D3D_UAV_RWBYTEADDRESS + 1 ) ,
479     D3D_UAV_CONSUME_STRUCTURED	= ( D3D_UAV_APPEND_STRUCTURED + 1 ) ,
480     D3D_UAV_RWSTRUCTURED_WITH_COUNTER	= ( D3D_UAV_CONSUME_STRUCTURED + 1 ) ,
481     D3D10_CBUFFER	= D3D_CBUFFER,
482     D3D10_TBUFFER	= D3D_TBUFFER,
483     D3D10_TEXTURE	= D3D_TEXTURE,
484     D3D10_SAMPLER	= D3D_SAMPLER,
485     D3D11_UAV_RWTYPED	= D3D_UAV_RWTYPED,
486     D3D11_STRUCTURED	= D3D_STRUCTURED,
487     D3D11_UAV_RWSTRUCTURED	= D3D_UAV_RWSTRUCTURED,
488     D3D11_BYTEADDRESS	= D3D_BYTEADDRESS,
489     D3D11_UAV_RWBYTEADDRESS	= D3D_UAV_RWBYTEADDRESS,
490     D3D11_UAV_APPEND_STRUCTURED	= D3D_UAV_APPEND_STRUCTURED,
491     D3D11_UAV_CONSUME_STRUCTURED	= D3D_UAV_CONSUME_STRUCTURED,
492     D3D11_UAV_RWSTRUCTURED_WITH_COUNTER	= D3D_UAV_RWSTRUCTURED_WITH_COUNTER
493 }
494 
495 enum D3D_SHADER_CBUFFER_FLAGS
496 {
497     D3D_USERPACKED	= 1,
498     D3D10_USERPACKED	= D3D_USERPACKED,
499     D3D_FORCE_DWORD	= 0x7fffffff
500 }
501 
502 enum D3D_CBUFFER_TYPE
503 {
504     D3D_CBUFFER	= 0,
505     D3D_TBUFFER	= ( D3D_CBUFFER + 1 ) ,
506     D3D_INTERFACE_POINTERS	= ( D3D_TBUFFER + 1 ) ,
507     D3D_RESOURCE_BIND_INFO	= ( D3D_INTERFACE_POINTERS + 1 ) ,
508     D3D10_CBUFFER	= D3D_CBUFFER,
509     D3D10_TBUFFER	= D3D_TBUFFER,
510     D3D11_CBUFFER	= D3D_CBUFFER,
511     D3D11_TBUFFER	= D3D_TBUFFER,
512     D3D11_INTERFACE_POINTERS	= D3D_INTERFACE_POINTERS,
513     D3D11_RESOURCE_BIND_INFO	= D3D_RESOURCE_BIND_INFO
514 }
515 
516 enum D3D_NAME
517 {
518     D3D_UNDEFINED	= 0,
519     D3D_POSITION	= 1,
520     D3D_CLIP_DISTANCE	= 2,
521     D3D_CULL_DISTANCE	= 3,
522     D3D_RENDER_TARGET_ARRAY_INDEX	= 4,
523     D3D_VIEWPORT_ARRAY_INDEX	= 5,
524     D3D_VERTEX_ID	= 6,
525     D3D_ID	= 7,
526     D3D_INSTANCE_ID	= 8,
527     D3D_IS_FRONT_FACE	= 9,
528     D3D_SAMPLE_INDEX	= 10,
529     D3D_FINAL_QUAD_EDGE_TESSFACTOR	= 11,
530     D3D_FINAL_QUAD_INSIDE_TESSFACTOR	= 12,
531     D3D_FINAL_TRI_EDGE_TESSFACTOR	= 13,
532     D3D_FINAL_TRI_INSIDE_TESSFACTOR	= 14,
533     D3D_FINAL_LINE_DETAIL_TESSFACTOR	= 15,
534     D3D_FINAL_LINE_DENSITY_TESSFACTOR	= 16,
535     D3D_BARYCENTRICS	= 23,
536     D3D_TARGET	= 64,
537     D3D_DEPTH	= 65,
538     D3D_COVERAGE	= 66,
539     D3D_DEPTH_GREATER_EQUAL	= 67,
540     D3D_DEPTH_LESS_EQUAL	= 68,
541     D3D_STENCIL_REF	= 69,
542     D3D_INNER_COVERAGE	= 70,
543     D3D10_UNDEFINED	= D3D_UNDEFINED,
544     D3D10_POSITION	= D3D_POSITION,
545     D3D10_CLIP_DISTANCE	= D3D_CLIP_DISTANCE,
546     D3D10_CULL_DISTANCE	= D3D_CULL_DISTANCE,
547     D3D10_RENDER_TARGET_ARRAY_INDEX	= D3D_RENDER_TARGET_ARRAY_INDEX,
548     D3D10_VIEWPORT_ARRAY_INDEX	= D3D_VIEWPORT_ARRAY_INDEX,
549     D3D10_VERTEX_ID	= D3D_VERTEX_ID,
550     D3D10_ID	= D3D_ID,
551     D3D10_INSTANCE_ID	= D3D_INSTANCE_ID,
552     D3D10_IS_FRONT_FACE	= D3D_IS_FRONT_FACE,
553     D3D10_SAMPLE_INDEX	= D3D_SAMPLE_INDEX,
554     D3D10_TARGET	= D3D_TARGET,
555     D3D10_DEPTH	= D3D_DEPTH,
556     D3D10_COVERAGE	= D3D_COVERAGE,
557     D3D11_FINAL_QUAD_EDGE_TESSFACTOR	= D3D_FINAL_QUAD_EDGE_TESSFACTOR,
558     D3D11_FINAL_QUAD_INSIDE_TESSFACTOR	= D3D_FINAL_QUAD_INSIDE_TESSFACTOR,
559     D3D11_FINAL_TRI_EDGE_TESSFACTOR	= D3D_FINAL_TRI_EDGE_TESSFACTOR,
560     D3D11_FINAL_TRI_INSIDE_TESSFACTOR	= D3D_FINAL_TRI_INSIDE_TESSFACTOR,
561     D3D11_FINAL_LINE_DETAIL_TESSFACTOR	= D3D_FINAL_LINE_DETAIL_TESSFACTOR,
562     D3D11_FINAL_LINE_DENSITY_TESSFACTOR	= D3D_FINAL_LINE_DENSITY_TESSFACTOR,
563     D3D11_DEPTH_GREATER_EQUAL	= D3D_DEPTH_GREATER_EQUAL,
564     D3D11_DEPTH_LESS_EQUAL	= D3D_DEPTH_LESS_EQUAL,
565     D3D11_STENCIL_REF	= D3D_STENCIL_REF,
566     D3D11_INNER_COVERAGE	= D3D_INNER_COVERAGE,
567     D3D12_BARYCENTRICS	= D3D_BARYCENTRICS
568 }
569 
570 enum D3D_RESOURCE_RETURN_TYPE
571 {
572     D3D_UNORM	= 1,
573     D3D_SNORM	= 2,
574     D3D_SINT	= 3,
575     D3D_UINT	= 4,
576     D3D_FLOAT	= 5,
577     D3D_MIXED	= 6,
578     D3D_DOUBLE	= 7,
579     D3D_CONTINUED	= 8,
580     D3D10_UNORM	= D3D_UNORM,
581     D3D10_SNORM	= D3D_SNORM,
582     D3D10_SINT	= D3D_SINT,
583     D3D10_UINT	= D3D_UINT,
584     D3D10_FLOAT	= D3D_FLOAT,
585     D3D10_MIXED	= D3D_MIXED,
586     D3D11_UNORM	= D3D_UNORM,
587     D3D11_SNORM	= D3D_SNORM,
588     D3D11_SINT	= D3D_SINT,
589     D3D11_UINT	= D3D_UINT,
590     D3D11_FLOAT	= D3D_FLOAT,
591     D3D11_MIXED	= D3D_MIXED,
592     D3D11_DOUBLE	= D3D_DOUBLE,
593     D3D11_CONTINUED	= D3D_CONTINUED
594 }
595 
596 enum D3D_REGISTER_COMPONENT_TYPE
597 {
598     D3D_UNKNOWN	= 0,
599     D3D_UINT32	= 1,
600     D3D_SINT32	= 2,
601     D3D_FLOAT32	= 3,
602     D3D10_UNKNOWN	= D3D_UNKNOWN,
603     D3D10_UINT32	= D3D_UINT32,
604     D3D10_SINT32	= D3D_SINT32,
605     D3D10_FLOAT32	= D3D_FLOAT32
606 }
607 
608 enum D3D_TESSELLATOR_DOMAIN
609 {
610     D3D_UNDEFINED	= 0,
611     D3D_ISOLINE	= 1,
612     D3D_TRI	= 2,
613     D3D_QUAD	= 3,
614     D3D11_UNDEFINED	= D3D_UNDEFINED,
615     D3D11_ISOLINE	= D3D_ISOLINE,
616     D3D11_TRI	= D3D_TRI,
617     D3D11_QUAD	= D3D_QUAD
618 }
619 
620 enum D3D_TESSELLATOR_PARTITIONING
621 {
622     D3D_UNDEFINED	= 0,
623     D3D_INTEGER	= 1,
624     D3D_POW2	= 2,
625     D3D_FRACTIONAL_ODD	= 3,
626     D3D_FRACTIONAL_EVEN	= 4,
627     D3D11_UNDEFINED	= D3D_UNDEFINED,
628     D3D11_INTEGER	= D3D_INTEGER,
629     D3D11_POW2	= D3D_POW2,
630     D3D11_FRACTIONAL_ODD	= D3D_FRACTIONAL_ODD,
631     D3D11_FRACTIONAL_EVEN	= D3D_FRACTIONAL_EVEN
632 }
633 
634 enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE
635 {
636     D3D_UNDEFINED	= 0,
637     D3D_POINT	= 1,
638     D3D_LINE	= 2,
639     D3D_TRIANGLE_CW	= 3,
640     D3D_TRIANGLE_CCW	= 4,
641     D3D11_UNDEFINED	= D3D_UNDEFINED,
642     D3D11_POINT	= D3D_POINT,
643     D3D11_LINE	= D3D_LINE,
644     D3D11_TRIANGLE_CW	= D3D_TRIANGLE_CW,
645     D3D11_TRIANGLE_CCW	= D3D_TRIANGLE_CCW
646 }
647 
648 enum D3D_MIN_PRECISION
649 {
650     DEFAULT	= 0,
651     FLOAT_16	= 1,
652     FLOAT_2_8	= 2,
653     RESERVED	= 3,
654     SINT_16	= 4,
655     UINT_16	= 5,
656     ANY_16	= 0xf0,
657     ANY_10	= 0xf1
658 }
659 
660 enum D3D_INTERPOLATION_MODE
661 {
662     UNDEFINED = 0,
663     CONSTANT = 1,
664     LINEAR = 2,
665     LINEAR_CENTROID	= 3,
666     LINEAR_NOPERSPECTIVE = 4,
667     LINEAR_NOPERSPECTIVE_CENTROID = 5,
668     LINEAR_SAMPLE = 6,
669     LINEAR_NOPERSPECTIVE_SAMPLE	= 7
670 }
671 
672 enum D3D_PARAMETER_FLAGS
673 {
674     NONE = 0,
675     IN = 0x1,
676     OUT	= 0x2,
677     FORCE_DWORD	= 0x7fffffff
678 }
679 
680 ///
681 /// Structures
682 ///
683 
684 struct D3D_SHADER_MACRO
685 {
686     const char *Name;
687     const char *Definition;
688 }
689 
690 ///
691 /// Interfaces
692 ///
693 
694 mixin(uuid!(ID3DDestructionNotifier, "a06eb39a-50da-425b-8c31-4eecd6c270f3"));
695 public interface ID3DDestructionNotifier : IUnknown
696 {
697 extern(Windows):
698     HRESULT RegisterDestructionCallback(void* delegate(void *pData) callbackFn, void *pData, uint *pCallbackID);
699     HRESULT UnregisterDestructionCallback(uint callbackID);
700 }
701 
702 mixin(uuid!(ID3D10Blob, "8BA5FB08-5195-40e2-AC58-0D989C3A0102"));
703 public interface ID3D10Blob : IUnknown
704 {
705 extern(Windows):
706     void *GetBufferPointer();
707     size_t GetBufferSize();
708 }
709 alias ID3D10Blob ID3DBlob;
710 
711 public interface ID3DInclude : IUnknown
712 {
713 extern(Windows):
714     HRESULT Open(D3D_INCLUDE_TYPE IncludeType, const void *pFileName, const void *pParentData, const void **ppData, uint *pBytes);
715     HRESULT Close(const void *pData);
716 }
717