msxml3/tests: Add some tests for IVBSAXContentHandler::startElement() and IVBSAXConte...
[wine.git] / include / d3d12.idl
blob42f33a06e401fc1d1c7c19389048baec84251d3c
1 /*
2 * Copyright 2016 Józef Kucia for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "oaidl.idl";
20 import "ocidl.idl";
21 import "dxgi.idl";
22 import "d3dcommon.idl";
24 cpp_quote("#ifndef _D3D12_CONSTANTS")
25 cpp_quote("#define _D3D12_CONSTANTS")
27 const UINT D3D12_CS_TGSM_REGISTER_COUNT = 8192;
28 const UINT D3D12_MAX_ROOT_COST = 64;
29 const UINT D3D12_VIEWPORT_BOUNDS_MAX = 32767;
30 const UINT D3D12_VIEWPORT_BOUNDS_MIN = -32768;
32 const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15;
34 const UINT D3D12_APPEND_ALIGNED_ELEMENT = 0xffffffff;
35 cpp_quote("#define D3D12_DEFAULT_BLEND_FACTOR_ALPHA (1.0f)")
36 cpp_quote("#define D3D12_DEFAULT_BLEND_FACTOR_BLUE (1.0f)")
37 cpp_quote("#define D3D12_DEFAULT_BLEND_FACTOR_GREEN (1.0f)")
38 cpp_quote("#define D3D12_DEFAULT_BLEND_FACTOR_RED (1.0f)")
39 const UINT D3D12_DEFAULT_DEPTH_BIAS = 0;
40 cpp_quote("#define D3D12_DEFAULT_DEPTH_BIAS_CLAMP (0.0f)")
41 cpp_quote("#define D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS (0.0f)")
42 const UINT D3D12_DEFAULT_STENCIL_READ_MASK = 0xff;
43 const UINT D3D12_DEFAULT_STENCIL_WRITE_MASK = 0xff;
44 const UINT D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND = 0xffffffff;
45 cpp_quote("#define D3D12_FLOAT32_MAX (3.402823466e+38f)")
46 const UINT D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
47 const UINT D3D12_UAV_SLOT_COUNT = 64;
48 const UINT D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
49 const UINT D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
50 const UINT D3D12_REQ_MIP_LEVELS = 15;
51 const UINT D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048;
52 const UINT D3D12_REQ_TEXTURE1D_U_DIMENSION = 16384;
53 const UINT D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048;
54 const UINT D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384;
55 const UINT D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048;
56 const UINT D3D12_REQ_TEXTURECUBE_DIMENSION = 16384;
57 const UINT D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = 0xffffffff;
58 const UINT D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
59 const UINT D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
60 const UINT D3D12_SO_BUFFER_SLOT_COUNT = 4;
61 const UINT D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff;
62 const UINT D3D12_SO_NO_RASTERIZED_STREAM = 0xffffffff;
63 const UINT D3D12_SO_OUTPUT_COMPONENT_COUNT = 128;
64 const UINT D3D12_SO_STREAM_COUNT = 4;
65 const UINT D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256;
66 const UINT D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 4194304;
67 const UINT D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 65536;
68 const UINT D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = 16;
69 const UINT D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 65536;
70 const UINT D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 4096;
71 const UINT D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4;
72 const UINT D3D12_TEXTURE_DATA_PITCH_ALIGNMENT = 256;
73 const UINT D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT = 512;
74 const UINT D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT = 4096;
75 const UINT D3D12_VS_INPUT_REGISTER_COUNT = 32;
76 const UINT D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16;
78 cpp_quote("#endif")
80 const UINT D3D12_SHADER_COMPONENT_MAPPING_MASK = 0x7;
81 const UINT D3D12_SHADER_COMPONENT_MAPPING_SHIFT = 3;
82 const UINT D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES
83 = 1 << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 4);
85 typedef enum D3D12_SHADER_MIN_PRECISION_SUPPORT
87 D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0x0,
88 D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1,
89 D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2,
90 } D3D12_SHADER_MIN_PRECISION_SUPPORT;
91 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_SHADER_MIN_PRECISION_SUPPORT);")
93 typedef enum D3D12_TILED_RESOURCES_TIER
95 D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0,
96 D3D12_TILED_RESOURCES_TIER_1 = 1,
97 D3D12_TILED_RESOURCES_TIER_2 = 2,
98 D3D12_TILED_RESOURCES_TIER_3 = 3,
99 } D3D12_TILED_RESOURCES_TIER;
101 typedef enum D3D12_RESOURCE_BINDING_TIER
103 D3D12_RESOURCE_BINDING_TIER_1 = 1,
104 D3D12_RESOURCE_BINDING_TIER_2 = 2,
105 D3D12_RESOURCE_BINDING_TIER_3 = 3,
106 } D3D12_RESOURCE_BINDING_TIER;
108 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_TIER
110 D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0,
111 D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1,
112 D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2,
113 D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3,
114 } D3D12_CONSERVATIVE_RASTERIZATION_TIER;
116 typedef enum D3D12_CROSS_NODE_SHARING_TIER
118 D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0,
119 D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1,
120 D3D12_CROSS_NODE_SHARING_TIER_1 = 2,
121 D3D12_CROSS_NODE_SHARING_TIER_2 = 3,
122 } D3D12_CROSS_NODE_SHARING_TIER;
124 typedef enum D3D12_RESOURCE_HEAP_TIER
126 D3D12_RESOURCE_HEAP_TIER_1 = 1,
127 D3D12_RESOURCE_HEAP_TIER_2 = 2,
128 } D3D12_RESOURCE_HEAP_TIER;
130 typedef enum D3D12_FORMAT_SUPPORT1
132 D3D12_FORMAT_SUPPORT1_NONE = 0x00000000,
133 D3D12_FORMAT_SUPPORT1_BUFFER = 0x00000001,
134 D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x00000002,
135 D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x00000004,
136 D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x00000008,
137 D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x00000010,
138 D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x00000020,
139 D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x00000040,
140 D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x00000080,
141 D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x00000100,
142 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x00000200,
143 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x00000400,
144 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x00000800,
145 D3D12_FORMAT_SUPPORT1_MIP = 0x00001000,
146 D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x00004000,
147 D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x00008000,
148 D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x00010000,
149 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x00040000,
150 D3D12_FORMAT_SUPPORT1_DISPLAY = 0x00080000,
151 D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x00100000,
152 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x00200000,
153 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x00400000,
154 D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x00800000,
155 D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x01000000,
156 D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x02000000,
157 D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x04000000,
158 D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x08000000,
159 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000,
160 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000,
161 D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000,
162 } D3D12_FORMAT_SUPPORT1;
163 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_FORMAT_SUPPORT1);")
165 typedef enum D3D12_FORMAT_SUPPORT2
167 D3D12_FORMAT_SUPPORT2_NONE = 0x00000000,
168 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x00000001,
169 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x00000002,
170 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x00000004,
171 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x00000008,
172 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x00000010,
173 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x00000020,
174 D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x00000040,
175 D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x00000080,
176 D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x00000100,
177 D3D12_FORMAT_SUPPORT2_TILED = 0x00000200,
178 D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x00004000,
179 } D3D12_FORMAT_SUPPORT2;
180 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_FORMAT_SUPPORT2);")
182 typedef enum D3D12_WRITEBUFFERIMMEDIATE_MODE
184 D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0x0,
185 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1,
186 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2,
187 } D3D12_WRITEBUFFERIMMEDIATE_MODE;
189 typedef enum D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER
191 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED = 0x0,
192 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_1 = 0x1,
193 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_2 = 0x2,
194 } D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER;
196 typedef enum D3D12_SHADER_CACHE_SUPPORT_FLAGS
198 D3D12_SHADER_CACHE_SUPPORT_NONE = 0x0,
199 D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO = 0x1,
200 D3D12_SHADER_CACHE_SUPPORT_LIBRARY = 0x2,
201 D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE = 0x4,
202 D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE = 0x8,
203 } D3D12_SHADER_CACHE_SUPPORT_FLAGS;
204 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_SHADER_CACHE_SUPPORT_FLAGS);")
206 typedef enum D3D12_COMMAND_LIST_SUPPORT_FLAGS
208 D3D12_COMMAND_LIST_SUPPORT_FLAG_NONE = 0x0,
209 D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT = 0x1,
210 D3D12_COMMAND_LIST_SUPPORT_FLAG_BUNDLE = 0x2,
211 D3D12_COMMAND_LIST_SUPPORT_FLAG_COMPUTE = 0x4,
212 D3D12_COMMAND_LIST_SUPPORT_FLAG_COPY = 0x8,
213 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_DECODE = 0x10,
214 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_PROCESS = 0x20,
215 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_ENCODE = 0x40,
216 } D3D12_COMMAND_LIST_SUPPORT_FLAGS;
217 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_COMMAND_LIST_SUPPORT_FLAGS);")
219 typedef enum D3D12_VIEW_INSTANCING_TIER
221 D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED = 0x0,
222 D3D12_VIEW_INSTANCING_TIER_1 = 0x1,
223 D3D12_VIEW_INSTANCING_TIER_2 = 0x2,
224 D3D12_VIEW_INSTANCING_TIER_3 = 0x3,
225 } D3D12_VIEW_INSTANCING_TIER;
227 typedef enum D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER
229 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0 = 0x0,
230 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_1 = 0x1,
231 } D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER;
233 typedef enum D3D12_HEAP_SERIALIZATION_TIER
235 D3D12_HEAP_SERIALIZATION_TIER_0 = 0x0,
236 D3D12_HEAP_SERIALIZATION_TIER_10 = 0xa,
237 } D3D12_HEAP_SERIALIZATION_TIER;
239 typedef enum D3D12_RENDER_PASS_TIER
241 D3D12_RENDER_PASS_TIER_0 = 0x0,
242 D3D12_RENDER_PASS_TIER_1 = 0x1,
243 D3D12_RENDER_PASS_TIER_2 = 0x2,
244 } D3D12_RENDER_PASS_TIER;
246 typedef enum D3D12_RAYTRACING_TIER
248 D3D12_RAYTRACING_TIER_NOT_SUPPORTED = 0x0,
249 D3D12_RAYTRACING_TIER_1_0 = 0xa,
250 } D3D12_RAYTRACING_TIER;
252 interface ID3D12Fence;
253 interface ID3D12RootSignature;
254 interface ID3D12Heap;
255 interface ID3D12DescriptorHeap;
256 interface ID3D12Resource;
257 interface ID3D12CommandAllocator;
258 interface ID3D12GraphicsCommandList;
259 interface ID3D12CommandQueue;
260 interface ID3D12PipelineState;
261 interface ID3D12Device;
263 typedef RECT D3D12_RECT;
265 typedef struct D3D12_BOX
267 UINT left;
268 UINT top;
269 UINT front;
270 UINT right;
271 UINT bottom;
272 UINT back;
273 } D3D12_BOX;
275 typedef struct D3D12_VIEWPORT
277 FLOAT TopLeftX;
278 FLOAT TopLeftY;
279 FLOAT Width;
280 FLOAT Height;
281 FLOAT MinDepth;
282 FLOAT MaxDepth;
283 } D3D12_VIEWPORT;
285 typedef struct D3D12_RANGE
287 SIZE_T Begin;
288 SIZE_T End;
289 } D3D12_RANGE;
291 typedef struct D3D12_RANGE_UINT64
293 UINT64 Begin;
294 UINT64 End;
295 } D3D12_RANGE_UINT64;
297 typedef struct D3D12_SUBRESOURCE_RANGE_UINT64
299 UINT Subresource;
300 D3D12_RANGE_UINT64 Range;
301 } D3D12_SUBRESOURCE_RANGE_UINT64;
303 typedef struct D3D12_RESOURCE_ALLOCATION_INFO
305 UINT64 SizeInBytes;
306 UINT64 Alignment;
307 } D3D12_RESOURCE_ALLOCATION_INFO;
309 typedef struct D3D12_DRAW_ARGUMENTS
311 UINT VertexCountPerInstance;
312 UINT InstanceCount;
313 UINT StartVertexLocation;
314 UINT StartInstanceLocation;
315 } D3D12_DRAW_ARGUMENTS;
317 typedef struct D3D12_DRAW_INDEXED_ARGUMENTS
319 UINT IndexCountPerInstance;
320 UINT InstanceCount;
321 UINT StartIndexLocation;
322 INT BaseVertexLocation;
323 UINT StartInstanceLocation;
324 } D3D12_DRAW_INDEXED_ARGUMENTS;
326 typedef struct D3D12_DISPATCH_ARGUMENTS
328 UINT ThreadGroupCountX;
329 UINT ThreadGroupCountY;
330 UINT ThreadGroupCountZ;
331 } D3D12_DISPATCH_ARGUMENTS;
333 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS
335 BOOL DoublePrecisionFloatShaderOps;
336 BOOL OutputMergerLogicOp;
337 D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport;
338 D3D12_TILED_RESOURCES_TIER TiledResourcesTier;
339 D3D12_RESOURCE_BINDING_TIER ResourceBindingTier;
340 BOOL PSSpecifiedStencilRefSupported;
341 BOOL TypedUAVLoadAdditionalFormats;
342 BOOL ROVsSupported;
343 D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier;
344 UINT MaxGPUVirtualAddressBitsPerResource;
345 BOOL StandardSwizzle64KBSupported;
346 D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier;
347 BOOL CrossAdapterRowMajorTextureSupported;
348 BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
349 D3D12_RESOURCE_HEAP_TIER ResourceHeapTier;
350 } D3D12_FEATURE_DATA_D3D12_OPTIONS;
352 typedef struct D3D12_FEATURE_DATA_FORMAT_SUPPORT
354 DXGI_FORMAT Format;
355 D3D12_FORMAT_SUPPORT1 Support1;
356 D3D12_FORMAT_SUPPORT2 Support2;
357 } D3D12_FEATURE_DATA_FORMAT_SUPPORT;
359 typedef enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS
361 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0x00000000,
362 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x00000001,
363 } D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS;
364 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS);")
366 typedef struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS
368 DXGI_FORMAT Format;
369 UINT SampleCount;
370 D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags;
371 UINT NumQualityLevels;
372 } D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS;
374 typedef enum D3D12_HEAP_TYPE
376 D3D12_HEAP_TYPE_DEFAULT = 1,
377 D3D12_HEAP_TYPE_UPLOAD = 2,
378 D3D12_HEAP_TYPE_READBACK = 3,
379 D3D12_HEAP_TYPE_CUSTOM = 4,
380 } D3D12_HEAP_TYPE;
382 typedef enum D3D12_CPU_PAGE_PROPERTY
384 D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0,
385 D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1,
386 D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2,
387 D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3,
388 } D3D12_CPU_PAGE_PROPERTY;
390 typedef enum D3D12_MEMORY_POOL
392 D3D12_MEMORY_POOL_UNKNOWN = 0,
393 D3D12_MEMORY_POOL_L0 = 1,
394 D3D12_MEMORY_POOL_L1 = 2,
395 } D3D12_MEMORY_POOL;
397 typedef struct D3D12_HEAP_PROPERTIES
399 D3D12_HEAP_TYPE Type;
400 D3D12_CPU_PAGE_PROPERTY CPUPageProperty;
401 D3D12_MEMORY_POOL MemoryPoolPreference;
402 UINT CreationNodeMask;
403 UINT VisibleNodeMask;
404 } D3D12_HEAP_PROPERTIES;
406 typedef enum D3D12_HEAP_FLAGS
408 D3D12_HEAP_FLAG_NONE = 0x00,
409 D3D12_HEAP_FLAG_SHARED = 0x01,
410 D3D12_HEAP_FLAG_DENY_BUFFERS = 0x04,
411 D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x08,
412 D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20,
413 D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40,
414 D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80,
415 D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0x00,
416 D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xc0,
417 D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44,
418 D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84,
419 } D3D12_HEAP_FLAGS;
420 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_HEAP_FLAGS);")
422 typedef struct D3D12_HEAP_DESC
424 UINT64 SizeInBytes;
425 D3D12_HEAP_PROPERTIES Properties;
426 UINT64 Alignment;
427 D3D12_HEAP_FLAGS Flags;
428 } D3D12_HEAP_DESC;
430 typedef struct D3D12_TILED_RESOURCE_COORDINATE
432 UINT X;
433 UINT Y;
434 UINT Z;
435 UINT Subresource;
436 } D3D12_TILED_RESOURCE_COORDINATE;
438 typedef struct D3D12_TILE_REGION_SIZE
440 UINT NumTiles;
441 BOOL UseBox;
442 UINT Width;
443 UINT16 Height;
444 UINT16 Depth;
445 } D3D12_TILE_REGION_SIZE;
447 typedef struct D3D12_SUBRESOURCE_TILING
449 UINT WidthInTiles;
450 UINT16 HeightInTiles;
451 UINT16 DepthInTiles;
452 UINT StartTileIndexInOverallResource;
453 } D3D12_SUBRESOURCE_TILING;
455 typedef struct D3D12_TILE_SHAPE
457 UINT WidthInTexels;
458 UINT HeightInTexels;
459 UINT DepthInTexels;
460 } D3D12_TILE_SHAPE;
462 typedef struct D3D12_SHADER_BYTECODE
464 const void *pShaderBytecode;
465 SIZE_T BytecodeLength;
466 } D3D12_SHADER_BYTECODE;
468 typedef struct D3D12_DEPTH_STENCIL_VALUE
470 FLOAT Depth;
471 UINT8 Stencil;
472 } D3D12_DEPTH_STENCIL_VALUE;
474 typedef struct D3D12_CLEAR_VALUE
476 DXGI_FORMAT Format;
477 union
479 FLOAT Color[4];
480 D3D12_DEPTH_STENCIL_VALUE DepthStencil;
482 } D3D12_CLEAR_VALUE;
484 typedef struct D3D12_PACKED_MIP_INFO
486 UINT8 NumStandardMips;
487 UINT8 NumPackedMips;
488 UINT NumTilesForPackedMips;
489 UINT StartTileIndexInOverallResource;
490 } D3D12_PACKED_MIP_INFO;
492 typedef enum D3D12_RESOURCE_STATES
494 D3D12_RESOURCE_STATE_COMMON = 0,
495 D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1,
496 D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2,
497 D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4,
498 D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8,
499 D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10,
500 D3D12_RESOURCE_STATE_DEPTH_READ = 0x20,
501 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40,
502 D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80,
503 D3D12_RESOURCE_STATE_STREAM_OUT = 0x100,
504 D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200,
505 D3D12_RESOURCE_STATE_COPY_DEST = 0x400,
506 D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800,
507 D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000,
508 D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000,
509 D3D12_RESOURCE_STATE_GENERIC_READ = 0x1 | 0x2 | 0x40 | 0x80 | 0x200 | 0x800,
510 D3D12_RESOURCE_STATE_PRESENT = 0x0,
511 D3D12_RESOURCE_STATE_PREDICATION = 0x200,
512 D3D12_RESOURCE_STATE_VIDEO_DECODE_READ = 0x10000,
513 D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE = 0x20000,
514 D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ = 0x40000,
515 D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE = 0x80000,
516 D3D12_RESOURCE_STATE_VIDEO_ENCODE_READ = 0x200000,
517 D3D12_RESOURCE_STATE_VIDEO_ENCODE_WRITE = 0x800000,
518 } D3D12_RESOURCE_STATES;
519 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_STATES);")
521 typedef enum D3D12_RESOURCE_BARRIER_TYPE
523 D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0,
524 D3D12_RESOURCE_BARRIER_TYPE_ALIASING = 1,
525 D3D12_RESOURCE_BARRIER_TYPE_UAV = 2,
526 } D3D12_RESOURCE_BARRIER_TYPE;
528 typedef enum D3D12_RESOURCE_BARRIER_FLAGS
530 D3D12_RESOURCE_BARRIER_FLAG_NONE = 0x0,
531 D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1,
532 D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2,
533 } D3D12_RESOURCE_BARRIER_FLAGS;
534 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_BARRIER_FLAGS);")
536 typedef struct D3D12_RESOURCE_TRANSITION_BARRIER
538 ID3D12Resource *pResource;
539 UINT Subresource;
540 D3D12_RESOURCE_STATES StateBefore;
541 D3D12_RESOURCE_STATES StateAfter;
542 } D3D12_RESOURCE_TRANSITION_BARRIER;
544 typedef struct D3D12_RESOURCE_ALIASING_BARRIER_ALIASING
546 ID3D12Resource *pResourceBefore;
547 ID3D12Resource *pResourceAfter;
548 } D3D12_RESOURCE_ALIASING_BARRIER;
550 typedef struct D3D12_RESOURCE_UAV_BARRIER
552 ID3D12Resource *pResource;
553 } D3D12_RESOURCE_UAV_BARRIER;
555 typedef struct D3D12_RESOURCE_BARRIER
557 D3D12_RESOURCE_BARRIER_TYPE Type;
558 D3D12_RESOURCE_BARRIER_FLAGS Flags;
559 union
561 D3D12_RESOURCE_TRANSITION_BARRIER Transition;
562 D3D12_RESOURCE_ALIASING_BARRIER Aliasing;
563 D3D12_RESOURCE_UAV_BARRIER UAV;
565 } D3D12_RESOURCE_BARRIER;
567 typedef enum D3D12_RESOURCE_DIMENSION
569 D3D12_RESOURCE_DIMENSION_UNKNOWN = 0,
570 D3D12_RESOURCE_DIMENSION_BUFFER = 1,
571 D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2,
572 D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3,
573 D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4,
574 } D3D12_RESOURCE_DIMENSION;
576 typedef enum D3D12_TEXTURE_LAYOUT
578 D3D12_TEXTURE_LAYOUT_UNKNOWN = 0,
579 D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1,
580 D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2,
581 D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3,
582 } D3D12_TEXTURE_LAYOUT;
584 typedef enum D3D12_RESOURCE_FLAGS
586 D3D12_RESOURCE_FLAG_NONE = 0x0,
587 D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1,
588 D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2,
589 D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4,
590 D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8,
591 D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10,
592 D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20,
593 } D3D12_RESOURCE_FLAGS;
594 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_FLAGS);")
596 typedef struct D3D12_RESOURCE_DESC
598 D3D12_RESOURCE_DIMENSION Dimension;
599 UINT64 Alignment;
600 UINT64 Width;
601 UINT Height;
602 UINT16 DepthOrArraySize;
603 UINT16 MipLevels;
604 DXGI_FORMAT Format;
605 DXGI_SAMPLE_DESC SampleDesc;
606 D3D12_TEXTURE_LAYOUT Layout;
607 D3D12_RESOURCE_FLAGS Flags;
608 } D3D12_RESOURCE_DESC;
610 typedef enum D3D12_RESOLVE_MODE
612 D3D12_RESOLVE_MODE_DECOMPRESS = 0,
613 D3D12_RESOLVE_MODE_MIN = 1,
614 D3D12_RESOLVE_MODE_MAX = 2,
615 D3D12_RESOLVE_MODE_AVERAGE = 3,
616 } D3D12_RESOLVE_MODE;
618 typedef struct D3D12_SAMPLE_POSITION
620 INT8 X;
621 INT8 Y;
622 } D3D12_SAMPLE_POSITION;
624 typedef enum D3D12_TEXTURE_COPY_TYPE
626 D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0,
627 D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1,
628 } D3D12_TEXTURE_COPY_TYPE;
630 typedef struct D3D12_SUBRESOURCE_FOOTPRINT
632 DXGI_FORMAT Format;
633 UINT Width;
634 UINT Height;
635 UINT Depth;
636 UINT RowPitch;
637 } D3D12_SUBRESOURCE_FOOTPRINT;
639 typedef struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT
641 UINT64 Offset;
642 D3D12_SUBRESOURCE_FOOTPRINT Footprint;
643 } D3D12_PLACED_SUBRESOURCE_FOOTPRINT;
645 typedef struct D3D12_TEXTURE_COPY_LOCATION
647 ID3D12Resource *pResource;
648 D3D12_TEXTURE_COPY_TYPE Type;
649 union
651 D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint;
652 UINT SubresourceIndex;
654 } D3D12_TEXTURE_COPY_LOCATION;
656 typedef enum D3D12_DESCRIPTOR_RANGE_TYPE
658 D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0,
659 D3D12_DESCRIPTOR_RANGE_TYPE_UAV = 1,
660 D3D12_DESCRIPTOR_RANGE_TYPE_CBV = 2,
661 D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = 3,
662 } D3D12_DESCRIPTOR_RANGE_TYPE;
664 typedef struct D3D12_DESCRIPTOR_RANGE
666 D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
667 UINT NumDescriptors;
668 UINT BaseShaderRegister;
669 UINT RegisterSpace;
670 UINT OffsetInDescriptorsFromTableStart;
671 } D3D12_DESCRIPTOR_RANGE;
673 typedef enum D3D12_DESCRIPTOR_RANGE_FLAGS
675 D3D12_DESCRIPTOR_RANGE_FLAG_NONE = 0x0,
676 D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1,
677 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2,
678 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
679 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8,
680 } D3D12_DESCRIPTOR_RANGE_FLAGS;
681 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_DESCRIPTOR_RANGE_FLAGS);")
683 typedef struct D3D12_DESCRIPTOR_RANGE1
685 D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
686 UINT NumDescriptors;
687 UINT BaseShaderRegister;
688 UINT RegisterSpace;
689 D3D12_DESCRIPTOR_RANGE_FLAGS Flags;
690 UINT OffsetInDescriptorsFromTableStart;
691 } D3D12_DESCRIPTOR_RANGE1;
693 typedef struct D3D12_ROOT_DESCRIPTOR_TABLE
695 UINT NumDescriptorRanges;
696 const D3D12_DESCRIPTOR_RANGE *pDescriptorRanges;
697 } D3D12_ROOT_DESCRIPTOR_TABLE;
699 typedef struct D3D12_ROOT_DESCRIPTOR_TABLE1
701 UINT NumDescriptorRanges;
702 const D3D12_DESCRIPTOR_RANGE1 *pDescriptorRanges;
703 } D3D12_ROOT_DESCRIPTOR_TABLE1;
705 typedef struct D3D12_ROOT_CONSTANTS
707 UINT ShaderRegister;
708 UINT RegisterSpace;
709 UINT Num32BitValues;
710 } D3D12_ROOT_CONSTANTS;
712 typedef struct D3D12_ROOT_DESCRIPTOR
714 UINT ShaderRegister;
715 UINT RegisterSpace;
716 } D3D12_ROOT_DESCRIPTOR;
718 typedef enum D3D12_ROOT_DESCRIPTOR_FLAGS
720 D3D12_ROOT_DESCRIPTOR_FLAG_NONE = 0x0,
721 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2,
722 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
723 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8,
724 } D3D12_ROOT_DESCRIPTOR_FLAGS;
725 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_ROOT_DESCRIPTOR_FLAGS);")
727 typedef struct D3D12_ROOT_DESCRIPTOR1
729 UINT ShaderRegister;
730 UINT RegisterSpace;
731 D3D12_ROOT_DESCRIPTOR_FLAGS Flags;
732 } D3D12_ROOT_DESCRIPTOR1;
734 typedef enum D3D12_ROOT_PARAMETER_TYPE
736 D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0,
737 D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 1,
738 D3D12_ROOT_PARAMETER_TYPE_CBV = 2,
739 D3D12_ROOT_PARAMETER_TYPE_SRV = 3,
740 D3D12_ROOT_PARAMETER_TYPE_UAV = 4,
741 } D3D12_ROOT_PARAMETER_TYPE;
743 typedef enum D3D12_SHADER_VISIBILITY
745 D3D12_SHADER_VISIBILITY_ALL = 0,
746 D3D12_SHADER_VISIBILITY_VERTEX = 1,
747 D3D12_SHADER_VISIBILITY_HULL = 2,
748 D3D12_SHADER_VISIBILITY_DOMAIN = 3,
749 D3D12_SHADER_VISIBILITY_GEOMETRY = 4,
750 D3D12_SHADER_VISIBILITY_PIXEL = 5,
751 } D3D12_SHADER_VISIBILITY;
753 typedef struct D3D12_ROOT_PARAMETER
755 D3D12_ROOT_PARAMETER_TYPE ParameterType;
756 union
758 D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable;
759 D3D12_ROOT_CONSTANTS Constants;
760 D3D12_ROOT_DESCRIPTOR Descriptor;
762 D3D12_SHADER_VISIBILITY ShaderVisibility;
763 } D3D12_ROOT_PARAMETER;
765 typedef struct D3D12_ROOT_PARAMETER1
767 D3D12_ROOT_PARAMETER_TYPE ParameterType;
768 union
770 D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable;
771 D3D12_ROOT_CONSTANTS Constants;
772 D3D12_ROOT_DESCRIPTOR1 Descriptor;
774 D3D12_SHADER_VISIBILITY ShaderVisibility;
775 } D3D12_ROOT_PARAMETER1;
777 typedef enum D3D12_STATIC_BORDER_COLOR
779 D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0,
780 D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = 1,
781 D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = 2,
782 } D3D12_STATIC_BORDER_COLOR;
784 typedef enum D3D12_FILTER
786 D3D12_FILTER_MIN_MAG_MIP_POINT = 0x00,
787 D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01,
788 D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04,
789 D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05,
790 D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
791 D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
792 D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
793 D3D12_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
794 D3D12_FILTER_ANISOTROPIC = 0x55,
795 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
796 D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
797 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
798 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
799 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
800 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
801 D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
802 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
803 D3D12_FILTER_COMPARISON_ANISOTROPIC = 0xd5,
804 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100,
805 D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101,
806 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104,
807 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105,
808 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110,
809 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111,
810 D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114,
811 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115,
812 D3D12_FILTER_MINIMUM_ANISOTROPIC = 0x155,
813 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180,
814 D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181,
815 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184,
816 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185,
817 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190,
818 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191,
819 D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194,
820 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195,
821 D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5,
822 } D3D12_FILTER;
824 typedef enum D3D12_FILTER_TYPE
826 D3D12_FILTER_TYPE_POINT = 0,
827 D3D12_FILTER_TYPE_LINEAR = 1,
828 } D3D12_FILTER_TYPE;
830 const UINT D3D12_MIP_FILTER_SHIFT = 0;
831 const UINT D3D12_MAG_FILTER_SHIFT = 2;
832 const UINT D3D12_MIN_FILTER_SHIFT = 4;
833 const UINT D3D12_FILTER_TYPE_MASK = 0x3;
835 const UINT D3D12_ANISOTROPIC_FILTERING_BIT = 0x40;
837 typedef enum D3D12_FILTER_REDUCTION_TYPE
839 D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0,
840 D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1,
841 D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2,
842 D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3,
843 } D3D12_FILTER_REDUCTION_TYPE;
845 const UINT D3D12_FILTER_REDUCTION_TYPE_MASK = 0x3;
846 const UINT D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7;
848 cpp_quote("#define D3D12_DECODE_MAG_FILTER(filter) \\")
849 cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MAG_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
851 cpp_quote("#define D3D12_DECODE_MIN_FILTER(filter) \\")
852 cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIN_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
854 cpp_quote("#define D3D12_DECODE_MIP_FILTER(filter) \\")
855 cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIP_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
857 cpp_quote("#define D3D12_DECODE_IS_ANISOTROPIC_FILTER(filter) \\")
858 cpp_quote(" (((filter) & D3D12_ANISOTROPIC_FILTERING_BIT) \\")
859 cpp_quote(" && (D3D12_DECODE_MIN_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
860 cpp_quote(" && (D3D12_DECODE_MAG_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
861 cpp_quote(" && (D3D12_DECODE_MIP_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR))")
863 cpp_quote("#define D3D12_DECODE_FILTER_REDUCTION(filter) \\")
864 cpp_quote(" ((D3D12_FILTER_REDUCTION_TYPE)(((filter) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT) \\")
865 cpp_quote(" & D3D12_FILTER_REDUCTION_TYPE_MASK))")
867 cpp_quote("#define D3D12_DECODE_IS_COMPARISON_FILTER(filter) \\")
868 cpp_quote(" (D3D12_DECODE_FILTER_REDUCTION(filter) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON)")
870 typedef enum D3D12_TEXTURE_ADDRESS_MODE
872 D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1,
873 D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2,
874 D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3,
875 D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4,
876 D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5,
877 } D3D12_TEXTURE_ADDRESS_MODE;
879 typedef enum D3D12_COMPARISON_FUNC
881 D3D12_COMPARISON_FUNC_NEVER = 1,
882 D3D12_COMPARISON_FUNC_LESS = 2,
883 D3D12_COMPARISON_FUNC_EQUAL = 3,
884 D3D12_COMPARISON_FUNC_LESS_EQUAL = 4,
885 D3D12_COMPARISON_FUNC_GREATER = 5,
886 D3D12_COMPARISON_FUNC_NOT_EQUAL = 6,
887 D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7,
888 D3D12_COMPARISON_FUNC_ALWAYS = 8,
889 } D3D12_COMPARISON_FUNC;
891 typedef struct D3D12_STATIC_SAMPLER_DESC
893 D3D12_FILTER Filter;
894 D3D12_TEXTURE_ADDRESS_MODE AddressU;
895 D3D12_TEXTURE_ADDRESS_MODE AddressV;
896 D3D12_TEXTURE_ADDRESS_MODE AddressW;
897 FLOAT MipLODBias;
898 UINT MaxAnisotropy;
899 D3D12_COMPARISON_FUNC ComparisonFunc;
900 D3D12_STATIC_BORDER_COLOR BorderColor;
901 FLOAT MinLOD;
902 FLOAT MaxLOD;
903 UINT ShaderRegister;
904 UINT RegisterSpace;
905 D3D12_SHADER_VISIBILITY ShaderVisibility;
906 } D3D12_STATIC_SAMPLER_DESC;
908 typedef enum D3D12_ROOT_SIGNATURE_FLAGS
910 D3D12_ROOT_SIGNATURE_FLAG_NONE = 0x00,
911 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x01,
912 D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x02,
913 D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x04,
914 D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x08,
915 D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
916 D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
917 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40,
918 } D3D12_ROOT_SIGNATURE_FLAGS;
919 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_ROOT_SIGNATURE_FLAGS);")
921 typedef struct D3D12_ROOT_SIGNATURE_DESC
923 UINT NumParameters;
924 const D3D12_ROOT_PARAMETER *pParameters;
925 UINT NumStaticSamplers;
926 const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers;
927 D3D12_ROOT_SIGNATURE_FLAGS Flags;
928 } D3D12_ROOT_SIGNATURE_DESC;
930 typedef struct D3D12_ROOT_SIGNATURE_DESC1
932 UINT NumParameters;
933 const D3D12_ROOT_PARAMETER1 *pParameters;
934 UINT NumStaticSamplers;
935 const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers;
936 D3D12_ROOT_SIGNATURE_FLAGS Flags;
937 } D3D12_ROOT_SIGNATURE_DESC1;
939 typedef enum D3D_ROOT_SIGNATURE_VERSION
941 D3D_ROOT_SIGNATURE_VERSION_1 = 0x1,
942 D3D_ROOT_SIGNATURE_VERSION_1_0 = 0x1,
943 D3D_ROOT_SIGNATURE_VERSION_1_1 = 0x2,
944 } D3D_ROOT_SIGNATURE_VERSION;
946 typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC
948 D3D_ROOT_SIGNATURE_VERSION Version;
949 union
951 D3D12_ROOT_SIGNATURE_DESC Desc_1_0;
952 D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1;
954 } D3D12_VERSIONED_ROOT_SIGNATURE_DESC;
956 typedef enum D3D12_DESCRIPTOR_HEAP_TYPE
958 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
959 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
960 D3D12_DESCRIPTOR_HEAP_TYPE_RTV,
961 D3D12_DESCRIPTOR_HEAP_TYPE_DSV,
962 D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES,
963 } D3D12_DESCRIPTOR_HEAP_TYPE;
965 typedef enum D3D12_DESCRIPTOR_HEAP_FLAGS
967 D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0x0,
968 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1,
969 } D3D12_DESCRIPTOR_HEAP_FLAGS;
970 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_DESCRIPTOR_HEAP_FLAGS);")
972 typedef struct D3D12_DESCRIPTOR_HEAP_DESC
974 D3D12_DESCRIPTOR_HEAP_TYPE Type;
975 UINT NumDescriptors;
976 D3D12_DESCRIPTOR_HEAP_FLAGS Flags;
977 UINT NodeMask;
978 } D3D12_DESCRIPTOR_HEAP_DESC;
980 typedef UINT64 D3D12_GPU_VIRTUAL_ADDRESS;
982 typedef struct D3D12_CONSTANT_BUFFER_VIEW_DESC
984 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
985 UINT SizeInBytes;
986 } D3D12_CONSTANT_BUFFER_VIEW_DESC;
988 typedef enum D3D12_SRV_DIMENSION
990 D3D12_SRV_DIMENSION_UNKNOWN = 0,
991 D3D12_SRV_DIMENSION_BUFFER = 1,
992 D3D12_SRV_DIMENSION_TEXTURE1D = 2,
993 D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3,
994 D3D12_SRV_DIMENSION_TEXTURE2D = 4,
995 D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5,
996 D3D12_SRV_DIMENSION_TEXTURE2DMS = 6,
997 D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7,
998 D3D12_SRV_DIMENSION_TEXTURE3D = 8,
999 D3D12_SRV_DIMENSION_TEXTURECUBE = 9,
1000 D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10,
1001 } D3D12_SRV_DIMENSION;
1003 typedef enum D3D12_BUFFER_SRV_FLAGS
1005 D3D12_BUFFER_SRV_FLAG_NONE = 0x0,
1006 D3D12_BUFFER_SRV_FLAG_RAW = 0x1,
1007 } D3D12_BUFFER_SRV_FLAGS;
1008 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_BUFFER_SRV_FLAGS);")
1010 typedef enum D3D12_SHADER_COMPONENT_MAPPING
1012 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0,
1013 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1,
1014 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2,
1015 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3,
1016 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4,
1017 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5,
1018 } D3D12_SHADER_COMPONENT_MAPPING;
1020 cpp_quote("#define D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(x, y, z, w) \\")
1021 cpp_quote(" (((x) & D3D12_SHADER_COMPONENT_MAPPING_MASK) \\")
1022 cpp_quote(" | (((y) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << D3D12_SHADER_COMPONENT_MAPPING_SHIFT) \\")
1023 cpp_quote(" | (((z) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 2)) \\")
1024 cpp_quote(" | (((w) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 3)) \\")
1025 cpp_quote(" | D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES)")
1026 cpp_quote("#define D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 1, 2, 3)")
1028 cpp_quote("#define D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(i, mapping) \\")
1029 cpp_quote(" ((D3D12_SHADER_COMPONENT_MAPPING)(mapping >> (i * D3D12_SHADER_COMPONENT_MAPPING_SHIFT) \\")
1030 cpp_quote(" & D3D12_SHADER_COMPONENT_MAPPING_MASK))")
1032 typedef struct D3D12_BUFFER_SRV
1034 UINT64 FirstElement;
1035 UINT NumElements;
1036 UINT StructureByteStride;
1037 D3D12_BUFFER_SRV_FLAGS Flags;
1038 } D3D12_BUFFER_SRV;
1040 typedef struct D3D12_TEX1D_SRV
1042 UINT MostDetailedMip;
1043 UINT MipLevels;
1044 FLOAT ResourceMinLODClamp;
1045 } D3D12_TEX1D_SRV;
1047 typedef struct D3D12_TEX1D_ARRAY_SRV
1049 UINT MostDetailedMip;
1050 UINT MipLevels;
1051 UINT FirstArraySlice;
1052 UINT ArraySize;
1053 FLOAT ResourceMinLODClamp;
1054 } D3D12_TEX1D_ARRAY_SRV;
1056 typedef struct D3D12_TEX2D_SRV
1058 UINT MostDetailedMip;
1059 UINT MipLevels;
1060 UINT PlaneSlice;
1061 FLOAT ResourceMinLODClamp;
1062 } D3D12_TEX2D_SRV;
1064 typedef struct D3D12_TEX2D_ARRAY_SRV
1066 UINT MostDetailedMip;
1067 UINT MipLevels;
1068 UINT FirstArraySlice;
1069 UINT ArraySize;
1070 UINT PlaneSlice;
1071 FLOAT ResourceMinLODClamp;
1072 } D3D12_TEX2D_ARRAY_SRV;
1074 typedef struct D3D12_TEX2DMS_SRV
1076 UINT UnusedField_NothingToDefine;
1077 } D3D12_TEX2DMS_SRV;
1079 typedef struct D3D12_TEX2DMS_ARRAY_SRV
1081 UINT FirstArraySlice;
1082 UINT ArraySize;
1083 } D3D12_TEX2DMS_ARRAY_SRV;
1085 typedef struct D3D12_TEX3D_SRV
1087 UINT MostDetailedMip;
1088 UINT MipLevels;
1089 FLOAT ResourceMinLODClamp;
1090 } D3D12_TEX3D_SRV;
1092 typedef struct D3D12_TEXCUBE_SRV
1094 UINT MostDetailedMip;
1095 UINT MipLevels;
1096 FLOAT ResourceMinLODClamp;
1097 } D3D12_TEXCUBE_SRV;
1099 typedef struct D3D12_TEXCUBE_ARRAY_SRV
1101 UINT MostDetailedMip;
1102 UINT MipLevels;
1103 UINT First2DArrayFace;
1104 UINT NumCubes;
1105 FLOAT ResourceMinLODClamp;
1106 } D3D12_TEXCUBE_ARRAY_SRV;
1108 typedef struct D3D12_SHADER_RESOURCE_VIEW_DESC
1110 DXGI_FORMAT Format;
1111 D3D12_SRV_DIMENSION ViewDimension;
1112 UINT Shader4ComponentMapping;
1113 union
1115 D3D12_BUFFER_SRV Buffer;
1116 D3D12_TEX1D_SRV Texture1D;
1117 D3D12_TEX1D_ARRAY_SRV Texture1DArray;
1118 D3D12_TEX2D_SRV Texture2D;
1119 D3D12_TEX2D_ARRAY_SRV Texture2DArray;
1120 D3D12_TEX2DMS_SRV Texture2DMS;
1121 D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray;
1122 D3D12_TEX3D_SRV Texture3D;
1123 D3D12_TEXCUBE_SRV TextureCube;
1124 D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray;
1126 } D3D12_SHADER_RESOURCE_VIEW_DESC;
1128 typedef enum D3D12_UAV_DIMENSION
1130 D3D12_UAV_DIMENSION_UNKNOWN = 0,
1131 D3D12_UAV_DIMENSION_BUFFER = 1,
1132 D3D12_UAV_DIMENSION_TEXTURE1D = 2,
1133 D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3,
1134 D3D12_UAV_DIMENSION_TEXTURE2D = 4,
1135 D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5,
1136 D3D12_UAV_DIMENSION_TEXTURE3D = 8,
1137 } D3D12_UAV_DIMENSION;
1139 typedef enum D3D12_BUFFER_UAV_FLAGS
1141 D3D12_BUFFER_UAV_FLAG_NONE = 0x0,
1142 D3D12_BUFFER_UAV_FLAG_RAW = 0x1,
1143 } D3D12_BUFFER_UAV_FLAGS;
1144 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_BUFFER_UAV_FLAGS);")
1146 typedef struct D3D12_BUFFER_UAV
1148 UINT64 FirstElement;
1149 UINT NumElements;
1150 UINT StructureByteStride;
1151 UINT64 CounterOffsetInBytes;
1152 D3D12_BUFFER_UAV_FLAGS Flags;
1153 } D3D12_BUFFER_UAV;
1155 typedef struct D3D12_TEX1D_UAV
1157 UINT MipSlice;
1158 } D3D12_TEX1D_UAV;
1160 typedef struct D3D12_TEX1D_ARRAY_UAV
1162 UINT MipSlice;
1163 UINT FirstArraySlice;
1164 UINT ArraySize;
1165 } D3D12_TEX1D_ARRAY_UAV;
1167 typedef struct D3D12_TEX2D_UAV
1169 UINT MipSlice;
1170 UINT PlaneSlice;
1171 } D3D12_TEX2D_UAV;
1173 typedef struct D3D12_TEX2D_ARRAY_UAV
1175 UINT MipSlice;
1176 UINT FirstArraySlice;
1177 UINT ArraySize;
1178 UINT PlaneSlice;
1179 } D3D12_TEX2D_ARRAY_UAV;
1181 typedef struct D3D12_TEX3D_UAV
1183 UINT MipSlice;
1184 UINT FirstWSlice;
1185 UINT WSize;
1186 } D3D12_TEX3D_UAV;
1188 typedef struct D3D12_UNORDERED_ACCESS_VIEW_DESC
1190 DXGI_FORMAT Format;
1191 D3D12_UAV_DIMENSION ViewDimension;
1192 union
1194 D3D12_BUFFER_UAV Buffer;
1195 D3D12_TEX1D_UAV Texture1D;
1196 D3D12_TEX1D_ARRAY_UAV Texture1DArray;
1197 D3D12_TEX2D_UAV Texture2D;
1198 D3D12_TEX2D_ARRAY_UAV Texture2DArray;
1199 D3D12_TEX3D_UAV Texture3D;
1201 } D3D12_UNORDERED_ACCESS_VIEW_DESC;
1203 typedef enum D3D12_RTV_DIMENSION
1205 D3D12_RTV_DIMENSION_UNKNOWN = 0,
1206 D3D12_RTV_DIMENSION_BUFFER = 1,
1207 D3D12_RTV_DIMENSION_TEXTURE1D = 2,
1208 D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3,
1209 D3D12_RTV_DIMENSION_TEXTURE2D = 4,
1210 D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5,
1211 D3D12_RTV_DIMENSION_TEXTURE2DMS = 6,
1212 D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7,
1213 D3D12_RTV_DIMENSION_TEXTURE3D = 8,
1214 } D3D12_RTV_DIMENSION;
1216 typedef struct D3D12_BUFFER_RTV
1218 UINT64 FirstElement;
1219 UINT NumElements;
1220 } D3D12_BUFFER_RTV;
1222 typedef struct D3D12_TEX1D_RTV
1224 UINT MipSlice;
1225 } D3D12_TEX1D_RTV;
1227 typedef struct D3D12_TEX1D_ARRAY_RTV
1229 UINT MipSlice;
1230 UINT FirstArraySlice;
1231 UINT ArraySize;
1232 } D3D12_TEX1D_ARRAY_RTV;
1234 typedef struct D3D12_TEX2D_RTV
1236 UINT MipSlice;
1237 UINT PlaneSlice;
1238 } D3D12_TEX2D_RTV;
1240 typedef struct D3D12_TEX2D_ARRAY_RTV
1242 UINT MipSlice;
1243 UINT FirstArraySlice;
1244 UINT ArraySize;
1245 UINT PlaneSlice;
1246 } D3D12_TEX2D_ARRAY_RTV;
1248 typedef struct D3D12_TEX2DMS_RTV
1250 UINT UnusedField_NothingToDefine;
1251 } D3D12_TEX2DMS_RTV;
1253 typedef struct D3D12_TEX2DMS_ARRAY_RTV
1255 UINT FirstArraySlice;
1256 UINT ArraySize;
1257 } D3D12_TEX2DMS_ARRAY_RTV;
1259 typedef struct D3D12_TEX3D_RTV
1261 UINT MipSlice;
1262 UINT FirstWSlice;
1263 UINT WSize;
1264 } D3D12_TEX3D_RTV;
1266 typedef struct D3D12_RENDER_TARGET_VIEW_DESC
1268 DXGI_FORMAT Format;
1269 D3D12_RTV_DIMENSION ViewDimension;
1270 union
1272 D3D12_BUFFER_RTV Buffer;
1273 D3D12_TEX1D_RTV Texture1D;
1274 D3D12_TEX1D_ARRAY_RTV Texture1DArray;
1275 D3D12_TEX2D_RTV Texture2D;
1276 D3D12_TEX2D_ARRAY_RTV Texture2DArray;
1277 D3D12_TEX2DMS_RTV Texture2DMS;
1278 D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray;
1279 D3D12_TEX3D_RTV Texture3D;
1281 } D3D12_RENDER_TARGET_VIEW_DESC;
1283 typedef enum D3D12_DSV_DIMENSION
1285 D3D12_DSV_DIMENSION_UNKNOWN = 0,
1286 D3D12_DSV_DIMENSION_TEXTURE1D = 1,
1287 D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2,
1288 D3D12_DSV_DIMENSION_TEXTURE2D = 3,
1289 D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4,
1290 D3D12_DSV_DIMENSION_TEXTURE2DMS = 5,
1291 D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6,
1292 } D3D12_DSV_DIMENSION;
1294 typedef enum D3D12_DSV_FLAGS
1296 D3D12_DSV_FLAG_NONE = 0x0,
1297 D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1,
1298 D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2,
1299 } D3D12_DSV_FLAGS;
1300 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_DSV_FLAGS);")
1302 typedef struct D3D12_TEX1D_DSV
1304 UINT MipSlice;
1305 } D3D12_TEX1D_DSV;
1307 typedef struct D3D12_TEX1D_ARRAY_DSV
1309 UINT MipSlice;
1310 UINT FirstArraySlice;
1311 UINT ArraySize;
1312 } D3D12_TEX1D_ARRAY_DSV;
1314 typedef struct D3D12_TEX2D_DSV
1316 UINT MipSlice;
1317 } D3D12_TEX2D_DSV;
1319 typedef struct D3D12_TEX2D_ARRAY_DSV
1321 UINT MipSlice;
1322 UINT FirstArraySlice;
1323 UINT ArraySize;
1324 } D3D12_TEX2D_ARRAY_DSV;
1326 typedef struct D3D12_TEX2DMS_DSV
1328 UINT UnusedField_NothingToDefine;
1329 } D3D12_TEX2DMS_DSV;
1331 typedef struct D3D12_TEX2DMS_ARRAY_DSV
1333 UINT FirstArraySlice;
1334 UINT ArraySize;
1335 } D3D12_TEX2DMS_ARRAY_DSV;
1337 typedef struct D3D12_DEPTH_STENCIL_VIEW_DESC
1339 DXGI_FORMAT Format;
1340 D3D12_DSV_DIMENSION ViewDimension;
1341 D3D12_DSV_FLAGS Flags;
1342 union
1344 D3D12_TEX1D_DSV Texture1D;
1345 D3D12_TEX1D_ARRAY_DSV Texture1DArray;
1346 D3D12_TEX2D_DSV Texture2D;
1347 D3D12_TEX2D_ARRAY_DSV Texture2DArray;
1348 D3D12_TEX2DMS_DSV Texture2DMS;
1349 D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray;
1351 } D3D12_DEPTH_STENCIL_VIEW_DESC;
1353 typedef struct D3D12_SAMPLER_DESC
1355 D3D12_FILTER Filter;
1356 D3D12_TEXTURE_ADDRESS_MODE AddressU;
1357 D3D12_TEXTURE_ADDRESS_MODE AddressV;
1358 D3D12_TEXTURE_ADDRESS_MODE AddressW;
1359 FLOAT MipLODBias;
1360 UINT MaxAnisotropy;
1361 D3D12_COMPARISON_FUNC ComparisonFunc;
1362 FLOAT BorderColor[4];
1363 FLOAT MinLOD;
1364 FLOAT MaxLOD;
1365 } D3D12_SAMPLER_DESC;
1367 typedef struct D3D12_CPU_DESCRIPTOR_HANDLE
1369 SIZE_T ptr;
1370 } D3D12_CPU_DESCRIPTOR_HANDLE;
1372 typedef struct D3D12_GPU_DESCRIPTOR_HANDLE
1374 UINT64 ptr;
1375 } D3D12_GPU_DESCRIPTOR_HANDLE;
1377 typedef enum D3D12_STENCIL_OP
1379 D3D12_STENCIL_OP_KEEP = 1,
1380 D3D12_STENCIL_OP_ZERO = 2,
1381 D3D12_STENCIL_OP_REPLACE = 3,
1382 D3D12_STENCIL_OP_INCR_SAT = 4,
1383 D3D12_STENCIL_OP_DECR_SAT = 5,
1384 D3D12_STENCIL_OP_INVERT = 6,
1385 D3D12_STENCIL_OP_INCR = 7,
1386 D3D12_STENCIL_OP_DECR = 8,
1387 } D3D12_STENCIL_OP;
1389 typedef struct D3D12_DEPTH_STENCILOP_DESC
1391 D3D12_STENCIL_OP StencilFailOp;
1392 D3D12_STENCIL_OP StencilDepthFailOp;
1393 D3D12_STENCIL_OP StencilPassOp;
1394 D3D12_COMPARISON_FUNC StencilFunc;
1395 } D3D12_DEPTH_STENCILOP_DESC;
1397 typedef enum D3D12_DEPTH_WRITE_MASK
1399 D3D12_DEPTH_WRITE_MASK_ZERO = 0,
1400 D3D12_DEPTH_WRITE_MASK_ALL = 1,
1401 } D3D12_DEPTH_WRITE_MASK;
1403 typedef struct D3D12_DEPTH_STENCIL_DESC
1405 BOOL DepthEnable;
1406 D3D12_DEPTH_WRITE_MASK DepthWriteMask;
1407 D3D12_COMPARISON_FUNC DepthFunc;
1408 BOOL StencilEnable;
1409 UINT8 StencilReadMask;
1410 UINT8 StencilWriteMask;
1411 D3D12_DEPTH_STENCILOP_DESC FrontFace;
1412 D3D12_DEPTH_STENCILOP_DESC BackFace;
1413 } D3D12_DEPTH_STENCIL_DESC;
1415 typedef enum D3D12_BLEND
1417 D3D12_BLEND_ZERO = 1,
1418 D3D12_BLEND_ONE = 2,
1419 D3D12_BLEND_SRC_COLOR = 3,
1420 D3D12_BLEND_INV_SRC_COLOR = 4,
1421 D3D12_BLEND_SRC_ALPHA = 5,
1422 D3D12_BLEND_INV_SRC_ALPHA = 6,
1423 D3D12_BLEND_DEST_ALPHA = 7,
1424 D3D12_BLEND_INV_DEST_ALPHA = 8,
1425 D3D12_BLEND_DEST_COLOR = 9,
1426 D3D12_BLEND_INV_DEST_COLOR = 10,
1427 D3D12_BLEND_SRC_ALPHA_SAT = 11,
1428 D3D12_BLEND_BLEND_FACTOR = 14,
1429 D3D12_BLEND_INV_BLEND_FACTOR = 15,
1430 D3D12_BLEND_SRC1_COLOR = 16,
1431 D3D12_BLEND_INV_SRC1_COLOR = 17,
1432 D3D12_BLEND_SRC1_ALPHA = 18,
1433 D3D12_BLEND_INV_SRC1_ALPHA = 19,
1434 } D3D12_BLEND;
1436 typedef enum D3D12_BLEND_OP
1438 D3D12_BLEND_OP_ADD = 1,
1439 D3D12_BLEND_OP_SUBTRACT = 2,
1440 D3D12_BLEND_OP_REV_SUBTRACT = 3,
1441 D3D12_BLEND_OP_MIN = 4,
1442 D3D12_BLEND_OP_MAX = 5,
1443 } D3D12_BLEND_OP;
1445 typedef enum D3D12_LOGIC_OP
1447 D3D12_LOGIC_OP_CLEAR = 0,
1448 D3D12_LOGIC_OP_SET = 1,
1449 D3D12_LOGIC_OP_COPY = 2,
1450 D3D12_LOGIC_OP_COPY_INVERTED = 3,
1451 D3D12_LOGIC_OP_NOOP = 4,
1452 } D3D12_LOGIC_OP;
1454 typedef enum D3D12_COLOR_WRITE_ENABLE
1456 D3D12_COLOR_WRITE_ENABLE_RED = 0x1,
1457 D3D12_COLOR_WRITE_ENABLE_GREEN = 0x2,
1458 D3D12_COLOR_WRITE_ENABLE_BLUE = 0x4,
1459 D3D12_COLOR_WRITE_ENABLE_ALPHA = 0x8,
1460 D3D12_COLOR_WRITE_ENABLE_ALL = (D3D12_COLOR_WRITE_ENABLE_RED
1461 | D3D12_COLOR_WRITE_ENABLE_GREEN | D3D12_COLOR_WRITE_ENABLE_BLUE
1462 | D3D12_COLOR_WRITE_ENABLE_ALPHA),
1463 } D3D12_COLOR_WRITE_ENABLE;
1465 typedef struct D3D12_RENDER_TARGET_BLEND_DESC
1467 BOOL BlendEnable;
1468 BOOL LogicOpEnable;
1469 D3D12_BLEND SrcBlend;
1470 D3D12_BLEND DestBlend;
1471 D3D12_BLEND_OP BlendOp;
1472 D3D12_BLEND SrcBlendAlpha;
1473 D3D12_BLEND DestBlendAlpha;
1474 D3D12_BLEND_OP BlendOpAlpha;
1475 D3D12_LOGIC_OP LogicOp;
1476 UINT8 RenderTargetWriteMask;
1477 } D3D12_RENDER_TARGET_BLEND_DESC;
1479 typedef struct D3D12_BLEND_DESC
1481 BOOL AlphaToCoverageEnable;
1482 BOOL IndependentBlendEnable;
1483 D3D12_RENDER_TARGET_BLEND_DESC RenderTarget[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
1484 } D3D12_BLEND_DESC;
1486 typedef enum D3D12_FILL_MODE
1488 D3D12_FILL_MODE_WIREFRAME = 2,
1489 D3D12_FILL_MODE_SOLID = 3,
1490 } D3D12_FILL_MODE;
1492 typedef enum D3D12_CULL_MODE
1494 D3D12_CULL_MODE_NONE = 1,
1495 D3D12_CULL_MODE_FRONT = 2,
1496 D3D12_CULL_MODE_BACK = 3,
1497 } D3D12_CULL_MODE;
1499 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_MODE
1501 D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0,
1502 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1,
1503 } D3D12_CONSERVATIVE_RASTERIZATION_MODE;
1505 typedef struct D3D12_RASTERIZER_DESC
1507 D3D12_FILL_MODE FillMode;
1508 D3D12_CULL_MODE CullMode;
1509 BOOL FrontCounterClockwise;
1510 INT DepthBias;
1511 FLOAT DepthBiasClamp;
1512 FLOAT SlopeScaledDepthBias;
1513 BOOL DepthClipEnable;
1514 BOOL MultisampleEnable;
1515 BOOL AntialiasedLineEnable;
1516 UINT ForcedSampleCount;
1517 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster;
1518 } D3D12_RASTERIZER_DESC;
1520 typedef struct D3D12_SO_DECLARATION_ENTRY
1522 UINT Stream;
1523 const char *SemanticName;
1524 UINT SemanticIndex;
1525 BYTE StartComponent;
1526 BYTE ComponentCount;
1527 BYTE OutputSlot;
1528 } D3D12_SO_DECLARATION_ENTRY;
1530 typedef struct D3D12_STREAM_OUTPUT_DESC
1532 const D3D12_SO_DECLARATION_ENTRY *pSODeclaration;
1533 UINT NumEntries;
1534 const UINT *pBufferStrides;
1535 UINT NumStrides;
1536 UINT RasterizedStream;
1537 } D3D12_STREAM_OUTPUT_DESC;
1539 typedef enum D3D12_INPUT_CLASSIFICATION
1541 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0,
1542 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1,
1543 } D3D12_INPUT_CLASSIFICATION;
1545 typedef struct D3D12_INPUT_ELEMENT_DESC
1547 const char *SemanticName;
1548 UINT SemanticIndex;
1549 DXGI_FORMAT Format;
1550 UINT InputSlot;
1551 UINT AlignedByteOffset;
1552 D3D12_INPUT_CLASSIFICATION InputSlotClass;
1553 UINT InstanceDataStepRate;
1554 } D3D12_INPUT_ELEMENT_DESC;
1556 typedef struct D3D12_INPUT_LAYOUT_DESC
1558 const D3D12_INPUT_ELEMENT_DESC *pInputElementDescs;
1559 UINT NumElements;
1560 } D3D12_INPUT_LAYOUT_DESC;
1562 typedef enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
1564 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0,
1565 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1,
1566 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2,
1567 } D3D12_INDEX_BUFFER_STRIP_CUT_VALUE;
1569 typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY;
1571 typedef enum D3D12_PRIMITIVE_TOPOLOGY_TYPE
1573 D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0,
1574 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1,
1575 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2,
1576 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3,
1577 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4,
1578 } D3D12_PRIMITIVE_TOPOLOGY_TYPE;
1580 typedef struct D3D12_CACHED_PIPELINE_STATE
1582 const void *pCachedBlob;
1583 SIZE_T CachedBlobSizeInBytes;
1584 } D3D12_CACHED_PIPELINE_STATE;
1586 typedef enum D3D12_PIPELINE_STATE_FLAGS
1588 D3D12_PIPELINE_STATE_FLAG_NONE = 0x0,
1589 D3D12_PIPELINE_STATE_FLAG_DEBUG = 0x1,
1590 } D3D12_PIPELINE_STATE_FLAGS;
1591 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_PIPELINE_STATE_FLAGS);")
1593 typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
1595 ID3D12RootSignature *pRootSignature;
1596 D3D12_SHADER_BYTECODE VS;
1597 D3D12_SHADER_BYTECODE PS;
1598 D3D12_SHADER_BYTECODE DS;
1599 D3D12_SHADER_BYTECODE HS;
1600 D3D12_SHADER_BYTECODE GS;
1601 D3D12_STREAM_OUTPUT_DESC StreamOutput;
1602 D3D12_BLEND_DESC BlendState;
1603 UINT SampleMask;
1604 D3D12_RASTERIZER_DESC RasterizerState;
1605 D3D12_DEPTH_STENCIL_DESC DepthStencilState;
1606 D3D12_INPUT_LAYOUT_DESC InputLayout;
1607 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
1608 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
1609 UINT NumRenderTargets;
1610 DXGI_FORMAT RTVFormats[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
1611 DXGI_FORMAT DSVFormat;
1612 DXGI_SAMPLE_DESC SampleDesc;
1613 UINT NodeMask;
1614 D3D12_CACHED_PIPELINE_STATE CachedPSO;
1615 D3D12_PIPELINE_STATE_FLAGS Flags;
1616 } D3D12_GRAPHICS_PIPELINE_STATE_DESC;
1618 typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
1620 ID3D12RootSignature *pRootSignature;
1621 D3D12_SHADER_BYTECODE CS;
1622 UINT NodeMask;
1623 D3D12_CACHED_PIPELINE_STATE CachedPSO;
1624 D3D12_PIPELINE_STATE_FLAGS Flags;
1625 } D3D12_COMPUTE_PIPELINE_STATE_DESC;
1627 typedef enum D3D12_COMMAND_LIST_TYPE
1629 D3D12_COMMAND_LIST_TYPE_DIRECT = 0,
1630 D3D12_COMMAND_LIST_TYPE_BUNDLE = 1,
1631 D3D12_COMMAND_LIST_TYPE_COMPUTE = 2,
1632 D3D12_COMMAND_LIST_TYPE_COPY = 3,
1633 } D3D12_COMMAND_LIST_TYPE;
1635 typedef enum D3D12_COMMAND_QUEUE_PRIORITY
1637 D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0,
1638 D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100,
1639 D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000,
1640 } D3D12_COMMAND_QUEUE_PRIORITY;
1642 typedef enum D3D12_COMMAND_QUEUE_FLAGS
1644 D3D12_COMMAND_QUEUE_FLAG_NONE = 0x0,
1645 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1,
1646 } D3D12_COMMAND_QUEUE_FLAGS;
1647 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_COMMAND_QUEUE_FLAGS);")
1649 typedef struct D3D12_COMMAND_QUEUE_DESC
1651 D3D12_COMMAND_LIST_TYPE Type;
1652 INT Priority;
1653 D3D12_COMMAND_QUEUE_FLAGS Flags;
1654 UINT NodeMask;
1655 } D3D12_COMMAND_QUEUE_DESC;
1657 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE
1659 UINT NodeIndex;
1660 BOOL TileBasedRenderer;
1661 BOOL UMA;
1662 BOOL CacheCoherentUMA;
1663 } D3D12_FEATURE_DATA_ARCHITECTURE;
1665 typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
1667 DXGI_FORMAT Format;
1668 UINT8 PlaneCount;
1669 } D3D12_FEATURE_DATA_FORMAT_INFO;
1671 typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS
1673 UINT NumFeatureLevels;
1674 const D3D_FEATURE_LEVEL *pFeatureLevelsRequested;
1675 D3D_FEATURE_LEVEL MaxSupportedFeatureLevel;
1676 } D3D12_FEATURE_DATA_FEATURE_LEVELS;
1678 typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
1680 D3D_ROOT_SIGNATURE_VERSION HighestVersion;
1681 } D3D12_FEATURE_DATA_ROOT_SIGNATURE;
1683 typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
1685 UINT MaxGPUVirtualAddressBitsPerResource;
1686 UINT MaxGPUVirtualAddressBitsPerProcess;
1687 } D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT;
1689 typedef enum D3D_SHADER_MODEL
1691 D3D_SHADER_MODEL_5_1 = 0x51,
1692 D3D_SHADER_MODEL_6_0 = 0x60,
1693 } D3D_SHADER_MODEL;
1695 typedef struct D3D12_FEATURE_DATA_SHADER_MODEL
1697 D3D_SHADER_MODEL HighestShaderModel;
1698 } D3D12_FEATURE_DATA_SHADER_MODEL;
1700 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
1702 BOOL WaveOps;
1703 UINT WaveLaneCountMin;
1704 UINT WaveLaneCountMax;
1705 UINT TotalLaneCount;
1706 BOOL ExpandedComputeResourceStates;
1707 BOOL Int64ShaderOps;
1708 } D3D12_FEATURE_DATA_D3D12_OPTIONS1;
1710 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1
1712 UINT NodeIndex;
1713 BOOL TileBasedRenderer;
1714 BOOL UMA;
1715 BOOL CacheCoherentUMA;
1716 BOOL IsolatedMMU;
1717 } D3D12_FEATURE_DATA_ARCHITECTURE1;
1719 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS2
1721 BOOL DepthBoundsTestSupported;
1722 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier;
1723 } D3D12_FEATURE_DATA_D3D12_OPTIONS2;
1725 typedef struct D3D12_FEATURE_DATA_SHADER_CACHE
1727 D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags;
1728 } D3D12_FEATURE_DATA_SHADER_CACHE;
1730 typedef struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
1732 D3D12_COMMAND_LIST_TYPE CommandListType;
1733 UINT Priority;
1734 BOOL PriorityForTypeIsSupported;
1735 } D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY;
1737 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
1739 BOOL CopyQueueTimestampQueriesSupported;
1740 BOOL CastingFullyTypedFormatSupported;
1741 D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags;
1742 D3D12_VIEW_INSTANCING_TIER ViewInstancingTier;
1743 BOOL BarycentricsSupported;
1744 } D3D12_FEATURE_DATA_D3D12_OPTIONS3;
1746 typedef struct D3D12_FEATURE_DATA_EXISTING_HEAPS
1748 BOOL Supported;
1749 } D3D12_FEATURE_DATA_EXISTING_HEAPS;
1751 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS4
1753 BOOL MSAA64KBAlignedTextureSupported;
1754 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER SharedResourceCompatibilityTier;
1755 BOOL Native16BitShaderOpsSupported;
1756 } D3D12_FEATURE_DATA_D3D12_OPTIONS4;
1758 typedef struct D3D12_FEATURE_DATA_SERIALIZATION
1760 UINT NodeIndex;
1761 D3D12_HEAP_SERIALIZATION_TIER HeapSerializationTier;
1762 } D3D12_FEATURE_DATA_SERIALIZATION;
1764 typedef struct D3D12_FEATURE_DATA_CROSS_NODE
1766 D3D12_CROSS_NODE_SHARING_TIER SharingTier;
1767 BOOL AtomicShaderInstructions;
1768 } D3D12_FEATURE_DATA_CROSS_NODE;
1770 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS5
1772 BOOL SRVOnlyTiledResourceTier3;
1773 D3D12_RENDER_PASS_TIER RenderPassesTier;
1774 D3D12_RAYTRACING_TIER RaytracingTier;
1775 } D3D12_FEATURE_DATA_D3D12_OPTIONS5;
1777 typedef enum D3D12_FEATURE
1779 D3D12_FEATURE_D3D12_OPTIONS = 0,
1780 D3D12_FEATURE_ARCHITECTURE = 1,
1781 D3D12_FEATURE_FEATURE_LEVELS = 2,
1782 D3D12_FEATURE_FORMAT_SUPPORT = 3,
1783 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4,
1784 D3D12_FEATURE_FORMAT_INFO = 5,
1785 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6,
1786 D3D12_FEATURE_SHADER_MODEL = 7,
1787 D3D12_FEATURE_D3D12_OPTIONS1 = 8,
1788 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT = 10,
1789 D3D12_FEATURE_ROOT_SIGNATURE = 12,
1790 D3D12_FEATURE_ARCHITECTURE1 = 16,
1791 D3D12_FEATURE_D3D12_OPTIONS2 = 18,
1792 D3D12_FEATURE_SHADER_CACHE = 19,
1793 D3D12_FEATURE_COMMAND_QUEUE_PRIORITY = 20,
1794 D3D12_FEATURE_D3D12_OPTIONS3 = 21,
1795 D3D12_FEATURE_EXISTING_HEAPS = 22,
1796 D3D12_FEATURE_D3D12_OPTIONS4 = 23,
1797 D3D12_FEATURE_SERIALIZATION = 24,
1798 D3D12_FEATURE_CROSS_NODE = 25,
1799 D3D12_FEATURE_D3D12_OPTIONS5 = 27,
1800 D3D12_FEATURE_D3D12_OPTIONS6 = 30,
1801 D3D12_FEATURE_QUERY_META_COMMAND = 31,
1802 D3D12_FEATURE_D3D12_OPTIONS7 = 32,
1803 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT = 33,
1804 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES = 34,
1805 } D3D12_FEATURE;
1807 typedef struct D3D12_MEMCPY_DEST
1809 void *pData;
1810 SIZE_T RowPitch;
1811 SIZE_T SlicePitch;
1812 } D3D12_MEMCPY_DEST;
1814 typedef struct D3D12_SUBRESOURCE_DATA
1816 const void *pData;
1817 LONG_PTR RowPitch;
1818 LONG_PTR SlicePitch;
1819 } D3D12_SUBRESOURCE_DATA;
1821 typedef enum D3D12_MULTIPLE_FENCE_WAIT_FLAGS
1823 D3D12_MULTIPLE_FENCE_WAIT_FLAG_NONE = 0x0,
1824 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY = 0x1,
1825 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ALL = 0x0,
1826 } D3D12_MULTIPLE_FENCE_WAIT_FLAGS;
1827 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_MULTIPLE_FENCE_WAIT_FLAGS);")
1829 typedef enum D3D12_RESIDENCY_PRIORITY
1831 D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
1832 D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
1833 D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
1834 D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
1835 D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000,
1836 } D3D12_RESIDENCY_PRIORITY;
1838 typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
1840 D3D12_GPU_VIRTUAL_ADDRESS Dest;
1841 UINT32 Value;
1842 } D3D12_WRITEBUFFERIMMEDIATE_PARAMETER;
1845 uuid(c4fec28f-7966-4e95-9f94-f431cb56c3b8),
1846 object,
1847 local,
1848 pointer_default(unique)
1850 interface ID3D12Object : IUnknown
1852 HRESULT GetPrivateData(REFGUID guid, UINT *data_size, void *data);
1853 HRESULT SetPrivateData(REFGUID guid, UINT data_size, const void *data);
1854 HRESULT SetPrivateDataInterface(REFGUID guid, const IUnknown *data);
1855 HRESULT SetName(const WCHAR *name);
1859 uuid(905db94b-a00c-4140-9df5-2b64ca9ea357),
1860 object,
1861 local,
1862 pointer_default(unique)
1864 interface ID3D12DeviceChild : ID3D12Object
1866 HRESULT GetDevice(REFIID riid, void **device);
1870 uuid(63ee58fb-1268-4835-86da-f008ce62f0d6),
1871 object,
1872 local,
1873 pointer_default(unique)
1875 interface ID3D12Pageable : ID3D12DeviceChild
1880 uuid(6b3b2502-6e51-45b3-90ee-9884265e8df3),
1881 object,
1882 local,
1883 pointer_default(unique)
1885 interface ID3D12Heap : ID3D12Pageable
1887 D3D12_HEAP_DESC GetDesc();
1891 uuid(696442be-a72e-4059-bc79-5b5c98040fad),
1892 object,
1893 local,
1894 pointer_default(unique)
1896 interface ID3D12Resource : ID3D12Pageable
1898 HRESULT Map(UINT sub_resource, const D3D12_RANGE *read_range, void **data);
1899 void Unmap(UINT sub_resource, const D3D12_RANGE *written_range);
1901 D3D12_RESOURCE_DESC GetDesc();
1903 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress();
1905 HRESULT WriteToSubresource(UINT dst_sub_resource, const D3D12_BOX *dst_box,
1906 const void *src_data, UINT src_row_pitch, UINT src_slice_pitch);
1907 HRESULT ReadFromSubresource(void *dst_data, UINT dst_row_pitch, UINT dst_slice_pitch,
1908 UINT src_sub_resource, const D3D12_BOX *src_box);
1910 HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS *flags);
1914 uuid(7116d91c-e7e4-47ce-b8c6-ec8168f437e5),
1915 object,
1916 local,
1917 pointer_default(unique)
1919 interface ID3D12CommandList : ID3D12DeviceChild
1921 D3D12_COMMAND_LIST_TYPE GetType();
1924 typedef enum D3D12_TILE_COPY_FLAGS
1926 D3D12_TILE_COPY_FLAG_NONE = 0x0,
1927 D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1,
1928 D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
1929 D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
1930 } D3D12_TILE_COPY_FLAGS;
1931 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_TILE_COPY_FLAGS);")
1933 typedef struct D3D12_INDEX_BUFFER_VIEW
1935 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1936 UINT SizeInBytes;
1937 DXGI_FORMAT Format;
1938 } D3D12_INDEX_BUFFER_VIEW;
1940 typedef struct D3D12_VERTEX_BUFFER_VIEW
1942 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1943 UINT SizeInBytes;
1944 UINT StrideInBytes;
1945 } D3D12_VERTEX_BUFFER_VIEW;
1947 typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
1949 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1950 UINT64 SizeInBytes;
1951 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation;
1952 } D3D12_STREAM_OUTPUT_BUFFER_VIEW;
1954 typedef enum D3D12_CLEAR_FLAGS
1956 D3D12_CLEAR_FLAG_DEPTH = 0x1,
1957 D3D12_CLEAR_FLAG_STENCIL = 0x2,
1958 } D3D12_CLEAR_FLAGS;
1959 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_CLEAR_FLAGS);")
1961 typedef struct D3D12_DISCARD_REGION
1963 UINT NumRects;
1964 const D3D12_RECT *pRects;
1965 UINT FirstSubresource;
1966 UINT NumSubresources;
1967 } D3D12_DISCARD_REGION;
1969 typedef enum D3D12_QUERY_TYPE
1971 D3D12_QUERY_TYPE_OCCLUSION = 0,
1972 D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1,
1973 D3D12_QUERY_TYPE_TIMESTAMP = 2,
1974 D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3,
1975 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4,
1976 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5,
1977 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6,
1978 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7,
1979 } D3D12_QUERY_TYPE;
1981 typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
1983 UINT64 IAVertices;
1984 UINT64 IAPrimitives;
1985 UINT64 VSInvocations;
1986 UINT64 GSInvocations;
1987 UINT64 GSPrimitives;
1988 UINT64 CInvocations;
1989 UINT64 CPrimitives;
1990 UINT64 PSInvocations;
1991 UINT64 HSInvocations;
1992 UINT64 DSInvocations;
1993 UINT64 CSInvocations;
1994 } D3D12_QUERY_DATA_PIPELINE_STATISTICS;
1996 typedef struct D3D12_QUERY_DATA_SO_STATISTICS
1998 UINT64 NumPrimitivesWritten;
1999 UINT64 PrimitivesStorageNeeded;
2000 } D3D12_QUERY_DATA_SO_STATISTICS;
2002 typedef enum D3D12_PREDICATION_OP
2004 D3D12_PREDICATION_OP_EQUAL_ZERO = 0,
2005 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1,
2006 } D3D12_PREDICATION_OP;
2009 uuid(8efb471d-616c-4f49-90f7-127bb763fa51),
2010 object,
2011 local,
2012 pointer_default(unique)
2014 interface ID3D12DescriptorHeap : ID3D12Pageable
2016 D3D12_DESCRIPTOR_HEAP_DESC GetDesc();
2018 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart();
2019 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart();
2023 uuid(0d9658ae-ed45-469e-a61d-970ec583cab4),
2024 object,
2025 local,
2026 pointer_default(unique)
2028 interface ID3D12QueryHeap : ID3D12Pageable
2033 uuid(c36a797c-ec80-4f0a-8985-a7b2475082d1),
2034 object,
2035 local,
2036 pointer_default(unique)
2038 interface ID3D12CommandSignature : ID3D12Pageable
2043 uuid(5b160d0f-ac1b-4185-8ba8-b3ae42a5a455),
2044 object,
2045 local,
2046 pointer_default(unique)
2048 interface ID3D12GraphicsCommandList : ID3D12CommandList
2050 HRESULT Close();
2052 HRESULT Reset(ID3D12CommandAllocator *allocator, ID3D12PipelineState *initial_state);
2054 HRESULT ClearState(ID3D12PipelineState *pipeline_state);
2056 void DrawInstanced(UINT vertex_count_per_instance, UINT instance_count,
2057 UINT start_vertex_location, UINT start_instance_location);
2058 void DrawIndexedInstanced(UINT index_count_per_instance, UINT instance_count,
2059 UINT start_vertex_location, INT base_vertex_location, UINT start_instance_location);
2061 void Dispatch(UINT x, UINT u, UINT z);
2063 void CopyBufferRegion(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2064 ID3D12Resource *src_buffer, UINT64 src_offset, UINT64 byte_count);
2065 void CopyTextureRegion(const D3D12_TEXTURE_COPY_LOCATION *dst,
2066 UINT dst_x, UINT dst_y, UINT dst_z,
2067 const D3D12_TEXTURE_COPY_LOCATION *src, const D3D12_BOX *src_box);
2068 void CopyResource(ID3D12Resource *dst_resource, ID3D12Resource *src_resource);
2070 void CopyTiles(ID3D12Resource *tiled_resource,
2071 const D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate,
2072 const D3D12_TILE_REGION_SIZE *tile_region_size,
2073 ID3D12Resource *buffer,
2074 UINT64 buffer_offset,
2075 D3D12_TILE_COPY_FLAGS flags);
2077 void ResolveSubresource(ID3D12Resource *dst_resource, UINT dst_sub_resource,
2078 ID3D12Resource *src_resource, UINT src_sub_resource,
2079 DXGI_FORMAT format);
2081 void IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY primitive_topology);
2083 void RSSetViewports(UINT viewport_count, const D3D12_VIEWPORT *viewports);
2084 void RSSetScissorRects(UINT rect_count, const D3D12_RECT *rects);
2086 void OMSetBlendFactor(const FLOAT blend_factor[4]);
2087 void OMSetStencilRef(UINT stencil_ref);
2089 void SetPipelineState(ID3D12PipelineState *pipeline_state);
2091 void ResourceBarrier(UINT barrier_count, const D3D12_RESOURCE_BARRIER *barriers);
2093 void ExecuteBundle(ID3D12GraphicsCommandList *command_list);
2095 void SetDescriptorHeaps(UINT heap_count, ID3D12DescriptorHeap * const *heaps);
2097 void SetComputeRootSignature(ID3D12RootSignature *root_signature);
2098 void SetGraphicsRootSignature(ID3D12RootSignature *root_signature);
2100 void SetComputeRootDescriptorTable(UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor);
2101 void SetGraphicsRootDescriptorTable(UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor);
2103 void SetComputeRoot32BitConstant(UINT root_parameter_index, UINT data, UINT dst_offset);
2104 void SetGraphicsRoot32BitConstant(UINT root_parameter_index, UINT data, UINT dst_offset);
2106 void SetComputeRoot32BitConstants(UINT root_parameter_index, UINT constant_count, const void *data,
2107 UINT dst_offset);
2108 void SetGraphicsRoot32BitConstants(UINT root_parameter_index, UINT constant_count, const void *data,
2109 UINT dst_offset);
2111 void SetComputeRootConstantBufferView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2112 void SetGraphicsRootConstantBufferView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2114 void SetComputeRootShaderResourceView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2115 void SetGraphicsRootShaderResourceView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2117 void SetComputeRootUnorderedAccessView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2118 void SetGraphicsRootUnorderedAccessView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2120 void IASetIndexBuffer(const D3D12_INDEX_BUFFER_VIEW *view);
2121 void IASetVertexBuffers(UINT start_slot, UINT view_count, const D3D12_VERTEX_BUFFER_VIEW *views);
2123 void SOSetTargets(UINT start_slot, UINT view_count, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *views);
2125 void OMSetRenderTargets(UINT render_target_descriptor_count,
2126 const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors,
2127 BOOL single_descriptor_handle,
2128 const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor);
2130 void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE dsv, D3D12_CLEAR_FLAGS flags,
2131 FLOAT depth, UINT8 stencil, UINT rect_count, const D3D12_RECT *rects);
2132 void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE rtv, const FLOAT color[4],
2133 UINT rect_count, const D3D12_RECT *rects);
2134 void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle,
2135 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const UINT values[4],
2136 UINT rect_count, const D3D12_RECT *rects);
2137 void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle,
2138 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const float values[4],
2139 UINT rect_count, const D3D12_RECT *rects);
2141 void DiscardResource(ID3D12Resource *resource, const D3D12_DISCARD_REGION *region);
2143 void BeginQuery(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index);
2144 void EndQuery(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index);
2145 void ResolveQueryData(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type,
2146 UINT start_index, UINT query_count,
2147 ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset);
2149 void SetPredication(ID3D12Resource *buffer, UINT64 aligned_buffer_offset,
2150 D3D12_PREDICATION_OP operation);
2152 void SetMarker(UINT metadata, const void *data, UINT size);
2153 void BeginEvent(UINT metadata, const void *data, UINT size);
2154 void EndEvent();
2156 void ExecuteIndirect(ID3D12CommandSignature *command_signature,
2157 UINT max_command_count, ID3D12Resource *arg_buffer, UINT64 arg_buffer_offset,
2158 ID3D12Resource *count_buffer, UINT64 count_buffer_offset);
2162 uuid(553103fb-1fe7-4557-bb38-946d7d0e7ca7),
2163 object,
2164 local,
2165 pointer_default(unique)
2167 interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
2169 void AtomicCopyBufferUINT(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2170 ID3D12Resource *src_buffer, UINT64 src_offset,
2171 UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
2172 const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges);
2174 void AtomicCopyBufferUINT64(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2175 ID3D12Resource *src_buffer, UINT64 src_offset,
2176 UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
2177 const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges);
2179 void OMSetDepthBounds(FLOAT min, FLOAT max);
2181 void SetSamplePositions(UINT sample_count, UINT pixel_count,
2182 D3D12_SAMPLE_POSITION *sample_positions);
2184 void ResolveSubresourceRegion(ID3D12Resource *dst_resource,
2185 UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
2186 ID3D12Resource *src_resource, UINT src_sub_resource_idx,
2187 D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode);
2189 void SetViewInstanceMask(UINT mask);
2193 uuid(38c3e585-ff17-412c-9150-4fc6f9d72a28),
2194 object,
2195 local,
2196 pointer_default(unique)
2198 interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
2200 void WriteBufferImmediate(UINT count,
2201 const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
2202 const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes);
2205 typedef enum D3D12_TILE_RANGE_FLAGS
2207 D3D12_TILE_RANGE_FLAG_NONE = 0x0,
2208 D3D12_TILE_RANGE_FLAG_NULL = 0x1,
2209 D3D12_TILE_RANGE_FLAG_SKIP = 0x2,
2210 D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 0x4
2211 } D3D12_TILE_RANGE_FLAGS;
2213 typedef enum D3D12_TILE_MAPPING_FLAGS
2215 D3D12_TILE_MAPPING_FLAG_NONE = 0x0,
2216 D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1,
2217 } D3D12_TILE_MAPPING_FLAGS;
2218 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_TILE_MAPPING_FLAGS);")
2221 uuid(0ec870a6-5d7e-4c22-8cfc-5baae07616ed),
2222 object,
2223 local,
2224 pointer_default(unique)
2226 interface ID3D12CommandQueue : ID3D12Pageable
2228 void UpdateTileMappings(ID3D12Resource *resource, UINT region_count,
2229 const D3D12_TILED_RESOURCE_COORDINATE *region_start_coordinates,
2230 const D3D12_TILE_REGION_SIZE *region_sizes,
2231 UINT range_count,
2232 const D3D12_TILE_RANGE_FLAGS *range_flags,
2233 UINT *heap_range_offsets,
2234 UINT *range_tile_counts,
2235 D3D12_TILE_MAPPING_FLAGS flags);
2237 void CopyTileMappings(ID3D12Resource *dst_resource,
2238 const D3D12_TILED_RESOURCE_COORDINATE *dst_region_start_coordinate,
2239 ID3D12Resource *src_resource,
2240 const D3D12_TILED_RESOURCE_COORDINATE *src_region_start_coordinate,
2241 const D3D12_TILE_REGION_SIZE *region_size,
2242 D3D12_TILE_MAPPING_FLAGS flags);
2244 void ExecuteCommandLists(UINT command_list_count,
2245 ID3D12CommandList * const * command_lists);
2247 void SetMarker(UINT metadata, const void *data, UINT size);
2248 void BeginEvent(UINT metadata, const void *data, UINT size);
2249 void EndEvent();
2251 HRESULT Signal(ID3D12Fence *fence, UINT64 value);
2252 HRESULT Wait(ID3D12Fence *fence, UINT64 value);
2254 HRESULT GetTimestampFrequency(UINT64 *frequency);
2255 HRESULT GetClockCalibration(UINT64 *gpu_timestamp, UINT64 *cpu_timestamp);
2257 D3D12_COMMAND_QUEUE_DESC GetDesc();
2260 typedef enum D3D12_FENCE_FLAGS
2262 D3D12_FENCE_FLAG_NONE = 0x0,
2263 D3D12_FENCE_FLAG_SHARED = 0x1,
2264 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2,
2265 } D3D12_FENCE_FLAGS;
2266 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_FENCE_FLAGS);")
2268 typedef enum D3D12_QUERY_HEAP_TYPE
2270 D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0,
2271 D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1,
2272 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2,
2273 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3,
2274 } D3D12_QUERY_HEAP_TYPE;
2276 typedef struct D3D12_QUERY_HEAP_DESC
2278 D3D12_QUERY_HEAP_TYPE Type;
2279 UINT Count;
2280 UINT NodeMask;
2281 } D3D12_QUERY_HEAP_DESC;
2283 typedef enum D3D12_INDIRECT_ARGUMENT_TYPE
2285 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW,
2286 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED,
2287 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH,
2288 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW,
2289 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW,
2290 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT,
2291 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW,
2292 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW,
2293 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW,
2294 } D3D12_INDIRECT_ARGUMENT_TYPE;
2296 typedef struct D3D12_INDIRECT_ARGUMENT_DESC
2298 D3D12_INDIRECT_ARGUMENT_TYPE Type;
2299 union
2301 struct
2303 UINT Slot;
2304 } VertexBuffer;
2305 struct
2307 UINT RootParameterIndex;
2308 UINT DestOffsetIn32BitValues;
2309 UINT Num32BitValuesToSet;
2310 } Constant;
2311 struct
2313 UINT RootParameterIndex;
2314 } ConstantBufferView;
2315 struct
2317 UINT RootParameterIndex;
2318 } ShaderResourceView;
2319 struct
2321 UINT RootParameterIndex;
2322 } UnorderedAccessView;
2324 } D3D12_INDIRECT_ARGUMENT_DESC;
2326 typedef struct D3D12_COMMAND_SIGNATURE_DESC
2328 UINT ByteStride;
2329 UINT NumArgumentDescs;
2330 const D3D12_INDIRECT_ARGUMENT_DESC *pArgumentDescs;
2331 UINT NodeMask;
2332 } D3D12_COMMAND_SIGNATURE_DESC;
2335 uuid(c54a6b66-72df-4ee8-8be5-a946a1429214),
2336 object,
2337 local,
2338 pointer_default(unique)
2340 interface ID3D12RootSignature : ID3D12DeviceChild
2345 uuid(765a30f3-f624-4c6f-a828-ace948622445),
2346 object,
2347 local,
2348 pointer_default(unique)
2350 interface ID3D12PipelineState : ID3D12Pageable
2352 HRESULT GetCachedBlob(ID3DBlob **blob);
2356 uuid(0a753dcf-c4d8-4b91-adf6-be5a60d95a76),
2357 object,
2358 local,
2359 pointer_default(unique)
2361 interface ID3D12Fence : ID3D12Pageable
2363 UINT64 GetCompletedValue();
2364 HRESULT SetEventOnCompletion(UINT64 value, HANDLE event);
2365 HRESULT Signal(UINT64 value);
2369 uuid(6102dee4-af59-4b09-b999-b44d73f09b24),
2370 object,
2371 local,
2372 pointer_default(unique)
2374 interface ID3D12CommandAllocator : ID3D12Pageable
2376 HRESULT Reset();
2380 uuid(189819f1-1db6-4b57-be54-1821339b85f7),
2381 object,
2382 local,
2383 pointer_default(unique)
2385 interface ID3D12Device : ID3D12Object
2387 UINT GetNodeCount();
2389 HRESULT CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC *desc,
2390 REFIID riid, void **command_queue);
2391 HRESULT CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type,
2392 REFIID riid, void **command_allocator);
2393 HRESULT CreateGraphicsPipelineState(const D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc,
2394 REFIID riid, void **pipeline_state);
2395 HRESULT CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc,
2396 REFIID riid, void **pipeline_state);
2397 HRESULT CreateCommandList(UINT node_mask,
2398 D3D12_COMMAND_LIST_TYPE type,
2399 ID3D12CommandAllocator *command_allocator,
2400 ID3D12PipelineState *initial_pipeline_state,
2401 REFIID riid, void **command_list);
2403 HRESULT CheckFeatureSupport(D3D12_FEATURE feature,
2404 void *feature_data, UINT feature_data_size);
2406 HRESULT CreateDescriptorHeap(const D3D12_DESCRIPTOR_HEAP_DESC *desc,
2407 REFIID riid, void **descriptor_heap);
2408 UINT GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2410 HRESULT CreateRootSignature(UINT node_mask,
2411 const void *bytecode, SIZE_T bytecode_length,
2412 REFIID riid, void **root_signature);
2414 void CreateConstantBufferView(const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc,
2415 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2416 void CreateShaderResourceView(ID3D12Resource *resource,
2417 const D3D12_SHADER_RESOURCE_VIEW_DESC *desc,
2418 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2419 void CreateUnorderedAccessView(ID3D12Resource *resource, ID3D12Resource *counter_resource,
2420 const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc,
2421 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2422 void CreateRenderTargetView(ID3D12Resource *resource,
2423 const D3D12_RENDER_TARGET_VIEW_DESC *desc,
2424 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2425 void CreateDepthStencilView(ID3D12Resource *resource,
2426 const D3D12_DEPTH_STENCIL_VIEW_DESC *desc,
2427 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2428 void CreateSampler(const D3D12_SAMPLER_DESC *desc,
2429 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2431 void CopyDescriptors(UINT dst_descriptor_range_count,
2432 const D3D12_CPU_DESCRIPTOR_HANDLE *dst_descriptor_range_offsets,
2433 const UINT *dst_descriptor_range_sizes,
2434 UINT src_descriptor_range_count,
2435 const D3D12_CPU_DESCRIPTOR_HANDLE *src_descriptor_range_offsets,
2436 const UINT *src_descriptor_range_sizes,
2437 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2438 void CopyDescriptorsSimple(UINT descriptor_count,
2439 const D3D12_CPU_DESCRIPTOR_HANDLE dst_descriptor_range_offset,
2440 const D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_offset,
2441 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2443 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(UINT visible_mask,
2444 UINT reource_desc_count, const D3D12_RESOURCE_DESC *resource_descs);
2446 D3D12_HEAP_PROPERTIES GetCustomHeapProperties(UINT node_mask,
2447 D3D12_HEAP_TYPE heap_type);
2449 HRESULT CreateCommittedResource(const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
2450 const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2451 const D3D12_CLEAR_VALUE *optimized_clear_value,
2452 REFIID riid, void **resource);
2454 HRESULT CreateHeap(const D3D12_HEAP_DESC *desc, REFIID riid, void **heap);
2456 HRESULT CreatePlacedResource(ID3D12Heap *heap, UINT64 heap_offset,
2457 const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2458 const D3D12_CLEAR_VALUE *optimized_clear_value,
2459 REFIID riid, void **resource);
2460 HRESULT CreateReservedResource(const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2461 const D3D12_CLEAR_VALUE *optimized_clear_value,
2462 REFIID riid, void **resource);
2464 HRESULT CreateSharedHandle(ID3D12DeviceChild *object,
2465 const SECURITY_ATTRIBUTES *attributes, DWORD access,
2466 const WCHAR *name, HANDLE *handle);
2467 HRESULT OpenSharedHandle(HANDLE handle,
2468 REFIID riid, void **object);
2469 HRESULT OpenSharedHandleByName(const WCHAR *name, DWORD access, HANDLE *handle);
2471 HRESULT MakeResident(UINT object_count, ID3D12Pageable * const *objects);
2472 HRESULT Evict(UINT object_count, ID3D12Pageable * const *objects);
2474 HRESULT CreateFence(UINT64 initial_value, D3D12_FENCE_FLAGS flags, REFIID riid, void **fence);
2476 HRESULT GetDeviceRemovedReason();
2478 void GetCopyableFootprints(const D3D12_RESOURCE_DESC *desc,
2479 UINT first_sub_resource,
2480 UINT sub_resource_count,
2481 UINT64 base_offset,
2482 D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts,
2483 UINT *row_count,
2484 UINT64 *row_size,
2485 UINT64 *total_bytes);
2487 HRESULT CreateQueryHeap(const D3D12_QUERY_HEAP_DESC *desc,
2488 REFIID riid, void **heap);
2490 HRESULT SetStablePowerState(BOOL enable);
2492 HRESULT CreateCommandSignature(const D3D12_COMMAND_SIGNATURE_DESC *desc,
2493 ID3D12RootSignature *root_signature,
2494 REFIID riid, void **command_signature);
2496 void GetResourceTiling(ID3D12Resource *resource,
2497 UINT *total_tile_count,
2498 D3D12_PACKED_MIP_INFO *packed_mip_info,
2499 D3D12_TILE_SHAPE *standard_tile_shape,
2500 UINT *sub_resource_tiling_count,
2501 UINT first_sub_resource_tiling,
2502 D3D12_SUBRESOURCE_TILING *sub_resource_tilings);
2504 LUID GetAdapterLuid();
2508 uuid(77acce80-638e-4e65-8895-c1f23386863e),
2509 object,
2510 local,
2511 pointer_default(unique)
2513 interface ID3D12Device1 : ID3D12Device
2515 HRESULT CreatePipelineLibrary(const void *blob, SIZE_T blob_size, REFIID iid, void **lib);
2517 HRESULT SetEventOnMultipleFenceCompletion(ID3D12Fence * const *fences,
2518 const UINT64 *values, UINT fence_count, D3D12_MULTIPLE_FENCE_WAIT_FLAGS flags, HANDLE event);
2520 HRESULT SetResidencyPriority(UINT object_count, ID3D12Pageable * const *objects,
2521 const D3D12_RESIDENCY_PRIORITY *priorities);
2525 uuid(34ab647b-3cc8-46ac-841b-c0965645c046),
2526 object,
2527 local,
2528 pointer_default(unique)
2530 interface ID3D12RootSignatureDeserializer : IUnknown
2532 const D3D12_ROOT_SIGNATURE_DESC *GetRootSignatureDesc();
2536 uuid(7f91ce67-090c-4bb7-b78e-ed8ff2e31da0),
2537 object,
2538 local,
2539 pointer_default(unique)
2541 interface ID3D12VersionedRootSignatureDeserializer : IUnknown
2543 HRESULT GetRootSignatureDescAtVersion(D3D_ROOT_SIGNATURE_VERSION version,
2544 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **desc);
2546 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *GetUnconvertedRootSignatureDesc();
2549 [local] HRESULT __stdcall D3D12CreateRootSignatureDeserializer(
2550 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2552 typedef HRESULT (__stdcall *PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER)(
2553 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2555 [local] HRESULT __stdcall D3D12CreateVersionedRootSignatureDeserializer(
2556 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2558 [local] HRESULT __stdcall D3D12SerializeRootSignature(
2559 const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc,
2560 D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob);
2562 typedef HRESULT (__stdcall *PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(
2563 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, ID3DBlob **blob, ID3DBlob **error_blob);
2565 [local] HRESULT __stdcall D3D12SerializeVersionedRootSignature(
2566 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *root_signature_desc,
2567 ID3DBlob **blob, ID3DBlob **error_blob);
2569 typedef HRESULT (__stdcall *PFN_D3D12_CREATE_DEVICE)(IUnknown *adapter,
2570 D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
2572 [local] HRESULT __stdcall D3D12CreateDevice(IUnknown *adapter,
2573 D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
2575 typedef HRESULT (__stdcall *PFN_D3D12_GET_DEBUG_INTERFACE)(REFIID iid, void **debug);
2577 [local] HRESULT __stdcall D3D12GetDebugInterface(REFIID iid, void **debug);
2579 [local] HRESULT __stdcall D3D12EnableExperimentalFeatures(UINT feature_count,
2580 const IID *iids, void *configurations, UINT *configurations_sizes);