blob: 3f60b6942b2b206f0e647bf292f6ed4f1547a83a [file] [log] [blame]
José Fonsecaaf7d2312011-07-07 10:16:57 +01001##########################################################################
2#
3# Copyright 2011 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
José Fonseca5b6fb752012-04-14 14:56:45 +010026
José Fonsecaaf7d2312011-07-07 10:16:57 +010027from dxgi import *
José Fonseca5b6fb752012-04-14 14:56:45 +010028from d3dcommon import *
29
José Fonsecaaf7d2312011-07-07 10:16:57 +010030
José Fonseca73841ad2012-04-16 20:47:56 +010031HRESULT = MAKE_HRESULT([
José Fonseca1e1676f2012-04-05 11:18:27 +010032 "D3D10_ERROR_FILE_NOT_FOUND",
33 "D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS",
34 "D3DERR_INVALIDCALL",
35 "D3DERR_WASSTILLDRAWING",
José Fonseca1e1676f2012-04-05 11:18:27 +010036])
37
José Fonsecaaf7d2312011-07-07 10:16:57 +010038D3D10_BLEND = Enum("D3D10_BLEND", [
39 "D3D10_BLEND_ZERO",
40 "D3D10_BLEND_ONE",
41 "D3D10_BLEND_SRC_COLOR",
42 "D3D10_BLEND_INV_SRC_COLOR",
43 "D3D10_BLEND_SRC_ALPHA",
44 "D3D10_BLEND_INV_SRC_ALPHA",
45 "D3D10_BLEND_DEST_ALPHA",
46 "D3D10_BLEND_INV_DEST_ALPHA",
47 "D3D10_BLEND_DEST_COLOR",
48 "D3D10_BLEND_INV_DEST_COLOR",
49 "D3D10_BLEND_SRC_ALPHA_SAT",
50 "D3D10_BLEND_BLEND_FACTOR",
51 "D3D10_BLEND_INV_BLEND_FACTOR",
52 "D3D10_BLEND_SRC1_COLOR",
53 "D3D10_BLEND_INV_SRC1_COLOR",
54 "D3D10_BLEND_SRC1_ALPHA",
55 "D3D10_BLEND_INV_SRC1_ALPHA",
56])
57
58D3D10_BLEND_OP = Enum("D3D10_BLEND_OP", [
59 "D3D10_BLEND_OP_ADD",
60 "D3D10_BLEND_OP_SUBTRACT",
61 "D3D10_BLEND_OP_REV_SUBTRACT",
62 "D3D10_BLEND_OP_MIN",
63 "D3D10_BLEND_OP_MAX",
64])
65
66D3D10_BLEND_DESC = Struct("D3D10_BLEND_DESC", [
67 (BOOL, "AlphaToCoverageEnable"),
José Fonseca44756652011-10-15 10:26:30 +010068 (Array(BOOL, 8), "BlendEnable"),
José Fonsecaaf7d2312011-07-07 10:16:57 +010069 (D3D10_BLEND, "SrcBlend"),
70 (D3D10_BLEND, "DestBlend"),
71 (D3D10_BLEND_OP, "BlendOp"),
72 (D3D10_BLEND, "SrcBlendAlpha"),
73 (D3D10_BLEND, "DestBlendAlpha"),
74 (D3D10_BLEND_OP, "BlendOpAlpha"),
José Fonseca44756652011-10-15 10:26:30 +010075 (Array(UINT8, 8), "RenderTargetWriteMask"),
José Fonsecaaf7d2312011-07-07 10:16:57 +010076])
77
78D3D10_DEPTH_WRITE_MASK = Enum("D3D10_DEPTH_WRITE_MASK", [
79 "D3D10_DEPTH_WRITE_MASK_ZERO",
80 "D3D10_DEPTH_WRITE_MASK_ALL",
81])
82
83D3D10_COMPARISON_FUNC = Enum("D3D10_COMPARISON_FUNC", [
84 "D3D10_COMPARISON_NEVER",
85 "D3D10_COMPARISON_LESS",
86 "D3D10_COMPARISON_EQUAL",
87 "D3D10_COMPARISON_LESS_EQUAL",
88 "D3D10_COMPARISON_GREATER",
89 "D3D10_COMPARISON_NOT_EQUAL",
90 "D3D10_COMPARISON_GREATER_EQUAL",
91 "D3D10_COMPARISON_ALWAYS",
92])
93
94D3D10_STENCIL_OP = Enum("D3D10_STENCIL_OP", [
95 "D3D10_STENCIL_OP_KEEP",
96 "D3D10_STENCIL_OP_ZERO",
97 "D3D10_STENCIL_OP_REPLACE",
98 "D3D10_STENCIL_OP_INCR_SAT",
99 "D3D10_STENCIL_OP_DECR_SAT",
100 "D3D10_STENCIL_OP_INVERT",
101 "D3D10_STENCIL_OP_INCR",
102 "D3D10_STENCIL_OP_DECR",
103])
104
105D3D10_DEPTH_STENCILOP_DESC = Struct("D3D10_DEPTH_STENCILOP_DESC", [
106 (D3D10_STENCIL_OP, "StencilFailOp"),
107 (D3D10_STENCIL_OP, "StencilDepthFailOp"),
108 (D3D10_STENCIL_OP, "StencilPassOp"),
109 (D3D10_COMPARISON_FUNC, "StencilFunc"),
110])
111
112D3D10_DEPTH_STENCIL_DESC = Struct("D3D10_DEPTH_STENCIL_DESC", [
113 (BOOL, "DepthEnable"),
114 (D3D10_DEPTH_WRITE_MASK, "DepthWriteMask"),
115 (D3D10_COMPARISON_FUNC, "DepthFunc"),
116 (BOOL, "StencilEnable"),
117 (UINT8, "StencilReadMask"),
118 (UINT8, "StencilWriteMask"),
119 (D3D10_DEPTH_STENCILOP_DESC, "FrontFace"),
120 (D3D10_DEPTH_STENCILOP_DESC, "BackFace"),
121])
122
123D3D10_FILL_MODE = Enum("D3D10_FILL_MODE", [
124 "D3D10_FILL_WIREFRAME",
125 "D3D10_FILL_SOLID",
126])
127
128D3D10_CULL_MODE = Enum("D3D10_CULL_MODE", [
129 "D3D10_CULL_NONE",
130 "D3D10_CULL_FRONT",
131 "D3D10_CULL_BACK",
132])
133
134D3D10_RASTERIZER_DESC = Struct("D3D10_RASTERIZER_DESC", [
135 (D3D10_FILL_MODE, "FillMode"),
136 (D3D10_CULL_MODE, "CullMode"),
137 (BOOL, "FrontCounterClockwise"),
138 (INT, "DepthBias"),
139 (FLOAT, "DepthBiasClamp"),
140 (FLOAT, "SlopeScaledDepthBias"),
141 (BOOL, "DepthClipEnable"),
142 (BOOL, "ScissorEnable"),
143 (BOOL, "MultisampleEnable"),
144 (BOOL, "AntialiasedLineEnable"),
145])
146
147D3D10_FILTER = Enum("D3D10_FILTER", [
148 "D3D10_FILTER_MIN_MAG_MIP_POINT",
149 "D3D10_FILTER_MIN_MAG_POINT_MIP_LINEAR",
150 "D3D10_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT",
151 "D3D10_FILTER_MIN_POINT_MAG_MIP_LINEAR",
152 "D3D10_FILTER_MIN_LINEAR_MAG_MIP_POINT",
153 "D3D10_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR",
154 "D3D10_FILTER_MIN_MAG_LINEAR_MIP_POINT",
155 "D3D10_FILTER_MIN_MAG_MIP_LINEAR",
156 "D3D10_FILTER_ANISOTROPIC",
157 "D3D10_FILTER_COMPARISON_MIN_MAG_MIP_POINT",
158 "D3D10_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR",
159 "D3D10_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT",
160 "D3D10_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR",
161 "D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT",
162 "D3D10_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR",
163 "D3D10_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT",
164 "D3D10_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR",
165 "D3D10_FILTER_COMPARISON_ANISOTROPIC",
166 "D3D10_FILTER_TEXT_1BIT",
167])
168
169D3D10_TEXTURE_ADDRESS_MODE = Enum("D3D10_TEXTURE_ADDRESS_MODE", [
170 "D3D10_TEXTURE_ADDRESS_WRAP",
171 "D3D10_TEXTURE_ADDRESS_MIRROR",
172 "D3D10_TEXTURE_ADDRESS_CLAMP",
173 "D3D10_TEXTURE_ADDRESS_BORDER",
174 "D3D10_TEXTURE_ADDRESS_MIRROR_ONCE",
175])
176
177D3D10_SAMPLER_DESC = Struct("D3D10_SAMPLER_DESC", [
178 (D3D10_FILTER, "Filter"),
179 (D3D10_TEXTURE_ADDRESS_MODE, "AddressU"),
180 (D3D10_TEXTURE_ADDRESS_MODE, "AddressV"),
181 (D3D10_TEXTURE_ADDRESS_MODE, "AddressW"),
182 (FLOAT, "MipLODBias"),
183 (UINT, "MaxAnisotropy"),
184 (D3D10_COMPARISON_FUNC, "ComparisonFunc"),
José Fonseca44756652011-10-15 10:26:30 +0100185 (Array(FLOAT, 4), "BorderColor"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100186 (FLOAT, "MinLOD"),
187 (FLOAT, "MaxLOD"),
188])
189
José Fonsecaee590be2012-04-16 13:25:06 +0100190D3D10_FORMAT_SUPPORT = Flags(UINT, [
191 "D3D10_FORMAT_SUPPORT_BUFFER",
192 "D3D10_FORMAT_SUPPORT_IA_VERTEX_BUFFER",
193 "D3D10_FORMAT_SUPPORT_IA_INDEX_BUFFER",
194 "D3D10_FORMAT_SUPPORT_SO_BUFFER",
195 "D3D10_FORMAT_SUPPORT_TEXTURE1D",
196 "D3D10_FORMAT_SUPPORT_TEXTURE2D",
197 "D3D10_FORMAT_SUPPORT_TEXTURE3D",
198 "D3D10_FORMAT_SUPPORT_TEXTURECUBE",
199 "D3D10_FORMAT_SUPPORT_SHADER_LOAD",
200 "D3D10_FORMAT_SUPPORT_SHADER_SAMPLE",
201 "D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON",
202 "D3D10_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT",
203 "D3D10_FORMAT_SUPPORT_MIP",
204 "D3D10_FORMAT_SUPPORT_MIP_AUTOGEN",
205 "D3D10_FORMAT_SUPPORT_RENDER_TARGET",
206 "D3D10_FORMAT_SUPPORT_BLENDABLE",
207 "D3D10_FORMAT_SUPPORT_DEPTH_STENCIL",
208 "D3D10_FORMAT_SUPPORT_CPU_LOCKABLE",
209 "D3D10_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE",
210 "D3D10_FORMAT_SUPPORT_DISPLAY",
211 "D3D10_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT",
212 "D3D10_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET",
213 "D3D10_FORMAT_SUPPORT_MULTISAMPLE_LOAD",
214 "D3D10_FORMAT_SUPPORT_SHADER_GATHER",
José Fonseca5b9ac332012-11-20 15:23:14 +0000215 "D3D10_FORMAT_SUPPORT_BACK_BUFFER_CAST",
José Fonsecaee590be2012-04-16 13:25:06 +0100216])
217
José Fonsecaaf7d2312011-07-07 10:16:57 +0100218D3D10_COUNTER = Enum("D3D10_COUNTER", [
219 "D3D10_COUNTER_GPU_IDLE",
220 "D3D10_COUNTER_VERTEX_PROCESSING",
221 "D3D10_COUNTER_GEOMETRY_PROCESSING",
222 "D3D10_COUNTER_PIXEL_PROCESSING",
223 "D3D10_COUNTER_OTHER_GPU_PROCESSING",
224 "D3D10_COUNTER_HOST_ADAPTER_BANDWIDTH_UTILIZATION",
225 "D3D10_COUNTER_LOCAL_VIDMEM_BANDWIDTH_UTILIZATION",
226 "D3D10_COUNTER_VERTEX_THROUGHPUT_UTILIZATION",
227 "D3D10_COUNTER_TRIANGLE_SETUP_THROUGHPUT_UTILIZATION",
228 "D3D10_COUNTER_FILLRATE_THROUGHPUT_UTILIZATION",
229 "D3D10_COUNTER_VS_MEMORY_LIMITED",
230 "D3D10_COUNTER_VS_COMPUTATION_LIMITED",
231 "D3D10_COUNTER_GS_MEMORY_LIMITED",
232 "D3D10_COUNTER_GS_COMPUTATION_LIMITED",
233 "D3D10_COUNTER_PS_MEMORY_LIMITED",
234 "D3D10_COUNTER_PS_COMPUTATION_LIMITED",
235 "D3D10_COUNTER_POST_TRANSFORM_CACHE_HIT_RATE",
236 "D3D10_COUNTER_TEXTURE_CACHE_HIT_RATE",
237 "D3D10_COUNTER_DEVICE_DEPENDENT_0",
238])
239
240D3D10_COUNTER_DESC = Struct("D3D10_COUNTER_DESC", [
241 (D3D10_COUNTER, "Counter"),
242 (UINT, "MiscFlags"),
243])
244
245D3D10_COUNTER_TYPE = Enum("D3D10_COUNTER_TYPE", [
246 "D3D10_COUNTER_TYPE_FLOAT32",
247 "D3D10_COUNTER_TYPE_UINT16",
248 "D3D10_COUNTER_TYPE_UINT32",
249 "D3D10_COUNTER_TYPE_UINT64",
250])
251
252D3D10_COUNTER_INFO = Struct("D3D10_COUNTER_INFO", [
253 (D3D10_COUNTER, "LastDeviceDependentCounter"),
254 (UINT, "NumSimultaneousCounters"),
255 (UINT8, "NumDetectableParallelUnits"),
256])
257
258D3D10_RESOURCE_DIMENSION = Enum("D3D10_RESOURCE_DIMENSION", [
259 "D3D10_RESOURCE_DIMENSION_UNKNOWN",
260 "D3D10_RESOURCE_DIMENSION_BUFFER",
261 "D3D10_RESOURCE_DIMENSION_TEXTURE1D",
262 "D3D10_RESOURCE_DIMENSION_TEXTURE2D",
263 "D3D10_RESOURCE_DIMENSION_TEXTURE3D",
264])
265
266D3D10_USAGE = Enum("D3D10_USAGE", [
267 "D3D10_USAGE_DEFAULT",
268 "D3D10_USAGE_IMMUTABLE",
269 "D3D10_USAGE_DYNAMIC",
270 "D3D10_USAGE_STAGING",
271])
272
José Fonseca511254d2012-04-11 12:04:00 +0100273D3D10_BIND_FLAG = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100274 "D3D10_BIND_VERTEX_BUFFER",
275 "D3D10_BIND_INDEX_BUFFER",
276 "D3D10_BIND_CONSTANT_BUFFER",
277 "D3D10_BIND_SHADER_RESOURCE",
278 "D3D10_BIND_STREAM_OUTPUT",
279 "D3D10_BIND_RENDER_TARGET",
280 "D3D10_BIND_DEPTH_STENCIL",
281])
282
José Fonseca511254d2012-04-11 12:04:00 +0100283D3D10_CPU_ACCESS_FLAG = Flags(UINT, [
284 "D3D10_CPU_ACCESS_WRITE",
285 "D3D10_CPU_ACCESS_READ",
286])
287
288D3D10_RESOURCE_MISC_FLAG = Flags(UINT, [
289 "D3D10_RESOURCE_MISC_GENERATE_MIPS",
290 "D3D10_RESOURCE_MISC_SHARED",
291 "D3D10_RESOURCE_MISC_TEXTURECUBE",
292 "D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX",
293 "D3D10_RESOURCE_MISC_GDI_COMPATIBLE",
294])
295
José Fonsecaaf7d2312011-07-07 10:16:57 +0100296D3D10_BUFFER_DESC = Struct("D3D10_BUFFER_DESC", [
297 (UINT, "ByteWidth"),
298 (D3D10_USAGE, "Usage"),
José Fonseca511254d2012-04-11 12:04:00 +0100299 (D3D10_BIND_FLAG, "BindFlags"),
300 (D3D10_CPU_ACCESS_FLAG, "CPUAccessFlags"),
301 (D3D10_RESOURCE_MISC_FLAG, "MiscFlags"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100302])
303
304D3D10_MAP = Enum("D3D10_MAP", [
305 "D3D10_MAP_READ",
306 "D3D10_MAP_WRITE",
307 "D3D10_MAP_READ_WRITE",
308 "D3D10_MAP_WRITE_DISCARD",
309 "D3D10_MAP_WRITE_NO_OVERWRITE",
310])
311
312D3D10_TEXTURE1D_DESC = Struct("D3D10_TEXTURE1D_DESC", [
313 (UINT, "Width"),
314 (UINT, "MipLevels"),
315 (UINT, "ArraySize"),
316 (DXGI_FORMAT, "Format"),
317 (D3D10_USAGE, "Usage"),
José Fonseca511254d2012-04-11 12:04:00 +0100318 (D3D10_BIND_FLAG, "BindFlags"),
319 (D3D10_CPU_ACCESS_FLAG, "CPUAccessFlags"),
320 (D3D10_RESOURCE_MISC_FLAG, "MiscFlags"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100321])
322
323D3D10_TEXTURE2D_DESC = Struct("D3D10_TEXTURE2D_DESC", [
324 (UINT, "Width"),
325 (UINT, "Height"),
326 (UINT, "MipLevels"),
327 (UINT, "ArraySize"),
328 (DXGI_FORMAT, "Format"),
329 (DXGI_SAMPLE_DESC, "SampleDesc"),
330 (D3D10_USAGE, "Usage"),
José Fonseca511254d2012-04-11 12:04:00 +0100331 (D3D10_BIND_FLAG, "BindFlags"),
332 (D3D10_CPU_ACCESS_FLAG, "CPUAccessFlags"),
333 (D3D10_RESOURCE_MISC_FLAG, "MiscFlags"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100334])
335
336D3D10_TEXTURE3D_DESC = Struct("D3D10_TEXTURE3D_DESC", [
337 (UINT, "Width"),
338 (UINT, "Height"),
339 (UINT, "Depth"),
340 (UINT, "MipLevels"),
341 (DXGI_FORMAT, "Format"),
342 (D3D10_USAGE, "Usage"),
José Fonseca511254d2012-04-11 12:04:00 +0100343 (D3D10_BIND_FLAG, "BindFlags"),
344 (D3D10_CPU_ACCESS_FLAG, "CPUAccessFlags"),
345 (D3D10_RESOURCE_MISC_FLAG, "MiscFlags"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100346])
347
348D3D10_DSV_DIMENSION = Enum("D3D10_DSV_DIMENSION", [
349 "D3D10_DSV_DIMENSION_UNKNOWN",
350 "D3D10_DSV_DIMENSION_TEXTURE1D",
351 "D3D10_DSV_DIMENSION_TEXTURE1DARRAY",
352 "D3D10_DSV_DIMENSION_TEXTURE2D",
353 "D3D10_DSV_DIMENSION_TEXTURE2DARRAY",
354 "D3D10_DSV_DIMENSION_TEXTURE2DMS",
355 "D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY",
356])
357
358D3D10_TEX1D_DSV = Struct("D3D10_TEX1D_DSV", [
359 (UINT, "MipSlice"),
360])
361
362D3D10_TEX1D_ARRAY_DSV = Struct("D3D10_TEX1D_ARRAY_DSV", [
363 (UINT, "MipSlice"),
364 (UINT, "FirstArraySlice"),
365 (UINT, "ArraySize"),
366])
367
368D3D10_TEX2D_DSV = Struct("D3D10_TEX2D_DSV", [
369 (UINT, "MipSlice"),
370])
371
372D3D10_TEX2D_ARRAY_DSV = Struct("D3D10_TEX2D_ARRAY_DSV", [
373 (UINT, "MipSlice"),
374 (UINT, "FirstArraySlice"),
375 (UINT, "ArraySize"),
376])
377
378D3D10_TEX2DMS_DSV = Struct("D3D10_TEX2DMS_DSV", [
379 (UINT, "UnusedField_NothingToDefine"),
380])
381
382D3D10_TEX2DMS_ARRAY_DSV = Struct("D3D10_TEX2DMS_ARRAY_DSV", [
383 (UINT, "FirstArraySlice"),
384 (UINT, "ArraySize"),
385])
386
387D3D10_DEPTH_STENCIL_VIEW_DESC = Struct("D3D10_DEPTH_STENCIL_VIEW_DESC", [
388 (DXGI_FORMAT, "Format"),
389 (D3D10_DSV_DIMENSION, "ViewDimension"),
José Fonsecadbf714b2012-11-20 17:03:43 +0000390 (Union("{self}.ViewDimension", [
391 ("D3D10_DSV_DIMENSION_TEXTURE1D", D3D10_TEX1D_DSV, "Texture1D"),
392 ("D3D10_DSV_DIMENSION_TEXTURE1DARRAY", D3D10_TEX1D_ARRAY_DSV, "Texture1DArray"),
393 ("D3D10_DSV_DIMENSION_TEXTURE2D", D3D10_TEX2D_DSV, "Texture2D"),
394 ("D3D10_DSV_DIMENSION_TEXTURE2DARRAY", D3D10_TEX2D_ARRAY_DSV, "Texture2DArray"),
395 ("D3D10_DSV_DIMENSION_TEXTURE2DMS", D3D10_TEX2DMS_DSV, "Texture2DMS"),
396 ("D3D10_DSV_DIMENSION_TEXTURE2DMSARRAY", D3D10_TEX2DMS_ARRAY_DSV, "Texture2DMSArray"),
397 ]), None),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100398])
399
400D3D10_RTV_DIMENSION = Enum("D3D10_RTV_DIMENSION", [
401 "D3D10_RTV_DIMENSION_UNKNOWN",
402 "D3D10_RTV_DIMENSION_BUFFER",
403 "D3D10_RTV_DIMENSION_TEXTURE1D",
404 "D3D10_RTV_DIMENSION_TEXTURE1DARRAY",
405 "D3D10_RTV_DIMENSION_TEXTURE2D",
406 "D3D10_RTV_DIMENSION_TEXTURE2DARRAY",
407 "D3D10_RTV_DIMENSION_TEXTURE2DMS",
408 "D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY",
409 "D3D10_RTV_DIMENSION_TEXTURE3D",
410])
411
412D3D10_BUFFER_RTV = Struct("D3D10_BUFFER_RTV", [
José Fonseca5f4b6e32012-11-20 10:47:10 +0000413 (UINT, "FirstElement"),
414 (UINT, "NumElements"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100415])
416
417D3D10_TEX1D_RTV = Struct("D3D10_TEX1D_RTV", [
418 (UINT, "MipSlice"),
419])
420
421D3D10_TEX1D_ARRAY_RTV = Struct("D3D10_TEX1D_ARRAY_RTV", [
422 (UINT, "MipSlice"),
423 (UINT, "FirstArraySlice"),
424 (UINT, "ArraySize"),
425])
426
427D3D10_TEX2D_RTV = Struct("D3D10_TEX2D_RTV", [
428 (UINT, "MipSlice"),
429])
430
431D3D10_TEX2D_ARRAY_RTV = Struct("D3D10_TEX2D_ARRAY_RTV", [
432 (UINT, "MipSlice"),
433 (UINT, "FirstArraySlice"),
434 (UINT, "ArraySize"),
435])
436
437D3D10_TEX2DMS_RTV = Struct("D3D10_TEX2DMS_RTV", [
438 (UINT, "UnusedField_NothingToDefine"),
439])
440
441D3D10_TEX2DMS_ARRAY_RTV = Struct("D3D10_TEX2DMS_ARRAY_RTV", [
442 (UINT, "FirstArraySlice"),
443 (UINT, "ArraySize"),
444])
445
446D3D10_TEX3D_RTV = Struct("D3D10_TEX3D_RTV", [
447 (UINT, "MipSlice"),
448 (UINT, "FirstWSlice"),
449 (UINT, "WSize"),
450])
451
452D3D10_RENDER_TARGET_VIEW_DESC = Struct("D3D10_RENDER_TARGET_VIEW_DESC", [
453 (DXGI_FORMAT, "Format"),
454 (D3D10_RTV_DIMENSION, "ViewDimension"),
José Fonsecadbf714b2012-11-20 17:03:43 +0000455 (Union("{self}.ViewDimension", [
456 ("D3D10_RTV_DIMENSION_BUFFER", D3D10_BUFFER_RTV, "Buffer"),
457 ("D3D10_RTV_DIMENSION_TEXTURE1D", D3D10_TEX1D_RTV, "Texture1D"),
458 ("D3D10_RTV_DIMENSION_TEXTURE1DARRAY", D3D10_TEX1D_ARRAY_RTV, "Texture1DArray"),
459 ("D3D10_RTV_DIMENSION_TEXTURE2D", D3D10_TEX2D_RTV, "Texture2D"),
460 ("D3D10_RTV_DIMENSION_TEXTURE2DARRAY", D3D10_TEX2D_ARRAY_RTV, "Texture2DArray"),
461 ("D3D10_RTV_DIMENSION_TEXTURE2DMS", D3D10_TEX2DMS_RTV, "Texture2DMS"),
462 ("D3D10_RTV_DIMENSION_TEXTURE2DMSARRAY", D3D10_TEX2DMS_ARRAY_RTV, "Texture2DMSArray"),
463 ("D3D10_RTV_DIMENSION_TEXTURE3D", D3D10_TEX3D_RTV, "Texture3D"),
464 ]), None),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100465])
466
467D3D10_SRV_DIMENSION = Enum("D3D10_SRV_DIMENSION", [
468 "D3D10_SRV_DIMENSION_UNKNOWN",
469 "D3D10_SRV_DIMENSION_BUFFER",
470 "D3D10_SRV_DIMENSION_TEXTURE1D",
471 "D3D10_SRV_DIMENSION_TEXTURE1DARRAY",
472 "D3D10_SRV_DIMENSION_TEXTURE2D",
473 "D3D10_SRV_DIMENSION_TEXTURE2DARRAY",
474 "D3D10_SRV_DIMENSION_TEXTURE2DMS",
475 "D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY",
476 "D3D10_SRV_DIMENSION_TEXTURE3D",
477 "D3D10_SRV_DIMENSION_TEXTURECUBE",
478])
479
480D3D10_BUFFER_SRV = Struct("D3D10_BUFFER_SRV", [
José Fonseca5f4b6e32012-11-20 10:47:10 +0000481 (UINT, "FirstElement"),
482 (UINT, "NumElements"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100483])
484
485D3D10_TEX1D_SRV = Struct("D3D10_TEX1D_SRV", [
486 (UINT, "MostDetailedMip"),
487 (UINT, "MipLevels"),
488])
489
490D3D10_TEX1D_ARRAY_SRV = Struct("D3D10_TEX1D_ARRAY_SRV", [
491 (UINT, "MostDetailedMip"),
492 (UINT, "MipLevels"),
493 (UINT, "FirstArraySlice"),
494 (UINT, "ArraySize"),
495])
496
497D3D10_TEX2D_SRV = Struct("D3D10_TEX2D_SRV", [
498 (UINT, "MostDetailedMip"),
499 (UINT, "MipLevels"),
500])
501
502D3D10_TEX2D_ARRAY_SRV = Struct("D3D10_TEX2D_ARRAY_SRV", [
503 (UINT, "MostDetailedMip"),
504 (UINT, "MipLevels"),
505 (UINT, "FirstArraySlice"),
506 (UINT, "ArraySize"),
507])
508
509D3D10_TEX2DMS_SRV = Struct("D3D10_TEX2DMS_SRV", [
510 (UINT, "UnusedField_NothingToDefine"),
511])
512
513D3D10_TEX2DMS_ARRAY_SRV = Struct("D3D10_TEX2DMS_ARRAY_SRV", [
514 (UINT, "FirstArraySlice"),
515 (UINT, "ArraySize"),
516])
517
518D3D10_TEX3D_SRV = Struct("D3D10_TEX3D_SRV", [
519 (UINT, "MostDetailedMip"),
520 (UINT, "MipLevels"),
521])
522
523D3D10_TEXCUBE_SRV = Struct("D3D10_TEXCUBE_SRV", [
524 (UINT, "MostDetailedMip"),
525 (UINT, "MipLevels"),
526])
527
528D3D10_SHADER_RESOURCE_VIEW_DESC = Struct("D3D10_SHADER_RESOURCE_VIEW_DESC", [
529 (DXGI_FORMAT, "Format"),
530 (D3D10_SRV_DIMENSION, "ViewDimension"),
José Fonsecadbf714b2012-11-20 17:03:43 +0000531 (Union("{self}.ViewDimension", [
532 ("D3D10_SRV_DIMENSION_BUFFER", D3D10_BUFFER_SRV, "Buffer"),
533 ("D3D10_SRV_DIMENSION_TEXTURE1D", D3D10_TEX1D_SRV, "Texture1D"),
534 ("D3D10_SRV_DIMENSION_TEXTURE1DARRAY", D3D10_TEX1D_ARRAY_SRV, "Texture1DArray"),
535 ("D3D10_SRV_DIMENSION_TEXTURE2D", D3D10_TEX2D_SRV, "Texture2D"),
536 ("D3D10_SRV_DIMENSION_TEXTURE2DARRAY", D3D10_TEX2D_ARRAY_SRV, "Texture2DArray"),
537 ("D3D10_SRV_DIMENSION_TEXTURE2DMS", D3D10_TEX2DMS_SRV, "Texture2DMS"),
538 ("D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY", D3D10_TEX2DMS_ARRAY_SRV, "Texture2DMSArray"),
539 ("D3D10_SRV_DIMENSION_TEXTURE3D", D3D10_TEX3D_SRV, "Texture3D"),
540 ("D3D10_SRV_DIMENSION_TEXTURECUBE", D3D10_TEXCUBE_SRV, "TextureCube"),
541 ]), None),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100542])
543
544D3D10_BOX = Struct("D3D10_BOX", [
545 (UINT, "left"),
546 (UINT, "top"),
547 (UINT, "front"),
548 (UINT, "right"),
549 (UINT, "bottom"),
550 (UINT, "back"),
551])
552
553D3D10_SUBRESOURCE_DATA = Struct("D3D10_SUBRESOURCE_DATA", [
José Fonseca30fb4c32012-11-04 11:07:45 +0000554 (Blob(Const(Void), "_calcSubresourceSize(pDesc, {i}, {self}.SysMemPitch, {self}.SysMemSlicePitch)"), "pSysMem"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100555 (UINT, "SysMemPitch"),
556 (UINT, "SysMemSlicePitch"),
557])
558
559D3D10_SO_DECLARATION_ENTRY = Struct("D3D10_SO_DECLARATION_ENTRY", [
560 (LPCSTR, "SemanticName"),
561 (UINT, "SemanticIndex"),
562 (BYTE, "StartComponent"),
563 (BYTE, "ComponentCount"),
564 (BYTE, "OutputSlot"),
565])
566
567D3D10_INPUT_CLASSIFICATION = Enum("D3D10_INPUT_CLASSIFICATION", [
568 "D3D10_INPUT_PER_VERTEX_DATA",
569 "D3D10_INPUT_PER_INSTANCE_DATA",
570])
571
572D3D10_INPUT_ELEMENT_DESC = Struct("D3D10_INPUT_ELEMENT_DESC", [
573 (LPCSTR, "SemanticName"),
574 (UINT, "SemanticIndex"),
575 (DXGI_FORMAT, "Format"),
576 (UINT, "InputSlot"),
577 (UINT, "AlignedByteOffset"),
578 (D3D10_INPUT_CLASSIFICATION, "InputSlotClass"),
579 (UINT, "InstanceDataStepRate"),
580])
581
582D3D10_QUERY = Enum("D3D10_QUERY", [
583 "D3D10_QUERY_EVENT",
584 "D3D10_QUERY_OCCLUSION",
585 "D3D10_QUERY_TIMESTAMP",
586 "D3D10_QUERY_TIMESTAMP_DISJOINT",
587 "D3D10_QUERY_PIPELINE_STATISTICS",
588 "D3D10_QUERY_OCCLUSION_PREDICATE",
589 "D3D10_QUERY_SO_STATISTICS",
590 "D3D10_QUERY_SO_OVERFLOW_PREDICATE",
591])
592
José Fonseca511254d2012-04-11 12:04:00 +0100593D3D10_QUERY_MISC_FLAG = Flags(UINT, [
594 "D3D10_QUERY_MISC_PREDICATEHINT",
595])
596
José Fonsecaaf7d2312011-07-07 10:16:57 +0100597D3D10_QUERY_DESC = Struct("D3D10_QUERY_DESC", [
598 (D3D10_QUERY, "Query"),
José Fonseca511254d2012-04-11 12:04:00 +0100599 (D3D10_QUERY_MISC_FLAG, "MiscFlags"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100600])
601
José Fonsecaaf7d2312011-07-07 10:16:57 +0100602D3D10_RECT = Alias("D3D10_RECT", RECT)
603D3D10_VIEWPORT = Struct("D3D10_VIEWPORT", [
604 (INT, "TopLeftX"),
605 (INT, "TopLeftY"),
606 (UINT, "Width"),
607 (UINT, "Height"),
608 (FLOAT, "MinDepth"),
609 (FLOAT, "MaxDepth"),
610])
611
612D3D10_MAPPED_TEXTURE2D = Struct("D3D10_MAPPED_TEXTURE2D", [
José Fonsecaaf366b22012-11-07 20:00:46 +0000613 (LinearPointer(Void, "_MappedSize"), "pData"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100614 (UINT, "RowPitch"),
615])
616
617D3D10_MAPPED_TEXTURE3D = Struct("D3D10_MAPPED_TEXTURE3D", [
José Fonsecaaf366b22012-11-07 20:00:46 +0000618 (LinearPointer(Void, "_MappedSize"), "pData"),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100619 (UINT, "RowPitch"),
620 (UINT, "DepthPitch"),
621])
622
José Fonseca511254d2012-04-11 12:04:00 +0100623D3D10_MAP_FLAG = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100624 "D3D10_MAP_FLAG_DO_NOT_WAIT",
625])
626
José Fonseca511254d2012-04-11 12:04:00 +0100627D3D10_CLEAR_FLAG = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100628 "D3D10_CLEAR_DEPTH",
629 "D3D10_CLEAR_STENCIL",
630])
631
José Fonseca511254d2012-04-11 12:04:00 +0100632D3D10_COLOR_WRITE_ENABLE = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100633 "D3D10_COLOR_WRITE_ENABLE_ALL",
634 "D3D10_COLOR_WRITE_ENABLE_RED",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100635 "D3D10_COLOR_WRITE_ENABLE_GREEN",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100636 "D3D10_COLOR_WRITE_ENABLE_BLUE",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100637 "D3D10_COLOR_WRITE_ENABLE_ALPHA",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100638])
639
640D3D10_TEXTURECUBE_FACE = Enum("D3D10_TEXTURECUBE_FACE", [
641 "D3D10_TEXTURECUBE_FACE_POSITIVE_X",
642 "D3D10_TEXTURECUBE_FACE_NEGATIVE_X",
643 "D3D10_TEXTURECUBE_FACE_POSITIVE_Y",
644 "D3D10_TEXTURECUBE_FACE_NEGATIVE_Y",
645 "D3D10_TEXTURECUBE_FACE_POSITIVE_Z",
646 "D3D10_TEXTURECUBE_FACE_NEGATIVE_Z",
647])
648
José Fonseca511254d2012-04-11 12:04:00 +0100649D3D10_ASYNC_GETDATA_FLAG = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100650 "D3D10_ASYNC_GETDATA_DONOTFLUSH",
651])
652
653D3D10_FILTER_TYPE = Enum("D3D10_FILTER_TYPE", [
654 "D3D10_FILTER_TYPE_POINT",
655 "D3D10_FILTER_TYPE_LINEAR",
656])
657
José Fonsecaaf7d2312011-07-07 10:16:57 +0100658D3D10_QUERY_DATA_TIMESTAMP_DISJOINT = Struct("D3D10_QUERY_DATA_TIMESTAMP_DISJOINT", [
659 (UINT64, "Frequency"),
660 (BOOL, "Disjoint"),
661])
662
663D3D10_QUERY_DATA_PIPELINE_STATISTICS = Struct("D3D10_QUERY_DATA_PIPELINE_STATISTICS", [
664 (UINT64, "IAVertices"),
665 (UINT64, "IAPrimitives"),
666 (UINT64, "VSInvocations"),
667 (UINT64, "GSInvocations"),
668 (UINT64, "GSPrimitives"),
669 (UINT64, "CInvocations"),
670 (UINT64, "CPrimitives"),
671 (UINT64, "PSInvocations"),
672])
673
674D3D10_QUERY_DATA_SO_STATISTICS = Struct("D3D10_QUERY_DATA_SO_STATISTICS", [
675 (UINT64, "NumPrimitivesWritten"),
676 (UINT64, "PrimitivesStorageNeeded"),
677])
678
José Fonseca1e1676f2012-04-05 11:18:27 +0100679D3D10_CREATE_DEVICE_FLAG = Flags(UINT, [
José Fonsecaaf7d2312011-07-07 10:16:57 +0100680 "D3D10_CREATE_DEVICE_SINGLETHREADED",
681 "D3D10_CREATE_DEVICE_DEBUG",
682 "D3D10_CREATE_DEVICE_SWITCH_TO_REF",
683 "D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS",
684 "D3D10_CREATE_DEVICE_ALLOW_NULL_FROM_MAP",
685 "D3D10_CREATE_DEVICE_BGRA_SUPPORT",
686 "D3D10_CREATE_DEVICE_STRICT_VALIDATION",
José Fonseca5b9ac332012-11-20 15:23:14 +0000687 "D3D10_CREATE_DEVICE_BGRA_SUPPORT",
688 "D3D10_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY",
689 "D3D10_CREATE_DEVICE_STRICT_VALIDATION",
690 "D3D10_CREATE_DEVICE_DEBUGGABLE",
José Fonsecaaf7d2312011-07-07 10:16:57 +0100691])
692
José Fonseca1e1676f2012-04-05 11:18:27 +0100693D3D10_RAISE_FLAG = Flags(UINT, [
694 "D3D10_RAISE_FLAG_DRIVER_INTERNAL_ERROR",
695])
696
José Fonsecaaf7d2312011-07-07 10:16:57 +0100697ID3D10DeviceChild = Interface("ID3D10DeviceChild", IUnknown)
698ID3D10Resource = Interface("ID3D10Resource", ID3D10DeviceChild)
699ID3D10Buffer = Interface("ID3D10Buffer", ID3D10Resource)
700ID3D10Texture1D = Interface("ID3D10Texture1D", ID3D10Resource)
701ID3D10Texture2D = Interface("ID3D10Texture2D", ID3D10Resource)
702ID3D10Texture3D = Interface("ID3D10Texture3D", ID3D10Resource)
703ID3D10View = Interface("ID3D10View", ID3D10DeviceChild)
704ID3D10DepthStencilView = Interface("ID3D10DepthStencilView", ID3D10View)
705ID3D10RenderTargetView = Interface("ID3D10RenderTargetView", ID3D10View)
706ID3D10ShaderResourceView = Interface("ID3D10ShaderResourceView", ID3D10View)
707ID3D10BlendState = Interface("ID3D10BlendState", ID3D10DeviceChild)
708ID3D10DepthStencilState = Interface("ID3D10DepthStencilState", ID3D10DeviceChild)
709ID3D10GeometryShader = Interface("ID3D10GeometryShader", ID3D10DeviceChild)
710ID3D10InputLayout = Interface("ID3D10InputLayout", ID3D10DeviceChild)
711ID3D10PixelShader = Interface("ID3D10PixelShader", ID3D10DeviceChild)
712ID3D10RasterizerState = Interface("ID3D10RasterizerState", ID3D10DeviceChild)
713ID3D10SamplerState = Interface("ID3D10SamplerState", ID3D10DeviceChild)
714ID3D10VertexShader = Interface("ID3D10VertexShader", ID3D10DeviceChild)
715ID3D10Asynchronous = Interface("ID3D10Asynchronous", ID3D10DeviceChild)
716ID3D10Counter = Interface("ID3D10Counter", ID3D10Asynchronous)
717ID3D10Query = Interface("ID3D10Query", ID3D10Asynchronous)
718ID3D10Predicate = Interface("ID3D10Predicate", ID3D10Query)
719ID3D10Device = Interface("ID3D10Device", IUnknown)
720ID3D10Multithread = Interface("ID3D10Multithread", IUnknown)
721
722ID3D10DeviceChild.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000723 StdMethod(Void, "GetDevice", [Out(Pointer(ObjPointer(ID3D10Device)), "ppDevice")]),
724 StdMethod(HRESULT, "GetPrivateData", [(REFGUID, "guid"), Out(Pointer(UINT), "pDataSize"), Out(OpaquePointer(Void), "pData")], sideeffects=False),
725 StdMethod(HRESULT, "SetPrivateData", [(REFGUID, "guid"), (UINT, "DataSize"), (OpaqueBlob(Const(Void), "DataSize"), "pData")], sideeffects=False),
726 StdMethod(HRESULT, "SetPrivateDataInterface", [(REFGUID, "guid"), (OpaquePointer(Const(IUnknown)), "pData")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100727]
728
729ID3D10Resource.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000730 StdMethod(Void, "GetType", [Out(Pointer(D3D10_RESOURCE_DIMENSION), "rType")], sideeffects=False),
731 StdMethod(Void, "SetEvictionPriority", [(UINT, "EvictionPriority")]),
732 StdMethod(UINT, "GetEvictionPriority", [], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100733]
734
735ID3D10Buffer.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000736 StdMethod(HRESULT, "Map", [(D3D10_MAP, "MapType"), (D3D10_MAP_FLAG, "MapFlags"), Out(Pointer(LinearPointer(Void, "_MappedSize")), "ppData")]),
737 StdMethod(Void, "Unmap", []),
738 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_BUFFER_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100739]
740
741ID3D10Texture1D.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000742 StdMethod(HRESULT, "Map", [(UINT, "Subresource"), (D3D10_MAP, "MapType"), (D3D10_MAP_FLAG, "MapFlags"), Out(Pointer(LinearPointer(Void, "_MappedSize")), "ppData")]),
743 StdMethod(Void, "Unmap", [(UINT, "Subresource")]),
744 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_TEXTURE1D_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100745]
746
747ID3D10Texture2D.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000748 StdMethod(HRESULT, "Map", [(UINT, "Subresource"), (D3D10_MAP, "MapType"), (D3D10_MAP_FLAG, "MapFlags"), Out(Pointer(D3D10_MAPPED_TEXTURE2D), "pMappedTex2D")]),
749 StdMethod(Void, "Unmap", [(UINT, "Subresource")]),
750 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_TEXTURE2D_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100751]
752
753ID3D10Texture3D.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000754 StdMethod(HRESULT, "Map", [(UINT, "Subresource"), (D3D10_MAP, "MapType"), (D3D10_MAP_FLAG, "MapFlags"), Out(Pointer(D3D10_MAPPED_TEXTURE3D), "pMappedTex3D")]),
755 StdMethod(Void, "Unmap", [(UINT, "Subresource")]),
756 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_TEXTURE3D_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100757]
758
759ID3D10View.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000760 StdMethod(Void, "GetResource", [Out(Pointer(ObjPointer(ID3D10Resource)), "ppResource")]),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100761]
762
763ID3D10DepthStencilView.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000764 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_DEPTH_STENCIL_VIEW_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100765]
766
767ID3D10RenderTargetView.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000768 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_RENDER_TARGET_VIEW_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100769]
770
771ID3D10ShaderResourceView.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000772 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_SHADER_RESOURCE_VIEW_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100773]
774
775ID3D10BlendState.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000776 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_BLEND_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100777]
778
779ID3D10DepthStencilState.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000780 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_DEPTH_STENCIL_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100781]
782
José Fonsecaaf7d2312011-07-07 10:16:57 +0100783ID3D10RasterizerState.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000784 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_RASTERIZER_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100785]
786
787ID3D10SamplerState.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000788 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_SAMPLER_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100789]
790
José Fonsecaaf7d2312011-07-07 10:16:57 +0100791ID3D10Asynchronous.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000792 StdMethod(Void, "Begin", []),
793 StdMethod(Void, "End", []),
794 StdMethod(HRESULT, "GetData", [Out(Blob(Void, "DataSize"), "pData"), (UINT, "DataSize"), (D3D10_ASYNC_GETDATA_FLAG, "GetDataFlags")], sideeffects=False),
795 StdMethod(UINT, "GetDataSize", [], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100796]
797
798ID3D10Counter.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000799 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_COUNTER_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100800]
801
802ID3D10Query.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000803 StdMethod(Void, "GetDesc", [Out(Pointer(D3D10_QUERY_DESC), "pDesc")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100804]
805
José Fonsecaaf7d2312011-07-07 10:16:57 +0100806ID3D10Device.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000807 StdMethod(Void, "VSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D10Buffer)), "NumBuffers"), "ppConstantBuffers")]),
808 StdMethod(Void, "PSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D10ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]),
809 StdMethod(Void, "PSSetShader", [(ObjPointer(ID3D10PixelShader), "pPixelShader")]),
810 StdMethod(Void, "PSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D10SamplerState)), "NumSamplers"), "ppSamplers")]),
811 StdMethod(Void, "VSSetShader", [(ObjPointer(ID3D10VertexShader), "pVertexShader")]),
812 StdMethod(Void, "DrawIndexed", [(UINT, "IndexCount"), (UINT, "StartIndexLocation"), (INT, "BaseVertexLocation")]),
813 StdMethod(Void, "Draw", [(UINT, "VertexCount"), (UINT, "StartVertexLocation")]),
814 StdMethod(Void, "PSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D10Buffer)), "NumBuffers"), "ppConstantBuffers")]),
815 StdMethod(Void, "IASetInputLayout", [(ObjPointer(ID3D10InputLayout), "pInputLayout")]),
816 StdMethod(Void, "IASetVertexBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D10Buffer)), "NumBuffers"), "ppVertexBuffers"), (Array(Const(UINT), "NumBuffers"), "pStrides"), (Array(Const(UINT), "NumBuffers"), "pOffsets")]),
817 StdMethod(Void, "IASetIndexBuffer", [(ObjPointer(ID3D10Buffer), "pIndexBuffer"), (DXGI_FORMAT, "Format"), (UINT, "Offset")]),
818 StdMethod(Void, "DrawIndexedInstanced", [(UINT, "IndexCountPerInstance"), (UINT, "InstanceCount"), (UINT, "StartIndexLocation"), (INT, "BaseVertexLocation"), (UINT, "StartInstanceLocation")]),
819 StdMethod(Void, "DrawInstanced", [(UINT, "VertexCountPerInstance"), (UINT, "InstanceCount"), (UINT, "StartVertexLocation"), (UINT, "StartInstanceLocation")]),
820 StdMethod(Void, "GSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D10Buffer)), "NumBuffers"), "ppConstantBuffers")]),
821 StdMethod(Void, "GSSetShader", [(ObjPointer(ID3D10GeometryShader), "pShader")]),
822 StdMethod(Void, "IASetPrimitiveTopology", [(D3D10_PRIMITIVE_TOPOLOGY, "Topology")]),
823 StdMethod(Void, "VSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D10ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]),
824 StdMethod(Void, "VSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D10SamplerState)), "NumSamplers"), "ppSamplers")]),
825 StdMethod(Void, "SetPredication", [(ObjPointer(ID3D10Predicate), "pPredicate"), (BOOL, "PredicateValue")]),
826 StdMethod(Void, "GSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D10ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]),
827 StdMethod(Void, "GSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D10SamplerState)), "NumSamplers"), "ppSamplers")]),
828 StdMethod(Void, "OMSetRenderTargets", [(UINT, "NumViews"), (Array(Const(ObjPointer(ID3D10RenderTargetView)), "NumViews"), "ppRenderTargetViews"), (ObjPointer(ID3D10DepthStencilView), "pDepthStencilView")]),
829 StdMethod(Void, "OMSetBlendState", [(ObjPointer(ID3D10BlendState), "pBlendState"), (Array(Const(FLOAT), 4), "BlendFactor"), (UINT, "SampleMask")]),
830 StdMethod(Void, "OMSetDepthStencilState", [(ObjPointer(ID3D10DepthStencilState), "pDepthStencilState"), (UINT, "StencilRef")]),
831 StdMethod(Void, "SOSetTargets", [(UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D10Buffer)), "NumBuffers"), "ppSOTargets"), (Array(Const(UINT), "NumBuffers"), "pOffsets")]),
832 StdMethod(Void, "DrawAuto", []),
833 StdMethod(Void, "RSSetState", [(ObjPointer(ID3D10RasterizerState), "pRasterizerState")]),
834 StdMethod(Void, "RSSetViewports", [(UINT, "NumViewports"), (Array(Const(D3D10_VIEWPORT), "NumViewports"), "pViewports")]),
835 StdMethod(Void, "RSSetScissorRects", [(UINT, "NumRects"), (Array(Const(D3D10_RECT), "NumRects"), "pRects")]),
836 StdMethod(Void, "CopySubresourceRegion", [(ObjPointer(ID3D10Resource), "pDstResource"), (UINT, "DstSubresource"), (UINT, "DstX"), (UINT, "DstY"), (UINT, "DstZ"), (ObjPointer(ID3D10Resource), "pSrcResource"), (UINT, "SrcSubresource"), (Pointer(Const(D3D10_BOX)), "pSrcBox")]),
837 StdMethod(Void, "CopyResource", [(ObjPointer(ID3D10Resource), "pDstResource"), (ObjPointer(ID3D10Resource), "pSrcResource")]),
838 StdMethod(Void, "UpdateSubresource", [(ObjPointer(ID3D10Resource), "pDstResource"), (UINT, "DstSubresource"), (Pointer(Const(D3D10_BOX)), "pDstBox"), (Blob(Const(Void), "_calcSubresourceSize(pDstResource, DstSubresource, pDstBox, SrcRowPitch, SrcDepthPitch)"), "pSrcData"), (UINT, "SrcRowPitch"), (UINT, "SrcDepthPitch")]),
839 StdMethod(Void, "ClearRenderTargetView", [(ObjPointer(ID3D10RenderTargetView), "pRenderTargetView"), (Array(Const(FLOAT), 4), "ColorRGBA")]),
840 StdMethod(Void, "ClearDepthStencilView", [(ObjPointer(ID3D10DepthStencilView), "pDepthStencilView"), (D3D10_CLEAR_FLAG, "ClearFlags"), (FLOAT, "Depth"), (UINT8, "Stencil")]),
841 StdMethod(Void, "GenerateMips", [(ObjPointer(ID3D10ShaderResourceView), "pShaderResourceView")]),
842 StdMethod(Void, "ResolveSubresource", [(ObjPointer(ID3D10Resource), "pDstResource"), (UINT, "DstSubresource"), (ObjPointer(ID3D10Resource), "pSrcResource"), (UINT, "SrcSubresource"), (DXGI_FORMAT, "Format")]),
843 StdMethod(Void, "VSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D10Buffer), "NumBuffers"), "ppConstantBuffers")]),
844 StdMethod(Void, "PSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D10ShaderResourceView), "NumViews"), "ppShaderResourceViews")]),
845 StdMethod(Void, "PSGetShader", [Out(Pointer(ObjPointer(ID3D10PixelShader)), "ppPixelShader")]),
846 StdMethod(Void, "PSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D10SamplerState), "NumSamplers"), "ppSamplers")]),
847 StdMethod(Void, "VSGetShader", [Out(Pointer(ObjPointer(ID3D10VertexShader)), "ppVertexShader")]),
848 StdMethod(Void, "PSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D10Buffer), "NumBuffers"), "ppConstantBuffers")]),
849 StdMethod(Void, "IAGetInputLayout", [Out(Pointer(ObjPointer(ID3D10InputLayout)), "ppInputLayout")]),
850 StdMethod(Void, "IAGetVertexBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D10Buffer), "NumBuffers"), "ppVertexBuffers"), Out(Array(UINT, "NumBuffers"), "pStrides"), Out(Array(UINT, "NumBuffers"), "pOffsets")]),
851 StdMethod(Void, "IAGetIndexBuffer", [Out(Pointer(ObjPointer(ID3D10Buffer)), "pIndexBuffer"), Out(Pointer(DXGI_FORMAT), "Format"), Out(Pointer(UINT), "Offset")]),
852 StdMethod(Void, "GSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D10Buffer), "NumBuffers"), "ppConstantBuffers")]),
853 StdMethod(Void, "GSGetShader", [Out(Pointer(ObjPointer(ID3D10GeometryShader)), "ppGeometryShader")]),
854 StdMethod(Void, "IAGetPrimitiveTopology", [Out(Pointer(D3D10_PRIMITIVE_TOPOLOGY), "pTopology")], sideeffects=False),
855 StdMethod(Void, "VSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D10ShaderResourceView), "NumViews"), "ppShaderResourceViews")]),
856 StdMethod(Void, "VSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D10SamplerState), "NumSamplers"), "ppSamplers")]),
857 StdMethod(Void, "GetPredication", [Out(Pointer(ObjPointer(ID3D10Predicate)), "ppPredicate"), Out(Pointer(BOOL), "pPredicateValue")]),
858 StdMethod(Void, "GSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D10ShaderResourceView), "NumViews"), "ppShaderResourceViews")]),
859 StdMethod(Void, "GSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D10SamplerState), "NumSamplers"), "ppSamplers")]),
860 StdMethod(Void, "OMGetRenderTargets", [(UINT, "NumViews"), Out(Array(ObjPointer(ID3D10RenderTargetView), "NumViews"), "ppRenderTargetViews"), Out(Pointer(ObjPointer(ID3D10DepthStencilView)), "ppDepthStencilView")]),
861 StdMethod(Void, "OMGetBlendState", [Out(Pointer(ObjPointer(ID3D10BlendState)), "ppBlendState"), Out(Array(FLOAT, 4), "BlendFactor"), Out(Pointer(UINT), "pSampleMask")]),
862 StdMethod(Void, "OMGetDepthStencilState", [Out(Pointer(ObjPointer(ID3D10DepthStencilState)), "ppDepthStencilState"), Out(Pointer(UINT), "pStencilRef")]),
863 StdMethod(Void, "SOGetTargets", [(UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D10Buffer), "NumBuffers"), "ppSOTargets"), Out(Array(UINT, "NumBuffers"), "pOffsets")]),
864 StdMethod(Void, "RSGetState", [Out(Pointer(ObjPointer(ID3D10RasterizerState)), "ppRasterizerState")]),
José Fonseca00b9aba2014-08-13 13:18:48 +0100865 StdMethod(Void, "RSGetViewports", [InOut(Pointer(UINT), "pNumViewports"), Out(Array(D3D10_VIEWPORT, "*pNumViewports"), "pViewports")], sideeffects=False),
866 StdMethod(Void, "RSGetScissorRects", [InOut(Pointer(UINT), "pNumRects"), Out(Array(D3D10_RECT, "*pNumRects"), "pRects")], sideeffects=False),
José Fonseca43aa19f2012-11-10 09:29:38 +0000867 StdMethod(HRESULT, "GetDeviceRemovedReason", [], sideeffects=False),
868 StdMethod(HRESULT, "SetExceptionMode", [(D3D10_RAISE_FLAG, "RaiseFlags")]),
869 StdMethod(D3D10_RAISE_FLAG, "GetExceptionMode", [], sideeffects=False),
870 StdMethod(HRESULT, "GetPrivateData", [(REFGUID, "guid"), Out(Pointer(UINT), "pDataSize"), Out(OpaquePointer(Void), "pData")], sideeffects=False),
871 StdMethod(HRESULT, "SetPrivateData", [(REFGUID, "guid"), (UINT, "DataSize"), (OpaqueBlob(Const(Void), "DataSize"), "pData")], sideeffects=False),
872 StdMethod(HRESULT, "SetPrivateDataInterface", [(REFGUID, "guid"), (OpaquePointer(Const(IUnknown)), "pData")], sideeffects=False),
873 StdMethod(Void, "ClearState", []),
874 StdMethod(Void, "Flush", []),
875 StdMethod(HRESULT, "CreateBuffer", [(Pointer(Const(D3D10_BUFFER_DESC)), "pDesc"), (Array(Const(D3D10_SUBRESOURCE_DATA), "1"), "pInitialData"), Out(Pointer(ObjPointer(ID3D10Buffer)), "ppBuffer")]),
876 StdMethod(HRESULT, "CreateTexture1D", [(Pointer(Const(D3D10_TEXTURE1D_DESC)), "pDesc"), (Array(Const(D3D10_SUBRESOURCE_DATA), "_getNumSubResources(pDesc)"), "pInitialData"), Out(Pointer(ObjPointer(ID3D10Texture1D)), "ppTexture1D")]),
877 StdMethod(HRESULT, "CreateTexture2D", [(Pointer(Const(D3D10_TEXTURE2D_DESC)), "pDesc"), (Array(Const(D3D10_SUBRESOURCE_DATA), "_getNumSubResources(pDesc)"), "pInitialData"), Out(Pointer(ObjPointer(ID3D10Texture2D)), "ppTexture2D")]),
878 StdMethod(HRESULT, "CreateTexture3D", [(Pointer(Const(D3D10_TEXTURE3D_DESC)), "pDesc"), (Array(Const(D3D10_SUBRESOURCE_DATA), "_getNumSubResources(pDesc)"), "pInitialData"), Out(Pointer(ObjPointer(ID3D10Texture3D)), "ppTexture3D")]),
879 StdMethod(HRESULT, "CreateShaderResourceView", [(ObjPointer(ID3D10Resource), "pResource"), (Pointer(Const(D3D10_SHADER_RESOURCE_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D10ShaderResourceView)), "ppSRView")]),
880 StdMethod(HRESULT, "CreateRenderTargetView", [(ObjPointer(ID3D10Resource), "pResource"), (Pointer(Const(D3D10_RENDER_TARGET_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D10RenderTargetView)), "ppRTView")]),
881 StdMethod(HRESULT, "CreateDepthStencilView", [(ObjPointer(ID3D10Resource), "pResource"), (Pointer(Const(D3D10_DEPTH_STENCIL_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D10DepthStencilView)), "ppDepthStencilView")]),
882 StdMethod(HRESULT, "CreateInputLayout", [(Array(Const(D3D10_INPUT_ELEMENT_DESC), "NumElements"), "pInputElementDescs"), (UINT, "NumElements"), (Blob(Const(Void), "BytecodeLength"), "pShaderBytecodeWithInputSignature"), (SIZE_T, "BytecodeLength"), Out(Pointer(ObjPointer(ID3D10InputLayout)), "ppInputLayout")]),
883 StdMethod(HRESULT, "CreateVertexShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), Out(Pointer(ObjPointer(ID3D10VertexShader)), "ppVertexShader")]),
884 StdMethod(HRESULT, "CreateGeometryShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), Out(Pointer(ObjPointer(ID3D10GeometryShader)), "ppGeometryShader")]),
885 StdMethod(HRESULT, "CreateGeometryShaderWithStreamOutput", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (Array(Const(D3D10_SO_DECLARATION_ENTRY), "NumEntries"), "pSODeclaration"), (UINT, "NumEntries"), (UINT, "OutputStreamStride"), Out(Pointer(ObjPointer(ID3D10GeometryShader)), "ppGeometryShader")]),
886 StdMethod(HRESULT, "CreatePixelShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), Out(Pointer(ObjPointer(ID3D10PixelShader)), "ppPixelShader")]),
887 StdMethod(HRESULT, "CreateBlendState", [(Pointer(Const(D3D10_BLEND_DESC)), "pBlendStateDesc"), Out(Pointer(ObjPointer(ID3D10BlendState)), "ppBlendState")]),
888 StdMethod(HRESULT, "CreateDepthStencilState", [(Pointer(Const(D3D10_DEPTH_STENCIL_DESC)), "pDepthStencilDesc"), Out(Pointer(ObjPointer(ID3D10DepthStencilState)), "ppDepthStencilState")]),
889 StdMethod(HRESULT, "CreateRasterizerState", [(Pointer(Const(D3D10_RASTERIZER_DESC)), "pRasterizerDesc"), Out(Pointer(ObjPointer(ID3D10RasterizerState)), "ppRasterizerState")]),
890 StdMethod(HRESULT, "CreateSamplerState", [(Pointer(Const(D3D10_SAMPLER_DESC)), "pSamplerDesc"), Out(Pointer(ObjPointer(ID3D10SamplerState)), "ppSamplerState")]),
891 StdMethod(HRESULT, "CreateQuery", [(Pointer(Const(D3D10_QUERY_DESC)), "pQueryDesc"), Out(Pointer(ObjPointer(ID3D10Query)), "ppQuery")]),
892 StdMethod(HRESULT, "CreatePredicate", [(Pointer(Const(D3D10_QUERY_DESC)), "pPredicateDesc"), Out(Pointer(ObjPointer(ID3D10Predicate)), "ppPredicate")]),
893 StdMethod(HRESULT, "CreateCounter", [(Pointer(Const(D3D10_COUNTER_DESC)), "pCounterDesc"), Out(Pointer(ObjPointer(ID3D10Counter)), "ppCounter")]),
894 StdMethod(HRESULT, "CheckFormatSupport", [(DXGI_FORMAT, "Format"), Out(Pointer(D3D10_FORMAT_SUPPORT), "pFormatSupport")], sideeffects=False),
895 StdMethod(HRESULT, "CheckMultisampleQualityLevels", [(DXGI_FORMAT, "Format"), (UINT, "SampleCount"), Out(Pointer(UINT), "pNumQualityLevels")], sideeffects=False),
José Fonsecae088e5c2012-11-16 20:05:54 +0000896 StdMethod(Void, "CheckCounterInfo", [Out(Pointer(D3D10_COUNTER_INFO), "pCounterInfo")], sideeffects=False),
José Fonseca43aa19f2012-11-10 09:29:38 +0000897 StdMethod(HRESULT, "CheckCounter", [(Pointer(Const(D3D10_COUNTER_DESC)), "pDesc"), Out(Pointer(D3D10_COUNTER_TYPE), "pType"), Out(Pointer(UINT), "pActiveCounters"), Out(LPSTR, "szName"), Out(Pointer(UINT), "pNameLength"), Out(LPSTR, "szUnits"), Out(Pointer(UINT), "pUnitsLength"), Out(LPSTR, "szDescription"), Out(Pointer(UINT), "pDescriptionLength")], sideeffects=False),
898 StdMethod(D3D10_CREATE_DEVICE_FLAG, "GetCreationFlags", [], sideeffects=False),
899 StdMethod(HRESULT, "OpenSharedResource", [(HANDLE, "hResource"), (REFIID, "ReturnedInterface"), Out(Pointer(ObjPointer(Void)), "ppResource")]),
900 StdMethod(Void, "SetTextFilterSize", [(UINT, "Width"), (UINT, "Height")]),
901 StdMethod(Void, "GetTextFilterSize", [Out(Pointer(UINT), "pWidth"), Out(Pointer(UINT), "pHeight")], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100902]
903
904ID3D10Multithread.methods += [
José Fonseca43aa19f2012-11-10 09:29:38 +0000905 StdMethod(Void, "Enter", []),
906 StdMethod(Void, "Leave", []),
907 StdMethod(BOOL, "SetMultithreadProtected", [(BOOL, "bMTProtect")]),
908 StdMethod(BOOL, "GetMultithreadProtected", [], sideeffects=False),
José Fonsecaaf7d2312011-07-07 10:16:57 +0100909]
910
José Fonseca467a42a2012-05-04 11:49:19 +0100911
José Fonseca81301932012-11-11 00:10:20 +0000912d3d10 = Module("d3d10")
José Fonseca467a42a2012-05-04 11:49:19 +0100913
914
915from d3d10sdklayers import *
916import d3d10misc