regedit: Use wide character string literals in regedit.c.
[wine.git] / include / d3d12.idl
blob082a436c9ec0ebefa6c5223ad1bc86d0ba8e4a31
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_INVERT = 5,
1453 D3D12_LOGIC_OP_AND = 6,
1454 D3D12_LOGIC_OP_NAND = 7,
1455 D3D12_LOGIC_OP_OR = 8,
1456 D3D12_LOGIC_OP_NOR = 9,
1457 D3D12_LOGIC_OP_XOR = 10,
1458 D3D12_LOGIC_OP_EQUIV = 11,
1459 D3D12_LOGIC_OP_AND_REVERSE = 12,
1460 D3D12_LOGIC_OP_AND_INVERTED = 13,
1461 D3D12_LOGIC_OP_OR_REVERSE = 14,
1462 D3D12_LOGIC_OP_OR_INVERTED = 15,
1463 } D3D12_LOGIC_OP;
1465 typedef enum D3D12_COLOR_WRITE_ENABLE
1467 D3D12_COLOR_WRITE_ENABLE_RED = 0x1,
1468 D3D12_COLOR_WRITE_ENABLE_GREEN = 0x2,
1469 D3D12_COLOR_WRITE_ENABLE_BLUE = 0x4,
1470 D3D12_COLOR_WRITE_ENABLE_ALPHA = 0x8,
1471 D3D12_COLOR_WRITE_ENABLE_ALL = (D3D12_COLOR_WRITE_ENABLE_RED
1472 | D3D12_COLOR_WRITE_ENABLE_GREEN | D3D12_COLOR_WRITE_ENABLE_BLUE
1473 | D3D12_COLOR_WRITE_ENABLE_ALPHA),
1474 } D3D12_COLOR_WRITE_ENABLE;
1476 typedef struct D3D12_RENDER_TARGET_BLEND_DESC
1478 BOOL BlendEnable;
1479 BOOL LogicOpEnable;
1480 D3D12_BLEND SrcBlend;
1481 D3D12_BLEND DestBlend;
1482 D3D12_BLEND_OP BlendOp;
1483 D3D12_BLEND SrcBlendAlpha;
1484 D3D12_BLEND DestBlendAlpha;
1485 D3D12_BLEND_OP BlendOpAlpha;
1486 D3D12_LOGIC_OP LogicOp;
1487 UINT8 RenderTargetWriteMask;
1488 } D3D12_RENDER_TARGET_BLEND_DESC;
1490 typedef struct D3D12_BLEND_DESC
1492 BOOL AlphaToCoverageEnable;
1493 BOOL IndependentBlendEnable;
1494 D3D12_RENDER_TARGET_BLEND_DESC RenderTarget[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
1495 } D3D12_BLEND_DESC;
1497 typedef enum D3D12_FILL_MODE
1499 D3D12_FILL_MODE_WIREFRAME = 2,
1500 D3D12_FILL_MODE_SOLID = 3,
1501 } D3D12_FILL_MODE;
1503 typedef enum D3D12_CULL_MODE
1505 D3D12_CULL_MODE_NONE = 1,
1506 D3D12_CULL_MODE_FRONT = 2,
1507 D3D12_CULL_MODE_BACK = 3,
1508 } D3D12_CULL_MODE;
1510 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_MODE
1512 D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0,
1513 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1,
1514 } D3D12_CONSERVATIVE_RASTERIZATION_MODE;
1516 typedef struct D3D12_RASTERIZER_DESC
1518 D3D12_FILL_MODE FillMode;
1519 D3D12_CULL_MODE CullMode;
1520 BOOL FrontCounterClockwise;
1521 INT DepthBias;
1522 FLOAT DepthBiasClamp;
1523 FLOAT SlopeScaledDepthBias;
1524 BOOL DepthClipEnable;
1525 BOOL MultisampleEnable;
1526 BOOL AntialiasedLineEnable;
1527 UINT ForcedSampleCount;
1528 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster;
1529 } D3D12_RASTERIZER_DESC;
1531 typedef struct D3D12_SO_DECLARATION_ENTRY
1533 UINT Stream;
1534 const char *SemanticName;
1535 UINT SemanticIndex;
1536 BYTE StartComponent;
1537 BYTE ComponentCount;
1538 BYTE OutputSlot;
1539 } D3D12_SO_DECLARATION_ENTRY;
1541 typedef struct D3D12_STREAM_OUTPUT_DESC
1543 const D3D12_SO_DECLARATION_ENTRY *pSODeclaration;
1544 UINT NumEntries;
1545 const UINT *pBufferStrides;
1546 UINT NumStrides;
1547 UINT RasterizedStream;
1548 } D3D12_STREAM_OUTPUT_DESC;
1550 typedef enum D3D12_INPUT_CLASSIFICATION
1552 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0,
1553 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1,
1554 } D3D12_INPUT_CLASSIFICATION;
1556 typedef struct D3D12_INPUT_ELEMENT_DESC
1558 const char *SemanticName;
1559 UINT SemanticIndex;
1560 DXGI_FORMAT Format;
1561 UINT InputSlot;
1562 UINT AlignedByteOffset;
1563 D3D12_INPUT_CLASSIFICATION InputSlotClass;
1564 UINT InstanceDataStepRate;
1565 } D3D12_INPUT_ELEMENT_DESC;
1567 typedef struct D3D12_INPUT_LAYOUT_DESC
1569 const D3D12_INPUT_ELEMENT_DESC *pInputElementDescs;
1570 UINT NumElements;
1571 } D3D12_INPUT_LAYOUT_DESC;
1573 typedef enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
1575 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0,
1576 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1,
1577 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2,
1578 } D3D12_INDEX_BUFFER_STRIP_CUT_VALUE;
1580 typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY;
1582 typedef enum D3D12_PRIMITIVE_TOPOLOGY_TYPE
1584 D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0,
1585 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1,
1586 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2,
1587 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3,
1588 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4,
1589 } D3D12_PRIMITIVE_TOPOLOGY_TYPE;
1591 typedef struct D3D12_CACHED_PIPELINE_STATE
1593 const void *pCachedBlob;
1594 SIZE_T CachedBlobSizeInBytes;
1595 } D3D12_CACHED_PIPELINE_STATE;
1597 typedef enum D3D12_PIPELINE_STATE_FLAGS
1599 D3D12_PIPELINE_STATE_FLAG_NONE = 0x0,
1600 D3D12_PIPELINE_STATE_FLAG_DEBUG = 0x1,
1601 } D3D12_PIPELINE_STATE_FLAGS;
1602 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_PIPELINE_STATE_FLAGS);")
1604 typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
1606 ID3D12RootSignature *pRootSignature;
1607 D3D12_SHADER_BYTECODE VS;
1608 D3D12_SHADER_BYTECODE PS;
1609 D3D12_SHADER_BYTECODE DS;
1610 D3D12_SHADER_BYTECODE HS;
1611 D3D12_SHADER_BYTECODE GS;
1612 D3D12_STREAM_OUTPUT_DESC StreamOutput;
1613 D3D12_BLEND_DESC BlendState;
1614 UINT SampleMask;
1615 D3D12_RASTERIZER_DESC RasterizerState;
1616 D3D12_DEPTH_STENCIL_DESC DepthStencilState;
1617 D3D12_INPUT_LAYOUT_DESC InputLayout;
1618 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
1619 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
1620 UINT NumRenderTargets;
1621 DXGI_FORMAT RTVFormats[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
1622 DXGI_FORMAT DSVFormat;
1623 DXGI_SAMPLE_DESC SampleDesc;
1624 UINT NodeMask;
1625 D3D12_CACHED_PIPELINE_STATE CachedPSO;
1626 D3D12_PIPELINE_STATE_FLAGS Flags;
1627 } D3D12_GRAPHICS_PIPELINE_STATE_DESC;
1629 typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
1631 ID3D12RootSignature *pRootSignature;
1632 D3D12_SHADER_BYTECODE CS;
1633 UINT NodeMask;
1634 D3D12_CACHED_PIPELINE_STATE CachedPSO;
1635 D3D12_PIPELINE_STATE_FLAGS Flags;
1636 } D3D12_COMPUTE_PIPELINE_STATE_DESC;
1638 typedef enum D3D12_COMMAND_LIST_TYPE
1640 D3D12_COMMAND_LIST_TYPE_DIRECT = 0,
1641 D3D12_COMMAND_LIST_TYPE_BUNDLE = 1,
1642 D3D12_COMMAND_LIST_TYPE_COMPUTE = 2,
1643 D3D12_COMMAND_LIST_TYPE_COPY = 3,
1644 } D3D12_COMMAND_LIST_TYPE;
1646 typedef enum D3D12_COMMAND_QUEUE_PRIORITY
1648 D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0,
1649 D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100,
1650 D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000,
1651 } D3D12_COMMAND_QUEUE_PRIORITY;
1653 typedef enum D3D12_COMMAND_QUEUE_FLAGS
1655 D3D12_COMMAND_QUEUE_FLAG_NONE = 0x0,
1656 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1,
1657 } D3D12_COMMAND_QUEUE_FLAGS;
1658 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_COMMAND_QUEUE_FLAGS);")
1660 typedef struct D3D12_COMMAND_QUEUE_DESC
1662 D3D12_COMMAND_LIST_TYPE Type;
1663 INT Priority;
1664 D3D12_COMMAND_QUEUE_FLAGS Flags;
1665 UINT NodeMask;
1666 } D3D12_COMMAND_QUEUE_DESC;
1668 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE
1670 UINT NodeIndex;
1671 BOOL TileBasedRenderer;
1672 BOOL UMA;
1673 BOOL CacheCoherentUMA;
1674 } D3D12_FEATURE_DATA_ARCHITECTURE;
1676 typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
1678 DXGI_FORMAT Format;
1679 UINT8 PlaneCount;
1680 } D3D12_FEATURE_DATA_FORMAT_INFO;
1682 typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS
1684 UINT NumFeatureLevels;
1685 const D3D_FEATURE_LEVEL *pFeatureLevelsRequested;
1686 D3D_FEATURE_LEVEL MaxSupportedFeatureLevel;
1687 } D3D12_FEATURE_DATA_FEATURE_LEVELS;
1689 typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
1691 D3D_ROOT_SIGNATURE_VERSION HighestVersion;
1692 } D3D12_FEATURE_DATA_ROOT_SIGNATURE;
1694 typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
1696 UINT MaxGPUVirtualAddressBitsPerResource;
1697 UINT MaxGPUVirtualAddressBitsPerProcess;
1698 } D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT;
1700 typedef enum D3D_SHADER_MODEL
1702 D3D_SHADER_MODEL_5_1 = 0x51,
1703 D3D_SHADER_MODEL_6_0 = 0x60,
1704 } D3D_SHADER_MODEL;
1706 typedef struct D3D12_FEATURE_DATA_SHADER_MODEL
1708 D3D_SHADER_MODEL HighestShaderModel;
1709 } D3D12_FEATURE_DATA_SHADER_MODEL;
1711 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
1713 BOOL WaveOps;
1714 UINT WaveLaneCountMin;
1715 UINT WaveLaneCountMax;
1716 UINT TotalLaneCount;
1717 BOOL ExpandedComputeResourceStates;
1718 BOOL Int64ShaderOps;
1719 } D3D12_FEATURE_DATA_D3D12_OPTIONS1;
1721 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1
1723 UINT NodeIndex;
1724 BOOL TileBasedRenderer;
1725 BOOL UMA;
1726 BOOL CacheCoherentUMA;
1727 BOOL IsolatedMMU;
1728 } D3D12_FEATURE_DATA_ARCHITECTURE1;
1730 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS2
1732 BOOL DepthBoundsTestSupported;
1733 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier;
1734 } D3D12_FEATURE_DATA_D3D12_OPTIONS2;
1736 typedef struct D3D12_FEATURE_DATA_SHADER_CACHE
1738 D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags;
1739 } D3D12_FEATURE_DATA_SHADER_CACHE;
1741 typedef struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
1743 D3D12_COMMAND_LIST_TYPE CommandListType;
1744 UINT Priority;
1745 BOOL PriorityForTypeIsSupported;
1746 } D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY;
1748 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
1750 BOOL CopyQueueTimestampQueriesSupported;
1751 BOOL CastingFullyTypedFormatSupported;
1752 D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags;
1753 D3D12_VIEW_INSTANCING_TIER ViewInstancingTier;
1754 BOOL BarycentricsSupported;
1755 } D3D12_FEATURE_DATA_D3D12_OPTIONS3;
1757 typedef struct D3D12_FEATURE_DATA_EXISTING_HEAPS
1759 BOOL Supported;
1760 } D3D12_FEATURE_DATA_EXISTING_HEAPS;
1762 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS4
1764 BOOL MSAA64KBAlignedTextureSupported;
1765 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER SharedResourceCompatibilityTier;
1766 BOOL Native16BitShaderOpsSupported;
1767 } D3D12_FEATURE_DATA_D3D12_OPTIONS4;
1769 typedef struct D3D12_FEATURE_DATA_SERIALIZATION
1771 UINT NodeIndex;
1772 D3D12_HEAP_SERIALIZATION_TIER HeapSerializationTier;
1773 } D3D12_FEATURE_DATA_SERIALIZATION;
1775 typedef struct D3D12_FEATURE_DATA_CROSS_NODE
1777 D3D12_CROSS_NODE_SHARING_TIER SharingTier;
1778 BOOL AtomicShaderInstructions;
1779 } D3D12_FEATURE_DATA_CROSS_NODE;
1781 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS5
1783 BOOL SRVOnlyTiledResourceTier3;
1784 D3D12_RENDER_PASS_TIER RenderPassesTier;
1785 D3D12_RAYTRACING_TIER RaytracingTier;
1786 } D3D12_FEATURE_DATA_D3D12_OPTIONS5;
1788 typedef enum D3D12_FEATURE
1790 D3D12_FEATURE_D3D12_OPTIONS = 0,
1791 D3D12_FEATURE_ARCHITECTURE = 1,
1792 D3D12_FEATURE_FEATURE_LEVELS = 2,
1793 D3D12_FEATURE_FORMAT_SUPPORT = 3,
1794 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4,
1795 D3D12_FEATURE_FORMAT_INFO = 5,
1796 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6,
1797 D3D12_FEATURE_SHADER_MODEL = 7,
1798 D3D12_FEATURE_D3D12_OPTIONS1 = 8,
1799 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT = 10,
1800 D3D12_FEATURE_ROOT_SIGNATURE = 12,
1801 D3D12_FEATURE_ARCHITECTURE1 = 16,
1802 D3D12_FEATURE_D3D12_OPTIONS2 = 18,
1803 D3D12_FEATURE_SHADER_CACHE = 19,
1804 D3D12_FEATURE_COMMAND_QUEUE_PRIORITY = 20,
1805 D3D12_FEATURE_D3D12_OPTIONS3 = 21,
1806 D3D12_FEATURE_EXISTING_HEAPS = 22,
1807 D3D12_FEATURE_D3D12_OPTIONS4 = 23,
1808 D3D12_FEATURE_SERIALIZATION = 24,
1809 D3D12_FEATURE_CROSS_NODE = 25,
1810 D3D12_FEATURE_D3D12_OPTIONS5 = 27,
1811 D3D12_FEATURE_D3D12_OPTIONS6 = 30,
1812 D3D12_FEATURE_QUERY_META_COMMAND = 31,
1813 D3D12_FEATURE_D3D12_OPTIONS7 = 32,
1814 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT = 33,
1815 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES = 34,
1816 } D3D12_FEATURE;
1818 typedef struct D3D12_MEMCPY_DEST
1820 void *pData;
1821 SIZE_T RowPitch;
1822 SIZE_T SlicePitch;
1823 } D3D12_MEMCPY_DEST;
1825 typedef struct D3D12_SUBRESOURCE_DATA
1827 const void *pData;
1828 LONG_PTR RowPitch;
1829 LONG_PTR SlicePitch;
1830 } D3D12_SUBRESOURCE_DATA;
1832 typedef enum D3D12_MULTIPLE_FENCE_WAIT_FLAGS
1834 D3D12_MULTIPLE_FENCE_WAIT_FLAG_NONE = 0x0,
1835 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY = 0x1,
1836 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ALL = 0x0,
1837 } D3D12_MULTIPLE_FENCE_WAIT_FLAGS;
1838 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_MULTIPLE_FENCE_WAIT_FLAGS);")
1840 typedef enum D3D12_RESIDENCY_PRIORITY
1842 D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
1843 D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
1844 D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
1845 D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
1846 D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000,
1847 } D3D12_RESIDENCY_PRIORITY;
1849 typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
1851 D3D12_GPU_VIRTUAL_ADDRESS Dest;
1852 UINT32 Value;
1853 } D3D12_WRITEBUFFERIMMEDIATE_PARAMETER;
1856 uuid(c4fec28f-7966-4e95-9f94-f431cb56c3b8),
1857 object,
1858 local,
1859 pointer_default(unique)
1861 interface ID3D12Object : IUnknown
1863 HRESULT GetPrivateData(REFGUID guid, UINT *data_size, void *data);
1864 HRESULT SetPrivateData(REFGUID guid, UINT data_size, const void *data);
1865 HRESULT SetPrivateDataInterface(REFGUID guid, const IUnknown *data);
1866 HRESULT SetName(const WCHAR *name);
1870 uuid(905db94b-a00c-4140-9df5-2b64ca9ea357),
1871 object,
1872 local,
1873 pointer_default(unique)
1875 interface ID3D12DeviceChild : ID3D12Object
1877 HRESULT GetDevice(REFIID riid, void **device);
1881 uuid(63ee58fb-1268-4835-86da-f008ce62f0d6),
1882 object,
1883 local,
1884 pointer_default(unique)
1886 interface ID3D12Pageable : ID3D12DeviceChild
1891 uuid(6b3b2502-6e51-45b3-90ee-9884265e8df3),
1892 object,
1893 local,
1894 pointer_default(unique)
1896 interface ID3D12Heap : ID3D12Pageable
1898 D3D12_HEAP_DESC GetDesc();
1902 uuid(696442be-a72e-4059-bc79-5b5c98040fad),
1903 object,
1904 local,
1905 pointer_default(unique)
1907 interface ID3D12Resource : ID3D12Pageable
1909 HRESULT Map(UINT sub_resource, const D3D12_RANGE *read_range, void **data);
1910 void Unmap(UINT sub_resource, const D3D12_RANGE *written_range);
1912 D3D12_RESOURCE_DESC GetDesc();
1914 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress();
1916 HRESULT WriteToSubresource(UINT dst_sub_resource, const D3D12_BOX *dst_box,
1917 const void *src_data, UINT src_row_pitch, UINT src_slice_pitch);
1918 HRESULT ReadFromSubresource(void *dst_data, UINT dst_row_pitch, UINT dst_slice_pitch,
1919 UINT src_sub_resource, const D3D12_BOX *src_box);
1921 HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS *flags);
1925 uuid(7116d91c-e7e4-47ce-b8c6-ec8168f437e5),
1926 object,
1927 local,
1928 pointer_default(unique)
1930 interface ID3D12CommandList : ID3D12DeviceChild
1932 D3D12_COMMAND_LIST_TYPE GetType();
1935 typedef enum D3D12_TILE_COPY_FLAGS
1937 D3D12_TILE_COPY_FLAG_NONE = 0x0,
1938 D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1,
1939 D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
1940 D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
1941 } D3D12_TILE_COPY_FLAGS;
1942 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_TILE_COPY_FLAGS);")
1944 typedef struct D3D12_INDEX_BUFFER_VIEW
1946 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1947 UINT SizeInBytes;
1948 DXGI_FORMAT Format;
1949 } D3D12_INDEX_BUFFER_VIEW;
1951 typedef struct D3D12_VERTEX_BUFFER_VIEW
1953 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1954 UINT SizeInBytes;
1955 UINT StrideInBytes;
1956 } D3D12_VERTEX_BUFFER_VIEW;
1958 typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
1960 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1961 UINT64 SizeInBytes;
1962 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation;
1963 } D3D12_STREAM_OUTPUT_BUFFER_VIEW;
1965 typedef enum D3D12_CLEAR_FLAGS
1967 D3D12_CLEAR_FLAG_DEPTH = 0x1,
1968 D3D12_CLEAR_FLAG_STENCIL = 0x2,
1969 } D3D12_CLEAR_FLAGS;
1970 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_CLEAR_FLAGS);")
1972 typedef struct D3D12_DISCARD_REGION
1974 UINT NumRects;
1975 const D3D12_RECT *pRects;
1976 UINT FirstSubresource;
1977 UINT NumSubresources;
1978 } D3D12_DISCARD_REGION;
1980 typedef enum D3D12_QUERY_TYPE
1982 D3D12_QUERY_TYPE_OCCLUSION = 0,
1983 D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1,
1984 D3D12_QUERY_TYPE_TIMESTAMP = 2,
1985 D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3,
1986 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4,
1987 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5,
1988 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6,
1989 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7,
1990 } D3D12_QUERY_TYPE;
1992 typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
1994 UINT64 IAVertices;
1995 UINT64 IAPrimitives;
1996 UINT64 VSInvocations;
1997 UINT64 GSInvocations;
1998 UINT64 GSPrimitives;
1999 UINT64 CInvocations;
2000 UINT64 CPrimitives;
2001 UINT64 PSInvocations;
2002 UINT64 HSInvocations;
2003 UINT64 DSInvocations;
2004 UINT64 CSInvocations;
2005 } D3D12_QUERY_DATA_PIPELINE_STATISTICS;
2007 typedef struct D3D12_QUERY_DATA_SO_STATISTICS
2009 UINT64 NumPrimitivesWritten;
2010 UINT64 PrimitivesStorageNeeded;
2011 } D3D12_QUERY_DATA_SO_STATISTICS;
2013 typedef enum D3D12_PREDICATION_OP
2015 D3D12_PREDICATION_OP_EQUAL_ZERO = 0,
2016 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1,
2017 } D3D12_PREDICATION_OP;
2020 uuid(8efb471d-616c-4f49-90f7-127bb763fa51),
2021 object,
2022 local,
2023 pointer_default(unique)
2025 interface ID3D12DescriptorHeap : ID3D12Pageable
2027 D3D12_DESCRIPTOR_HEAP_DESC GetDesc();
2029 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart();
2030 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart();
2034 uuid(0d9658ae-ed45-469e-a61d-970ec583cab4),
2035 object,
2036 local,
2037 pointer_default(unique)
2039 interface ID3D12QueryHeap : ID3D12Pageable
2044 uuid(c36a797c-ec80-4f0a-8985-a7b2475082d1),
2045 object,
2046 local,
2047 pointer_default(unique)
2049 interface ID3D12CommandSignature : ID3D12Pageable
2054 uuid(5b160d0f-ac1b-4185-8ba8-b3ae42a5a455),
2055 object,
2056 local,
2057 pointer_default(unique)
2059 interface ID3D12GraphicsCommandList : ID3D12CommandList
2061 HRESULT Close();
2063 HRESULT Reset(ID3D12CommandAllocator *allocator, ID3D12PipelineState *initial_state);
2065 void ClearState(ID3D12PipelineState *pipeline_state);
2067 void DrawInstanced(UINT vertex_count_per_instance, UINT instance_count,
2068 UINT start_vertex_location, UINT start_instance_location);
2069 void DrawIndexedInstanced(UINT index_count_per_instance, UINT instance_count,
2070 UINT start_vertex_location, INT base_vertex_location, UINT start_instance_location);
2072 void Dispatch(UINT x, UINT u, UINT z);
2074 void CopyBufferRegion(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2075 ID3D12Resource *src_buffer, UINT64 src_offset, UINT64 byte_count);
2076 void CopyTextureRegion(const D3D12_TEXTURE_COPY_LOCATION *dst,
2077 UINT dst_x, UINT dst_y, UINT dst_z,
2078 const D3D12_TEXTURE_COPY_LOCATION *src, const D3D12_BOX *src_box);
2079 void CopyResource(ID3D12Resource *dst_resource, ID3D12Resource *src_resource);
2081 void CopyTiles(ID3D12Resource *tiled_resource,
2082 const D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate,
2083 const D3D12_TILE_REGION_SIZE *tile_region_size,
2084 ID3D12Resource *buffer,
2085 UINT64 buffer_offset,
2086 D3D12_TILE_COPY_FLAGS flags);
2088 void ResolveSubresource(ID3D12Resource *dst_resource, UINT dst_sub_resource,
2089 ID3D12Resource *src_resource, UINT src_sub_resource,
2090 DXGI_FORMAT format);
2092 void IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY primitive_topology);
2094 void RSSetViewports(UINT viewport_count, const D3D12_VIEWPORT *viewports);
2095 void RSSetScissorRects(UINT rect_count, const D3D12_RECT *rects);
2097 void OMSetBlendFactor(const FLOAT blend_factor[4]);
2098 void OMSetStencilRef(UINT stencil_ref);
2100 void SetPipelineState(ID3D12PipelineState *pipeline_state);
2102 void ResourceBarrier(UINT barrier_count, const D3D12_RESOURCE_BARRIER *barriers);
2104 void ExecuteBundle(ID3D12GraphicsCommandList *command_list);
2106 void SetDescriptorHeaps(UINT heap_count, ID3D12DescriptorHeap * const *heaps);
2108 void SetComputeRootSignature(ID3D12RootSignature *root_signature);
2109 void SetGraphicsRootSignature(ID3D12RootSignature *root_signature);
2111 void SetComputeRootDescriptorTable(UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor);
2112 void SetGraphicsRootDescriptorTable(UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor);
2114 void SetComputeRoot32BitConstant(UINT root_parameter_index, UINT data, UINT dst_offset);
2115 void SetGraphicsRoot32BitConstant(UINT root_parameter_index, UINT data, UINT dst_offset);
2117 void SetComputeRoot32BitConstants(UINT root_parameter_index, UINT constant_count, const void *data,
2118 UINT dst_offset);
2119 void SetGraphicsRoot32BitConstants(UINT root_parameter_index, UINT constant_count, const void *data,
2120 UINT dst_offset);
2122 void SetComputeRootConstantBufferView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2123 void SetGraphicsRootConstantBufferView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2125 void SetComputeRootShaderResourceView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2126 void SetGraphicsRootShaderResourceView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2128 void SetComputeRootUnorderedAccessView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2129 void SetGraphicsRootUnorderedAccessView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2131 void IASetIndexBuffer(const D3D12_INDEX_BUFFER_VIEW *view);
2132 void IASetVertexBuffers(UINT start_slot, UINT view_count, const D3D12_VERTEX_BUFFER_VIEW *views);
2134 void SOSetTargets(UINT start_slot, UINT view_count, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *views);
2136 void OMSetRenderTargets(UINT render_target_descriptor_count,
2137 const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors,
2138 BOOL single_descriptor_handle,
2139 const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor);
2141 void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE dsv, D3D12_CLEAR_FLAGS flags,
2142 FLOAT depth, UINT8 stencil, UINT rect_count, const D3D12_RECT *rects);
2143 void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE rtv, const FLOAT color[4],
2144 UINT rect_count, const D3D12_RECT *rects);
2145 void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle,
2146 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const UINT values[4],
2147 UINT rect_count, const D3D12_RECT *rects);
2148 void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle,
2149 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const float values[4],
2150 UINT rect_count, const D3D12_RECT *rects);
2152 void DiscardResource(ID3D12Resource *resource, const D3D12_DISCARD_REGION *region);
2154 void BeginQuery(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index);
2155 void EndQuery(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index);
2156 void ResolveQueryData(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type,
2157 UINT start_index, UINT query_count,
2158 ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset);
2160 void SetPredication(ID3D12Resource *buffer, UINT64 aligned_buffer_offset,
2161 D3D12_PREDICATION_OP operation);
2163 void SetMarker(UINT metadata, const void *data, UINT size);
2164 void BeginEvent(UINT metadata, const void *data, UINT size);
2165 void EndEvent();
2167 void ExecuteIndirect(ID3D12CommandSignature *command_signature,
2168 UINT max_command_count, ID3D12Resource *arg_buffer, UINT64 arg_buffer_offset,
2169 ID3D12Resource *count_buffer, UINT64 count_buffer_offset);
2173 uuid(553103fb-1fe7-4557-bb38-946d7d0e7ca7),
2174 object,
2175 local,
2176 pointer_default(unique)
2178 interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
2180 void AtomicCopyBufferUINT(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2181 ID3D12Resource *src_buffer, UINT64 src_offset,
2182 UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
2183 const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges);
2185 void AtomicCopyBufferUINT64(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2186 ID3D12Resource *src_buffer, UINT64 src_offset,
2187 UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
2188 const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges);
2190 void OMSetDepthBounds(FLOAT min, FLOAT max);
2192 void SetSamplePositions(UINT sample_count, UINT pixel_count,
2193 D3D12_SAMPLE_POSITION *sample_positions);
2195 void ResolveSubresourceRegion(ID3D12Resource *dst_resource,
2196 UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
2197 ID3D12Resource *src_resource, UINT src_sub_resource_idx,
2198 D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode);
2200 void SetViewInstanceMask(UINT mask);
2204 uuid(38c3e585-ff17-412c-9150-4fc6f9d72a28),
2205 object,
2206 local,
2207 pointer_default(unique)
2209 interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
2211 void WriteBufferImmediate(UINT count,
2212 const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
2213 const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes);
2216 typedef enum D3D12_TILE_RANGE_FLAGS
2218 D3D12_TILE_RANGE_FLAG_NONE = 0x0,
2219 D3D12_TILE_RANGE_FLAG_NULL = 0x1,
2220 D3D12_TILE_RANGE_FLAG_SKIP = 0x2,
2221 D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 0x4
2222 } D3D12_TILE_RANGE_FLAGS;
2224 typedef enum D3D12_TILE_MAPPING_FLAGS
2226 D3D12_TILE_MAPPING_FLAG_NONE = 0x0,
2227 D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1,
2228 } D3D12_TILE_MAPPING_FLAGS;
2229 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_TILE_MAPPING_FLAGS);")
2232 uuid(0ec870a6-5d7e-4c22-8cfc-5baae07616ed),
2233 object,
2234 local,
2235 pointer_default(unique)
2237 interface ID3D12CommandQueue : ID3D12Pageable
2239 void UpdateTileMappings(ID3D12Resource *resource, UINT region_count,
2240 const D3D12_TILED_RESOURCE_COORDINATE *region_start_coordinates,
2241 const D3D12_TILE_REGION_SIZE *region_sizes,
2242 UINT range_count,
2243 const D3D12_TILE_RANGE_FLAGS *range_flags,
2244 UINT *heap_range_offsets,
2245 UINT *range_tile_counts,
2246 D3D12_TILE_MAPPING_FLAGS flags);
2248 void CopyTileMappings(ID3D12Resource *dst_resource,
2249 const D3D12_TILED_RESOURCE_COORDINATE *dst_region_start_coordinate,
2250 ID3D12Resource *src_resource,
2251 const D3D12_TILED_RESOURCE_COORDINATE *src_region_start_coordinate,
2252 const D3D12_TILE_REGION_SIZE *region_size,
2253 D3D12_TILE_MAPPING_FLAGS flags);
2255 void ExecuteCommandLists(UINT command_list_count,
2256 ID3D12CommandList * const * command_lists);
2258 void SetMarker(UINT metadata, const void *data, UINT size);
2259 void BeginEvent(UINT metadata, const void *data, UINT size);
2260 void EndEvent();
2262 HRESULT Signal(ID3D12Fence *fence, UINT64 value);
2263 HRESULT Wait(ID3D12Fence *fence, UINT64 value);
2265 HRESULT GetTimestampFrequency(UINT64 *frequency);
2266 HRESULT GetClockCalibration(UINT64 *gpu_timestamp, UINT64 *cpu_timestamp);
2268 D3D12_COMMAND_QUEUE_DESC GetDesc();
2271 typedef enum D3D12_FENCE_FLAGS
2273 D3D12_FENCE_FLAG_NONE = 0x0,
2274 D3D12_FENCE_FLAG_SHARED = 0x1,
2275 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2,
2276 } D3D12_FENCE_FLAGS;
2277 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_FENCE_FLAGS);")
2279 typedef enum D3D12_QUERY_HEAP_TYPE
2281 D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0,
2282 D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1,
2283 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2,
2284 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3,
2285 } D3D12_QUERY_HEAP_TYPE;
2287 typedef struct D3D12_QUERY_HEAP_DESC
2289 D3D12_QUERY_HEAP_TYPE Type;
2290 UINT Count;
2291 UINT NodeMask;
2292 } D3D12_QUERY_HEAP_DESC;
2294 typedef enum D3D12_INDIRECT_ARGUMENT_TYPE
2296 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW,
2297 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED,
2298 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH,
2299 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW,
2300 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW,
2301 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT,
2302 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW,
2303 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW,
2304 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW,
2305 } D3D12_INDIRECT_ARGUMENT_TYPE;
2307 typedef struct D3D12_INDIRECT_ARGUMENT_DESC
2309 D3D12_INDIRECT_ARGUMENT_TYPE Type;
2310 union
2312 struct
2314 UINT Slot;
2315 } VertexBuffer;
2316 struct
2318 UINT RootParameterIndex;
2319 UINT DestOffsetIn32BitValues;
2320 UINT Num32BitValuesToSet;
2321 } Constant;
2322 struct
2324 UINT RootParameterIndex;
2325 } ConstantBufferView;
2326 struct
2328 UINT RootParameterIndex;
2329 } ShaderResourceView;
2330 struct
2332 UINT RootParameterIndex;
2333 } UnorderedAccessView;
2335 } D3D12_INDIRECT_ARGUMENT_DESC;
2337 typedef struct D3D12_COMMAND_SIGNATURE_DESC
2339 UINT ByteStride;
2340 UINT NumArgumentDescs;
2341 const D3D12_INDIRECT_ARGUMENT_DESC *pArgumentDescs;
2342 UINT NodeMask;
2343 } D3D12_COMMAND_SIGNATURE_DESC;
2346 uuid(c54a6b66-72df-4ee8-8be5-a946a1429214),
2347 object,
2348 local,
2349 pointer_default(unique)
2351 interface ID3D12RootSignature : ID3D12DeviceChild
2356 uuid(765a30f3-f624-4c6f-a828-ace948622445),
2357 object,
2358 local,
2359 pointer_default(unique)
2361 interface ID3D12PipelineState : ID3D12Pageable
2363 HRESULT GetCachedBlob(ID3DBlob **blob);
2367 uuid(0a753dcf-c4d8-4b91-adf6-be5a60d95a76),
2368 object,
2369 local,
2370 pointer_default(unique)
2372 interface ID3D12Fence : ID3D12Pageable
2374 UINT64 GetCompletedValue();
2375 HRESULT SetEventOnCompletion(UINT64 value, HANDLE event);
2376 HRESULT Signal(UINT64 value);
2380 uuid(6102dee4-af59-4b09-b999-b44d73f09b24),
2381 object,
2382 local,
2383 pointer_default(unique)
2385 interface ID3D12CommandAllocator : ID3D12Pageable
2387 HRESULT Reset();
2391 uuid(189819f1-1db6-4b57-be54-1821339b85f7),
2392 object,
2393 local,
2394 pointer_default(unique)
2396 interface ID3D12Device : ID3D12Object
2398 UINT GetNodeCount();
2400 HRESULT CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC *desc,
2401 REFIID riid, void **command_queue);
2402 HRESULT CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type,
2403 REFIID riid, void **command_allocator);
2404 HRESULT CreateGraphicsPipelineState(const D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc,
2405 REFIID riid, void **pipeline_state);
2406 HRESULT CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc,
2407 REFIID riid, void **pipeline_state);
2408 HRESULT CreateCommandList(UINT node_mask,
2409 D3D12_COMMAND_LIST_TYPE type,
2410 ID3D12CommandAllocator *command_allocator,
2411 ID3D12PipelineState *initial_pipeline_state,
2412 REFIID riid, void **command_list);
2414 HRESULT CheckFeatureSupport(D3D12_FEATURE feature,
2415 void *feature_data, UINT feature_data_size);
2417 HRESULT CreateDescriptorHeap(const D3D12_DESCRIPTOR_HEAP_DESC *desc,
2418 REFIID riid, void **descriptor_heap);
2419 UINT GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2421 HRESULT CreateRootSignature(UINT node_mask,
2422 const void *bytecode, SIZE_T bytecode_length,
2423 REFIID riid, void **root_signature);
2425 void CreateConstantBufferView(const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc,
2426 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2427 void CreateShaderResourceView(ID3D12Resource *resource,
2428 const D3D12_SHADER_RESOURCE_VIEW_DESC *desc,
2429 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2430 void CreateUnorderedAccessView(ID3D12Resource *resource, ID3D12Resource *counter_resource,
2431 const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc,
2432 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2433 void CreateRenderTargetView(ID3D12Resource *resource,
2434 const D3D12_RENDER_TARGET_VIEW_DESC *desc,
2435 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2436 void CreateDepthStencilView(ID3D12Resource *resource,
2437 const D3D12_DEPTH_STENCIL_VIEW_DESC *desc,
2438 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2439 void CreateSampler(const D3D12_SAMPLER_DESC *desc,
2440 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2442 void CopyDescriptors(UINT dst_descriptor_range_count,
2443 const D3D12_CPU_DESCRIPTOR_HANDLE *dst_descriptor_range_offsets,
2444 const UINT *dst_descriptor_range_sizes,
2445 UINT src_descriptor_range_count,
2446 const D3D12_CPU_DESCRIPTOR_HANDLE *src_descriptor_range_offsets,
2447 const UINT *src_descriptor_range_sizes,
2448 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2449 void CopyDescriptorsSimple(UINT descriptor_count,
2450 const D3D12_CPU_DESCRIPTOR_HANDLE dst_descriptor_range_offset,
2451 const D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_offset,
2452 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2454 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(UINT visible_mask,
2455 UINT reource_desc_count, const D3D12_RESOURCE_DESC *resource_descs);
2457 D3D12_HEAP_PROPERTIES GetCustomHeapProperties(UINT node_mask,
2458 D3D12_HEAP_TYPE heap_type);
2460 HRESULT CreateCommittedResource(const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
2461 const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2462 const D3D12_CLEAR_VALUE *optimized_clear_value,
2463 REFIID riid, void **resource);
2465 HRESULT CreateHeap(const D3D12_HEAP_DESC *desc, REFIID riid, void **heap);
2467 HRESULT CreatePlacedResource(ID3D12Heap *heap, UINT64 heap_offset,
2468 const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2469 const D3D12_CLEAR_VALUE *optimized_clear_value,
2470 REFIID riid, void **resource);
2471 HRESULT CreateReservedResource(const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2472 const D3D12_CLEAR_VALUE *optimized_clear_value,
2473 REFIID riid, void **resource);
2475 HRESULT CreateSharedHandle(ID3D12DeviceChild *object,
2476 const SECURITY_ATTRIBUTES *attributes, DWORD access,
2477 const WCHAR *name, HANDLE *handle);
2478 HRESULT OpenSharedHandle(HANDLE handle,
2479 REFIID riid, void **object);
2480 HRESULT OpenSharedHandleByName(const WCHAR *name, DWORD access, HANDLE *handle);
2482 HRESULT MakeResident(UINT object_count, ID3D12Pageable * const *objects);
2483 HRESULT Evict(UINT object_count, ID3D12Pageable * const *objects);
2485 HRESULT CreateFence(UINT64 initial_value, D3D12_FENCE_FLAGS flags, REFIID riid, void **fence);
2487 HRESULT GetDeviceRemovedReason();
2489 void GetCopyableFootprints(const D3D12_RESOURCE_DESC *desc,
2490 UINT first_sub_resource,
2491 UINT sub_resource_count,
2492 UINT64 base_offset,
2493 D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts,
2494 UINT *row_count,
2495 UINT64 *row_size,
2496 UINT64 *total_bytes);
2498 HRESULT CreateQueryHeap(const D3D12_QUERY_HEAP_DESC *desc,
2499 REFIID riid, void **heap);
2501 HRESULT SetStablePowerState(BOOL enable);
2503 HRESULT CreateCommandSignature(const D3D12_COMMAND_SIGNATURE_DESC *desc,
2504 ID3D12RootSignature *root_signature,
2505 REFIID riid, void **command_signature);
2507 void GetResourceTiling(ID3D12Resource *resource,
2508 UINT *total_tile_count,
2509 D3D12_PACKED_MIP_INFO *packed_mip_info,
2510 D3D12_TILE_SHAPE *standard_tile_shape,
2511 UINT *sub_resource_tiling_count,
2512 UINT first_sub_resource_tiling,
2513 D3D12_SUBRESOURCE_TILING *sub_resource_tilings);
2515 LUID GetAdapterLuid();
2519 uuid(77acce80-638e-4e65-8895-c1f23386863e),
2520 object,
2521 local,
2522 pointer_default(unique)
2524 interface ID3D12Device1 : ID3D12Device
2526 HRESULT CreatePipelineLibrary(const void *blob, SIZE_T blob_size, REFIID iid, void **lib);
2528 HRESULT SetEventOnMultipleFenceCompletion(ID3D12Fence * const *fences,
2529 const UINT64 *values, UINT fence_count, D3D12_MULTIPLE_FENCE_WAIT_FLAGS flags, HANDLE event);
2531 HRESULT SetResidencyPriority(UINT object_count, ID3D12Pageable * const *objects,
2532 const D3D12_RESIDENCY_PRIORITY *priorities);
2536 uuid(34ab647b-3cc8-46ac-841b-c0965645c046),
2537 object,
2538 local,
2539 pointer_default(unique)
2541 interface ID3D12RootSignatureDeserializer : IUnknown
2543 const D3D12_ROOT_SIGNATURE_DESC *GetRootSignatureDesc();
2547 uuid(7f91ce67-090c-4bb7-b78e-ed8ff2e31da0),
2548 object,
2549 local,
2550 pointer_default(unique)
2552 interface ID3D12VersionedRootSignatureDeserializer : IUnknown
2554 HRESULT GetRootSignatureDescAtVersion(D3D_ROOT_SIGNATURE_VERSION version,
2555 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **desc);
2557 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *GetUnconvertedRootSignatureDesc();
2560 [local] HRESULT __stdcall D3D12CreateRootSignatureDeserializer(
2561 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2563 typedef HRESULT (__stdcall *PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER)(
2564 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2566 [local] HRESULT __stdcall D3D12CreateVersionedRootSignatureDeserializer(
2567 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2569 [local] HRESULT __stdcall D3D12SerializeRootSignature(
2570 const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc,
2571 D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob);
2573 typedef HRESULT (__stdcall *PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(
2574 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, ID3DBlob **blob, ID3DBlob **error_blob);
2576 [local] HRESULT __stdcall D3D12SerializeVersionedRootSignature(
2577 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *root_signature_desc,
2578 ID3DBlob **blob, ID3DBlob **error_blob);
2580 typedef HRESULT (__stdcall *PFN_D3D12_CREATE_DEVICE)(IUnknown *adapter,
2581 D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
2583 [local] HRESULT __stdcall D3D12CreateDevice(IUnknown *adapter,
2584 D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
2586 typedef HRESULT (__stdcall *PFN_D3D12_GET_DEBUG_INTERFACE)(REFIID iid, void **debug);
2588 [local] HRESULT __stdcall D3D12GetDebugInterface(REFIID iid, void **debug);
2590 [local] HRESULT __stdcall D3D12EnableExperimentalFeatures(UINT feature_count,
2591 const IID *iids, void *configurations, UINT *configurations_sizes);