]> git.cworth.org Git - apitrace/blob - specs/d3dcommon.py
d3dstate: Fix MSVC build.
[apitrace] / specs / d3dcommon.py
1 ##########################################################################
2 #
3 # Copyright 2012 Jose Fonseca
4 # All Rights Reserved.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 # THE SOFTWARE.
23 #
24 ##########################################################################/
25
26
27 from winapi import *
28
29
30 D3D_DRIVER_TYPE = Enum('D3D_DRIVER_TYPE', [
31     'D3D_DRIVER_TYPE_UNKNOWN',
32     'D3D_DRIVER_TYPE_HARDWARE',
33     'D3D_DRIVER_TYPE_REFERENCE',
34     'D3D_DRIVER_TYPE_NULL',
35     'D3D_DRIVER_TYPE_SOFTWARE',
36     'D3D_DRIVER_TYPE_WARP',
37 ])
38
39 D3D_FEATURE_LEVEL = Enum('D3D_FEATURE_LEVEL', [
40     'D3D_FEATURE_LEVEL_9_1',
41     'D3D_FEATURE_LEVEL_9_2',
42     'D3D_FEATURE_LEVEL_9_3',
43     'D3D_FEATURE_LEVEL_10_0',
44     'D3D_FEATURE_LEVEL_10_1',
45     'D3D_FEATURE_LEVEL_11_0',
46 ])
47
48 D3D_PRIMITIVE_TOPOLOGY = Enum('D3D_PRIMITIVE_TOPOLOGY', [
49     'D3D_PRIMITIVE_TOPOLOGY_UNDEFINED',
50     'D3D_PRIMITIVE_TOPOLOGY_POINTLIST',
51     'D3D_PRIMITIVE_TOPOLOGY_LINELIST',
52     'D3D_PRIMITIVE_TOPOLOGY_LINESTRIP',
53     'D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST',
54     'D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP',
55     'D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ',
56     'D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ',
57     'D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ',
58     'D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ',
59     'D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST',
60     'D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST',
61     'D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST',
62     'D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST',
63     'D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST',
64     'D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST',
65     'D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST',
66     'D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST',
67     'D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST',
68     'D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST',
69     'D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST',
70     'D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST',
71     'D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST',
72     'D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST',
73     'D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST',
74     'D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST',
75     'D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST',
76     'D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST',
77     'D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST',
78     'D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST',
79     'D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST',
80     'D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST',
81     'D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST',
82     'D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST',
83     'D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST',
84     'D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST',
85     'D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST',
86     'D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST',
87     'D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST',
88     'D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST',
89     'D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST',
90     'D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST',
91 ])
92
93 D3D10_PRIMITIVE_TOPOLOGY = Enum('D3D10_PRIMITIVE_TOPOLOGY', [
94     'D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED',
95     'D3D10_PRIMITIVE_TOPOLOGY_POINTLIST',
96     'D3D10_PRIMITIVE_TOPOLOGY_LINELIST',
97     'D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP',
98     'D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST',
99     'D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP',
100     'D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ',
101     'D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ',
102     'D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ',
103     'D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ',
104 ])
105
106 D3D11_PRIMITIVE_TOPOLOGY = Enum('D3D11_PRIMITIVE_TOPOLOGY', [
107     'D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED',
108     'D3D11_PRIMITIVE_TOPOLOGY_POINTLIST',
109     'D3D11_PRIMITIVE_TOPOLOGY_LINELIST',
110     'D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP',
111     'D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST',
112     'D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP',
113     'D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ',
114     'D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ',
115     'D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ',
116     'D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ',
117     'D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST',
118     'D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST',
119     'D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST',
120     'D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST',
121     'D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST',
122     'D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST',
123     'D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST',
124     'D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST',
125     'D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST',
126     'D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST',
127     'D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST',
128     'D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST',
129     'D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST',
130     'D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST',
131     'D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST',
132     'D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST',
133     'D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST',
134     'D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST',
135     'D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST',
136     'D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST',
137     'D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST',
138     'D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST',
139     'D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST',
140     'D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST',
141     'D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST',
142     'D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST',
143     'D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST',
144     'D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST',
145     'D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST',
146     'D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST',
147     'D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST',
148     'D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST',
149 ])
150
151 D3D_PRIMITIVE = Enum('D3D_PRIMITIVE', [
152     'D3D_PRIMITIVE_UNDEFINED',
153     'D3D_PRIMITIVE_POINT',
154     'D3D_PRIMITIVE_LINE',
155     'D3D_PRIMITIVE_TRIANGLE',
156     'D3D_PRIMITIVE_LINE_ADJ',
157     'D3D_PRIMITIVE_TRIANGLE_ADJ',
158     'D3D_PRIMITIVE_1_CONTROL_POINT_PATCH',
159     'D3D_PRIMITIVE_2_CONTROL_POINT_PATCH',
160     'D3D_PRIMITIVE_3_CONTROL_POINT_PATCH',
161     'D3D_PRIMITIVE_4_CONTROL_POINT_PATCH',
162     'D3D_PRIMITIVE_5_CONTROL_POINT_PATCH',
163     'D3D_PRIMITIVE_6_CONTROL_POINT_PATCH',
164     'D3D_PRIMITIVE_7_CONTROL_POINT_PATCH',
165     'D3D_PRIMITIVE_8_CONTROL_POINT_PATCH',
166     'D3D_PRIMITIVE_9_CONTROL_POINT_PATCH',
167     'D3D_PRIMITIVE_10_CONTROL_POINT_PATCH',
168     'D3D_PRIMITIVE_11_CONTROL_POINT_PATCH',
169     'D3D_PRIMITIVE_12_CONTROL_POINT_PATCH',
170     'D3D_PRIMITIVE_13_CONTROL_POINT_PATCH',
171     'D3D_PRIMITIVE_14_CONTROL_POINT_PATCH',
172     'D3D_PRIMITIVE_15_CONTROL_POINT_PATCH',
173     'D3D_PRIMITIVE_16_CONTROL_POINT_PATCH',
174     'D3D_PRIMITIVE_17_CONTROL_POINT_PATCH',
175     'D3D_PRIMITIVE_18_CONTROL_POINT_PATCH',
176     'D3D_PRIMITIVE_19_CONTROL_POINT_PATCH',
177     'D3D_PRIMITIVE_20_CONTROL_POINT_PATCH',
178     'D3D_PRIMITIVE_21_CONTROL_POINT_PATCH',
179     'D3D_PRIMITIVE_22_CONTROL_POINT_PATCH',
180     'D3D_PRIMITIVE_23_CONTROL_POINT_PATCH',
181     'D3D_PRIMITIVE_24_CONTROL_POINT_PATCH',
182     'D3D_PRIMITIVE_25_CONTROL_POINT_PATCH',
183     'D3D_PRIMITIVE_26_CONTROL_POINT_PATCH',
184     'D3D_PRIMITIVE_27_CONTROL_POINT_PATCH',
185     'D3D_PRIMITIVE_28_CONTROL_POINT_PATCH',
186     'D3D_PRIMITIVE_29_CONTROL_POINT_PATCH',
187     'D3D_PRIMITIVE_30_CONTROL_POINT_PATCH',
188     'D3D_PRIMITIVE_31_CONTROL_POINT_PATCH',
189     'D3D_PRIMITIVE_32_CONTROL_POINT_PATCH',
190 ])
191
192 D3D10_PRIMITIVE = Enum('D3D10_PRIMITIVE', [
193     'D3D10_PRIMITIVE_UNDEFINED',
194     'D3D10_PRIMITIVE_POINT',
195     'D3D10_PRIMITIVE_LINE',
196     'D3D10_PRIMITIVE_TRIANGLE',
197     'D3D10_PRIMITIVE_LINE_ADJ',
198     'D3D10_PRIMITIVE_TRIANGLE_ADJ',
199 ])
200
201 D3D11_PRIMITIVE = Enum('D3D11_PRIMITIVE', [
202     'D3D11_PRIMITIVE_UNDEFINED',
203     'D3D11_PRIMITIVE_POINT',
204     'D3D11_PRIMITIVE_LINE',
205     'D3D11_PRIMITIVE_TRIANGLE',
206     'D3D11_PRIMITIVE_LINE_ADJ',
207     'D3D11_PRIMITIVE_TRIANGLE_ADJ',
208     'D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH',
209     'D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH',
210     'D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH',
211     'D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH',
212     'D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH',
213     'D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH',
214     'D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH',
215     'D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH',
216     'D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH',
217     'D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH',
218     'D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH',
219     'D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH',
220     'D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH',
221     'D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH',
222     'D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH',
223     'D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH',
224     'D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH',
225     'D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH',
226     'D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH',
227     'D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH',
228     'D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH',
229     'D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH',
230     'D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH',
231     'D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH',
232     'D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH',
233     'D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH',
234     'D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH',
235     'D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH',
236     'D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH',
237     'D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH',
238     'D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH',
239     'D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH',
240 ])
241
242 D3D_SRV_DIMENSION = Enum('D3D_SRV_DIMENSION', [
243     'D3D_SRV_DIMENSION_UNKNOWN',
244     'D3D_SRV_DIMENSION_BUFFER',
245     'D3D_SRV_DIMENSION_TEXTURE1D',
246     'D3D_SRV_DIMENSION_TEXTURE1DARRAY',
247     'D3D_SRV_DIMENSION_TEXTURE2D',
248     'D3D_SRV_DIMENSION_TEXTURE2DARRAY',
249     'D3D_SRV_DIMENSION_TEXTURE2DMS',
250     'D3D_SRV_DIMENSION_TEXTURE2DMSARRAY',
251     'D3D_SRV_DIMENSION_TEXTURE3D',
252     'D3D_SRV_DIMENSION_TEXTURECUBE',
253     'D3D_SRV_DIMENSION_TEXTURECUBEARRAY',
254     'D3D_SRV_DIMENSION_BUFFEREX',
255 ])
256
257 D3D10_SRV_DIMENSION = Enum('D3D10_SRV_DIMENSION', [
258     'D3D10_SRV_DIMENSION_UNKNOWN',
259     'D3D10_SRV_DIMENSION_BUFFER',
260     'D3D10_SRV_DIMENSION_TEXTURE1D',
261     'D3D10_SRV_DIMENSION_TEXTURE1DARRAY',
262     'D3D10_SRV_DIMENSION_TEXTURE2D',
263     'D3D10_SRV_DIMENSION_TEXTURE2DARRAY',
264     'D3D10_SRV_DIMENSION_TEXTURE2DMS',
265     'D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY',
266     'D3D10_SRV_DIMENSION_TEXTURE3D',
267     'D3D10_SRV_DIMENSION_TEXTURECUBE',
268 ])
269
270 D3D10_SRV_DIMENSION1 = Enum('D3D10_SRV_DIMENSION1', [
271     'D3D10_1_SRV_DIMENSION_UNKNOWN',
272     'D3D10_1_SRV_DIMENSION_BUFFER',
273     'D3D10_1_SRV_DIMENSION_TEXTURE1D',
274     'D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY',
275     'D3D10_1_SRV_DIMENSION_TEXTURE2D',
276     'D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY',
277     'D3D10_1_SRV_DIMENSION_TEXTURE2DMS',
278     'D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY',
279     'D3D10_1_SRV_DIMENSION_TEXTURE3D',
280     'D3D10_1_SRV_DIMENSION_TEXTURECUBE',
281     'D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY',
282 ])
283
284 D3D11_SRV_DIMENSION = Enum('D3D11_SRV_DIMENSION', [
285     'D3D11_SRV_DIMENSION_UNKNOWN',
286     'D3D11_SRV_DIMENSION_BUFFER',
287     'D3D11_SRV_DIMENSION_TEXTURE1D',
288     'D3D11_SRV_DIMENSION_TEXTURE1DARRAY',
289     'D3D11_SRV_DIMENSION_TEXTURE2D',
290     'D3D11_SRV_DIMENSION_TEXTURE2DARRAY',
291     'D3D11_SRV_DIMENSION_TEXTURE2DMS',
292     'D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY',
293     'D3D11_SRV_DIMENSION_TEXTURE3D',
294     'D3D11_SRV_DIMENSION_TEXTURECUBE',
295     'D3D11_SRV_DIMENSION_TEXTURECUBEARRAY',
296     'D3D11_SRV_DIMENSION_BUFFEREX',
297 ])
298
299 D3D10_SHADER_MACRO = Struct('D3D10_SHADER_MACRO', [
300     (LPCSTR, 'Name'),
301     (LPCSTR, 'Definition'),
302 ])
303
304 ID3D10Blob = Interface('ID3D10Blob', IUnknown)
305 ID3D10Blob.methods += [
306     StdMethod(LPVOID, 'GetBufferPointer', [], sideeffects=False),
307     StdMethod(SIZE_T, 'GetBufferSize', [], sideeffects=False),
308 ]
309 LPD3D10BLOB = ObjPointer(ID3D10Blob)
310
311 D3D_INCLUDE_TYPE = Enum('D3D_INCLUDE_TYPE', [
312     'D3D_INCLUDE_LOCAL',
313     'D3D_INCLUDE_SYSTEM',
314 ])
315
316 D3D10_INCLUDE_TYPE = Enum('D3D10_INCLUDE_TYPE', [
317     'D3D10_INCLUDE_LOCAL',
318     'D3D10_INCLUDE_SYSTEM',
319 ])
320
321 ID3D10Include = Interface("ID3D10Include", IUnknown)
322 ID3D10Include.methods += [
323     StdMethod(HRESULT, "Open", [(D3D10_INCLUDE_TYPE, "IncludeType"), (LPCSTR, "pFileName"), (LPCVOID, "pParentData"), Out(Pointer(LPCVOID), "ppData"), Out(Pointer(UINT), "pBytes")]),
324     StdMethod(HRESULT, "Close", [(LPCVOID, "pData")]),
325 ]
326 # It is implemented by applications, not D3D runtime, so treat as opaque for
327 # now.
328 LPD3D10INCLUDE = OpaquePointer(ID3D10Include)
329
330 D3D_SHADER_VARIABLE_CLASS = Enum('D3D_SHADER_VARIABLE_CLASS', [
331     'D3D_SVC_SCALAR',
332     'D3D_SVC_VECTOR',
333     'D3D_SVC_MATRIX_ROWS',
334     'D3D_SVC_MATRIX_COLUMNS',
335     'D3D_SVC_OBJECT',
336     'D3D_SVC_STRUCT',
337     'D3D_SVC_INTERFACE_CLASS',
338     'D3D_SVC_INTERFACE_POINTER',
339 ])
340
341 D3D10_SHADER_VARIABLE_CLASS = Enum('D3D_SHADER_VARIABLE_CLASS', [
342     'D3D10_SVC_SCALAR',
343     'D3D10_SVC_VECTOR',
344     'D3D10_SVC_MATRIX_ROWS',
345     'D3D10_SVC_MATRIX_COLUMNS',
346     'D3D10_SVC_OBJECT',
347     'D3D10_SVC_STRUCT',
348 ])
349
350 D3D11_SHADER_VARIABLE_CLASS = Enum('D3D_SHADER_VARIABLE_CLASS', [
351     'D3D11_SVC_INTERFACE_CLASS',
352     'D3D11_SVC_INTERFACE_POINTER',
353 ])
354
355 D3D10_SHADER_VARIABLE_FLAGS = Enum('D3D10_SHADER_VARIABLE_FLAGS', [
356     'D3D_SVF_USERPACKED',
357     'D3D_SVF_USED',
358     'D3D_SVF_INTERFACE_POINTER',
359     'D3D_SVF_INTERFACE_PARAMETER',
360 ])
361
362 D3D11_SHADER_VARIABLE_FLAGS = Enum('D3D11_SHADER_VARIABLE_FLAGS', [
363     'D3D10_SVF_USERPACKED',
364     'D3D10_SVF_USED',
365     'D3D11_SVF_INTERFACE_POINTER',
366     'D3D11_SVF_INTERFACE_PARAMETER',
367 ])
368
369 D3D_SHADER_VARIABLE_TYPE = Enum('D3D_SHADER_VARIABLE_TYPE', [
370     'D3D_SVT_VOID',
371     'D3D_SVT_BOOL',
372     'D3D_SVT_INT',
373     'D3D_SVT_FLOAT',
374     'D3D_SVT_STRING',
375     'D3D_SVT_TEXTURE',
376     'D3D_SVT_TEXTURE1D',
377     'D3D_SVT_TEXTURE2D',
378     'D3D_SVT_TEXTURE3D',
379     'D3D_SVT_TEXTURECUBE',
380     'D3D_SVT_SAMPLER',
381     'D3D_SVT_SAMPLER1D',
382     'D3D_SVT_SAMPLER2D',
383     'D3D_SVT_SAMPLER3D',
384     'D3D_SVT_SAMPLERCUBE',
385     'D3D_SVT_PIXELSHADER',
386     'D3D_SVT_VERTEXSHADER',
387     'D3D_SVT_PIXELFRAGMENT',
388     'D3D_SVT_VERTEXFRAGMENT',
389     'D3D_SVT_UINT',
390     'D3D_SVT_UINT8',
391     'D3D_SVT_GEOMETRYSHADER',
392     'D3D_SVT_RASTERIZER',
393     'D3D_SVT_DEPTHSTENCIL',
394     'D3D_SVT_BLEND',
395     'D3D_SVT_BUFFER',
396     'D3D_SVT_CBUFFER',
397     'D3D_SVT_TBUFFER',
398     'D3D_SVT_TEXTURE1DARRAY',
399     'D3D_SVT_TEXTURE2DARRAY',
400     'D3D_SVT_RENDERTARGETVIEW',
401     'D3D_SVT_DEPTHSTENCILVIEW',
402     'D3D_SVT_TEXTURE2DMS',
403     'D3D_SVT_TEXTURE2DMSARRAY',
404     'D3D_SVT_TEXTURECUBEARRAY',
405     'D3D_SVT_HULLSHADER',
406     'D3D_SVT_DOMAINSHADER',
407     'D3D_SVT_INTERFACE_POINTER',
408     'D3D_SVT_COMPUTESHADER',
409     'D3D_SVT_DOUBLE',
410     'D3D_SVT_RWTEXTURE1D',
411     'D3D_SVT_RWTEXTURE1DARRAY',
412     'D3D_SVT_RWTEXTURE2D',
413     'D3D_SVT_RWTEXTURE2DARRAY',
414     'D3D_SVT_RWTEXTURE3D',
415     'D3D_SVT_RWBUFFER',
416     'D3D_SVT_BYTEADDRESS_BUFFER',
417     'D3D_SVT_RWBYTEADDRESS_BUFFER',
418     'D3D_SVT_STRUCTURED_BUFFER',
419     'D3D_SVT_RWSTRUCTURED_BUFFER',
420     'D3D_SVT_APPEND_STRUCTURED_BUFFER',
421     'D3D_SVT_CONSUME_STRUCTURED_BUFFER',
422 ])
423
424 D3D10_SHADER_VARIABLE_TYPE = Enum('D3D10_SHADER_VARIABLE_TYPE', [
425     'D3D10_SVT_VOID',
426     'D3D10_SVT_BOOL',
427     'D3D10_SVT_INT',
428     'D3D10_SVT_FLOAT',
429     'D3D10_SVT_STRING',
430     'D3D10_SVT_TEXTURE',
431     'D3D10_SVT_TEXTURE1D',
432     'D3D10_SVT_TEXTURE2D',
433     'D3D10_SVT_TEXTURE3D',
434     'D3D10_SVT_TEXTURECUBE',
435     'D3D10_SVT_SAMPLER',
436     'D3D10_SVT_SAMPLER1D',
437     'D3D10_SVT_SAMPLER2D',
438     'D3D10_SVT_SAMPLER3D',
439     'D3D10_SVT_SAMPLERCUBE',
440     'D3D10_SVT_PIXELSHADER',
441     'D3D10_SVT_VERTEXSHADER',
442     'D3D10_SVT_PIXELFRAGMENT',
443     'D3D10_SVT_VERTEXFRAGMENT',
444     'D3D10_SVT_UINT',
445     'D3D10_SVT_UINT8',
446     'D3D10_SVT_GEOMETRYSHADER',
447     'D3D10_SVT_RASTERIZER',
448     'D3D10_SVT_DEPTHSTENCIL',
449     'D3D10_SVT_BLEND',
450     'D3D10_SVT_BUFFER',
451     'D3D10_SVT_CBUFFER',
452     'D3D10_SVT_TBUFFER',
453     'D3D10_SVT_TEXTURE1DARRAY',
454     'D3D10_SVT_TEXTURE2DARRAY',
455     'D3D10_SVT_RENDERTARGETVIEW',
456     'D3D10_SVT_DEPTHSTENCILVIEW',
457     'D3D10_SVT_TEXTURE2DMS',
458     'D3D10_SVT_TEXTURE2DMSARRAY',
459     'D3D10_SVT_TEXTURECUBEARRAY',
460 ])
461
462 D3D11_SHADER_VARIABLE_TYPE = Enum('D3D11_SHADER_VARIABLE_TYPE', [
463     'D3D11_SVT_HULLSHADER',
464     'D3D11_SVT_DOMAINSHADER',
465     'D3D11_SVT_INTERFACE_POINTER',
466     'D3D11_SVT_COMPUTESHADER',
467     'D3D11_SVT_DOUBLE',
468     'D3D11_SVT_RWTEXTURE1D',
469     'D3D11_SVT_RWTEXTURE1DARRAY',
470     'D3D11_SVT_RWTEXTURE2D',
471     'D3D11_SVT_RWTEXTURE2DARRAY',
472     'D3D11_SVT_RWTEXTURE3D',
473     'D3D11_SVT_RWBUFFER',
474     'D3D11_SVT_BYTEADDRESS_BUFFER',
475     'D3D11_SVT_RWBYTEADDRESS_BUFFER',
476     'D3D11_SVT_STRUCTURED_BUFFER',
477     'D3D11_SVT_RWSTRUCTURED_BUFFER',
478     'D3D11_SVT_APPEND_STRUCTURED_BUFFER',
479     'D3D11_SVT_CONSUME_STRUCTURED_BUFFER',
480 ])
481
482 D3D_SHADER_INPUT_FLAGS = Enum('D3D_SHADER_INPUT_FLAGS', [
483     'D3D_SIF_USERPACKED',
484     'D3D_SIF_COMPARISON_SAMPLER',
485     'D3D_SIF_TEXTURE_COMPONENT_0',
486     'D3D_SIF_TEXTURE_COMPONENT_1',
487     'D3D_SIF_TEXTURE_COMPONENTS',
488 ])
489
490 D3D10_SHADER_INPUT_FLAGS = Enum('D3D10_SHADER_INPUT_FLAGS', [
491     'D3D10_SIF_USERPACKED',
492     'D3D10_SIF_COMPARISON_SAMPLER',
493     'D3D10_SIF_TEXTURE_COMPONENT_0',
494     'D3D10_SIF_TEXTURE_COMPONENT_1',
495     'D3D10_SIF_TEXTURE_COMPONENTS',
496 ])
497
498 D3D_SHADER_INPUT_TYPE = Enum('D3D_SHADER_INPUT_TYPE', [
499     'D3D_SIT_CBUFFER',
500     'D3D_SIT_TBUFFER',
501     'D3D_SIT_TEXTURE',
502     'D3D_SIT_SAMPLER',
503     'D3D_SIT_UAV_RWTYPED',
504     'D3D_SIT_STRUCTURED',
505     'D3D_SIT_UAV_RWSTRUCTURED',
506     'D3D_SIT_BYTEADDRESS',
507     'D3D_SIT_UAV_RWBYTEADDRESS',
508     'D3D_SIT_UAV_APPEND_STRUCTURED',
509     'D3D_SIT_UAV_CONSUME_STRUCTURED',
510     'D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER',
511 ])
512
513 D3D10_SHADER_INPUT_TYPE = Enum('D3D10_SHADER_INPUT_TYPE', [
514     'D3D10_SIT_CBUFFER',
515     'D3D10_SIT_TBUFFER',
516     'D3D10_SIT_TEXTURE',
517     'D3D10_SIT_SAMPLER',
518 ])
519
520 D3D11_SHADER_INPUT_TYPE = Enum('D3D11_SHADER_INPUT_TYPE', [
521     'D3D11_SIT_UAV_RWTYPED',
522     'D3D11_SIT_STRUCTURED',
523     'D3D11_SIT_UAV_RWSTRUCTURED',
524     'D3D11_SIT_BYTEADDRESS',
525     'D3D11_SIT_UAV_RWBYTEADDRESS',
526     'D3D11_SIT_UAV_APPEND_STRUCTURED',
527     'D3D11_SIT_UAV_CONSUME_STRUCTURED',
528     'D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER',
529 ])
530
531 D3D_SHADER_CBUFFER_FLAGS = Enum('D3D_SHADER_CBUFFER_FLAGS', [
532     'D3D_CBF_USERPACKED',
533 ])
534
535 D3D10_SHADER_CBUFFER_FLAGS = Enum('D3D10_SHADER_CBUFFER_FLAGS', [
536     'D3D10_CBF_USERPACKED',
537 ])
538
539 D3D_CBUFFER_TYPE = Enum('D3D_CBUFFER_TYPE', [
540     'D3D_CT_CBUFFER',
541     'D3D_CT_TBUFFER',
542     'D3D_CT_INTERFACE_POINTERS',
543     'D3D_CT_RESOURCE_BIND_INFO',
544 ])
545
546 D3D10_CBUFFER_TYPE = Enum('D3D10_CBUFFER_TYPE', [
547     'D3D10_CT_CBUFFER',
548     'D3D10_CT_TBUFFER',
549 ])
550
551 D3D11_CBUFFER_TYPE = Enum('D3D11_CBUFFER_TYPE', [
552     'D3D11_CT_CBUFFER',
553     'D3D11_CT_TBUFFER',
554     'D3D11_CT_INTERFACE_POINTERS',
555     'D3D11_CT_RESOURCE_BIND_INFO',
556 ])
557
558 D3D_NAME = Enum('D3D_NAME', [
559     'D3D_NAME_UNDEFINED',
560     'D3D_NAME_POSITION',
561     'D3D_NAME_CLIP_DISTANCE',
562     'D3D_NAME_CULL_DISTANCE',
563     'D3D_NAME_RENDER_TARGET_ARRAY_INDEX',
564     'D3D_NAME_VIEWPORT_ARRAY_INDEX',
565     'D3D_NAME_VERTEX_ID',
566     'D3D_NAME_PRIMITIVE_ID',
567     'D3D_NAME_INSTANCE_ID',
568     'D3D_NAME_IS_FRONT_FACE',
569     'D3D_NAME_SAMPLE_INDEX',
570     'D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR',
571     'D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR',
572     'D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR',
573     'D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR',
574     'D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR',
575     'D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR',
576     'D3D_NAME_TARGET',
577     'D3D_NAME_DEPTH',
578     'D3D_NAME_COVERAGE',
579     'D3D_NAME_DEPTH_GREATER_EQUAL',
580     'D3D_NAME_DEPTH_LESS_EQUAL',
581 ])
582
583 D3D10_NAME = Enum('D3D10_NAME', [
584     'D3D10_NAME_UNDEFINED',
585     'D3D10_NAME_POSITION',
586     'D3D10_NAME_CLIP_DISTANCE',
587     'D3D10_NAME_CULL_DISTANCE',
588     'D3D10_NAME_RENDER_TARGET_ARRAY_INDEX',
589     'D3D10_NAME_VIEWPORT_ARRAY_INDEX',
590     'D3D10_NAME_VERTEX_ID',
591     'D3D10_NAME_PRIMITIVE_ID',
592     'D3D10_NAME_INSTANCE_ID',
593     'D3D10_NAME_IS_FRONT_FACE',
594     'D3D10_NAME_SAMPLE_INDEX',
595     'D3D10_NAME_TARGET',
596     'D3D10_NAME_DEPTH',
597     'D3D10_NAME_COVERAGE',
598 ])
599
600 D3D11_NAME = Enum('D3D11_NAME', [
601     'D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR',
602     'D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR',
603     'D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR',
604     'D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR',
605     'D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR',
606     'D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR',
607     'D3D11_NAME_DEPTH_GREATER_EQUAL',
608     'D3D11_NAME_DEPTH_LESS_EQUAL',
609 ])
610
611 D3D_RESOURCE_RETURN_TYPE = Enum('D3D_RESOURCE_RETURN_TYPE', [
612     'D3D_RETURN_TYPE_UNORM',
613     'D3D_RETURN_TYPE_SNORM',
614     'D3D_RETURN_TYPE_SINT',
615     'D3D_RETURN_TYPE_UINT',
616     'D3D_RETURN_TYPE_FLOAT',
617     'D3D_RETURN_TYPE_MIXED',
618     'D3D_RETURN_TYPE_DOUBLE',
619     'D3D_RETURN_TYPE_CONTINUED',
620 ])
621
622 D3D10_RESOURCE_RETURN_TYPE = Enum('D3D10_RESOURCE_RETURN_TYPE', [
623     'D3D10_RETURN_TYPE_UNORM',
624     'D3D10_RETURN_TYPE_SNORM',
625     'D3D10_RETURN_TYPE_SINT',
626     'D3D10_RETURN_TYPE_UINT',
627     'D3D10_RETURN_TYPE_FLOAT',
628     'D3D10_RETURN_TYPE_MIXED',
629 ])
630
631 D3D11_RESOURCE_RETURN_TYPE = Enum('D3D11_RESOURCE_RETURN_TYPE', [
632     'D3D11_RETURN_TYPE_UNORM',
633     'D3D11_RETURN_TYPE_SNORM',
634     'D3D11_RETURN_TYPE_SINT',
635     'D3D11_RETURN_TYPE_UINT',
636     'D3D11_RETURN_TYPE_FLOAT',
637     'D3D11_RETURN_TYPE_MIXED',
638     'D3D11_RETURN_TYPE_DOUBLE',
639     'D3D11_RETURN_TYPE_CONTINUED',
640 ])
641
642 D3D_REGISTER_COMPONENT_TYPE = Enum('D3D_REGISTER_COMPONENT_TYPE', [
643     'D3D_REGISTER_COMPONENT_UNKNOWN',
644     'D3D_REGISTER_COMPONENT_UINT32',
645     'D3D_REGISTER_COMPONENT_SINT32',
646     'D3D_REGISTER_COMPONENT_FLOAT32',
647 ])
648
649 D3D10_REGISTER_COMPONENT_TYPE = Enum('D3D10_REGISTER_COMPONENT_TYPE', [
650     'D3D10_REGISTER_COMPONENT_UNKNOWN',
651     'D3D10_REGISTER_COMPONENT_UINT32',
652     'D3D10_REGISTER_COMPONENT_SINT32',
653     'D3D10_REGISTER_COMPONENT_FLOAT32',
654 ])
655
656 D3D_TESSELLATOR_DOMAIN = Enum('D3D_TESSELLATOR_DOMAIN', [
657     'D3D_TESSELLATOR_DOMAIN_UNDEFINED',
658     'D3D_TESSELLATOR_DOMAIN_ISOLINE',
659     'D3D_TESSELLATOR_DOMAIN_TRI',
660     'D3D_TESSELLATOR_DOMAIN_QUAD',
661 ])
662
663 D3D11_TESSELLATOR_DOMAIN = Enum('D3D11_TESSELLATOR_DOMAIN', [
664     'D3D11_TESSELLATOR_DOMAIN_UNDEFINED',
665     'D3D11_TESSELLATOR_DOMAIN_ISOLINE',
666     'D3D11_TESSELLATOR_DOMAIN_TRI',
667     'D3D11_TESSELLATOR_DOMAIN_QUAD',
668 ])
669
670 D3D_TESSELLATOR_PARTITIONING = Enum('D3D_TESSELLATOR_PARTITIONING', [
671     'D3D_TESSELLATOR_PARTITIONING_UNDEFINED',
672     'D3D_TESSELLATOR_PARTITIONING_INTEGER',
673     'D3D_TESSELLATOR_PARTITIONING_POW2',
674     'D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD',
675     'D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN',
676 ])
677
678 D3D11_TESSELLATOR_PARTITIONING = Enum('D3D11_TESSELLATOR_PARTITIONING', [
679     'D3D11_TESSELLATOR_PARTITIONING_UNDEFINED',
680     'D3D11_TESSELLATOR_PARTITIONING_INTEGER',
681     'D3D11_TESSELLATOR_PARTITIONING_POW2',
682     'D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD',
683     'D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN',
684 ])
685
686 D3D_TESSELLATOR_OUTPUT_PRIMITIVE = Enum('D3D_TESSELLATOR_OUTPUT_PRIMITIVE', [
687     'D3D_TESSELLATOR_OUTPUT_UNDEFINED',
688     'D3D_TESSELLATOR_OUTPUT_POINT',
689     'D3D_TESSELLATOR_OUTPUT_LINE',
690     'D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW',
691     'D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW',
692 ])
693
694 D3D11_TESSELLATOR_OUTPUT_PRIMITIVE = Enum('D3D11_TESSELLATOR_OUTPUT_PRIMITIVE', [
695     'D3D11_TESSELLATOR_OUTPUT_UNDEFINED',
696     'D3D11_TESSELLATOR_OUTPUT_POINT',
697     'D3D11_TESSELLATOR_OUTPUT_LINE',
698     'D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW',
699     'D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW',
700 ])
701