scrrun: Implement Count() property for drive collection.
[wine.git] / include / d3d11.idl
blob72d5358be65ebedbfb42dab26e6629fea9f96c5c
1 /*
2 * Copyright 2010 Rico Schüller
3 * Copyright 2013 Austin English
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 import "oaidl.idl";
21 import "ocidl.idl";
22 import "dxgi.idl";
23 import "d3dcommon.idl";
25 typedef D3D_PRIMITIVE D3D11_PRIMITIVE;
26 typedef D3D_PRIMITIVE_TOPOLOGY D3D11_PRIMITIVE_TOPOLOGY;
27 typedef D3D_SRV_DIMENSION D3D11_SRV_DIMENSION;
28 typedef RECT D3D11_RECT;
30 const UINT D3D11_DEFAULT_DEPTH_BIAS = 0;
31 cpp_quote("#define D3D11_DEFAULT_DEPTH_BIAS_CLAMP 0.0f")
32 const UINT D3D11_DEFAULT_MAX_ANISOTROPY = 16;
33 cpp_quote("#define D3D11_DEFAULT_MIP_LOD_BIAS 0.0f")
34 const UINT D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0;
35 const UINT D3D11_DEFAULT_SAMPLE_MASK = 0xffffffff;
36 const UINT D3D11_DEFAULT_SCISSOR_ENDX = 0;
37 const UINT D3D11_DEFAULT_SCISSOR_ENDY = 0;
38 const UINT D3D11_DEFAULT_SCISSOR_STARTX = 0;
39 const UINT D3D11_DEFAULT_SCISSOR_STARTY = 0;
40 cpp_quote("#define D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS 0.0f")
41 const UINT D3D11_DEFAULT_STENCIL_READ_MASK = 0xff;
42 const UINT D3D11_DEFAULT_STENCIL_REFERENCE = 0;
43 const UINT D3D11_DEFAULT_STENCIL_WRITE_MASK = 0xff;
44 const UINT D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0;
45 const UINT D3D11_DEFAULT_VIEWPORT_HEIGHT = 0;
46 cpp_quote("#define D3D11_DEFAULT_VIEWPORT_MAX_DEPTH 0.0f")
47 cpp_quote("#define D3D11_DEFAULT_VIEWPORT_MIN_DEPTH 0.0f")
48 const UINT D3D11_DEFAULT_VIEWPORT_TOPLEFTX = 0;
49 const UINT D3D11_DEFAULT_VIEWPORT_TOPLEFTY = 0;
50 const UINT D3D11_DEFAULT_VIEWPORT_WIDTH = 0;
52 cpp_quote("#define D3D11_FLOAT32_MAX (3.402823466e+38f)")
54 const unsigned int D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
56 const UINT D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384;
57 const UINT D3D11_MAX_MAXANISOTROPY = 16;
58 const UINT D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT = 32;
59 const UINT D3D11_VIEWPORT_BOUNDS_MAX = 32767;
60 const INT D3D11_VIEWPORT_BOUNDS_MIN = -32768;
61 const UINT D3D11_SHADER_MAJOR_VERSION = 5;
62 const UINT D3D11_SHADER_MAX_INSTANCES = 65535;
63 const UINT D3D11_SHADER_MAX_INTERFACES = 253;
64 const UINT D3D11_SHADER_MAX_INTERFACE_CALL_SITES = 4096;
65 const UINT D3D11_SHADER_MAX_TYPES = 65535;
66 const UINT D3D11_SHADER_MINOR_VERSION = 0;
67 const UINT D3D11_VS_OUTPUT_REGISTER_COUNT = 32;
69 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
70 cpp_quote("struct CD3D11_DEFAULT {};")
71 cpp_quote("extern const DECLSPEC_SELECTANY CD3D11_DEFAULT D3D11_DEFAULT;")
72 cpp_quote("#endif")
74 typedef enum D3D11_BLEND
76 D3D11_BLEND_ZERO = 1,
77 D3D11_BLEND_ONE = 2,
78 D3D11_BLEND_SRC_COLOR = 3,
79 D3D11_BLEND_INV_SRC_COLOR = 4,
80 D3D11_BLEND_SRC_ALPHA = 5,
81 D3D11_BLEND_INV_SRC_ALPHA = 6,
82 D3D11_BLEND_DEST_ALPHA = 7,
83 D3D11_BLEND_INV_DEST_ALPHA = 8,
84 D3D11_BLEND_DEST_COLOR = 9,
85 D3D11_BLEND_INV_DEST_COLOR = 10,
86 D3D11_BLEND_SRC_ALPHA_SAT = 11,
87 D3D11_BLEND_BLEND_FACTOR = 14,
88 D3D11_BLEND_INV_BLEND_FACTOR = 15,
89 D3D11_BLEND_SRC1_COLOR = 16,
90 D3D11_BLEND_INV_SRC1_COLOR = 17,
91 D3D11_BLEND_SRC1_ALPHA = 18,
92 D3D11_BLEND_INV_SRC1_ALPHA = 19,
93 } D3D11_BLEND;
95 typedef enum D3D11_BLEND_OP
97 D3D11_BLEND_OP_ADD = 1,
98 D3D11_BLEND_OP_SUBTRACT,
99 D3D11_BLEND_OP_REV_SUBTRACT,
100 D3D11_BLEND_OP_MIN,
101 D3D11_BLEND_OP_MAX
102 } D3D11_BLEND_OP;
104 typedef struct D3D11_BOX
106 UINT left;
107 UINT top;
108 UINT front;
109 UINT right;
110 UINT bottom;
111 UINT back;
112 } D3D11_BOX;
114 typedef struct D3D11_BUFFER_RTV
116 union
118 UINT FirstElement;
119 UINT ElementOffset;
121 union
123 UINT NumElements;
124 UINT ElementWidth;
126 } D3D11_BUFFER_RTV;
128 typedef struct D3D11_BUFFER_SRV
130 union
132 UINT FirstElement;
133 UINT ElementOffset;
135 union
137 UINT NumElements;
138 UINT ElementWidth;
140 } D3D11_BUFFER_SRV;
142 typedef struct D3D11_BUFFER_UAV
144 UINT FirstElement;
145 UINT NumElements;
146 UINT Flags;
147 } D3D11_BUFFER_UAV;
149 typedef struct D3D11_BUFFEREX_SRV
151 UINT FirstElement;
152 UINT NumElements;
153 UINT Flags;
154 } D3D11_BUFFEREX_SRV;
156 typedef struct D3D11_CLASS_INSTANCE_DESC
158 UINT InstanceId;
159 UINT InstanceIndex;
160 UINT TypeId;
161 UINT ConstantBuffer;
162 UINT BaseConstantBufferOffset;
163 UINT BaseTexture;
164 UINT BaseSampler;
165 BOOL Created;
166 } D3D11_CLASS_INSTANCE_DESC;
168 typedef enum D3D11_COMPARISON_FUNC
170 D3D11_COMPARISON_NEVER = 1,
171 D3D11_COMPARISON_LESS,
172 D3D11_COMPARISON_EQUAL,
173 D3D11_COMPARISON_LESS_EQUAL,
174 D3D11_COMPARISON_GREATER,
175 D3D11_COMPARISON_NOT_EQUAL,
176 D3D11_COMPARISON_GREATER_EQUAL,
177 D3D11_COMPARISON_ALWAYS
178 } D3D11_COMPARISON_FUNC;
180 typedef enum D3D11_COUNTER
182 D3D11_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000,
183 } D3D11_COUNTER;
185 typedef struct D3D11_COUNTER_DESC
187 D3D11_COUNTER Counter;
188 UINT MiscFlags;
189 } D3D11_COUNTER_DESC;
191 typedef struct D3D11_COUNTER_INFO
193 D3D11_COUNTER LastDeviceDependentCounter;
194 UINT NumSimultaneousCounters;
195 UINT8 NumDetectableParallelUnits;
196 } D3D11_COUNTER_INFO;
198 typedef enum D3D11_COUNTER_TYPE
200 D3D11_COUNTER_TYPE_FLOAT32,
201 D3D11_COUNTER_TYPE_UINT16,
202 D3D11_COUNTER_TYPE_UINT32,
203 D3D11_COUNTER_TYPE_UINT64,
204 } D3D11_COUNTER_TYPE;
206 typedef enum D3D11_CULL_MODE
208 D3D11_CULL_NONE = 1,
209 D3D11_CULL_FRONT,
210 D3D11_CULL_BACK
211 } D3D11_CULL_MODE;
213 typedef enum D3D11_DEPTH_WRITE_MASK
215 D3D11_DEPTH_WRITE_MASK_ZERO,
216 D3D11_DEPTH_WRITE_MASK_ALL,
217 } D3D11_DEPTH_WRITE_MASK;
219 typedef enum D3D11_DEVICE_CONTEXT_TYPE
221 D3D11_DEVICE_CONTEXT_IMMEDIATE,
222 D3D11_DEVICE_CONTEXT_DEFERRED,
223 } D3D11_DEVICE_CONTEXT_TYPE;
225 typedef enum D3D11_DSV_DIMENSION
227 D3D11_DSV_DIMENSION_UNKNOWN,
228 D3D11_DSV_DIMENSION_TEXTURE1D,
229 D3D11_DSV_DIMENSION_TEXTURE1DARRAY,
230 D3D11_DSV_DIMENSION_TEXTURE2D,
231 D3D11_DSV_DIMENSION_TEXTURE2DARRAY,
232 D3D11_DSV_DIMENSION_TEXTURE2DMS,
233 D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY,
234 } D3D11_DSV_DIMENSION;
236 typedef enum D3D11_FEATURE
238 D3D11_FEATURE_THREADING,
239 D3D11_FEATURE_DOUBLES,
240 D3D11_FEATURE_FORMAT_SUPPORT,
241 D3D11_FEATURE_FORMAT_SUPPORT2,
242 D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS,
243 } D3D11_FEATURE;
245 typedef enum D3D11_FILL_MODE
247 D3D11_FILL_WIREFRAME = 2,
248 D3D11_FILL_SOLID
249 } D3D11_FILL_MODE;
251 typedef enum D3D11_FILTER_TYPE
253 D3D11_FILTER_TYPE_POINT = 0,
254 D3D11_FILTER_TYPE_LINEAR = 1
255 } D3D11_FILTER_TYPE;
257 const UINT D3D11_MIN_FILTER_SHIFT = 4;
258 const UINT D3D11_MAG_FILTER_SHIFT = 2;
259 const UINT D3D11_MIP_FILTER_SHIFT = 0;
260 const UINT D3D11_FILTER_TYPE_MASK = 0x00000003;
261 const UINT D3D11_COMPARISON_FILTERING_BIT = 0x00000080;
262 const UINT D3D11_ANISOTROPIC_FILTERING_BIT = 0x00000040;
264 cpp_quote("#define D3D11_ENCODE_BASIC_FILTER(min, mag, mip, bComparison) \\")
265 cpp_quote(" ((D3D11_FILTER)(((bComparison) ? D3D11_COMPARISON_FILTERING_BIT : 0 ) | \\")
266 cpp_quote(" (((min)&D3D11_FILTER_TYPE_MASK) << D3D11_MIN_FILTER_SHIFT) | \\")
267 cpp_quote(" (((mag)&D3D11_FILTER_TYPE_MASK) << D3D11_MAG_FILTER_SHIFT) | \\")
268 cpp_quote(" (((mip)&D3D11_FILTER_TYPE_MASK) << D3D11_MIP_FILTER_SHIFT)))")
270 cpp_quote("#define D3D11_ENCODE_ANISOTROPIC_FILTER(bComparison) \\")
271 cpp_quote(" ((D3D11_FILTER)(D3D11_ANISOTROPIC_FILTERING_BIT | \\" )
272 cpp_quote(" D3D11_ENCODE_BASIC_FILTER(D3D11_FILTER_TYPE_LINEAR,D3D11_FILTER_TYPE_LINEAR, \\" )
273 cpp_quote(" D3D11_FILTER_TYPE_LINEAR,bComparison)))" )
275 cpp_quote("#define D3D11_DECODE_MIN_FILTER(d3d11Filter) \\")
276 cpp_quote(" ((D3D11_FILTER_TYPE)(((d3d11Filter) >> D3D11_MIN_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))")
278 cpp_quote("#define D3D11_DECODE_MAG_FILTER(d3d11Filter) \\")
279 cpp_quote(" ((D3D11_FILTER_TYPE)(((d3d11Filter) >> D3D11_MAG_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))")
281 cpp_quote("#define D3D11_DECODE_MIP_FILTER(d3d11Filter) \\")
282 cpp_quote(" ((D3D11_FILTER_TYPE)(((d3d11Filter) >> D3D11_MIP_FILTER_SHIFT) & D3D11_FILTER_TYPE_MASK))")
284 cpp_quote("#define D3D11_DECODE_IS_COMPARISON_FILTER(d3d11Filter) ((d3d11Filter) & D3D11_COMPARISON_FILTERING_BIT)")
286 cpp_quote("#define D3D11_DECODE_IS_ANISOTROPIC_FILTER(d3d11Filter) \\")
287 cpp_quote(" (((d3d11Filter) & D3D11_ANISOTROPIC_FILTERING_BIT ) \\" )
288 cpp_quote(" && (D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIN_FILTER(d3d11Filter)) \\" )
289 cpp_quote(" && (D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MAG_FILTER(d3d11Filter)) \\" )
290 cpp_quote(" && (D3D11_FILTER_TYPE_LINEAR == D3D11_DECODE_MIP_FILTER(d3d11Filter)))")
292 typedef enum D3D11_FILTER
294 D3D11_FILTER_MIN_MAG_MIP_POINT = 0x00,
295 D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01,
296 D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04,
297 D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05,
298 D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
299 D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
300 D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
301 D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
302 D3D11_FILTER_ANISOTROPIC = 0x55,
303 D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
304 D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
305 D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
306 D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
307 D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
308 D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
309 D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
310 D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
311 D3D11_FILTER_COMPARISON_ANISOTROPIC = 0xd5
312 } D3D11_FILTER;
314 typedef enum D3D11_DSV_FLAG
316 D3D11_DSV_READ_ONLY_DEPTH = 0x1,
317 D3D11_DSV_READ_ONLY_STENCIL = 0x2,
318 } D3D11_DSV_FLAG;
320 typedef enum D3D11_INPUT_CLASSIFICATION
322 D3D11_INPUT_PER_VERTEX_DATA,
323 D3D11_INPUT_PER_INSTANCE_DATA,
324 } D3D11_INPUT_CLASSIFICATION;
326 typedef struct D3D11_INPUT_ELEMENT_DESC
328 LPCSTR SemanticName;
329 UINT SemanticIndex;
330 DXGI_FORMAT Format;
331 UINT InputSlot;
332 UINT AlignedByteOffset;
333 D3D11_INPUT_CLASSIFICATION InputSlotClass;
334 UINT InstanceDataStepRate;
335 } D3D11_INPUT_ELEMENT_DESC;
337 typedef enum D3D11_MAP
339 D3D11_MAP_READ = 1,
340 D3D11_MAP_WRITE,
341 D3D11_MAP_READ_WRITE,
342 D3D11_MAP_WRITE_DISCARD,
343 D3D11_MAP_WRITE_NO_OVERWRITE
344 } D3D11_MAP;
346 typedef struct D3D11_MAPPED_SUBRESOURCE
348 void *pData;
349 UINT RowPitch;
350 UINT DepthPitch;
351 } D3D11_MAPPED_SUBRESOURCE;
353 typedef enum D3D11_QUERY
355 D3D11_QUERY_EVENT,
356 D3D11_QUERY_OCCLUSION,
357 D3D11_QUERY_TIMESTAMP,
358 D3D11_QUERY_TIMESTAMP_DISJOINT,
359 D3D11_QUERY_PIPELINE_STATISTICS,
360 D3D11_QUERY_OCCLUSION_PREDICATE,
361 D3D11_QUERY_SO_STATISTICS,
362 D3D11_QUERY_SO_OVERFLOW_PREDICATE,
363 D3D11_QUERY_SO_STATISTICS_STREAM0,
364 D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0,
365 D3D11_QUERY_SO_STATISTICS_STREAM1,
366 D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1,
367 D3D11_QUERY_SO_STATISTICS_STREAM2,
368 D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2,
369 D3D11_QUERY_SO_STATISTICS_STREAM3,
370 D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3,
371 } D3D11_QUERY;
373 typedef enum D3D11_ASYNC_GETDATA_FLAG
375 D3D11_ASYNC_GETDATA_DONOTFLUSH = 0x0001,
376 } D3D11_ASYNC_GETDATA_FLAG;
378 typedef enum D3D11_RESOURCE_MISC_FLAG
380 D3D11_RESOURCE_MISC_GENERATE_MIPS = 0x00000001L,
381 D3D11_RESOURCE_MISC_SHARED = 0x00000002L,
382 D3D11_RESOURCE_MISC_TEXTURECUBE = 0x00000004L,
383 D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x00000010L,
384 D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x00000020L,
385 D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = 0x00000040L,
386 D3D11_RESOURCE_MISC_RESOURCE_CLAMP = 0x00000080L,
387 D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x00000100L,
388 D3D11_RESOURCE_MISC_GDI_COMPATIBLE = 0x00000200L,
389 D3D11_RESOURCE_MISC_SHARED_NTHANDLE = 0x00000800L,
390 D3D11_RESOURCE_MISC_RESTRICTED_CONTENT = 0x00001000L,
391 D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE = 0x00002000L,
392 D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER = 0x00004000L,
393 D3D11_RESOURCE_MISC_GUARDED = 0x00008000L
394 } D3D11_RESOURCE_MISC_FLAG;
396 typedef struct D3D11_QUERY_DESC
398 D3D11_QUERY Query;
399 UINT MiscFlags;
400 } D3D11_QUERY_DESC;
402 typedef struct D3D11_RASTERIZER_DESC
404 D3D11_FILL_MODE FillMode;
405 D3D11_CULL_MODE CullMode;
406 BOOL FrontCounterClockwise;
407 INT DepthBias;
408 FLOAT DepthBiasClamp;
409 FLOAT SlopeScaledDepthBias;
410 BOOL DepthClipEnable;
411 BOOL ScissorEnable;
412 BOOL MultisampleEnable;
413 BOOL AntialiasedLineEnable;
414 } D3D11_RASTERIZER_DESC;
416 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
417 cpp_quote("struct CD3D11_RASTERIZER_DESC : public D3D11_RASTERIZER_DESC {")
418 cpp_quote(" CD3D11_RASTERIZER_DESC() {}")
419 cpp_quote(" explicit CD3D11_RASTERIZER_DESC(const D3D11_RASTERIZER_DESC &o) : D3D11_RASTERIZER_DESC(o) {}")
420 cpp_quote(" explicit CD3D11_RASTERIZER_DESC(CD3D11_DEFAULT) {")
421 cpp_quote(" FillMode = D3D11_FILL_SOLID;")
422 cpp_quote(" CullMode = D3D11_CULL_BACK;")
423 cpp_quote(" FrontCounterClockwise = FALSE;")
424 cpp_quote(" DepthBias = D3D11_DEFAULT_DEPTH_BIAS;")
425 cpp_quote(" DepthBiasClamp = D3D11_DEFAULT_DEPTH_BIAS_CLAMP;")
426 cpp_quote(" SlopeScaledDepthBias = D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;")
427 cpp_quote(" DepthClipEnable = TRUE;")
428 cpp_quote(" ScissorEnable = FALSE;")
429 cpp_quote(" MultisampleEnable = FALSE;")
430 cpp_quote(" AntialiasedLineEnable = FALSE;")
431 cpp_quote(" }")
432 cpp_quote(" explicit CD3D11_RASTERIZER_DESC(D3D11_FILL_MODE fillMode, D3D11_CULL_MODE cullMode," )
433 cpp_quote(" BOOL frontCounterClockwise, INT depthBias, FLOAT depthBiasClamp, FLOAT slopeScaledDepthBias,")
434 cpp_quote(" BOOL depthClipEnable, BOOL scissorEnable, BOOL multisampleEnable, BOOL antialiasedLineEnable) {")
435 cpp_quote(" FillMode = fillMode;")
436 cpp_quote(" CullMode = cullMode;")
437 cpp_quote(" FrontCounterClockwise = frontCounterClockwise;")
438 cpp_quote(" DepthBias = depthBias;")
439 cpp_quote(" DepthBiasClamp = depthBiasClamp;")
440 cpp_quote(" SlopeScaledDepthBias = slopeScaledDepthBias;")
441 cpp_quote(" DepthClipEnable = depthClipEnable;")
442 cpp_quote(" ScissorEnable = scissorEnable;")
443 cpp_quote(" MultisampleEnable = multisampleEnable;")
444 cpp_quote(" AntialiasedLineEnable = antialiasedLineEnable;")
445 cpp_quote(" }")
446 cpp_quote(" ~CD3D11_RASTERIZER_DESC() {}")
447 cpp_quote(" operator const D3D11_RASTERIZER_DESC&() const { return *this; }")
448 cpp_quote("};")
449 cpp_quote("#endif")
451 typedef enum D3D11_RESOURCE_DIMENSION
453 D3D11_RESOURCE_DIMENSION_UNKNOWN,
454 D3D11_RESOURCE_DIMENSION_BUFFER,
455 D3D11_RESOURCE_DIMENSION_TEXTURE1D,
456 D3D11_RESOURCE_DIMENSION_TEXTURE2D,
457 D3D11_RESOURCE_DIMENSION_TEXTURE3D,
458 } D3D11_RESOURCE_DIMENSION;
460 typedef enum D3D11_RTV_DIMENSION
462 D3D11_RTV_DIMENSION_UNKNOWN,
463 D3D11_RTV_DIMENSION_BUFFER,
464 D3D11_RTV_DIMENSION_TEXTURE1D,
465 D3D11_RTV_DIMENSION_TEXTURE1DARRAY,
466 D3D11_RTV_DIMENSION_TEXTURE2D,
467 D3D11_RTV_DIMENSION_TEXTURE2DARRAY,
468 D3D11_RTV_DIMENSION_TEXTURE2DMS,
469 D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY,
470 D3D11_RTV_DIMENSION_TEXTURE3D,
471 } D3D11_RTV_DIMENSION;
473 typedef struct D3D11_SO_DECLARATION_ENTRY
475 UINT Stream;
476 LPCSTR SemanticName;
477 UINT SemanticIndex;
478 BYTE StartComponent;
479 BYTE ComponentCount;
480 BYTE OutputSlot;
481 } D3D11_SO_DECLARATION_ENTRY;
483 typedef enum D3D11_STENCIL_OP
485 D3D11_STENCIL_OP_KEEP = 1,
486 D3D11_STENCIL_OP_ZERO,
487 D3D11_STENCIL_OP_REPLACE,
488 D3D11_STENCIL_OP_INCR_SAT,
489 D3D11_STENCIL_OP_DECR_SAT,
490 D3D11_STENCIL_OP_INVERT,
491 D3D11_STENCIL_OP_INCR,
492 D3D11_STENCIL_OP_DECR
493 } D3D11_STENCIL_OP;
495 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
496 cpp_quote("}")
497 cpp_quote("inline UINT D3D11CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT MipLevels) {")
498 cpp_quote(" return MipSlice + ArraySlice * MipLevels;")
499 cpp_quote("}")
500 cpp_quote("extern \"C\"{")
501 cpp_quote("#endif")
503 typedef struct D3D11_SUBRESOURCE_DATA
505 const void *pSysMem;
506 UINT SysMemPitch;
507 UINT SysMemSlicePitch;
508 } D3D11_SUBRESOURCE_DATA;
510 typedef struct D3D11_TEX1D_ARRAY_DSV
512 UINT MipSlice;
513 UINT FirstArraySlice;
514 UINT ArraySize;
515 } D3D11_TEX1D_ARRAY_DSV;
517 typedef struct D3D11_TEX1D_ARRAY_RTV
519 UINT MipSlice;
520 UINT FirstArraySlice;
521 UINT ArraySize;
522 } D3D11_TEX1D_ARRAY_RTV;
524 typedef struct D3D11_TEX1D_ARRAY_SRV
526 UINT MostDetailedMip;
527 UINT MipLevels;
528 UINT FirstArraySlice;
529 UINT ArraySize;
530 } D3D11_TEX1D_ARRAY_SRV;
532 typedef struct D3D11_TEX1D_ARRAY_UAV
534 UINT MipSlice;
535 UINT FirstArraySlice;
536 UINT ArraySize;
537 } D3D11_TEX1D_ARRAY_UAV;
539 typedef struct D3D11_TEX1D_DSV
541 UINT MipSlice;
542 } D3D11_TEX1D_DSV;
544 typedef struct D3D11_TEX1D_RTV
546 UINT MipSlice;
547 } D3D11_TEX1D_RTV;
549 typedef struct D3D11_TEX1D_SRV
551 UINT MostDetailedMip;
552 UINT MipLevels;
553 } D3D11_TEX1D_SRV;
555 typedef struct D3D11_TEX1D_UAV
557 UINT MipSlice;
558 } D3D11_TEX1D_UAV;
560 typedef struct D3D11_TEX2D_ARRAY_DSV
562 UINT MipSlice;
563 UINT FirstArraySlice;
564 UINT ArraySize;
565 } D3D11_TEX2D_ARRAY_DSV;
567 typedef struct D3D11_TEX2D_ARRAY_RTV
569 UINT MipSlice;
570 UINT FirstArraySlice;
571 UINT ArraySize;
572 } D3D11_TEX2D_ARRAY_RTV;
574 typedef struct D3D11_TEX2D_ARRAY_SRV
576 UINT MostDetailedMip;
577 UINT MipLevels;
578 UINT FirstArraySlice;
579 UINT ArraySize;
580 } D3D11_TEX2D_ARRAY_SRV;
582 typedef struct D3D11_TEX2D_ARRAY_UAV
584 UINT MipSlice;
585 UINT FirstArraySlice;
586 UINT ArraySize;
587 } D3D11_TEX2D_ARRAY_UAV;
589 typedef struct D3D11_TEX2D_DSV
591 UINT MipSlice;
592 } D3D11_TEX2D_DSV;
594 typedef struct D3D11_TEX2D_RTV
596 UINT MipSlice;
597 } D3D11_TEX2D_RTV;
599 typedef struct D3D11_TEX2D_SRV
601 UINT MostDetailedMip;
602 UINT MipLevels;
603 } D3D11_TEX2D_SRV;
605 typedef struct D3D11_TEX2D_UAV
607 UINT MipSlice;
608 } D3D11_TEX2D_UAV;
610 typedef struct D3D11_TEX2DMS_ARRAY_DSV
612 UINT FirstArraySlice;
613 UINT ArraySize;
614 } D3D11_TEX2DMS_ARRAY_DSV;
616 typedef struct D3D11_TEX2DMS_ARRAY_RTV
618 UINT FirstArraySlice;
619 UINT ArraySize;
620 } D3D11_TEX2DMS_ARRAY_RTV;
622 typedef struct D3D11_TEX2DMS_ARRAY_SRV
624 UINT FirstArraySlice;
625 UINT ArraySize;
626 } D3D11_TEX2DMS_ARRAY_SRV;
628 typedef struct D3D11_TEX2DMS_DSV
630 UINT UnusedField_NothingToDefine;
631 } D3D11_TEX2DMS_DSV;
633 typedef struct D3D11_TEX2DMS_RTV
635 UINT UnusedField_NothingToDefine;
636 } D3D11_TEX2DMS_RTV;
638 typedef struct D3D11_TEX2DMS_SRV
640 UINT UnusedField_NothingToDefine;
641 } D3D11_TEX2DMS_SRV;
643 typedef struct D3D11_TEX3D_RTV
645 UINT MipSlice;
646 UINT FirstWSlice;
647 UINT WSize;
648 } D3D11_TEX3D_RTV;
650 typedef struct D3D11_TEX3D_SRV
652 UINT MostDetailedMip;
653 UINT MipLevels;
654 } D3D11_TEX3D_SRV;
656 typedef struct D3D11_TEX3D_UAV
658 UINT MipSlice;
659 UINT FirstWSlice;
660 UINT WSize;
661 } D3D11_TEX3D_UAV;
663 typedef struct D3D11_TEXCUBE_ARRAY_SRV
665 UINT MostDetailedMip;
666 UINT MipLevels;
667 UINT First2DArrayFace;
668 UINT NumCubes;
669 } D3D11_TEXCUBE_ARRAY_SRV;
671 typedef struct D3D11_TEXCUBE_SRV
673 UINT MostDetailedMip;
674 UINT MipLevels;
675 } D3D11_TEXCUBE_SRV;
677 typedef enum D3D11_TEXTURE_ADDRESS_MODE
679 D3D11_TEXTURE_ADDRESS_WRAP = 1,
680 D3D11_TEXTURE_ADDRESS_MIRROR,
681 D3D11_TEXTURE_ADDRESS_CLAMP,
682 D3D11_TEXTURE_ADDRESS_BORDER,
683 D3D11_TEXTURE_ADDRESS_MIRROR_ONCE
684 } D3D11_TEXTURE_ADDRESS_MODE;
686 typedef enum D3D11_UAV_DIMENSION
688 D3D11_UAV_DIMENSION_UNKNOWN,
689 D3D11_UAV_DIMENSION_BUFFER,
690 D3D11_UAV_DIMENSION_TEXTURE1D,
691 D3D11_UAV_DIMENSION_TEXTURE1DARRAY,
692 D3D11_UAV_DIMENSION_TEXTURE2D,
693 D3D11_UAV_DIMENSION_TEXTURE2DARRAY,
694 D3D11_UAV_DIMENSION_TEXTURE3D = 8,
695 } D3D11_UAV_DIMENSION;
697 typedef struct D3D11_UNORDERED_ACCESS_VIEW_DESC
699 DXGI_FORMAT Format;
700 D3D11_UAV_DIMENSION ViewDimension;
702 union
704 D3D11_BUFFER_UAV Buffer;
705 D3D11_TEX1D_UAV Texture1D;
706 D3D11_TEX1D_ARRAY_UAV Texture1DArray;
707 D3D11_TEX2D_UAV Texture2D;
708 D3D11_TEX2D_ARRAY_UAV Texture2DArray;
709 D3D11_TEX3D_UAV Texture3D;
711 } D3D11_UNORDERED_ACCESS_VIEW_DESC;
713 typedef enum D3D11_USAGE
715 D3D11_USAGE_DEFAULT,
716 D3D11_USAGE_IMMUTABLE,
717 D3D11_USAGE_DYNAMIC,
718 D3D11_USAGE_STAGING,
719 } D3D11_USAGE;
721 typedef enum D3D11_BIND_FLAG
723 D3D11_BIND_VERTEX_BUFFER = 0x0001,
724 D3D11_BIND_INDEX_BUFFER = 0x0002,
725 D3D11_BIND_CONSTANT_BUFFER = 0x0004,
726 D3D11_BIND_SHADER_RESOURCE = 0x0008,
727 D3D11_BIND_STREAM_OUTPUT = 0x0010,
728 D3D11_BIND_RENDER_TARGET = 0x0020,
729 D3D11_BIND_DEPTH_STENCIL = 0x0040,
730 D3D11_BIND_UNORDERED_ACCESS = 0x0080,
731 D3D11_BIND_DECODER = 0x0200,
732 D3D11_BIND_VIDEO_ENCODER = 0x0400
733 } D3D11_BIND_FLAG;
735 typedef enum D3D11_CPU_ACCESS_FLAG
737 D3D11_CPU_ACCESS_WRITE = 0x00010000,
738 D3D11_CPU_ACCESS_READ = 0x00020000
739 } D3D11_CPU_ACCESS_FLAG;
741 typedef struct D3D11_VIEWPORT
743 FLOAT TopLeftX;
744 FLOAT TopLeftY;
745 FLOAT Width;
746 FLOAT Height;
747 FLOAT MinDepth;
748 FLOAT MaxDepth;
749 } D3D11_VIEWPORT;
751 typedef enum D3D11_COLOR_WRITE_ENABLE
753 D3D11_COLOR_WRITE_ENABLE_RED = 1,
754 D3D11_COLOR_WRITE_ENABLE_GREEN = 2,
755 D3D11_COLOR_WRITE_ENABLE_BLUE = 4,
756 D3D11_COLOR_WRITE_ENABLE_ALPHA = 8,
757 D3D11_COLOR_WRITE_ENABLE_ALL =
758 (D3D11_COLOR_WRITE_ENABLE_RED|D3D11_COLOR_WRITE_ENABLE_GREEN|D3D11_COLOR_WRITE_ENABLE_BLUE|D3D11_COLOR_WRITE_ENABLE_ALPHA)
759 } D3D11_COLOR_WRITE_ENABLE;
761 typedef enum D3D11_FORMAT_SUPPORT
763 D3D11_FORMAT_SUPPORT_BUFFER = 0x00000001,
764 D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x00000002,
765 D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x00000004,
766 D3D11_FORMAT_SUPPORT_SO_BUFFER = 0x00000008,
767 D3D11_FORMAT_SUPPORT_TEXTURE1D = 0x00000010,
768 D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x00000020,
769 D3D11_FORMAT_SUPPORT_TEXTURE3D = 0x00000040,
770 D3D11_FORMAT_SUPPORT_TEXTURECUBE = 0x00000080,
771 D3D11_FORMAT_SUPPORT_SHADER_LOAD = 0x00000100,
772 D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = 0x00000200,
773 D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x00000400,
774 D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x00000800,
775 D3D11_FORMAT_SUPPORT_MIP = 0x00001000,
776 D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = 0x00002000,
777 D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x00004000,
778 D3D11_FORMAT_SUPPORT_BLENDABLE = 0x00008000,
779 D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = 0x00010000,
780 D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = 0x00020000,
781 D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x00040000,
782 D3D11_FORMAT_SUPPORT_DISPLAY = 0x00080000,
783 D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x00100000,
784 D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x00200000,
785 D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x00400000,
786 D3D11_FORMAT_SUPPORT_SHADER_GATHER = 0x00800000,
787 D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x01000000,
788 D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x02000000,
789 D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x04000000
790 } D3D11_FORMAT_SUPPORT;
792 typedef enum D3D11_CLEAR_FLAG
794 D3D11_CLEAR_DEPTH = 0x0001L,
795 D3D11_CLEAR_STENCIL = 0x0002L
796 } D3D11_CLEAR_FLAG;
798 typedef struct D3D11_RENDER_TARGET_BLEND_DESC
800 BOOL BlendEnable;
801 D3D11_BLEND SrcBlend;
802 D3D11_BLEND DestBlend;
803 D3D11_BLEND_OP BlendOp;
804 D3D11_BLEND SrcBlendAlpha;
805 D3D11_BLEND DestBlendAlpha;
806 D3D11_BLEND_OP BlendOpAlpha;
807 UINT8 RenderTargetWriteMask;
808 } D3D11_RENDER_TARGET_BLEND_DESC;
810 typedef struct D3D11_BLEND_DESC
812 BOOL AlphaToCoverageEnable;
813 BOOL IndependentBlendEnable;
814 D3D11_RENDER_TARGET_BLEND_DESC RenderTarget[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT];
815 } D3D11_BLEND_DESC;
817 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
818 cpp_quote("struct CD3D11_BLEND_DESC : public D3D11_BLEND_DESC {")
819 cpp_quote(" CD3D11_BLEND_DESC() {}")
820 cpp_quote(" explicit CD3D11_BLEND_DESC(const D3D11_BLEND_DESC &o) : D3D11_BLEND_DESC(o) {}")
821 cpp_quote(" explicit CD3D11_BLEND_DESC(CD3D11_DEFAULT) {")
822 cpp_quote(" AlphaToCoverageEnable = FALSE;")
823 cpp_quote(" IndependentBlendEnable = FALSE;")
824 cpp_quote(" for(D3D11_RENDER_TARGET_BLEND_DESC *target; target < RenderTarget+D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; target++) {")
825 cpp_quote(" target->BlendEnable = FALSE;")
826 cpp_quote(" target->SrcBlend = target->SrcBlendAlpha = D3D11_BLEND_ONE;")
827 cpp_quote(" target->DestBlend = target->DestBlendAlpha = D3D11_BLEND_ZERO;")
828 cpp_quote(" target->BlendOp = target->BlendOpAlpha = D3D11_BLEND_OP_ADD;")
829 cpp_quote(" target->RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;")
830 cpp_quote(" }")
831 cpp_quote(" }")
832 cpp_quote(" ~CD3D11_BLEND_DESC() {}")
833 cpp_quote(" operator const D3D11_BLEND_DESC&() const { return *this; }")
834 cpp_quote("};" )
835 cpp_quote("#endif" )
837 typedef struct D3D11_BUFFER_DESC
839 UINT ByteWidth;
840 D3D11_USAGE Usage;
841 UINT BindFlags;
842 UINT CPUAccessFlags;
843 UINT MiscFlags;
844 UINT StructureByteStride;
845 } D3D11_BUFFER_DESC;
847 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
848 cpp_quote("struct CD3D11_BUFFER_DESC : public D3D11_BUFFER_DESC {")
849 cpp_quote(" CD3D11_BUFFER_DESC() {}" )
850 cpp_quote(" explicit CD3D11_BUFFER_DESC(const D3D11_BUFFER_DESC &o) : D3D11_BUFFER_DESC(o) {}")
851 cpp_quote(" explicit CD3D11_BUFFER_DESC(UINT byteWidth,UINT bindFlags,")
852 cpp_quote(" D3D11_USAGE usage = D3D11_USAGE_DEFAULT, UINT cpuaccessFlags = 0,")
853 cpp_quote(" UINT miscFlags = 0, UINT structureByteStride = 0 ) {")
854 cpp_quote(" ByteWidth = byteWidth;")
855 cpp_quote(" Usage = usage;")
856 cpp_quote(" BindFlags = bindFlags;")
857 cpp_quote(" CPUAccessFlags = cpuaccessFlags;")
858 cpp_quote(" MiscFlags = miscFlags;" )
859 cpp_quote(" StructureByteStride = structureByteStride;")
860 cpp_quote(" }")
861 cpp_quote(" ~CD3D11_BUFFER_DESC() {}")
862 cpp_quote(" operator const D3D11_BUFFER_DESC&() const { return *this; }")
863 cpp_quote("};" )
864 cpp_quote("#endif" )
866 typedef struct D3D11_DEPTH_STENCIL_VIEW_DESC
868 DXGI_FORMAT Format;
869 D3D11_DSV_DIMENSION ViewDimension;
870 UINT Flags;
872 union
874 D3D11_TEX1D_DSV Texture1D;
875 D3D11_TEX1D_ARRAY_DSV Texture1DArray;
876 D3D11_TEX2D_DSV Texture2D;
877 D3D11_TEX2D_ARRAY_DSV Texture2DArray;
878 D3D11_TEX2DMS_DSV Texture2DMS;
879 D3D11_TEX2DMS_ARRAY_DSV Texture2DMSArray;
881 } D3D11_DEPTH_STENCIL_VIEW_DESC;
883 typedef struct D3D11_DEPTH_STENCILOP_DESC
885 D3D11_STENCIL_OP StencilFailOp;
886 D3D11_STENCIL_OP StencilDepthFailOp;
887 D3D11_STENCIL_OP StencilPassOp;
888 D3D11_COMPARISON_FUNC StencilFunc;
889 } D3D11_DEPTH_STENCILOP_DESC;
891 typedef struct D3D11_DEPTH_STENCIL_DESC
893 BOOL DepthEnable;
894 D3D11_DEPTH_WRITE_MASK DepthWriteMask;
895 D3D11_COMPARISON_FUNC DepthFunc;
896 BOOL StencilEnable;
897 UINT8 StencilReadMask;
898 UINT8 StencilWriteMask;
899 D3D11_DEPTH_STENCILOP_DESC FrontFace;
900 D3D11_DEPTH_STENCILOP_DESC BackFace;
901 } D3D11_DEPTH_STENCIL_DESC;
903 typedef struct D3D11_RENDER_TARGET_VIEW_DESC
905 DXGI_FORMAT Format;
906 D3D11_RTV_DIMENSION ViewDimension;
908 union
910 D3D11_BUFFER_RTV Buffer;
911 D3D11_TEX1D_RTV Texture1D;
912 D3D11_TEX1D_ARRAY_RTV Texture1DArray;
913 D3D11_TEX2D_RTV Texture2D;
914 D3D11_TEX2D_ARRAY_RTV Texture2DArray;
915 D3D11_TEX2DMS_RTV Texture2DMS;
916 D3D11_TEX2DMS_ARRAY_RTV Texture2DMSArray;
917 D3D11_TEX3D_RTV Texture3D;
919 } D3D11_RENDER_TARGET_VIEW_DESC;
921 typedef struct D3D11_SAMPLER_DESC
923 D3D11_FILTER Filter;
924 D3D11_TEXTURE_ADDRESS_MODE AddressU;
925 D3D11_TEXTURE_ADDRESS_MODE AddressV;
926 D3D11_TEXTURE_ADDRESS_MODE AddressW;
927 FLOAT MipLODBias;
928 UINT MaxAnisotropy;
929 D3D11_COMPARISON_FUNC ComparisonFunc;
930 FLOAT BorderColor[4];
931 FLOAT MinLOD;
932 FLOAT MaxLOD;
933 } D3D11_SAMPLER_DESC;
935 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
936 cpp_quote("struct CD3D11_SAMPLER_DESC : public D3D11_SAMPLER_DESC {")
937 cpp_quote(" CD3D11_SAMPLER_DESC() {}")
938 cpp_quote(" explicit CD3D11_SAMPLER_DESC(const D3D11_SAMPLER_DESC &o) : D3D11_SAMPLER_DESC(o) {}")
939 cpp_quote(" explicit CD3D11_SAMPLER_DESC(CD3D11_DEFAULT) {" )
940 cpp_quote(" Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;")
941 cpp_quote(" AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;")
942 cpp_quote(" AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;")
943 cpp_quote(" AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;")
944 cpp_quote(" MipLODBias = 0;")
945 cpp_quote(" MaxAnisotropy = 1;")
946 cpp_quote(" ComparisonFunc = D3D11_COMPARISON_NEVER;")
947 cpp_quote(" BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 1.0f;")
948 cpp_quote(" MinLOD = -3.402823466e+38f;")
949 cpp_quote(" MaxLOD = 3.402823466e+38f;")
950 cpp_quote(" }")
951 cpp_quote(" explicit CD3D11_SAMPLER_DESC(D3D11_FILTER filter, D3D11_TEXTURE_ADDRESS_MODE addressU,")
952 cpp_quote(" D3D11_TEXTURE_ADDRESS_MODE addressV, D3D11_TEXTURE_ADDRESS_MODE addressW,")
953 cpp_quote(" FLOAT mipLODBias, UINT maxAnisotropy, D3D11_COMPARISON_FUNC comparisonFunc,")
954 cpp_quote(" const FLOAT *borderColor, FLOAT minLOD, FLOAT maxLOD) {" )
955 cpp_quote(" Filter = filter;")
956 cpp_quote(" AddressU = addressU;")
957 cpp_quote(" AddressV = addressV;")
958 cpp_quote(" AddressW = addressW;")
959 cpp_quote(" MipLODBias = mipLODBias;")
960 cpp_quote(" MaxAnisotropy = maxAnisotropy;")
961 cpp_quote(" ComparisonFunc = comparisonFunc;")
962 cpp_quote(" if(borderColor) {")
963 cpp_quote(" BorderColor[0] = borderColor[0];")
964 cpp_quote(" BorderColor[1] = borderColor[1];")
965 cpp_quote(" BorderColor[2] = borderColor[2];")
966 cpp_quote(" BorderColor[3] = borderColor[3];")
967 cpp_quote(" }else {")
968 cpp_quote(" BorderColor[0] = BorderColor[1] = BorderColor[2] = BorderColor[3] = 1.0f;")
969 cpp_quote(" }")
970 cpp_quote(" MinLOD = minLOD;")
971 cpp_quote(" MaxLOD = maxLOD;")
972 cpp_quote(" }")
973 cpp_quote(" ~CD3D11_SAMPLER_DESC() {}")
974 cpp_quote(" operator const D3D11_SAMPLER_DESC&() const { return *this; }")
975 cpp_quote("};")
976 cpp_quote("#endif")
978 typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC
980 DXGI_FORMAT Format;
981 D3D11_SRV_DIMENSION ViewDimension;
983 union
985 D3D11_BUFFER_SRV Buffer;
986 D3D11_TEX1D_SRV Texture1D;
987 D3D11_TEX1D_ARRAY_SRV Texture1DArray;
988 D3D11_TEX2D_SRV Texture2D;
989 D3D11_TEX2D_ARRAY_SRV Texture2DArray;
990 D3D11_TEX2DMS_SRV Texture2DMS;
991 D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray;
992 D3D11_TEX3D_SRV Texture3D;
993 D3D11_TEXCUBE_SRV TextureCube;
994 D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray;
995 D3D11_BUFFEREX_SRV BufferEx;
997 } D3D11_SHADER_RESOURCE_VIEW_DESC;
999 typedef struct D3D11_TEXTURE1D_DESC
1001 UINT Width;
1002 UINT MipLevels;
1003 UINT ArraySize;
1004 DXGI_FORMAT Format;
1005 D3D11_USAGE Usage;
1006 UINT BindFlags;
1007 UINT CPUAccessFlags;
1008 UINT MiscFlags;
1009 } D3D11_TEXTURE1D_DESC;
1011 typedef struct D3D11_TEXTURE2D_DESC
1013 UINT Width;
1014 UINT Height;
1015 UINT MipLevels;
1016 UINT ArraySize;
1017 DXGI_FORMAT Format;
1018 DXGI_SAMPLE_DESC SampleDesc;
1019 D3D11_USAGE Usage;
1020 UINT BindFlags;
1021 UINT CPUAccessFlags;
1022 UINT MiscFlags;
1023 } D3D11_TEXTURE2D_DESC;
1025 cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
1026 cpp_quote("struct CD3D11_TEXTURE2D_DESC : public D3D11_TEXTURE2D_DESC {")
1027 cpp_quote(" CD3D11_TEXTURE2D_DESC() {}")
1028 cpp_quote(" explicit CD3D11_TEXTURE2D_DESC(const D3D11_TEXTURE2D_DESC &o) : D3D11_TEXTURE2D_DESC(o) {}")
1029 cpp_quote(" explicit CD3D11_TEXTURE2D_DESC(DXGI_FORMAT format, UINT width, UINT height, UINT arraySize = 1,")
1030 cpp_quote(" UINT mipLevels = 0, UINT bindFlags = D3D11_BIND_SHADER_RESOURCE,")
1031 cpp_quote(" D3D11_USAGE usage = D3D11_USAGE_DEFAULT, UINT cpuaccessFlags = 0, UINT sampleCount = 1," )
1032 cpp_quote(" UINT sampleQuality = 0, UINT miscFlags = 0) {")
1033 cpp_quote(" Width = width;")
1034 cpp_quote(" Height = height;")
1035 cpp_quote(" MipLevels = mipLevels;")
1036 cpp_quote(" ArraySize = arraySize;")
1037 cpp_quote(" Format = format;")
1038 cpp_quote(" SampleDesc.Count = sampleCount;")
1039 cpp_quote(" SampleDesc.Quality = sampleQuality;")
1040 cpp_quote(" Usage = usage;")
1041 cpp_quote(" BindFlags = bindFlags;")
1042 cpp_quote(" CPUAccessFlags = cpuaccessFlags;")
1043 cpp_quote(" MiscFlags = miscFlags;")
1044 cpp_quote(" }" )
1045 cpp_quote(" ~CD3D11_TEXTURE2D_DESC() {}")
1046 cpp_quote(" operator const D3D11_TEXTURE2D_DESC&() const { return *this; }")
1047 cpp_quote("};")
1048 cpp_quote("#endif")
1050 typedef struct D3D11_TEXTURE3D_DESC
1052 UINT Width;
1053 UINT Height;
1054 UINT Depth;
1055 UINT MipLevels;
1056 DXGI_FORMAT Format;
1057 D3D11_USAGE Usage;
1058 UINT BindFlags;
1059 UINT CPUAccessFlags;
1060 UINT MiscFlags;
1061 } D3D11_TEXTURE3D_DESC;
1063 /* A couple forward declarations are needed */
1064 interface ID3D11Device;
1065 interface ID3D11ClassLinkage;
1068 object,
1069 local,
1070 uuid(1841e5c8-16b0-489b-bcc8-44cfb0d5deae)
1072 interface ID3D11DeviceChild : IUnknown
1074 void GetDevice(
1075 [out] ID3D11Device **ppDevice);
1076 HRESULT GetPrivateData(
1077 [in] REFGUID guid,
1078 [in, out] UINT *pDataSize,
1079 [out] void *pData);
1080 HRESULT SetPrivateData(
1081 [in] REFGUID guid,
1082 [in] UINT DataSize,
1083 [in] const void *pData);
1084 HRESULT SetPrivateDataInterface(
1085 [in] REFGUID guid,
1086 [in] const IUnknown *pData);
1090 object,
1091 local,
1092 uuid(4b35d0cd-1e15-4258-9c98-1b1333f6dd3b)
1094 interface ID3D11Asynchronous : ID3D11DeviceChild
1096 UINT GetDataSize();
1100 object,
1101 local,
1102 uuid(d6c00747-87b7-425e-b84d-44d108560afd)
1104 interface ID3D11Query : ID3D11Asynchronous
1106 void GetDesc(
1107 [out] D3D11_QUERY_DESC *pDesc);
1111 object,
1112 local,
1113 uuid(dc8e63f3-d12b-4952-b47b-5e45026a862d)
1115 interface ID3D11Resource : ID3D11DeviceChild
1117 void GetType(
1118 [out] D3D11_RESOURCE_DIMENSION *pResourceDimension);
1119 void SetEvictionPriority(
1120 [in] UINT EvictionPriority);
1121 UINT GetEvictionPriority();
1125 object,
1126 local,
1127 uuid(839d1216-bb2e-412b-b7f4-a9dbebe08ed1)
1129 interface ID3D11View : ID3D11DeviceChild
1131 void GetResource(
1132 [out] ID3D11Resource **ppResource);
1136 object,
1137 local,
1138 uuid(75b68faa-347d-4159-8f45-a0640f01cd9a)
1140 interface ID3D11BlendState : ID3D11DeviceChild
1142 void GetDesc(
1143 [out] D3D11_BLEND_DESC *pDesc);
1147 object,
1148 local,
1149 uuid(48570b85-d1ee-4fcd-a250-eb350722b037)
1151 interface ID3D11Buffer : ID3D11Resource
1153 void GetDesc(
1154 [out] D3D11_BUFFER_DESC *pDesc);
1158 object,
1159 local,
1160 uuid(a6cd7faa-b0b7-4a2f-9436-8662a65797cb)
1162 interface ID3D11ClassInstance : ID3D11DeviceChild
1164 void GetClassLinkage(
1165 [out] ID3D11ClassLinkage **ppLinkage);
1166 void GetDesc(
1167 [out] D3D11_CLASS_INSTANCE_DESC *pDesc);
1168 void GetInstanceName(
1169 [out] LPSTR pInstanceName,
1170 [in, out] SIZE_T *pBufferLength);
1171 void GetTypeName(
1172 [out] LPSTR pTypeName,
1173 [in, out] SIZE_T *pBufferLength);
1177 object,
1178 local,
1179 uuid(ddf57cba-9543-46e4-a12b-f207a0fe7fed)
1181 interface ID3D11ClassLinkage : ID3D11DeviceChild
1183 HRESULT GetClassInstance(
1184 [in] LPCSTR pClassInstanceName,
1185 [in] UINT InstanceIndex,
1186 [out] ID3D11ClassInstance **ppInstance);
1187 HRESULT CreateClassInstance(
1188 [in] LPCSTR pClassTypeName,
1189 [in] UINT ConstantBufferOffset,
1190 [in] UINT ConstantVectorOffset,
1191 [in] UINT TextureOffset,
1192 [in] UINT SamplerOffset,
1193 [out] ID3D11ClassInstance **ppInstance);
1197 object,
1198 local,
1199 uuid(a24bc4d1-769e-43f7-8013-98ff566c18e2)
1201 interface ID3D11CommandList : ID3D11DeviceChild
1203 UINT GetContextFlags();
1207 object,
1208 local,
1209 uuid(4f5b196e-c2bd-495e-bd01-1fded38e4969)
1211 interface ID3D11ComputeShader : ID3D11DeviceChild
1216 object,
1217 local,
1218 uuid(6e8c49fb-a371-4770-b440-29086022b741)
1220 interface ID3D11Counter : ID3D11Asynchronous
1222 void GetDesc(
1223 [out] D3D11_COUNTER_DESC *pDesc);
1227 object,
1228 local,
1229 uuid(03823efb-8d8f-4e1c-9aa2-f64bb2cbfdf1)
1231 interface ID3D11DepthStencilState : ID3D11DeviceChild
1233 void GetDesc(
1234 [out] D3D11_DEPTH_STENCIL_DESC *pDesc);
1238 object,
1239 local,
1240 uuid(9fdac92a-1876-48c3-afad-25b94f84a9b6)
1242 interface ID3D11DepthStencilView : ID3D11View
1244 void GetDesc(
1245 [out] D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc);
1249 object,
1250 local,
1251 uuid(f582c508-0f36-490c-9977-31eece268cfa)
1253 interface ID3D11DomainShader : ID3D11DeviceChild
1258 object,
1259 local,
1260 uuid(38325b96-effb-4022-ba02-2e795b70275c)
1262 interface ID3D11GeometryShader : ID3D11DeviceChild
1267 object,
1268 local,
1269 uuid(8e5c6061-628a-4c8e-8264-bbe45cb3d5dd)
1271 interface ID3D11HullShader : ID3D11DeviceChild
1276 object,
1277 local,
1278 uuid(e4819ddc-4cf0-4025-bd26-5de82a3e07b7)
1280 interface ID3D11InputLayout : ID3D11DeviceChild
1285 object,
1286 local,
1287 uuid(ea82e40d-51dc-4f33-93d4-db7c9125ae8c)
1289 interface ID3D11PixelShader : ID3D11DeviceChild
1294 object,
1295 local,
1296 uuid(9eb576dd-9f77-4d86-81aa-8bab5fe490e2)
1298 interface ID3D11Predicate : ID3D11Query
1303 object,
1304 local,
1305 uuid(9bb4ab81-ab1a-4d8f-b506-fc04200b6ee7)
1307 interface ID3D11RasterizerState : ID3D11DeviceChild
1309 void GetDesc(
1310 [out] D3D11_RASTERIZER_DESC *pDesc);
1314 object,
1315 local,
1316 uuid(dfdba067-0b8d-4865-875b-d7b4516cc164)
1318 interface ID3D11RenderTargetView : ID3D11View
1320 void GetDesc(
1321 [out] D3D11_RENDER_TARGET_VIEW_DESC *pDesc);
1325 object,
1326 local,
1327 uuid(da6fea51-564c-4487-9810-f0d0f9b4e3a5)
1329 interface ID3D11SamplerState : ID3D11DeviceChild
1331 void GetDesc(
1332 [out] D3D11_SAMPLER_DESC *pDesc);
1336 object,
1337 local,
1338 uuid(b0e06fe0-8192-4e1a-b1ca-36d7414710b2)
1340 interface ID3D11ShaderResourceView : ID3D11View
1342 void GetDesc(
1343 [out] D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc);
1347 object,
1348 local,
1349 uuid(f8fb5c27-c6b3-4f75-a4c8-439af2ef564c),
1351 interface ID3D11Texture1D : ID3D11Resource
1353 void GetDesc(
1354 [out] D3D11_TEXTURE1D_DESC *pDesc);
1358 object,
1359 local,
1360 uuid(6f15aaf2-d208-4e89-9ab4-489535d34f9c)
1362 interface ID3D11Texture2D : ID3D11Resource
1364 void GetDesc(
1365 [out] D3D11_TEXTURE2D_DESC *pDesc);
1369 object,
1370 local,
1371 uuid(037e866e-f56d-4357-a8af-9dabbe6e250e)
1373 interface ID3D11Texture3D : ID3D11Resource
1375 void GetDesc(
1376 [out] D3D11_TEXTURE3D_DESC *pDesc);
1380 object,
1381 local,
1382 uuid(28acf509-7f5c-48f6-8611-f316010a6380)
1384 interface ID3D11UnorderedAccessView : ID3D11View
1386 void GetDesc(
1387 [out] D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc);
1391 object,
1392 local,
1393 uuid(3b301d64-d678-4289-8897-22f8928b72f3)
1395 interface ID3D11VertexShader : ID3D11DeviceChild
1400 object,
1401 local,
1402 uuid(c0bfa96c-e089-44fb-8eaf-26f8796190da)
1404 interface ID3D11DeviceContext : ID3D11DeviceChild
1406 void VSSetConstantBuffers(
1407 [in] UINT StartSlot,
1408 [in] UINT NumBuffers,
1409 [in] ID3D11Buffer *const *ppConstantBuffers);
1410 void PSSetShaderResources(
1411 [in] UINT StartSlot,
1412 [in] UINT NumViews,
1413 [in] ID3D11ShaderResourceView *const *ppShaderResourceViews);
1414 void PSSetShader(
1415 [in] ID3D11PixelShader *pPixelShader,
1416 [in] ID3D11ClassInstance *const *ppClassInstances,
1417 UINT NumClassInstances);
1418 void PSSetSamplers(
1419 [in] UINT StartSlot,
1420 [in] UINT NumSamplers,
1421 [in] ID3D11SamplerState *const *ppSamplers);
1422 void VSSetShader(
1423 [in] ID3D11VertexShader *pVertexShader,
1424 [in] ID3D11ClassInstance *const *ppClassInstances,
1425 UINT NumClassInstances);
1426 void DrawIndexed(
1427 [in] UINT IndexCount,
1428 [in] UINT StartIndexLocation,
1429 [in] INT BaseVertexLocation);
1430 void Draw(
1431 [in] UINT VertexCount,
1432 [in] UINT StartVertexLocation);
1433 HRESULT Map(
1434 [in] ID3D11Resource *pResource,
1435 [in] UINT Subresource,
1436 [in] D3D11_MAP MapType,
1437 [in] UINT MapFlags,
1438 [out] D3D11_MAPPED_SUBRESOURCE *pMappedResource);
1439 void Unmap(
1440 [in] ID3D11Resource *pResource,
1441 [in] UINT Subresource);
1442 void PSSetConstantBuffers(
1443 [in] UINT StartSlot,
1444 [in] UINT NumBuffers,
1445 [in] ID3D11Buffer *const *ppConstantBuffers);
1446 void IASetInputLayout(
1447 [in] ID3D11InputLayout *pInputLayout);
1448 void IASetVertexBuffers(
1449 [in] UINT StartSlot,
1450 [in] UINT NumBuffers,
1451 [in] ID3D11Buffer *const *ppVertexBuffers,
1452 [in] const UINT *pStrides,
1453 [in] const UINT *pOffsets);
1454 void IASetIndexBuffer(
1455 [in] ID3D11Buffer *pIndexBuffer,
1456 [in] DXGI_FORMAT Format,
1457 [in] UINT Offset);
1458 void DrawIndexedInstanced(
1459 [in] UINT IndexCountPerInstance,
1460 [in] UINT InstanceCount,
1461 [in] UINT StartIndexLocation,
1462 [in] INT BaseVertexLocation,
1463 [in] UINT StartInstanceLocation);
1464 void DrawInstanced(
1465 [in] UINT VertexCountPerInstance,
1466 [in] UINT InstanceCount,
1467 [in] UINT StartVertexLocation,
1468 [in] UINT StartInstanceLocation);
1469 void GSSetConstantBuffers(
1470 [in] UINT StartSlot,
1471 [in] UINT NumBuffers,
1472 [in] ID3D11Buffer *const *ppConstantBuffers);
1473 void GSSetShader(
1474 [in] ID3D11GeometryShader *pShader,
1475 [in] ID3D11ClassInstance *const *ppClassInstances,
1476 UINT NumClassInstances);
1477 void IASetPrimitiveTopology(
1478 [in] D3D11_PRIMITIVE_TOPOLOGY Topology);
1479 void VSSetShaderResources(
1480 [in] UINT StartSlot,
1481 [in] UINT NumViews,
1482 [in] ID3D11ShaderResourceView *const *ppShaderResourceViews);
1483 void VSSetSamplers(
1484 [in] UINT StartSlot,
1485 [in] UINT NumSamplers,
1486 [in] ID3D11SamplerState *const *ppSamplers);
1487 void Begin(
1488 [in] ID3D11Asynchronous *pAsync);
1489 void End(
1490 [in] ID3D11Asynchronous *pAsync);
1491 HRESULT GetData(
1492 [in] ID3D11Asynchronous *pAsync,
1493 [in] void *pData,
1494 [in] UINT DataSize,
1495 [in] UINT GetDataFlags);
1496 void SetPredication(
1497 [in] ID3D11Predicate *pPredicate,
1498 [in] BOOL PredicateValue);
1499 void GSSetShaderResources(
1500 [in] UINT StartSlot,
1501 [in] UINT NumViews,
1502 [in] ID3D11ShaderResourceView *const *ppShaderResourceViews);
1503 void GSSetSamplers(
1504 [in] UINT StartSlot,
1505 [in] UINT NumSamplers,
1506 [in] ID3D11SamplerState *const *ppSamplers);
1507 void OMSetRenderTargets(
1508 [in] UINT NumViews,
1509 [in] ID3D11RenderTargetView *const *ppRenderTargetViews,
1510 [in] ID3D11DepthStencilView *pDepthStencilView);
1511 void OMSetRenderTargetsAndUnorderedAccessViews(
1512 [in] UINT NumRTVs,
1513 [in] ID3D11RenderTargetView *const *ppRenderTargetViews,
1514 [in] ID3D11DepthStencilView *pDepthStencilView,
1515 [in] UINT UAVStartSlot,
1516 [in] UINT NumUAVs,
1517 [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
1518 [in] const UINT *pUAVInitialCounts);
1519 void OMSetBlendState(
1520 [in] ID3D11BlendState *pBlendState,
1521 [in] const FLOAT BlendFactor[4],
1522 [in] UINT SampleMask);
1523 void OMSetDepthStencilState(
1524 [in] ID3D11DepthStencilState *pDepthStencilState,
1525 [in] UINT StencilRef);
1526 void SOSetTargets(
1527 [in] UINT NumBuffers,
1528 [in] ID3D11Buffer *const *ppSOTargets,
1529 [in] const UINT *pOffsets);
1530 void DrawAuto();
1531 void DrawIndexedInstancedIndirect(
1532 [in] ID3D11Buffer *pBufferForArgs,
1533 [in] UINT AlignedByteOffsetForArgs);
1534 void DrawInstancedIndirect(
1535 [in] ID3D11Buffer *pBufferForArgs,
1536 [in] UINT AlignedByteOffsetForArgs);
1537 void Dispatch(
1538 [in] UINT ThreadGroupCountX,
1539 [in] UINT ThreadGroupCountY,
1540 [in] UINT ThreadGroupCountZ);
1541 void DispatchIndirect(
1542 [in] ID3D11Buffer *pBufferForArgs,
1543 [in] UINT AlignedByteOffsetForArgs);
1544 void RSSetState(
1545 [in] ID3D11RasterizerState *pRasterizerState);
1546 void RSSetViewports(
1547 [in] UINT NumViewports,
1548 [in] const D3D11_VIEWPORT *pViewports);
1549 void RSSetScissorRects(
1550 [in] UINT NumRects,
1551 [in] const D3D11_RECT *pRects);
1552 void CopySubresourceRegion(
1553 [in] ID3D11Resource *pDstResource,
1554 [in] UINT DstSubresource,
1555 [in] UINT DstX,
1556 [in] UINT DstY,
1557 [in] UINT DstZ,
1558 [in] ID3D11Resource *pSrcResource,
1559 [in] UINT SrcSubresource,
1560 [in] const D3D11_BOX *pSrcBox);
1561 void CopyResource(
1562 [in] ID3D11Resource *pDstResource,
1563 [in] ID3D11Resource *pSrcResource);
1564 void UpdateSubresource(
1565 [in] ID3D11Resource *pDstResource,
1566 [in] UINT DstSubresource,
1567 [in] const D3D11_BOX *pDstBox,
1568 [in] const void *pSrcData,
1569 [in] UINT SrcRowPitch,
1570 [in] UINT SrcDepthPitch);
1571 void CopyStructureCount(
1572 [in] ID3D11Buffer *pDstBuffer,
1573 [in] UINT DstAlignedByteOffset,
1574 [in] ID3D11UnorderedAccessView *pSrcView);
1575 void ClearRenderTargetView(
1576 [in] ID3D11RenderTargetView *pRenderTargetView,
1577 [in] const FLOAT ColorRGBA[4]);
1578 void ClearUnorderedAccessViewUint(
1579 [in] ID3D11UnorderedAccessView *pUnorderedAccessView,
1580 [in] const UINT Values[4]);
1581 void ClearUnorderedAccessViewFloat(
1582 [in] ID3D11UnorderedAccessView *pUnorderedAccessView,
1583 [in] const FLOAT Values[4]);
1584 void ClearDepthStencilView(
1585 [in] ID3D11DepthStencilView *pDepthStencilView,
1586 [in] UINT ClearFlags,
1587 [in] FLOAT Depth,
1588 [in] UINT8 Stencil);
1589 void GenerateMips(
1590 [in] ID3D11ShaderResourceView *pShaderResourceView);
1591 void SetResourceMinLOD(
1592 [in] ID3D11Resource *pResource, FLOAT MinLOD);
1593 FLOAT GetResourceMinLOD(
1594 [in] ID3D11Resource *pResource);
1595 void ResolveSubresource(
1596 [in] ID3D11Resource *pDstResource,
1597 [in] UINT DstSubresource,
1598 [in] ID3D11Resource *pSrcResource,
1599 [in] UINT SrcSubresource,
1600 [in] DXGI_FORMAT Format);
1601 void ExecuteCommandList(
1602 [in] ID3D11CommandList *pCommandList,
1603 BOOL RestoreContextState);
1604 void HSSetShaderResources(
1605 [in] UINT StartSlot,
1606 [in] UINT NumViews,
1607 [in] ID3D11ShaderResourceView *const *ppShaderResourceViews);
1608 void HSSetShader(
1609 [in] ID3D11HullShader *pHullShader,
1610 [in] ID3D11ClassInstance *const *ppClassInstances,
1611 UINT NumClassInstances);
1612 void HSSetSamplers(
1613 [in] UINT StartSlot,
1614 [in] UINT NumSamplers,
1615 [in] ID3D11SamplerState *const *ppSamplers);
1616 void HSSetConstantBuffers(
1617 [in] UINT StartSlot,
1618 [in] UINT NumBuffers,
1619 [in] ID3D11Buffer *const *ppConstantBuffers);
1620 void DSSetShaderResources(
1621 [in] UINT StartSlot,
1622 [in] UINT NumViews,
1623 [in] ID3D11ShaderResourceView *const *ppShaderResourceViews);
1624 void DSSetShader(
1625 [in] ID3D11DomainShader *pDomainShader,
1626 [in] ID3D11ClassInstance *const *ppClassInstances,
1627 UINT NumClassInstances);
1628 void DSSetSamplers(
1629 [in] UINT StartSlot,
1630 [in] UINT NumSamplers,
1631 [in] ID3D11SamplerState *const *ppSamplers);
1632 void DSSetConstantBuffers(
1633 [in] UINT StartSlot,
1634 [in] UINT NumBuffers,
1635 [in] ID3D11Buffer *const *ppConstantBuffers);
1636 void CSSetShaderResources(
1637 [in] UINT StartSlot,
1638 [in] UINT NumViews,
1639 [in] ID3D11ShaderResourceView *const *ppShaderResourceViews);
1640 void CSSetUnorderedAccessViews(
1641 [in] UINT StartSlot,
1642 [in] UINT NumUAVs,
1643 [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews,
1644 [in] const UINT *pUAVInitialCounts);
1645 void CSSetShader(
1646 [in] ID3D11ComputeShader *pComputeShader,
1647 [in] ID3D11ClassInstance *const *ppClassInstances,
1648 UINT NumClassInstances);
1649 void CSSetSamplers(
1650 [in] UINT StartSlot,
1651 [in] UINT NumSamplers,
1652 [in] ID3D11SamplerState *const *ppSamplers);
1653 void CSSetConstantBuffers(
1654 [in] UINT StartSlot,
1655 [in] UINT NumBuffers,
1656 [in] ID3D11Buffer *const *ppConstantBuffers);
1657 void VSGetConstantBuffers(
1658 [in] UINT StartSlot,
1659 [in] UINT NumBuffers,
1660 [out] ID3D11Buffer **ppConstantBuffers);
1661 void PSGetShaderResources(
1662 [in] UINT StartSlot,
1663 [in] UINT NumViews,
1664 [out] ID3D11ShaderResourceView **ppShaderResourceViews);
1665 void PSGetShader(
1666 [out] ID3D11PixelShader **ppPixelShader,
1667 [out] ID3D11ClassInstance **ppClassInstances,
1668 [in, out] UINT *pNumClassInstances);
1669 void PSGetSamplers(
1670 [in] UINT StartSlot,
1671 [in] UINT NumSamplers,
1672 [out] ID3D11SamplerState **ppSamplers);
1673 void VSGetShader(
1674 [out] ID3D11VertexShader **ppVertexShader,
1675 [out] ID3D11ClassInstance **ppClassInstances,
1676 [in, out] UINT *pNumClassInstances);
1677 void PSGetConstantBuffers(
1678 [in] UINT StartSlot,
1679 [in] UINT NumBuffers,
1680 [out] ID3D11Buffer **ppConstantBuffers);
1681 void IAGetInputLayout(
1682 [out] ID3D11InputLayout **ppInputLayout);
1683 void IAGetVertexBuffers(
1684 [in] UINT StartSlot,
1685 [in] UINT NumBuffers,
1686 [out] ID3D11Buffer **ppVertexBuffers,
1687 [out] UINT *pStrides,
1688 [out] UINT *pOffsets);
1689 void IAGetIndexBuffer(
1690 [out] ID3D11Buffer **pIndexBuffer,
1691 [out] DXGI_FORMAT* Format,
1692 [out] UINT* Offset);
1693 void GSGetConstantBuffers(
1694 [in] UINT StartSlot,
1695 [in] UINT NumBuffers,
1696 [out] ID3D11Buffer **ppConstantBuffers);
1697 void GSGetShader(
1698 [out] ID3D11GeometryShader **ppGeometryShader,
1699 [out] ID3D11ClassInstance **ppClassInstances,
1700 [in, out] UINT *pNumClassInstances);
1701 void IAGetPrimitiveTopology(
1702 [out] D3D11_PRIMITIVE_TOPOLOGY *pTopology);
1703 void VSGetShaderResources(
1704 [in] UINT StartSlot,
1705 [in] UINT NumViews,
1706 [out] ID3D11ShaderResourceView **ppShaderResourceViews);
1707 void VSGetSamplers(
1708 [in] UINT StartSlot,
1709 [in] UINT NumSamplers,
1710 [out] ID3D11SamplerState **ppSamplers);
1711 void GetPredication(
1712 [out] ID3D11Predicate **ppPredicate,
1713 [out] BOOL *pPredicateValue);
1714 void GSGetShaderResources(
1715 [in] UINT StartSlot,
1716 [in] UINT NumViews,
1717 [out] ID3D11ShaderResourceView **ppShaderResourceViews);
1718 void GSGetSamplers(
1719 [in] UINT StartSlot,
1720 [in] UINT NumSamplers,
1721 [out] ID3D11SamplerState **ppSamplers);
1722 void OMGetRenderTargets(
1723 [in] UINT NumViews,
1724 [out] ID3D11RenderTargetView **ppRenderTargetViews,
1725 [out] ID3D11DepthStencilView **ppDepthStencilView);
1726 void OMGetRenderTargetsAndUnorderedAccessViews(
1727 [in] UINT NumRTVs,
1728 [out] ID3D11RenderTargetView **ppRenderTargetViews,
1729 [out] ID3D11DepthStencilView **ppDepthStencilView,
1730 [in] UINT UAVStartSlot,
1731 [out] UINT NumUAVs,
1732 [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews);
1733 void OMGetBlendState(
1734 [out] ID3D11BlendState **ppBlendState,
1735 [out] FLOAT BlendFactor[4],
1736 [out] UINT *pSampleMask);
1737 void OMGetDepthStencilState(
1738 [out] ID3D11DepthStencilState **ppDepthStencilState,
1739 [out] UINT *pStencilRef);
1740 void SOGetTargets(
1741 [in] UINT NumBuffers,
1742 [out] ID3D11Buffer **ppSOTargets);
1743 void RSGetState(
1744 [out] ID3D11RasterizerState **ppRasterizerState);
1745 void RSGetViewports(
1746 [in, out] UINT *pNumViewports,
1747 [out] D3D11_VIEWPORT *pViewports);
1748 void RSGetScissorRects(
1749 [in, out] UINT *pNumRects,
1750 [out] D3D11_RECT *pRects);
1751 void HSGetShaderResources(
1752 [in] UINT StartSlot,
1753 [in] UINT NumViews,
1754 [out] ID3D11ShaderResourceView **ppShaderResourceViews);
1755 void HSGetShader(
1756 [out] ID3D11HullShader **ppHullShader,
1757 [out] ID3D11ClassInstance **ppClassInstances,
1758 [in, out] UINT *pNumClassInstances);
1759 void HSGetSamplers(
1760 [in] UINT StartSlot,
1761 [in] UINT NumSamplers,
1762 [out] ID3D11SamplerState **ppSamplers);
1763 void HSGetConstantBuffers(
1764 [in] UINT StartSlot,
1765 [in] UINT NumBuffers,
1766 [out] ID3D11Buffer **ppConstantBuffers);
1767 void DSGetShaderResources(
1768 [in] UINT StartSlot,
1769 [in] UINT NumViews,
1770 [out] ID3D11ShaderResourceView **ppShaderResourceViews);
1771 void DSGetShader(
1772 [out] ID3D11DomainShader **ppDomainShader,
1773 [out] ID3D11ClassInstance **ppClassInstances,
1774 [in, out] UINT *pNumClassInstances);
1775 void DSGetSamplers(
1776 [in] UINT StartSlot,
1777 [in] UINT NumSamplers,
1778 [out] ID3D11SamplerState **ppSamplers);
1779 void DSGetConstantBuffers(
1780 [in] UINT StartSlot,
1781 [in] UINT NumBuffers,
1782 [out] ID3D11Buffer **ppConstantBuffers);
1783 void CSGetShaderResources(
1784 [in] UINT StartSlot,
1785 [in] UINT NumViews,
1786 [out] ID3D11ShaderResourceView **ppShaderResourceViews);
1787 void CSGetUnorderedAccessViews(
1788 [in] UINT StartSlot,
1789 [in] UINT NumUAVs,
1790 [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews);
1791 void CSGetShader(
1792 [out] ID3D11ComputeShader **ppComputeShader,
1793 [out] ID3D11ClassInstance **ppClassInstances,
1794 [in, out] UINT *pNumClassInstances);
1795 void CSGetSamplers(
1796 [in] UINT StartSlot,
1797 [in] UINT NumSamplers,
1798 [out] ID3D11SamplerState **ppSamplers);
1799 void CSGetConstantBuffers(
1800 [in] UINT StartSlot,
1801 [in] UINT NumBuffers,
1802 [out] ID3D11Buffer **ppConstantBuffers);
1803 void ClearState();
1804 void Flush();
1805 D3D11_DEVICE_CONTEXT_TYPE GetType();
1806 UINT GetContextFlags();
1807 HRESULT FinishCommandList(
1808 BOOL RestoreDeferredContextState,
1809 [out] ID3D11CommandList **ppCommandList);
1813 object,
1814 local,
1815 uuid(db6f6ddb-ac77-4e88-8253-819df9bbf140)
1817 interface ID3D11Device : IUnknown
1819 HRESULT CreateBuffer(
1820 [in] const D3D11_BUFFER_DESC *pDesc,
1821 [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
1822 [out] ID3D11Buffer **ppBuffer);
1823 HRESULT CreateTexture1D(
1824 [in] const D3D11_TEXTURE1D_DESC *pDesc,
1825 [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
1826 [out] ID3D11Texture1D **ppTexture1D);
1827 HRESULT CreateTexture2D(
1828 [in] const D3D11_TEXTURE2D_DESC *pDesc,
1829 [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
1830 [out] ID3D11Texture2D **ppTexture2D);
1831 HRESULT CreateTexture3D(
1832 [in] const D3D11_TEXTURE3D_DESC *pDesc,
1833 [in] const D3D11_SUBRESOURCE_DATA *pInitialData,
1834 [out] ID3D11Texture3D **ppTexture3D);
1835 HRESULT CreateShaderResourceView(
1836 [in] ID3D11Resource *pResource,
1837 [in] const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
1838 [out] ID3D11ShaderResourceView **ppSRView);
1839 HRESULT CreateUnorderedAccessView(
1840 [in] ID3D11Resource *pResource,
1841 [in] const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
1842 [out] ID3D11UnorderedAccessView **ppUAView);
1843 HRESULT CreateRenderTargetView(
1844 [in] ID3D11Resource *pResource,
1845 [in] const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
1846 [out] ID3D11RenderTargetView **ppRTView);
1847 HRESULT CreateDepthStencilView(
1848 [in] ID3D11Resource *pResource,
1849 [in] const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
1850 [out] ID3D11DepthStencilView **ppDepthStencilView);
1851 HRESULT CreateInputLayout(
1852 [in] const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
1853 [in] UINT NumElements,
1854 [in] const void *pShaderBytecodeWithInputSignature,
1855 [in] SIZE_T BytecodeLength,
1856 [out] ID3D11InputLayout **ppInputLayout);
1857 HRESULT CreateVertexShader(
1858 [in] const void *pShaderBytecode,
1859 [in] SIZE_T BytecodeLength,
1860 [in] ID3D11ClassLinkage *pClassLinkage,
1861 [out] ID3D11VertexShader **ppVertexShader);
1862 HRESULT CreateGeometryShader(
1863 [in] const void *pShaderBytecode,
1864 [in] SIZE_T BytecodeLength,
1865 [in] ID3D11ClassLinkage *pClassLinkage,
1866 [out] ID3D11GeometryShader **ppGeometryShader);
1867 HRESULT CreateGeometryShaderWithStreamOutput(
1868 [in] const void *pShaderBytecode,
1869 [in] SIZE_T BytecodeLength,
1870 [in] const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
1871 [in] UINT NumEntries,
1872 [in] const UINT *pBufferStrides,
1873 [in] UINT NumStrides,
1874 [in] UINT RasterizedStream,
1875 [in] ID3D11ClassLinkage *pClassLinkage,
1876 [out] ID3D11GeometryShader **ppGeometryShader);
1877 HRESULT CreatePixelShader(
1878 [in] const void *pShaderBytecode,
1879 [in] SIZE_T BytecodeLength,
1880 [in] ID3D11ClassLinkage *pClassLinkage,
1881 [out] ID3D11PixelShader **ppPixelShader);
1882 HRESULT CreateHullShader(
1883 [in] const void *pShaderBytecode,
1884 [in] SIZE_T BytecodeLength,
1885 [in] ID3D11ClassLinkage *pClassLinkage,
1886 [out] ID3D11HullShader **ppHullShader);
1887 HRESULT CreateDomainShader(
1888 [in] const void *pShaderBytecode,
1889 [in] SIZE_T BytecodeLength,
1890 [in] ID3D11ClassLinkage *pClassLinkage,
1891 [out] ID3D11DomainShader **ppDomainShader);
1892 HRESULT CreateComputeShader(
1893 [in] const void *pShaderBytecode,
1894 [in] SIZE_T BytecodeLength,
1895 [in] ID3D11ClassLinkage *pClassLinkage,
1896 [out] ID3D11ComputeShader **ppComputeShader);
1897 HRESULT CreateClassLinkage(
1898 [out] ID3D11ClassLinkage **ppLinkage);
1899 HRESULT CreateBlendState(
1900 [in] const D3D11_BLEND_DESC *pBlendStateDesc,
1901 [out] ID3D11BlendState **ppBlendState);
1902 HRESULT CreateDepthStencilState(
1903 [in] const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
1904 [out] ID3D11DepthStencilState **ppDepthStencilState);
1905 HRESULT CreateRasterizerState(
1906 [in] const D3D11_RASTERIZER_DESC *pRasterizerDesc,
1907 [out] ID3D11RasterizerState **ppRasterizerState);
1908 HRESULT CreateSamplerState(
1909 [in] const D3D11_SAMPLER_DESC *pSamplerDesc,
1910 [out] ID3D11SamplerState **ppSamplerState);
1911 HRESULT CreateQuery(
1912 [in] const D3D11_QUERY_DESC *pQueryDesc,
1913 [out] ID3D11Query **ppQuery);
1914 HRESULT CreatePredicate(
1915 [in] const D3D11_QUERY_DESC *pPredicateDesc,
1916 [out] ID3D11Predicate **ppPredicate);
1917 HRESULT CreateCounter(
1918 [in] const D3D11_COUNTER_DESC *pCounterDesc,
1919 [out] ID3D11Counter **ppCounter);
1920 HRESULT CreateDeferredContext(
1921 UINT ContextFlags,
1922 [out] ID3D11DeviceContext **ppDeferredContext);
1923 HRESULT OpenSharedResource(
1924 [in] HANDLE hResource,
1925 [in] REFIID ReturnedInterface,
1926 [out] void **ppResource);
1927 HRESULT CheckFormatSupport(
1928 [in] DXGI_FORMAT Format,
1929 [out] UINT *pFormatSupport);
1930 HRESULT CheckMultisampleQualityLevels(
1931 [in] DXGI_FORMAT Format,
1932 [in] UINT SampleCount,
1933 [out] UINT *pNumQualityLevels);
1934 void CheckCounterInfo(
1935 [out] D3D11_COUNTER_INFO *pCounterInfo);
1936 HRESULT CheckCounter(
1937 [in] const D3D11_COUNTER_DESC *pDesc,
1938 [out] D3D11_COUNTER_TYPE *pType,
1939 [out] UINT *pActiveCounters,
1940 [out] LPSTR szName,
1941 [in, out] UINT *pNameLength,
1942 [out] LPSTR szUnits,
1943 [in, out] UINT *pUnitsLength,
1944 [out] LPSTR szDescription,
1945 [in, out] UINT *pDescriptionLength);
1946 HRESULT CheckFeatureSupport(
1947 D3D11_FEATURE Feature,
1948 [out] void *pFeatureSupportData,
1949 UINT FeatureSupportDataSize);
1950 HRESULT GetPrivateData(
1951 [in] REFGUID guid,
1952 [in, out] UINT *pDataSize,
1953 [out] void *pData);
1954 HRESULT SetPrivateData(
1955 [in] REFGUID guid,
1956 [in] UINT DataSize,
1957 [in] const void *pData);
1958 HRESULT SetPrivateDataInterface(
1959 [in] REFGUID guid,
1960 [in] const IUnknown *pData);
1961 D3D_FEATURE_LEVEL GetFeatureLevel();
1962 UINT GetCreationFlags();
1963 HRESULT GetDeviceRemovedReason();
1964 void GetImmediateContext(
1965 [out] ID3D11DeviceContext **ppImmediateContext);
1966 HRESULT SetExceptionMode(UINT RaiseFlags);
1967 UINT GetExceptionMode();
1970 typedef enum D3D11_CREATE_DEVICE_FLAG {
1971 D3D11_CREATE_DEVICE_SINGLETHREADED = 0x0001,
1972 D3D11_CREATE_DEVICE_DEBUG = 0x0002,
1973 D3D11_CREATE_DEVICE_SWITCH_TO_REF = 0x0004,
1974 D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x0008,
1975 D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0x0020,
1976 D3D11_CREATE_DEVICE_DEBUGGABLE = 0x0040,
1977 D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0x0080,
1978 D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = 0x0100,
1979 D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0x0800
1980 } D3D11_CREATE_DEVICE_FLAG;
1982 const UINT D3D11_SDK_VERSION = 7;
1984 cpp_quote("#include <d3d10_1.h>")
1985 cpp_quote("#ifndef D3D11_IGNORE_SDK_LAYERS")
1986 cpp_quote("# include <d3d11sdklayers.h>")
1987 cpp_quote("#endif")
1988 cpp_quote("#include <d3d10misc.h>")
1989 cpp_quote("#include <d3d10shader.h>")
1990 cpp_quote("#include <d3d10effect.h>")
1991 cpp_quote("#include <d3d10_1shader.h>")
1993 cpp_quote("typedef HRESULT (WINAPI* PFN_D3D11_CREATE_DEVICE)(IDXGIAdapter*,D3D_DRIVER_TYPE,HMODULE,UINT,")
1994 cpp_quote(" const D3D_FEATURE_LEVEL*,UINT,UINT,ID3D11Device**,D3D_FEATURE_LEVEL*,ID3D11DeviceContext**);")
1996 cpp_quote("HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter*,D3D_DRIVER_TYPE,HMODULE,UINT,const D3D_FEATURE_LEVEL*," )
1997 cpp_quote(" UINT,UINT,ID3D11Device**,D3D_FEATURE_LEVEL*,ID3D11DeviceContext**);")
1999 cpp_quote("typedef HRESULT (WINAPI *PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)(IDXGIAdapter*,D3D_DRIVER_TYPE,HMODULE,UINT,")
2000 cpp_quote(" const D3D_FEATURE_LEVEL*,UINT,UINT,const DXGI_SWAP_CHAIN_DESC*,IDXGISwapChain**,ID3D11Device**,")
2001 cpp_quote(" D3D_FEATURE_LEVEL*,ID3D11DeviceContext**);")