quartz/tests: Add some tests for parser streaming.
[wine.git] / include / d3d12.idl
blob9cb546b57ee4481dce7a2182220a493b9ebd39a2
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;
92 typedef enum D3D12_TILED_RESOURCES_TIER
94 D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0,
95 D3D12_TILED_RESOURCES_TIER_1 = 1,
96 D3D12_TILED_RESOURCES_TIER_2 = 2,
97 D3D12_TILED_RESOURCES_TIER_3 = 3,
98 } D3D12_TILED_RESOURCES_TIER;
100 typedef enum D3D12_RESOURCE_BINDING_TIER
102 D3D12_RESOURCE_BINDING_TIER_1 = 1,
103 D3D12_RESOURCE_BINDING_TIER_2 = 2,
104 D3D12_RESOURCE_BINDING_TIER_3 = 3,
105 } D3D12_RESOURCE_BINDING_TIER;
107 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_TIER
109 D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0,
110 D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1,
111 D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2,
112 D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3,
113 } D3D12_CONSERVATIVE_RASTERIZATION_TIER;
115 typedef enum D3D12_CROSS_NODE_SHARING_TIER
117 D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0,
118 D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1,
119 D3D12_CROSS_NODE_SHARING_TIER_1 = 2,
120 D3D12_CROSS_NODE_SHARING_TIER_2 = 3,
121 } D3D12_CROSS_NODE_SHARING_TIER;
123 typedef enum D3D12_RESOURCE_HEAP_TIER
125 D3D12_RESOURCE_HEAP_TIER_1 = 1,
126 D3D12_RESOURCE_HEAP_TIER_2 = 2,
127 } D3D12_RESOURCE_HEAP_TIER;
129 typedef enum D3D12_FORMAT_SUPPORT1
131 D3D12_FORMAT_SUPPORT1_NONE = 0x00000000,
132 D3D12_FORMAT_SUPPORT1_BUFFER = 0x00000001,
133 D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x00000002,
134 D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x00000004,
135 D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x00000008,
136 D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x00000010,
137 D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x00000020,
138 D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x00000040,
139 D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x00000080,
140 D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x00000100,
141 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x00000200,
142 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x00000400,
143 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x00000800,
144 D3D12_FORMAT_SUPPORT1_MIP = 0x00001000,
145 D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x00004000,
146 D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x00008000,
147 D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x00010000,
148 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x00040000,
149 D3D12_FORMAT_SUPPORT1_DISPLAY = 0x00080000,
150 D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x00100000,
151 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x00200000,
152 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x00400000,
153 D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x00800000,
154 D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x01000000,
155 D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x02000000,
156 D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x04000000,
157 D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x08000000,
158 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000,
159 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000,
160 D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000,
161 } D3D12_FORMAT_SUPPORT1;
163 typedef enum D3D12_FORMAT_SUPPORT2
165 D3D12_FORMAT_SUPPORT2_NONE = 0x00000000,
166 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x00000001,
167 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x00000002,
168 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x00000004,
169 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x00000008,
170 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x00000010,
171 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x00000020,
172 D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x00000040,
173 D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x00000080,
174 D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x00000100,
175 D3D12_FORMAT_SUPPORT2_TILED = 0x00000200,
176 D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x00004000,
177 } D3D12_FORMAT_SUPPORT2;
179 typedef enum D3D12_WRITEBUFFERIMMEDIATE_MODE
181 D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0x0,
182 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1,
183 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2,
184 } D3D12_WRITEBUFFERIMMEDIATE_MODE;
186 typedef enum D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER
188 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED = 0x0,
189 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_1 = 0x1,
190 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_2 = 0x2,
191 } D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER;
193 typedef enum D3D12_SHADER_CACHE_SUPPORT_FLAGS
195 D3D12_SHADER_CACHE_SUPPORT_NONE = 0x0,
196 D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO = 0x1,
197 D3D12_SHADER_CACHE_SUPPORT_LIBRARY = 0x2,
198 D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE = 0x4,
199 D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE = 0x8,
200 } D3D12_SHADER_CACHE_SUPPORT_FLAGS;
202 typedef enum D3D12_COMMAND_LIST_SUPPORT_FLAGS
204 D3D12_COMMAND_LIST_SUPPORT_FLAG_NONE = 0x0,
205 D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT = 0x1,
206 D3D12_COMMAND_LIST_SUPPORT_FLAG_BUNDLE = 0x2,
207 D3D12_COMMAND_LIST_SUPPORT_FLAG_COMPUTE = 0x4,
208 D3D12_COMMAND_LIST_SUPPORT_FLAG_COPY = 0x8,
209 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_DECODE = 0x10,
210 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_PROCESS = 0x20,
211 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_ENCODE = 0x40,
212 } D3D12_COMMAND_LIST_SUPPORT_FLAGS;
214 typedef enum D3D12_VIEW_INSTANCING_TIER
216 D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED = 0x0,
217 D3D12_VIEW_INSTANCING_TIER_1 = 0x1,
218 D3D12_VIEW_INSTANCING_TIER_2 = 0x2,
219 D3D12_VIEW_INSTANCING_TIER_3 = 0x3,
220 } D3D12_VIEW_INSTANCING_TIER;
222 typedef enum D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER
224 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0 = 0x0,
225 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_1 = 0x1,
226 } D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER;
228 typedef enum D3D12_HEAP_SERIALIZATION_TIER
230 D3D12_HEAP_SERIALIZATION_TIER_0 = 0x0,
231 D3D12_HEAP_SERIALIZATION_TIER_10 = 0xa,
232 } D3D12_HEAP_SERIALIZATION_TIER;
234 typedef enum D3D12_RENDER_PASS_TIER
236 D3D12_RENDER_PASS_TIER_0 = 0x0,
237 D3D12_RENDER_PASS_TIER_1 = 0x1,
238 D3D12_RENDER_PASS_TIER_2 = 0x2,
239 } D3D12_RENDER_PASS_TIER;
241 typedef enum D3D12_RAYTRACING_TIER
243 D3D12_RAYTRACING_TIER_NOT_SUPPORTED = 0x0,
244 D3D12_RAYTRACING_TIER_1_0 = 0xa,
245 } D3D12_RAYTRACING_TIER;
247 interface ID3D12Fence;
248 interface ID3D12RootSignature;
249 interface ID3D12Heap;
250 interface ID3D12DescriptorHeap;
251 interface ID3D12Resource;
252 interface ID3D12CommandAllocator;
253 interface ID3D12GraphicsCommandList;
254 interface ID3D12CommandQueue;
255 interface ID3D12PipelineState;
256 interface ID3D12Device;
258 typedef RECT D3D12_RECT;
260 typedef struct D3D12_BOX
262 UINT left;
263 UINT top;
264 UINT front;
265 UINT right;
266 UINT bottom;
267 UINT back;
268 } D3D12_BOX;
270 typedef struct D3D12_VIEWPORT
272 FLOAT TopLeftX;
273 FLOAT TopLeftY;
274 FLOAT Width;
275 FLOAT Height;
276 FLOAT MinDepth;
277 FLOAT MaxDepth;
278 } D3D12_VIEWPORT;
280 typedef struct D3D12_RANGE
282 SIZE_T Begin;
283 SIZE_T End;
284 } D3D12_RANGE;
286 typedef struct D3D12_RANGE_UINT64
288 UINT64 Begin;
289 UINT64 End;
290 } D3D12_RANGE_UINT64;
292 typedef struct D3D12_SUBRESOURCE_RANGE_UINT64
294 UINT Subresource;
295 D3D12_RANGE_UINT64 Range;
296 } D3D12_SUBRESOURCE_RANGE_UINT64;
298 typedef struct D3D12_RESOURCE_ALLOCATION_INFO
300 UINT64 SizeInBytes;
301 UINT64 Alignment;
302 } D3D12_RESOURCE_ALLOCATION_INFO;
304 typedef struct D3D12_DRAW_ARGUMENTS
306 UINT VertexCountPerInstance;
307 UINT InstanceCount;
308 UINT StartVertexLocation;
309 UINT StartInstanceLocation;
310 } D3D12_DRAW_ARGUMENTS;
312 typedef struct D3D12_DRAW_INDEXED_ARGUMENTS
314 UINT IndexCountPerInstance;
315 UINT InstanceCount;
316 UINT StartIndexLocation;
317 INT BaseVertexLocation;
318 UINT StartInstanceLocation;
319 } D3D12_DRAW_INDEXED_ARGUMENTS;
321 typedef struct D3D12_DISPATCH_ARGUMENTS
323 UINT ThreadGroupCountX;
324 UINT ThreadGroupCountY;
325 UINT ThreadGroupCountZ;
326 } D3D12_DISPATCH_ARGUMENTS;
328 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS
330 BOOL DoublePrecisionFloatShaderOps;
331 BOOL OutputMergerLogicOp;
332 D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport;
333 D3D12_TILED_RESOURCES_TIER TiledResourcesTier;
334 D3D12_RESOURCE_BINDING_TIER ResourceBindingTier;
335 BOOL PSSpecifiedStencilRefSupported;
336 BOOL TypedUAVLoadAdditionalFormats;
337 BOOL ROVsSupported;
338 D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier;
339 UINT MaxGPUVirtualAddressBitsPerResource;
340 BOOL StandardSwizzle64KBSupported;
341 D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier;
342 BOOL CrossAdapterRowMajorTextureSupported;
343 BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
344 D3D12_RESOURCE_HEAP_TIER ResourceHeapTier;
345 } D3D12_FEATURE_DATA_D3D12_OPTIONS;
347 typedef struct D3D12_FEATURE_DATA_FORMAT_SUPPORT
349 DXGI_FORMAT Format;
350 D3D12_FORMAT_SUPPORT1 Support1;
351 D3D12_FORMAT_SUPPORT2 Support2;
352 } D3D12_FEATURE_DATA_FORMAT_SUPPORT;
354 typedef enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS
356 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0x00000000,
357 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x00000001,
358 } D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS;
359 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS);")
361 typedef struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS
363 DXGI_FORMAT Format;
364 UINT SampleCount;
365 D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags;
366 UINT NumQualityLevels;
367 } D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS;
369 typedef enum D3D12_HEAP_TYPE
371 D3D12_HEAP_TYPE_DEFAULT = 1,
372 D3D12_HEAP_TYPE_UPLOAD = 2,
373 D3D12_HEAP_TYPE_READBACK = 3,
374 D3D12_HEAP_TYPE_CUSTOM = 4,
375 } D3D12_HEAP_TYPE;
377 typedef enum D3D12_CPU_PAGE_PROPERTY
379 D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0,
380 D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1,
381 D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2,
382 D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3,
383 } D3D12_CPU_PAGE_PROPERTY;
385 typedef enum D3D12_MEMORY_POOL
387 D3D12_MEMORY_POOL_UNKNOWN = 0,
388 D3D12_MEMORY_POOL_L0 = 1,
389 D3D12_MEMORY_POOL_L1 = 2,
390 } D3D12_MEMORY_POOL;
392 typedef struct D3D12_HEAP_PROPERTIES
394 D3D12_HEAP_TYPE Type;
395 D3D12_CPU_PAGE_PROPERTY CPUPageProperty;
396 D3D12_MEMORY_POOL MemoryPoolPreference;
397 UINT CreationNodeMask;
398 UINT VisibleNodeMask;
399 } D3D12_HEAP_PROPERTIES;
401 typedef enum D3D12_HEAP_FLAGS
403 D3D12_HEAP_FLAG_NONE = 0x00,
404 D3D12_HEAP_FLAG_SHARED = 0x01,
405 D3D12_HEAP_FLAG_DENY_BUFFERS = 0x04,
406 D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x08,
407 D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20,
408 D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40,
409 D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80,
410 D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0x00,
411 D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xc0,
412 D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44,
413 D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84,
414 } D3D12_HEAP_FLAGS;
416 typedef struct D3D12_HEAP_DESC
418 UINT64 SizeInBytes;
419 D3D12_HEAP_PROPERTIES Properties;
420 UINT64 Alignment;
421 D3D12_HEAP_FLAGS Flags;
422 } D3D12_HEAP_DESC;
424 typedef struct D3D12_TILED_RESOURCE_COORDINATE
426 UINT X;
427 UINT Y;
428 UINT Z;
429 UINT Subresource;
430 } D3D12_TILED_RESOURCE_COORDINATE;
432 typedef struct D3D12_TILE_REGION_SIZE
434 UINT NumTiles;
435 BOOL UseBox;
436 UINT Width;
437 UINT16 Height;
438 UINT16 Depth;
439 } D3D12_TILE_REGION_SIZE;
441 typedef struct D3D12_SUBRESOURCE_TILING
443 UINT WidthInTiles;
444 UINT16 HeightInTiles;
445 UINT16 DepthInTiles;
446 UINT StartTileIndexInOverallResource;
447 } D3D12_SUBRESOURCE_TILING;
449 typedef struct D3D12_TILE_SHAPE
451 UINT WidthInTexels;
452 UINT HeightInTexels;
453 UINT DepthInTexels;
454 } D3D12_TILE_SHAPE;
456 typedef struct D3D12_SHADER_BYTECODE
458 const void *pShaderBytecode;
459 SIZE_T BytecodeLength;
460 } D3D12_SHADER_BYTECODE;
462 typedef struct D3D12_DEPTH_STENCIL_VALUE
464 FLOAT Depth;
465 UINT8 Stencil;
466 } D3D12_DEPTH_STENCIL_VALUE;
468 typedef struct D3D12_CLEAR_VALUE
470 DXGI_FORMAT Format;
471 union
473 FLOAT Color[4];
474 D3D12_DEPTH_STENCIL_VALUE DepthStencil;
476 } D3D12_CLEAR_VALUE;
478 typedef struct D3D12_PACKED_MIP_INFO
480 UINT8 NumStandardMips;
481 UINT8 NumPackedMips;
482 UINT NumTilesForPackedMips;
483 UINT StartTileIndexInOverallResource;
484 } D3D12_PACKED_MIP_INFO;
486 typedef enum D3D12_RESOURCE_STATES
488 D3D12_RESOURCE_STATE_COMMON = 0,
489 D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1,
490 D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2,
491 D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4,
492 D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8,
493 D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10,
494 D3D12_RESOURCE_STATE_DEPTH_READ = 0x20,
495 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40,
496 D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80,
497 D3D12_RESOURCE_STATE_STREAM_OUT = 0x100,
498 D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200,
499 D3D12_RESOURCE_STATE_COPY_DEST = 0x400,
500 D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800,
501 D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000,
502 D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000,
503 D3D12_RESOURCE_STATE_GENERIC_READ = 0x1 | 0x2 | 0x40 | 0x80 | 0x200 | 0x800,
504 D3D12_RESOURCE_STATE_PRESENT = 0x0,
505 D3D12_RESOURCE_STATE_PREDICATION = 0x200,
506 } D3D12_RESOURCE_STATES;
507 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_STATES);")
509 typedef enum D3D12_RESOURCE_BARRIER_TYPE
511 D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0,
512 D3D12_RESOURCE_BARRIER_TYPE_ALIASING = 1,
513 D3D12_RESOURCE_BARRIER_TYPE_UAV = 2,
514 } D3D12_RESOURCE_BARRIER_TYPE;
516 typedef enum D3D12_RESOURCE_BARRIER_FLAGS
518 D3D12_RESOURCE_BARRIER_FLAG_NONE = 0x0,
519 D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1,
520 D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2,
521 } D3D12_RESOURCE_BARRIER_FLAGS;
523 typedef struct D3D12_RESOURCE_TRANSITION_BARRIER
525 ID3D12Resource *pResource;
526 UINT Subresource;
527 D3D12_RESOURCE_STATES StateBefore;
528 D3D12_RESOURCE_STATES StateAfter;
529 } D3D12_RESOURCE_TRANSITION_BARRIER;
531 typedef struct D3D12_RESOURCE_ALIASING_BARRIER_ALIASING
533 ID3D12Resource *pResourceBefore;
534 ID3D12Resource *pResourceAfter;
535 } D3D12_RESOURCE_ALIASING_BARRIER;
537 typedef struct D3D12_RESOURCE_UAV_BARRIER
539 ID3D12Resource *pResource;
540 } D3D12_RESOURCE_UAV_BARRIER;
542 typedef struct D3D12_RESOURCE_BARRIER
544 D3D12_RESOURCE_BARRIER_TYPE Type;
545 D3D12_RESOURCE_BARRIER_FLAGS Flags;
546 union
548 D3D12_RESOURCE_TRANSITION_BARRIER Transition;
549 D3D12_RESOURCE_ALIASING_BARRIER Aliasing;
550 D3D12_RESOURCE_UAV_BARRIER UAV;
552 } D3D12_RESOURCE_BARRIER;
554 typedef enum D3D12_RESOURCE_DIMENSION
556 D3D12_RESOURCE_DIMENSION_UNKNOWN = 0,
557 D3D12_RESOURCE_DIMENSION_BUFFER = 1,
558 D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2,
559 D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3,
560 D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4,
561 } D3D12_RESOURCE_DIMENSION;
563 typedef enum D3D12_TEXTURE_LAYOUT
565 D3D12_TEXTURE_LAYOUT_UNKNOWN = 0,
566 D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1,
567 D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2,
568 D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3,
569 } D3D12_TEXTURE_LAYOUT;
571 typedef enum D3D12_RESOURCE_FLAGS
573 D3D12_RESOURCE_FLAG_NONE = 0x0,
574 D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1,
575 D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2,
576 D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4,
577 D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8,
578 D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10,
579 D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20,
580 } D3D12_RESOURCE_FLAGS;
581 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_FLAGS);")
583 typedef struct D3D12_RESOURCE_DESC
585 D3D12_RESOURCE_DIMENSION Dimension;
586 UINT64 Alignment;
587 UINT64 Width;
588 UINT Height;
589 UINT16 DepthOrArraySize;
590 UINT16 MipLevels;
591 DXGI_FORMAT Format;
592 DXGI_SAMPLE_DESC SampleDesc;
593 D3D12_TEXTURE_LAYOUT Layout;
594 D3D12_RESOURCE_FLAGS Flags;
595 } D3D12_RESOURCE_DESC;
597 typedef enum D3D12_RESOLVE_MODE
599 D3D12_RESOLVE_MODE_DECOMPRESS = 0,
600 D3D12_RESOLVE_MODE_MIN = 1,
601 D3D12_RESOLVE_MODE_MAX = 2,
602 D3D12_RESOLVE_MODE_AVERAGE = 3,
603 } D3D12_RESOLVE_MODE;
605 typedef struct D3D12_SAMPLE_POSITION
607 INT8 X;
608 INT8 Y;
609 } D3D12_SAMPLE_POSITION;
611 typedef enum D3D12_TEXTURE_COPY_TYPE
613 D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0,
614 D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1,
615 } D3D12_TEXTURE_COPY_TYPE;
617 typedef struct D3D12_SUBRESOURCE_FOOTPRINT
619 DXGI_FORMAT Format;
620 UINT Width;
621 UINT Height;
622 UINT Depth;
623 UINT RowPitch;
624 } D3D12_SUBRESOURCE_FOOTPRINT;
626 typedef struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT
628 UINT64 Offset;
629 D3D12_SUBRESOURCE_FOOTPRINT Footprint;
630 } D3D12_PLACED_SUBRESOURCE_FOOTPRINT;
632 typedef struct D3D12_TEXTURE_COPY_LOCATION
634 ID3D12Resource *pResource;
635 D3D12_TEXTURE_COPY_TYPE Type;
636 union
638 D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint;
639 UINT SubresourceIndex;
641 } D3D12_TEXTURE_COPY_LOCATION;
643 typedef enum D3D12_DESCRIPTOR_RANGE_TYPE
645 D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0,
646 D3D12_DESCRIPTOR_RANGE_TYPE_UAV = 1,
647 D3D12_DESCRIPTOR_RANGE_TYPE_CBV = 2,
648 D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = 3,
649 } D3D12_DESCRIPTOR_RANGE_TYPE;
651 typedef struct D3D12_DESCRIPTOR_RANGE
653 D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
654 UINT NumDescriptors;
655 UINT BaseShaderRegister;
656 UINT RegisterSpace;
657 UINT OffsetInDescriptorsFromTableStart;
658 } D3D12_DESCRIPTOR_RANGE;
660 typedef enum D3D12_DESCRIPTOR_RANGE_FLAGS
662 D3D12_DESCRIPTOR_RANGE_FLAG_NONE = 0x0,
663 D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1,
664 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2,
665 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
666 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8,
667 } D3D12_DESCRIPTOR_RANGE_FLAGS;
669 typedef struct D3D12_DESCRIPTOR_RANGE1
671 D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
672 UINT NumDescriptors;
673 UINT BaseShaderRegister;
674 UINT RegisterSpace;
675 D3D12_DESCRIPTOR_RANGE_FLAGS Flags;
676 UINT OffsetInDescriptorsFromTableStart;
677 } D3D12_DESCRIPTOR_RANGE1;
679 typedef struct D3D12_ROOT_DESCRIPTOR_TABLE
681 UINT NumDescriptorRanges;
682 const D3D12_DESCRIPTOR_RANGE *pDescriptorRanges;
683 } D3D12_ROOT_DESCRIPTOR_TABLE;
685 typedef struct D3D12_ROOT_DESCRIPTOR_TABLE1
687 UINT NumDescriptorRanges;
688 const D3D12_DESCRIPTOR_RANGE1 *pDescriptorRanges;
689 } D3D12_ROOT_DESCRIPTOR_TABLE1;
691 typedef struct D3D12_ROOT_CONSTANTS
693 UINT ShaderRegister;
694 UINT RegisterSpace;
695 UINT Num32BitValues;
696 } D3D12_ROOT_CONSTANTS;
698 typedef struct D3D12_ROOT_DESCRIPTOR
700 UINT ShaderRegister;
701 UINT RegisterSpace;
702 } D3D12_ROOT_DESCRIPTOR;
704 typedef enum D3D12_ROOT_DESCRIPTOR_FLAGS
706 D3D12_ROOT_DESCRIPTOR_FLAG_NONE = 0x0,
707 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2,
708 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
709 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8,
710 } D3D12_ROOT_DESCRIPTOR_FLAGS;
712 typedef struct D3D12_ROOT_DESCRIPTOR1
714 UINT ShaderRegister;
715 UINT RegisterSpace;
716 D3D12_ROOT_DESCRIPTOR_FLAGS Flags;
717 } D3D12_ROOT_DESCRIPTOR1;
719 typedef enum D3D12_ROOT_PARAMETER_TYPE
721 D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0,
722 D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 1,
723 D3D12_ROOT_PARAMETER_TYPE_CBV = 2,
724 D3D12_ROOT_PARAMETER_TYPE_SRV = 3,
725 D3D12_ROOT_PARAMETER_TYPE_UAV = 4,
726 } D3D12_ROOT_PARAMETER_TYPE;
728 typedef enum D3D12_SHADER_VISIBILITY
730 D3D12_SHADER_VISIBILITY_ALL = 0,
731 D3D12_SHADER_VISIBILITY_VERTEX = 1,
732 D3D12_SHADER_VISIBILITY_HULL = 2,
733 D3D12_SHADER_VISIBILITY_DOMAIN = 3,
734 D3D12_SHADER_VISIBILITY_GEOMETRY = 4,
735 D3D12_SHADER_VISIBILITY_PIXEL = 5,
736 } D3D12_SHADER_VISIBILITY;
738 typedef struct D3D12_ROOT_PARAMETER
740 D3D12_ROOT_PARAMETER_TYPE ParameterType;
741 union
743 D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable;
744 D3D12_ROOT_CONSTANTS Constants;
745 D3D12_ROOT_DESCRIPTOR Descriptor;
747 D3D12_SHADER_VISIBILITY ShaderVisibility;
748 } D3D12_ROOT_PARAMETER;
750 typedef struct D3D12_ROOT_PARAMETER1
752 D3D12_ROOT_PARAMETER_TYPE ParameterType;
753 union
755 D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable;
756 D3D12_ROOT_CONSTANTS Constants;
757 D3D12_ROOT_DESCRIPTOR1 Descriptor;
759 D3D12_SHADER_VISIBILITY ShaderVisibility;
760 } D3D12_ROOT_PARAMETER1;
762 typedef enum D3D12_STATIC_BORDER_COLOR
764 D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0,
765 D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = 1,
766 D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = 2,
767 } D3D12_STATIC_BORDER_COLOR;
769 typedef enum D3D12_FILTER
771 D3D12_FILTER_MIN_MAG_MIP_POINT = 0x00,
772 D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x01,
773 D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x04,
774 D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x05,
775 D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10,
776 D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11,
777 D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14,
778 D3D12_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
779 D3D12_FILTER_ANISOTROPIC = 0x55,
780 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80,
781 D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81,
782 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84,
783 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85,
784 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90,
785 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91,
786 D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94,
787 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95,
788 D3D12_FILTER_COMPARISON_ANISOTROPIC = 0xd5,
789 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100,
790 D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101,
791 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104,
792 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105,
793 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110,
794 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111,
795 D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114,
796 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115,
797 D3D12_FILTER_MINIMUM_ANISOTROPIC = 0x155,
798 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180,
799 D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181,
800 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184,
801 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185,
802 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190,
803 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191,
804 D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194,
805 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195,
806 D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5,
807 } D3D12_FILTER;
809 typedef enum D3D12_FILTER_TYPE
811 D3D12_FILTER_TYPE_POINT = 0,
812 D3D12_FILTER_TYPE_LINEAR = 1,
813 } D3D12_FILTER_TYPE;
815 const UINT D3D12_MIP_FILTER_SHIFT = 0;
816 const UINT D3D12_MAG_FILTER_SHIFT = 2;
817 const UINT D3D12_MIN_FILTER_SHIFT = 4;
818 const UINT D3D12_FILTER_TYPE_MASK = 0x3;
820 const UINT D3D12_ANISOTROPIC_FILTERING_BIT = 0x40;
822 typedef enum D3D12_FILTER_REDUCTION_TYPE
824 D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0,
825 D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1,
826 D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2,
827 D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3,
828 } D3D12_FILTER_REDUCTION_TYPE;
830 const UINT D3D12_FILTER_REDUCTION_TYPE_MASK = 0x3;
831 const UINT D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7;
833 cpp_quote("#define D3D12_DECODE_MAG_FILTER(filter) \\")
834 cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MAG_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
836 cpp_quote("#define D3D12_DECODE_MIN_FILTER(filter) \\")
837 cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIN_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
839 cpp_quote("#define D3D12_DECODE_MIP_FILTER(filter) \\")
840 cpp_quote(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIP_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
842 cpp_quote("#define D3D12_DECODE_IS_ANISOTROPIC_FILTER(filter) \\")
843 cpp_quote(" (((filter) & D3D12_ANISOTROPIC_FILTERING_BIT) \\")
844 cpp_quote(" && (D3D12_DECODE_MIN_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
845 cpp_quote(" && (D3D12_DECODE_MAG_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
846 cpp_quote(" && (D3D12_DECODE_MIP_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR))")
848 cpp_quote("#define D3D12_DECODE_FILTER_REDUCTION(filter) \\")
849 cpp_quote(" ((D3D12_FILTER_REDUCTION_TYPE)(((filter) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT) \\")
850 cpp_quote(" & D3D12_FILTER_REDUCTION_TYPE_MASK))")
852 cpp_quote("#define D3D12_DECODE_IS_COMPARISON_FILTER(filter) \\")
853 cpp_quote(" (D3D12_DECODE_FILTER_REDUCTION(filter) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON)")
855 typedef enum D3D12_TEXTURE_ADDRESS_MODE
857 D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1,
858 D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2,
859 D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3,
860 D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4,
861 D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5,
862 } D3D12_TEXTURE_ADDRESS_MODE;
864 typedef enum D3D12_COMPARISON_FUNC
866 D3D12_COMPARISON_FUNC_NEVER = 1,
867 D3D12_COMPARISON_FUNC_LESS = 2,
868 D3D12_COMPARISON_FUNC_EQUAL = 3,
869 D3D12_COMPARISON_FUNC_LESS_EQUAL = 4,
870 D3D12_COMPARISON_FUNC_GREATER = 5,
871 D3D12_COMPARISON_FUNC_NOT_EQUAL = 6,
872 D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7,
873 D3D12_COMPARISON_FUNC_ALWAYS = 8,
874 } D3D12_COMPARISON_FUNC;
876 typedef struct D3D12_STATIC_SAMPLER_DESC
878 D3D12_FILTER Filter;
879 D3D12_TEXTURE_ADDRESS_MODE AddressU;
880 D3D12_TEXTURE_ADDRESS_MODE AddressV;
881 D3D12_TEXTURE_ADDRESS_MODE AddressW;
882 FLOAT MipLODBias;
883 UINT MaxAnisotropy;
884 D3D12_COMPARISON_FUNC ComparisonFunc;
885 D3D12_STATIC_BORDER_COLOR BorderColor;
886 FLOAT MinLOD;
887 FLOAT MaxLOD;
888 UINT ShaderRegister;
889 UINT RegisterSpace;
890 D3D12_SHADER_VISIBILITY ShaderVisibility;
891 } D3D12_STATIC_SAMPLER_DESC;
893 typedef enum D3D12_ROOT_SIGNATURE_FLAGS
895 D3D12_ROOT_SIGNATURE_FLAG_NONE = 0x00,
896 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x01,
897 D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x02,
898 D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x04,
899 D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x08,
900 D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
901 D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
902 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40,
903 } D3D12_ROOT_SIGNATURE_FLAGS;
905 typedef struct D3D12_ROOT_SIGNATURE_DESC
907 UINT NumParameters;
908 const D3D12_ROOT_PARAMETER *pParameters;
909 UINT NumStaticSamplers;
910 const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers;
911 D3D12_ROOT_SIGNATURE_FLAGS Flags;
912 } D3D12_ROOT_SIGNATURE_DESC;
914 typedef struct D3D12_ROOT_SIGNATURE_DESC1
916 UINT NumParameters;
917 const D3D12_ROOT_PARAMETER1 *pParameters;
918 UINT NumStaticSamplers;
919 const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers;
920 D3D12_ROOT_SIGNATURE_FLAGS Flags;
921 } D3D12_ROOT_SIGNATURE_DESC1;
923 typedef enum D3D_ROOT_SIGNATURE_VERSION
925 D3D_ROOT_SIGNATURE_VERSION_1 = 0x1,
926 D3D_ROOT_SIGNATURE_VERSION_1_0 = 0x1,
927 D3D_ROOT_SIGNATURE_VERSION_1_1 = 0x2,
928 } D3D_ROOT_SIGNATURE_VERSION;
930 typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC
932 D3D_ROOT_SIGNATURE_VERSION Version;
933 union
935 D3D12_ROOT_SIGNATURE_DESC Desc_1_0;
936 D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1;
938 } D3D12_VERSIONED_ROOT_SIGNATURE_DESC;
940 typedef enum D3D12_DESCRIPTOR_HEAP_TYPE
942 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
943 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
944 D3D12_DESCRIPTOR_HEAP_TYPE_RTV,
945 D3D12_DESCRIPTOR_HEAP_TYPE_DSV,
946 D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES,
947 } D3D12_DESCRIPTOR_HEAP_TYPE;
949 typedef enum D3D12_DESCRIPTOR_HEAP_FLAGS
951 D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0x0,
952 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1,
953 } D3D12_DESCRIPTOR_HEAP_FLAGS;
955 typedef struct D3D12_DESCRIPTOR_HEAP_DESC
957 D3D12_DESCRIPTOR_HEAP_TYPE Type;
958 UINT NumDescriptors;
959 D3D12_DESCRIPTOR_HEAP_FLAGS Flags;
960 UINT NodeMask;
961 } D3D12_DESCRIPTOR_HEAP_DESC;
963 typedef UINT64 D3D12_GPU_VIRTUAL_ADDRESS;
965 typedef struct D3D12_CONSTANT_BUFFER_VIEW_DESC
967 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
968 UINT SizeInBytes;
969 } D3D12_CONSTANT_BUFFER_VIEW_DESC;
971 typedef enum D3D12_SRV_DIMENSION
973 D3D12_SRV_DIMENSION_UNKNOWN = 0,
974 D3D12_SRV_DIMENSION_BUFFER = 1,
975 D3D12_SRV_DIMENSION_TEXTURE1D = 2,
976 D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3,
977 D3D12_SRV_DIMENSION_TEXTURE2D = 4,
978 D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5,
979 D3D12_SRV_DIMENSION_TEXTURE2DMS = 6,
980 D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7,
981 D3D12_SRV_DIMENSION_TEXTURE3D = 8,
982 D3D12_SRV_DIMENSION_TEXTURECUBE = 9,
983 D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10,
984 } D3D12_SRV_DIMENSION;
986 typedef enum D3D12_BUFFER_SRV_FLAGS
988 D3D12_BUFFER_SRV_FLAG_NONE = 0x0,
989 D3D12_BUFFER_SRV_FLAG_RAW = 0x1,
990 } D3D12_BUFFER_SRV_FLAGS;
992 typedef enum D3D12_SHADER_COMPONENT_MAPPING
994 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0,
995 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1,
996 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2,
997 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3,
998 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4,
999 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5,
1000 } D3D12_SHADER_COMPONENT_MAPPING;
1002 cpp_quote("#define D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(x, y, z, w) \\")
1003 cpp_quote(" (((x) & D3D12_SHADER_COMPONENT_MAPPING_MASK) \\")
1004 cpp_quote(" | (((y) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << D3D12_SHADER_COMPONENT_MAPPING_SHIFT) \\")
1005 cpp_quote(" | (((z) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 2)) \\")
1006 cpp_quote(" | (((w) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 3)) \\")
1007 cpp_quote(" | D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES)")
1008 cpp_quote("#define D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 1, 2, 3)")
1010 cpp_quote("#define D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(i, mapping) \\")
1011 cpp_quote(" ((D3D12_SHADER_COMPONENT_MAPPING)(mapping >> (i * D3D12_SHADER_COMPONENT_MAPPING_SHIFT) \\")
1012 cpp_quote(" & D3D12_SHADER_COMPONENT_MAPPING_MASK))")
1014 typedef struct D3D12_BUFFER_SRV
1016 UINT64 FirstElement;
1017 UINT NumElements;
1018 UINT StructureByteStride;
1019 D3D12_BUFFER_SRV_FLAGS Flags;
1020 } D3D12_BUFFER_SRV;
1022 typedef struct D3D12_TEX1D_SRV
1024 UINT MostDetailedMip;
1025 UINT MipLevels;
1026 FLOAT ResourceMinLODClamp;
1027 } D3D12_TEX1D_SRV;
1029 typedef struct D3D12_TEX1D_ARRAY_SRV
1031 UINT MostDetailedMip;
1032 UINT MipLevels;
1033 UINT FirstArraySlice;
1034 UINT ArraySize;
1035 FLOAT ResourceMinLODClamp;
1036 } D3D12_TEX1D_ARRAY_SRV;
1038 typedef struct D3D12_TEX2D_SRV
1040 UINT MostDetailedMip;
1041 UINT MipLevels;
1042 UINT PlaneSlice;
1043 FLOAT ResourceMinLODClamp;
1044 } D3D12_TEX2D_SRV;
1046 typedef struct D3D12_TEX2D_ARRAY_SRV
1048 UINT MostDetailedMip;
1049 UINT MipLevels;
1050 UINT FirstArraySlice;
1051 UINT ArraySize;
1052 UINT PlaneSlice;
1053 FLOAT ResourceMinLODClamp;
1054 } D3D12_TEX2D_ARRAY_SRV;
1056 typedef struct D3D12_TEX2DMS_SRV
1058 UINT UnusedField_NothingToDefine;
1059 } D3D12_TEX2DMS_SRV;
1061 typedef struct D3D12_TEX2DMS_ARRAY_SRV
1063 UINT FirstArraySlice;
1064 UINT ArraySize;
1065 } D3D12_TEX2DMS_ARRAY_SRV;
1067 typedef struct D3D12_TEX3D_SRV
1069 UINT MostDetailedMip;
1070 UINT MipLevels;
1071 FLOAT ResourceMinLODClamp;
1072 } D3D12_TEX3D_SRV;
1074 typedef struct D3D12_TEXCUBE_SRV
1076 UINT MostDetailedMip;
1077 UINT MipLevels;
1078 FLOAT ResourceMinLODClamp;
1079 } D3D12_TEXCUBE_SRV;
1081 typedef struct D3D12_TEXCUBE_ARRAY_SRV
1083 UINT MostDetailedMip;
1084 UINT MipLevels;
1085 UINT First2DArrayFace;
1086 UINT NumCubes;
1087 FLOAT ResourceMinLODClamp;
1088 } D3D12_TEXCUBE_ARRAY_SRV;
1090 typedef struct D3D12_SHADER_RESOURCE_VIEW_DESC
1092 DXGI_FORMAT Format;
1093 D3D12_SRV_DIMENSION ViewDimension;
1094 UINT Shader4ComponentMapping;
1095 union
1097 D3D12_BUFFER_SRV Buffer;
1098 D3D12_TEX1D_SRV Texture1D;
1099 D3D12_TEX1D_ARRAY_SRV Texture1DArray;
1100 D3D12_TEX2D_SRV Texture2D;
1101 D3D12_TEX2D_ARRAY_SRV Texture2DArray;
1102 D3D12_TEX2DMS_SRV Texture2DMS;
1103 D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray;
1104 D3D12_TEX3D_SRV Texture3D;
1105 D3D12_TEXCUBE_SRV TextureCube;
1106 D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray;
1108 } D3D12_SHADER_RESOURCE_VIEW_DESC;
1110 typedef enum D3D12_UAV_DIMENSION
1112 D3D12_UAV_DIMENSION_UNKNOWN = 0,
1113 D3D12_UAV_DIMENSION_BUFFER = 1,
1114 D3D12_UAV_DIMENSION_TEXTURE1D = 2,
1115 D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3,
1116 D3D12_UAV_DIMENSION_TEXTURE2D = 4,
1117 D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5,
1118 D3D12_UAV_DIMENSION_TEXTURE3D = 8,
1119 } D3D12_UAV_DIMENSION;
1121 typedef enum D3D12_BUFFER_UAV_FLAGS
1123 D3D12_BUFFER_UAV_FLAG_NONE = 0x0,
1124 D3D12_BUFFER_UAV_FLAG_RAW = 0x1,
1125 } D3D12_BUFFER_UAV_FLAGS;
1127 typedef struct D3D12_BUFFER_UAV
1129 UINT64 FirstElement;
1130 UINT NumElements;
1131 UINT StructureByteStride;
1132 UINT64 CounterOffsetInBytes;
1133 D3D12_BUFFER_UAV_FLAGS Flags;
1134 } D3D12_BUFFER_UAV;
1136 typedef struct D3D12_TEX1D_UAV
1138 UINT MipSlice;
1139 } D3D12_TEX1D_UAV;
1141 typedef struct D3D12_TEX1D_ARRAY_UAV
1143 UINT MipSlice;
1144 UINT FirstArraySlice;
1145 UINT ArraySize;
1146 } D3D12_TEX1D_ARRAY_UAV;
1148 typedef struct D3D12_TEX2D_UAV
1150 UINT MipSlice;
1151 UINT PlaneSlice;
1152 } D3D12_TEX2D_UAV;
1154 typedef struct D3D12_TEX2D_ARRAY_UAV
1156 UINT MipSlice;
1157 UINT FirstArraySlice;
1158 UINT ArraySize;
1159 UINT PlaneSlice;
1160 } D3D12_TEX2D_ARRAY_UAV;
1162 typedef struct D3D12_TEX3D_UAV
1164 UINT MipSlice;
1165 UINT FirstWSlice;
1166 UINT WSize;
1167 } D3D12_TEX3D_UAV;
1169 typedef struct D3D12_UNORDERED_ACCESS_VIEW_DESC
1171 DXGI_FORMAT Format;
1172 D3D12_UAV_DIMENSION ViewDimension;
1173 union
1175 D3D12_BUFFER_UAV Buffer;
1176 D3D12_TEX1D_UAV Texture1D;
1177 D3D12_TEX1D_ARRAY_UAV Texture1DArray;
1178 D3D12_TEX2D_UAV Texture2D;
1179 D3D12_TEX2D_ARRAY_UAV Texture2DArray;
1180 D3D12_TEX3D_UAV Texture3D;
1182 } D3D12_UNORDERED_ACCESS_VIEW_DESC;
1184 typedef enum D3D12_RTV_DIMENSION
1186 D3D12_RTV_DIMENSION_UNKNOWN = 0,
1187 D3D12_RTV_DIMENSION_BUFFER = 1,
1188 D3D12_RTV_DIMENSION_TEXTURE1D = 2,
1189 D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3,
1190 D3D12_RTV_DIMENSION_TEXTURE2D = 4,
1191 D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5,
1192 D3D12_RTV_DIMENSION_TEXTURE2DMS = 6,
1193 D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7,
1194 D3D12_RTV_DIMENSION_TEXTURE3D = 8,
1195 } D3D12_RTV_DIMENSION;
1197 typedef struct D3D12_BUFFER_RTV
1199 UINT64 FirstElement;
1200 UINT NumElements;
1201 } D3D12_BUFFER_RTV;
1203 typedef struct D3D12_TEX1D_RTV
1205 UINT MipSlice;
1206 } D3D12_TEX1D_RTV;
1208 typedef struct D3D12_TEX1D_ARRAY_RTV
1210 UINT MipSlice;
1211 UINT FirstArraySlice;
1212 UINT ArraySize;
1213 } D3D12_TEX1D_ARRAY_RTV;
1215 typedef struct D3D12_TEX2D_RTV
1217 UINT MipSlice;
1218 UINT PlaneSlice;
1219 } D3D12_TEX2D_RTV;
1221 typedef struct D3D12_TEX2D_ARRAY_RTV
1223 UINT MipSlice;
1224 UINT FirstArraySlice;
1225 UINT ArraySize;
1226 UINT PlaneSlice;
1227 } D3D12_TEX2D_ARRAY_RTV;
1229 typedef struct D3D12_TEX2DMS_RTV
1231 UINT UnusedField_NothingToDefine;
1232 } D3D12_TEX2DMS_RTV;
1234 typedef struct D3D12_TEX2DMS_ARRAY_RTV
1236 UINT FirstArraySlice;
1237 UINT ArraySize;
1238 } D3D12_TEX2DMS_ARRAY_RTV;
1240 typedef struct D3D12_TEX3D_RTV
1242 UINT MipSlice;
1243 UINT FirstWSlice;
1244 UINT WSize;
1245 } D3D12_TEX3D_RTV;
1247 typedef struct D3D12_RENDER_TARGET_VIEW_DESC
1249 DXGI_FORMAT Format;
1250 D3D12_RTV_DIMENSION ViewDimension;
1251 union
1253 D3D12_BUFFER_RTV Buffer;
1254 D3D12_TEX1D_RTV Texture1D;
1255 D3D12_TEX1D_ARRAY_RTV Texture1DArray;
1256 D3D12_TEX2D_RTV Texture2D;
1257 D3D12_TEX2D_ARRAY_RTV Texture2DArray;
1258 D3D12_TEX2DMS_RTV Texture2DMS;
1259 D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray;
1260 D3D12_TEX3D_RTV Texture3D;
1262 } D3D12_RENDER_TARGET_VIEW_DESC;
1264 typedef enum D3D12_DSV_DIMENSION
1266 D3D12_DSV_DIMENSION_UNKNOWN = 0,
1267 D3D12_DSV_DIMENSION_TEXTURE1D = 1,
1268 D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2,
1269 D3D12_DSV_DIMENSION_TEXTURE2D = 3,
1270 D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4,
1271 D3D12_DSV_DIMENSION_TEXTURE2DMS = 5,
1272 D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6,
1273 } D3D12_DSV_DIMENSION;
1275 typedef enum D3D12_DSV_FLAGS
1277 D3D12_DSV_FLAG_NONE = 0x0,
1278 D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1,
1279 D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2,
1280 } D3D12_DSV_FLAGS;
1281 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_DSV_FLAGS);")
1283 typedef struct D3D12_TEX1D_DSV
1285 UINT MipSlice;
1286 } D3D12_TEX1D_DSV;
1288 typedef struct D3D12_TEX1D_ARRAY_DSV
1290 UINT MipSlice;
1291 UINT FirstArraySlice;
1292 UINT ArraySize;
1293 } D3D12_TEX1D_ARRAY_DSV;
1295 typedef struct D3D12_TEX2D_DSV
1297 UINT MipSlice;
1298 } D3D12_TEX2D_DSV;
1300 typedef struct D3D12_TEX2D_ARRAY_DSV
1302 UINT MipSlice;
1303 UINT FirstArraySlice;
1304 UINT ArraySize;
1305 } D3D12_TEX2D_ARRAY_DSV;
1307 typedef struct D3D12_TEX2DMS_DSV
1309 UINT UnusedField_NothingToDefine;
1310 } D3D12_TEX2DMS_DSV;
1312 typedef struct D3D12_TEX2DMS_ARRAY_DSV
1314 UINT FirstArraySlice;
1315 UINT ArraySize;
1316 } D3D12_TEX2DMS_ARRAY_DSV;
1318 typedef struct D3D12_DEPTH_STENCIL_VIEW_DESC
1320 DXGI_FORMAT Format;
1321 D3D12_DSV_DIMENSION ViewDimension;
1322 D3D12_DSV_FLAGS Flags;
1323 union
1325 D3D12_TEX1D_DSV Texture1D;
1326 D3D12_TEX1D_ARRAY_DSV Texture1DArray;
1327 D3D12_TEX2D_DSV Texture2D;
1328 D3D12_TEX2D_ARRAY_DSV Texture2DArray;
1329 D3D12_TEX2DMS_DSV Texture2DMS;
1330 D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray;
1332 } D3D12_DEPTH_STENCIL_VIEW_DESC;
1334 typedef struct D3D12_SAMPLER_DESC
1336 D3D12_FILTER Filter;
1337 D3D12_TEXTURE_ADDRESS_MODE AddressU;
1338 D3D12_TEXTURE_ADDRESS_MODE AddressV;
1339 D3D12_TEXTURE_ADDRESS_MODE AddressW;
1340 FLOAT MipLODBias;
1341 UINT MaxAnisotropy;
1342 D3D12_COMPARISON_FUNC ComparisonFunc;
1343 FLOAT BorderColor[4];
1344 FLOAT MinLOD;
1345 FLOAT MaxLOD;
1346 } D3D12_SAMPLER_DESC;
1348 typedef struct D3D12_CPU_DESCRIPTOR_HANDLE
1350 SIZE_T ptr;
1351 } D3D12_CPU_DESCRIPTOR_HANDLE;
1353 typedef struct D3D12_GPU_DESCRIPTOR_HANDLE
1355 UINT64 ptr;
1356 } D3D12_GPU_DESCRIPTOR_HANDLE;
1358 typedef enum D3D12_STENCIL_OP
1360 D3D12_STENCIL_OP_KEEP = 1,
1361 D3D12_STENCIL_OP_ZERO = 2,
1362 D3D12_STENCIL_OP_REPLACE = 3,
1363 D3D12_STENCIL_OP_INCR_SAT = 4,
1364 D3D12_STENCIL_OP_DECR_SAT = 5,
1365 D3D12_STENCIL_OP_INVERT = 6,
1366 D3D12_STENCIL_OP_INCR = 7,
1367 D3D12_STENCIL_OP_DECR = 8,
1368 } D3D12_STENCIL_OP;
1370 typedef struct D3D12_DEPTH_STENCILOP_DESC
1372 D3D12_STENCIL_OP StencilFailOp;
1373 D3D12_STENCIL_OP StencilDepthFailOp;
1374 D3D12_STENCIL_OP StencilPassOp;
1375 D3D12_COMPARISON_FUNC StencilFunc;
1376 } D3D12_DEPTH_STENCILOP_DESC;
1378 typedef enum D3D12_DEPTH_WRITE_MASK
1380 D3D12_DEPTH_WRITE_MASK_ZERO = 0,
1381 D3D12_DEPTH_WRITE_MASK_ALL = 1,
1382 } D3D12_DEPTH_WRITE_MASK;
1384 typedef struct D3D12_DEPTH_STENCIL_DESC
1386 BOOL DepthEnable;
1387 D3D12_DEPTH_WRITE_MASK DepthWriteMask;
1388 D3D12_COMPARISON_FUNC DepthFunc;
1389 BOOL StencilEnable;
1390 UINT8 StencilReadMask;
1391 UINT8 StencilWriteMask;
1392 D3D12_DEPTH_STENCILOP_DESC FrontFace;
1393 D3D12_DEPTH_STENCILOP_DESC BackFace;
1394 } D3D12_DEPTH_STENCIL_DESC;
1396 typedef enum D3D12_BLEND
1398 D3D12_BLEND_ZERO = 1,
1399 D3D12_BLEND_ONE = 2,
1400 D3D12_BLEND_SRC_COLOR = 3,
1401 D3D12_BLEND_INV_SRC_COLOR = 4,
1402 D3D12_BLEND_SRC_ALPHA = 5,
1403 D3D12_BLEND_INV_SRC_ALPHA = 6,
1404 D3D12_BLEND_DEST_ALPHA = 7,
1405 D3D12_BLEND_INV_DEST_ALPHA = 8,
1406 D3D12_BLEND_DEST_COLOR = 9,
1407 D3D12_BLEND_INV_DEST_COLOR = 10,
1408 D3D12_BLEND_SRC_ALPHA_SAT = 11,
1409 D3D12_BLEND_BLEND_FACTOR = 14,
1410 D3D12_BLEND_INV_BLEND_FACTOR = 15,
1411 D3D12_BLEND_SRC1_COLOR = 16,
1412 D3D12_BLEND_INV_SRC1_COLOR = 17,
1413 D3D12_BLEND_SRC1_ALPHA = 18,
1414 D3D12_BLEND_INV_SRC1_ALPHA = 19,
1415 } D3D12_BLEND;
1417 typedef enum D3D12_BLEND_OP
1419 D3D12_BLEND_OP_ADD = 1,
1420 D3D12_BLEND_OP_SUBTRACT = 2,
1421 D3D12_BLEND_OP_REV_SUBTRACT = 3,
1422 D3D12_BLEND_OP_MIN = 4,
1423 D3D12_BLEND_OP_MAX = 5,
1424 } D3D12_BLEND_OP;
1426 typedef enum D3D12_LOGIC_OP
1428 D3D12_LOGIC_OP_CLEAR = 0,
1429 D3D12_LOGIC_OP_SET = 1,
1430 D3D12_LOGIC_OP_COPY = 2,
1431 D3D12_LOGIC_OP_COPY_INVERTED = 3,
1432 D3D12_LOGIC_OP_NOOP = 4,
1433 } D3D12_LOGIC_OP;
1435 typedef enum D3D12_COLOR_WRITE_ENABLE
1437 D3D12_COLOR_WRITE_ENABLE_RED = 0x1,
1438 D3D12_COLOR_WRITE_ENABLE_GREEN = 0x2,
1439 D3D12_COLOR_WRITE_ENABLE_BLUE = 0x4,
1440 D3D12_COLOR_WRITE_ENABLE_ALPHA = 0x8,
1441 D3D12_COLOR_WRITE_ENABLE_ALL = (D3D12_COLOR_WRITE_ENABLE_RED
1442 | D3D12_COLOR_WRITE_ENABLE_GREEN | D3D12_COLOR_WRITE_ENABLE_BLUE
1443 | D3D12_COLOR_WRITE_ENABLE_ALPHA),
1444 } D3D12_COLOR_WRITE_ENABLE;
1446 typedef struct D3D12_RENDER_TARGET_BLEND_DESC
1448 BOOL BlendEnable;
1449 BOOL LogicOpEnable;
1450 D3D12_BLEND SrcBlend;
1451 D3D12_BLEND DestBlend;
1452 D3D12_BLEND_OP BlendOp;
1453 D3D12_BLEND SrcBlendAlpha;
1454 D3D12_BLEND DestBlendAlpha;
1455 D3D12_BLEND_OP BlendOpAlpha;
1456 D3D12_LOGIC_OP LogicOp;
1457 UINT8 RenderTargetWriteMask;
1458 } D3D12_RENDER_TARGET_BLEND_DESC;
1460 typedef struct D3D12_BLEND_DESC
1462 BOOL AlphaToCoverageEnable;
1463 BOOL IndependentBlendEnable;
1464 D3D12_RENDER_TARGET_BLEND_DESC RenderTarget[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
1465 } D3D12_BLEND_DESC;
1467 typedef enum D3D12_FILL_MODE
1469 D3D12_FILL_MODE_WIREFRAME = 2,
1470 D3D12_FILL_MODE_SOLID = 3,
1471 } D3D12_FILL_MODE;
1473 typedef enum D3D12_CULL_MODE
1475 D3D12_CULL_MODE_NONE = 1,
1476 D3D12_CULL_MODE_FRONT = 2,
1477 D3D12_CULL_MODE_BACK = 3,
1478 } D3D12_CULL_MODE;
1480 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_MODE
1482 D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0,
1483 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1,
1484 } D3D12_CONSERVATIVE_RASTERIZATION_MODE;
1486 typedef struct D3D12_RASTERIZER_DESC
1488 D3D12_FILL_MODE FillMode;
1489 D3D12_CULL_MODE CullMode;
1490 BOOL FrontCounterClockwise;
1491 INT DepthBias;
1492 FLOAT DepthBiasClamp;
1493 FLOAT SlopeScaledDepthBias;
1494 BOOL DepthClipEnable;
1495 BOOL MultisampleEnable;
1496 BOOL AntialiasedLineEnable;
1497 UINT ForcedSampleCount;
1498 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster;
1499 } D3D12_RASTERIZER_DESC;
1501 typedef struct D3D12_SO_DECLARATION_ENTRY
1503 UINT Stream;
1504 const char *SemanticName;
1505 UINT SemanticIndex;
1506 BYTE StartComponent;
1507 BYTE ComponentCount;
1508 BYTE OutputSlot;
1509 } D3D12_SO_DECLARATION_ENTRY;
1511 typedef struct D3D12_STREAM_OUTPUT_DESC
1513 const D3D12_SO_DECLARATION_ENTRY *pSODeclaration;
1514 UINT NumEntries;
1515 const UINT *pBufferStrides;
1516 UINT NumStrides;
1517 UINT RasterizedStream;
1518 } D3D12_STREAM_OUTPUT_DESC;
1520 typedef enum D3D12_INPUT_CLASSIFICATION
1522 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0,
1523 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1,
1524 } D3D12_INPUT_CLASSIFICATION;
1526 typedef struct D3D12_INPUT_ELEMENT_DESC
1528 const char *SemanticName;
1529 UINT SemanticIndex;
1530 DXGI_FORMAT Format;
1531 UINT InputSlot;
1532 UINT AlignedByteOffset;
1533 D3D12_INPUT_CLASSIFICATION InputSlotClass;
1534 UINT InstanceDataStepRate;
1535 } D3D12_INPUT_ELEMENT_DESC;
1537 typedef struct D3D12_INPUT_LAYOUT_DESC
1539 const D3D12_INPUT_ELEMENT_DESC *pInputElementDescs;
1540 UINT NumElements;
1541 } D3D12_INPUT_LAYOUT_DESC;
1543 typedef enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
1545 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0,
1546 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1,
1547 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2,
1548 } D3D12_INDEX_BUFFER_STRIP_CUT_VALUE;
1550 typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY;
1552 typedef enum D3D12_PRIMITIVE_TOPOLOGY_TYPE
1554 D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0,
1555 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1,
1556 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2,
1557 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3,
1558 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4,
1559 } D3D12_PRIMITIVE_TOPOLOGY_TYPE;
1561 typedef struct D3D12_CACHED_PIPELINE_STATE
1563 const void *pCachedBlob;
1564 SIZE_T CachedBlobSizeInBytes;
1565 } D3D12_CACHED_PIPELINE_STATE;
1567 typedef enum D3D12_PIPELINE_STATE_FLAGS
1569 D3D12_PIPELINE_STATE_FLAG_NONE = 0x0,
1570 D3D12_PIPELINE_STATE_FLAG_DEBUG = 0x1,
1571 } D3D12_PIPELINE_STATE_FLAGS;
1573 typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
1575 ID3D12RootSignature *pRootSignature;
1576 D3D12_SHADER_BYTECODE VS;
1577 D3D12_SHADER_BYTECODE PS;
1578 D3D12_SHADER_BYTECODE DS;
1579 D3D12_SHADER_BYTECODE HS;
1580 D3D12_SHADER_BYTECODE GS;
1581 D3D12_STREAM_OUTPUT_DESC StreamOutput;
1582 D3D12_BLEND_DESC BlendState;
1583 UINT SampleMask;
1584 D3D12_RASTERIZER_DESC RasterizerState;
1585 D3D12_DEPTH_STENCIL_DESC DepthStencilState;
1586 D3D12_INPUT_LAYOUT_DESC InputLayout;
1587 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
1588 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
1589 UINT NumRenderTargets;
1590 DXGI_FORMAT RTVFormats[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
1591 DXGI_FORMAT DSVFormat;
1592 DXGI_SAMPLE_DESC SampleDesc;
1593 UINT NodeMask;
1594 D3D12_CACHED_PIPELINE_STATE CachedPSO;
1595 D3D12_PIPELINE_STATE_FLAGS Flags;
1596 } D3D12_GRAPHICS_PIPELINE_STATE_DESC;
1598 typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
1600 ID3D12RootSignature *pRootSignature;
1601 D3D12_SHADER_BYTECODE CS;
1602 UINT NodeMask;
1603 D3D12_CACHED_PIPELINE_STATE CachedPSO;
1604 D3D12_PIPELINE_STATE_FLAGS Flags;
1605 } D3D12_COMPUTE_PIPELINE_STATE_DESC;
1607 typedef enum D3D12_COMMAND_LIST_TYPE
1609 D3D12_COMMAND_LIST_TYPE_DIRECT = 0,
1610 D3D12_COMMAND_LIST_TYPE_BUNDLE = 1,
1611 D3D12_COMMAND_LIST_TYPE_COMPUTE = 2,
1612 D3D12_COMMAND_LIST_TYPE_COPY = 3,
1613 } D3D12_COMMAND_LIST_TYPE;
1615 typedef enum D3D12_COMMAND_QUEUE_PRIORITY
1617 D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0,
1618 D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100,
1619 D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000,
1620 } D3D12_COMMAND_QUEUE_PRIORITY;
1622 typedef enum D3D12_COMMAND_QUEUE_FLAGS
1624 D3D12_COMMAND_QUEUE_FLAG_NONE = 0x0,
1625 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1,
1626 } D3D12_COMMAND_QUEUE_FLAGS;
1628 typedef struct D3D12_COMMAND_QUEUE_DESC
1630 D3D12_COMMAND_LIST_TYPE Type;
1631 INT Priority;
1632 D3D12_COMMAND_QUEUE_FLAGS Flags;
1633 UINT NodeMask;
1634 } D3D12_COMMAND_QUEUE_DESC;
1636 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE
1638 UINT NodeIndex;
1639 BOOL TileBasedRenderer;
1640 BOOL UMA;
1641 BOOL CacheCoherentUMA;
1642 } D3D12_FEATURE_DATA_ARCHITECTURE;
1644 typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
1646 DXGI_FORMAT Format;
1647 UINT8 PlaneCount;
1648 } D3D12_FEATURE_DATA_FORMAT_INFO;
1650 typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS
1652 UINT NumFeatureLevels;
1653 const D3D_FEATURE_LEVEL *pFeatureLevelsRequested;
1654 D3D_FEATURE_LEVEL MaxSupportedFeatureLevel;
1655 } D3D12_FEATURE_DATA_FEATURE_LEVELS;
1657 typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
1659 D3D_ROOT_SIGNATURE_VERSION HighestVersion;
1660 } D3D12_FEATURE_DATA_ROOT_SIGNATURE;
1662 typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
1664 UINT MaxGPUVirtualAddressBitsPerResource;
1665 UINT MaxGPUVirtualAddressBitsPerProcess;
1666 } D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT;
1668 typedef enum D3D_SHADER_MODEL
1670 D3D_SHADER_MODEL_5_1 = 0x51,
1671 D3D_SHADER_MODEL_6_0 = 0x60,
1672 } D3D_SHADER_MODEL;
1674 typedef struct D3D12_FEATURE_DATA_SHADER_MODEL
1676 D3D_SHADER_MODEL HighestShaderModel;
1677 } D3D12_FEATURE_DATA_SHADER_MODEL;
1679 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
1681 BOOL WaveOps;
1682 UINT WaveLaneCountMin;
1683 UINT WaveLaneCountMax;
1684 UINT TotalLaneCount;
1685 BOOL ExpandedComputeResourceStates;
1686 BOOL Int64ShaderOps;
1687 } D3D12_FEATURE_DATA_D3D12_OPTIONS1;
1689 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1
1691 UINT NodeIndex;
1692 BOOL TileBasedRenderer;
1693 BOOL UMA;
1694 BOOL CacheCoherentUMA;
1695 BOOL IsolatedMMU;
1696 } D3D12_FEATURE_DATA_ARCHITECTURE1;
1698 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS2
1700 BOOL DepthBoundsTestSupported;
1701 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier;
1702 } D3D12_FEATURE_DATA_D3D12_OPTIONS2;
1704 typedef struct D3D12_FEATURE_DATA_SHADER_CACHE
1706 D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags;
1707 } D3D12_FEATURE_DATA_SHADER_CACHE;
1709 typedef struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
1711 D3D12_COMMAND_LIST_TYPE CommandListType;
1712 UINT Priority;
1713 BOOL PriorityForTypeIsSupported;
1714 } D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY;
1716 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
1718 BOOL CopyQueueTimestampQueriesSupported;
1719 BOOL CastingFullyTypedFormatSupported;
1720 D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags;
1721 D3D12_VIEW_INSTANCING_TIER ViewInstancingTier;
1722 BOOL BarycentricsSupported;
1723 } D3D12_FEATURE_DATA_D3D12_OPTIONS3;
1725 typedef struct D3D12_FEATURE_DATA_EXISTING_HEAPS
1727 BOOL Supported;
1728 } D3D12_FEATURE_DATA_EXISTING_HEAPS;
1730 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS4
1732 BOOL MSAA64KBAlignedTextureSupported;
1733 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER SharedResourceCompatibilityTier;
1734 BOOL Native16BitShaderOpsSupported;
1735 } D3D12_FEATURE_DATA_D3D12_OPTIONS4;
1737 typedef struct D3D12_FEATURE_DATA_SERIALIZATION
1739 UINT NodeIndex;
1740 D3D12_HEAP_SERIALIZATION_TIER HeapSerializationTier;
1741 } D3D12_FEATURE_DATA_SERIALIZATION;
1743 typedef struct D3D12_FEATURE_DATA_CROSS_NODE
1745 D3D12_CROSS_NODE_SHARING_TIER SharingTier;
1746 BOOL AtomicShaderInstructions;
1747 } D3D12_FEATURE_DATA_CROSS_NODE;
1749 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS5
1751 BOOL SRVOnlyTiledResourceTier3;
1752 D3D12_RENDER_PASS_TIER RenderPassesTier;
1753 D3D12_RAYTRACING_TIER RaytracingTier;
1754 } D3D12_FEATURE_DATA_D3D12_OPTIONS5;
1756 typedef enum D3D12_FEATURE
1758 D3D12_FEATURE_D3D12_OPTIONS = 0,
1759 D3D12_FEATURE_ARCHITECTURE = 1,
1760 D3D12_FEATURE_FEATURE_LEVELS = 2,
1761 D3D12_FEATURE_FORMAT_SUPPORT = 3,
1762 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4,
1763 D3D12_FEATURE_FORMAT_INFO = 5,
1764 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6,
1765 D3D12_FEATURE_SHADER_MODEL = 7,
1766 D3D12_FEATURE_D3D12_OPTIONS1 = 8,
1767 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT = 10,
1768 D3D12_FEATURE_ROOT_SIGNATURE = 12,
1769 D3D12_FEATURE_ARCHITECTURE1 = 16,
1770 D3D12_FEATURE_D3D12_OPTIONS2 = 18,
1771 D3D12_FEATURE_SHADER_CACHE = 19,
1772 D3D12_FEATURE_COMMAND_QUEUE_PRIORITY = 20,
1773 D3D12_FEATURE_D3D12_OPTIONS3 = 21,
1774 D3D12_FEATURE_EXISTING_HEAPS = 22,
1775 D3D12_FEATURE_D3D12_OPTIONS4 = 23,
1776 D3D12_FEATURE_SERIALIZATION = 24,
1777 D3D12_FEATURE_CROSS_NODE = 25,
1778 D3D12_FEATURE_D3D12_OPTIONS5 = 27,
1779 D3D12_FEATURE_D3D12_OPTIONS6 = 30,
1780 D3D12_FEATURE_QUERY_META_COMMAND = 31,
1781 D3D12_FEATURE_D3D12_OPTIONS7 = 32,
1782 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT = 33,
1783 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES = 34,
1784 } D3D12_FEATURE;
1786 typedef struct D3D12_MEMCPY_DEST
1788 void *pData;
1789 SIZE_T RowPitch;
1790 SIZE_T SlicePitch;
1791 } D3D12_MEMCPY_DEST;
1793 typedef struct D3D12_SUBRESOURCE_DATA
1795 const void *pData;
1796 LONG_PTR RowPitch;
1797 LONG_PTR SlicePitch;
1798 } D3D12_SUBRESOURCE_DATA;
1800 typedef enum D3D12_MULTIPLE_FENCE_WAIT_FLAGS
1802 D3D12_MULTIPLE_FENCE_WAIT_FLAG_NONE = 0x0,
1803 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY = 0x1,
1804 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ALL = 0x0,
1805 } D3D12_MULTIPLE_FENCE_WAIT_FLAGS;
1806 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_MULTIPLE_FENCE_WAIT_FLAGS);")
1808 typedef enum D3D12_RESIDENCY_PRIORITY
1810 D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
1811 D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
1812 D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
1813 D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
1814 D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000,
1815 } D3D12_RESIDENCY_PRIORITY;
1817 typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
1819 D3D12_GPU_VIRTUAL_ADDRESS Dest;
1820 UINT32 Value;
1821 } D3D12_WRITEBUFFERIMMEDIATE_PARAMETER;
1824 uuid(c4fec28f-7966-4e95-9f94-f431cb56c3b8),
1825 object,
1826 local,
1827 pointer_default(unique)
1829 interface ID3D12Object : IUnknown
1831 HRESULT GetPrivateData(REFGUID guid, UINT *data_size, void *data);
1832 HRESULT SetPrivateData(REFGUID guid, UINT data_size, const void *data);
1833 HRESULT SetPrivateDataInterface(REFGUID guid, const IUnknown *data);
1834 HRESULT SetName(const WCHAR *name);
1838 uuid(905db94b-a00c-4140-9df5-2b64ca9ea357),
1839 object,
1840 local,
1841 pointer_default(unique)
1843 interface ID3D12DeviceChild : ID3D12Object
1845 HRESULT GetDevice(REFIID riid, void **device);
1849 uuid(63ee58fb-1268-4835-86da-f008ce62f0d6),
1850 object,
1851 local,
1852 pointer_default(unique)
1854 interface ID3D12Pageable : ID3D12DeviceChild
1859 uuid(6b3b2502-6e51-45b3-90ee-9884265e8df3),
1860 object,
1861 local,
1862 pointer_default(unique)
1864 interface ID3D12Heap : ID3D12Pageable
1866 D3D12_HEAP_DESC GetDesc();
1870 uuid(696442be-a72e-4059-bc79-5b5c98040fad),
1871 object,
1872 local,
1873 pointer_default(unique)
1875 interface ID3D12Resource : ID3D12Pageable
1877 HRESULT Map(UINT sub_resource, const D3D12_RANGE *read_range, void **data);
1878 void Unmap(UINT sub_resource, const D3D12_RANGE *written_range);
1880 D3D12_RESOURCE_DESC GetDesc();
1882 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress();
1884 HRESULT WriteToSubresource(UINT dst_sub_resource, const D3D12_BOX *dst_box,
1885 const void *src_data, UINT src_row_pitch, UINT src_slice_pitch);
1886 HRESULT ReadFromSubresource(void *dst_data, UINT dst_row_pitch, UINT dst_slice_pitch,
1887 UINT src_sub_resource, const D3D12_BOX *src_box);
1889 HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS *flags);
1893 uuid(7116d91c-e7e4-47ce-b8c6-ec8168f437e5),
1894 object,
1895 local,
1896 pointer_default(unique)
1898 interface ID3D12CommandList : ID3D12DeviceChild
1900 D3D12_COMMAND_LIST_TYPE GetType();
1903 typedef enum D3D12_TILE_COPY_FLAGS
1905 D3D12_TILE_COPY_FLAG_NONE = 0x0,
1906 D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1,
1907 D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
1908 D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
1909 } D3D12_TILE_COPY_FLAGS;
1911 typedef struct D3D12_INDEX_BUFFER_VIEW
1913 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1914 UINT SizeInBytes;
1915 DXGI_FORMAT Format;
1916 } D3D12_INDEX_BUFFER_VIEW;
1918 typedef struct D3D12_VERTEX_BUFFER_VIEW
1920 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1921 UINT SizeInBytes;
1922 UINT StrideInBytes;
1923 } D3D12_VERTEX_BUFFER_VIEW;
1925 typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
1927 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1928 UINT64 SizeInBytes;
1929 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation;
1930 } D3D12_STREAM_OUTPUT_BUFFER_VIEW;
1932 typedef enum D3D12_CLEAR_FLAGS
1934 D3D12_CLEAR_FLAG_DEPTH = 0x1,
1935 D3D12_CLEAR_FLAG_STENCIL = 0x2,
1936 } D3D12_CLEAR_FLAGS;
1937 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_CLEAR_FLAGS);")
1939 typedef struct D3D12_DISCARD_REGION
1941 UINT NumRects;
1942 const D3D12_RECT *pRects;
1943 UINT FirstSubresource;
1944 UINT NumSubresources;
1945 } D3D12_DISCARD_REGION;
1947 typedef enum D3D12_QUERY_TYPE
1949 D3D12_QUERY_TYPE_OCCLUSION = 0,
1950 D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1,
1951 D3D12_QUERY_TYPE_TIMESTAMP = 2,
1952 D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3,
1953 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4,
1954 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5,
1955 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6,
1956 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7,
1957 } D3D12_QUERY_TYPE;
1959 typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
1961 UINT64 IAVertices;
1962 UINT64 IAPrimitives;
1963 UINT64 VSInvocations;
1964 UINT64 GSInvocations;
1965 UINT64 GSPrimitives;
1966 UINT64 CInvocations;
1967 UINT64 CPrimitives;
1968 UINT64 PSInvocations;
1969 UINT64 HSInvocations;
1970 UINT64 DSInvocations;
1971 UINT64 CSInvocations;
1972 } D3D12_QUERY_DATA_PIPELINE_STATISTICS;
1974 typedef struct D3D12_QUERY_DATA_SO_STATISTICS
1976 UINT64 NumPrimitivesWritten;
1977 UINT64 PrimitivesStorageNeeded;
1978 } D3D12_QUERY_DATA_SO_STATISTICS;
1980 typedef enum D3D12_PREDICATION_OP
1982 D3D12_PREDICATION_OP_EQUAL_ZERO = 0,
1983 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1,
1984 } D3D12_PREDICATION_OP;
1987 uuid(8efb471d-616c-4f49-90f7-127bb763fa51),
1988 object,
1989 local,
1990 pointer_default(unique)
1992 interface ID3D12DescriptorHeap : ID3D12Pageable
1994 D3D12_DESCRIPTOR_HEAP_DESC GetDesc();
1996 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart();
1997 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart();
2001 uuid(0d9658ae-ed45-469e-a61d-970ec583cab4),
2002 object,
2003 local,
2004 pointer_default(unique)
2006 interface ID3D12QueryHeap : ID3D12Pageable
2011 uuid(c36a797c-ec80-4f0a-8985-a7b2475082d1),
2012 object,
2013 local,
2014 pointer_default(unique)
2016 interface ID3D12CommandSignature : ID3D12Pageable
2021 uuid(5b160d0f-ac1b-4185-8ba8-b3ae42a5a455),
2022 object,
2023 local,
2024 pointer_default(unique)
2026 interface ID3D12GraphicsCommandList : ID3D12CommandList
2028 HRESULT Close();
2030 HRESULT Reset(ID3D12CommandAllocator *allocator, ID3D12PipelineState *initial_state);
2032 HRESULT ClearState(ID3D12PipelineState *pipeline_state);
2034 void DrawInstanced(UINT vertex_count_per_instance, UINT instance_count,
2035 UINT start_vertex_location, UINT start_instance_location);
2036 void DrawIndexedInstanced(UINT index_count_per_instance, UINT instance_count,
2037 UINT start_vertex_location, INT base_vertex_location, UINT start_instance_location);
2039 void Dispatch(UINT x, UINT u, UINT z);
2041 void CopyBufferRegion(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2042 ID3D12Resource *src_buffer, UINT64 src_offset, UINT64 byte_count);
2043 void CopyTextureRegion(const D3D12_TEXTURE_COPY_LOCATION *dst,
2044 UINT dst_x, UINT dst_y, UINT dst_z,
2045 const D3D12_TEXTURE_COPY_LOCATION *src, const D3D12_BOX *src_box);
2046 void CopyResource(ID3D12Resource *dst_resource, ID3D12Resource *src_resource);
2048 void CopyTiles(ID3D12Resource *tiled_resource,
2049 const D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate,
2050 const D3D12_TILE_REGION_SIZE *tile_region_size,
2051 ID3D12Resource *buffer,
2052 UINT64 buffer_offset,
2053 D3D12_TILE_COPY_FLAGS flags);
2055 void ResolveSubresource(ID3D12Resource *dst_resource, UINT dst_sub_resource,
2056 ID3D12Resource *src_resource, UINT src_sub_resource,
2057 DXGI_FORMAT format);
2059 void IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY primitive_topology);
2061 void RSSetViewports(UINT viewport_count, const D3D12_VIEWPORT *viewports);
2062 void RSSetScissorRects(UINT rect_count, const D3D12_RECT *rects);
2064 void OMSetBlendFactor(const FLOAT blend_factor[4]);
2065 void OMSetStencilRef(UINT stencil_ref);
2067 void SetPipelineState(ID3D12PipelineState *pipeline_state);
2069 void ResourceBarrier(UINT barrier_count, const D3D12_RESOURCE_BARRIER *barriers);
2071 void ExecuteBundle(ID3D12GraphicsCommandList *command_list);
2073 void SetDescriptorHeaps(UINT heap_count, ID3D12DescriptorHeap * const *heaps);
2075 void SetComputeRootSignature(ID3D12RootSignature *root_signature);
2076 void SetGraphicsRootSignature(ID3D12RootSignature *root_signature);
2078 void SetComputeRootDescriptorTable(UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor);
2079 void SetGraphicsRootDescriptorTable(UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor);
2081 void SetComputeRoot32BitConstant(UINT root_parameter_index, UINT data, UINT dst_offset);
2082 void SetGraphicsRoot32BitConstant(UINT root_parameter_index, UINT data, UINT dst_offset);
2084 void SetComputeRoot32BitConstants(UINT root_parameter_index, UINT constant_count, const void *data,
2085 UINT dst_offset);
2086 void SetGraphicsRoot32BitConstants(UINT root_parameter_index, UINT constant_count, const void *data,
2087 UINT dst_offset);
2089 void SetComputeRootConstantBufferView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2090 void SetGraphicsRootConstantBufferView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2092 void SetComputeRootShaderResourceView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2093 void SetGraphicsRootShaderResourceView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2095 void SetComputeRootUnorderedAccessView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2096 void SetGraphicsRootUnorderedAccessView(UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address);
2098 void IASetIndexBuffer(const D3D12_INDEX_BUFFER_VIEW *view);
2099 void IASetVertexBuffers(UINT start_slot, UINT view_count, const D3D12_VERTEX_BUFFER_VIEW *views);
2101 void SOSetTargets(UINT start_slot, UINT view_count, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *views);
2103 void OMSetRenderTargets(UINT render_target_descriptor_count,
2104 const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors,
2105 BOOL single_descriptor_handle,
2106 const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor);
2108 void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE dsv, D3D12_CLEAR_FLAGS flags,
2109 FLOAT depth, UINT8 stencil, UINT rect_count, const D3D12_RECT *rects);
2110 void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE rtv, const FLOAT color[4],
2111 UINT rect_count, const D3D12_RECT *rects);
2112 void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle,
2113 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const UINT values[4],
2114 UINT rect_count, const D3D12_RECT *rects);
2115 void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle,
2116 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource, const float values[4],
2117 UINT rect_count, const D3D12_RECT *rects);
2119 void DiscardResource(ID3D12Resource *resource, const D3D12_DISCARD_REGION *region);
2121 void BeginQuery(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index);
2122 void EndQuery(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index);
2123 void ResolveQueryData(ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type,
2124 UINT start_index, UINT query_count,
2125 ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset);
2127 void SetPredication(ID3D12Resource *buffer, UINT64 aligned_buffer_offset,
2128 D3D12_PREDICATION_OP operation);
2130 void SetMarker(UINT metadata, const void *data, UINT size);
2131 void BeginEvent(UINT metadata, const void *data, UINT size);
2132 void EndEvent();
2134 void ExecuteIndirect(ID3D12CommandSignature *command_signature,
2135 UINT max_command_count, ID3D12Resource *arg_buffer, UINT64 arg_buffer_offset,
2136 ID3D12Resource *count_buffer, UINT64 count_buffer_offset);
2140 uuid(553103fb-1fe7-4557-bb38-946d7d0e7ca7),
2141 object,
2142 local,
2143 pointer_default(unique)
2145 interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
2147 void AtomicCopyBufferUINT(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2148 ID3D12Resource *src_buffer, UINT64 src_offset,
2149 UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
2150 const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges);
2152 void AtomicCopyBufferUINT64(ID3D12Resource *dst_buffer, UINT64 dst_offset,
2153 ID3D12Resource *src_buffer, UINT64 src_offset,
2154 UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
2155 const D3D12_SUBRESOURCE_RANGE_UINT64 *dependent_sub_resource_ranges);
2157 void OMSetDepthBounds(FLOAT min, FLOAT max);
2159 void SetSamplePositions(UINT sample_count, UINT pixel_count,
2160 D3D12_SAMPLE_POSITION *sample_positions);
2162 void ResolveSubresourceRegion(ID3D12Resource *dst_resource,
2163 UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
2164 ID3D12Resource *src_resource, UINT src_sub_resource_idx,
2165 D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode);
2167 void SetViewInstanceMask(UINT mask);
2171 uuid(38c3e585-ff17-412c-9150-4fc6f9d72a28),
2172 object,
2173 local,
2174 pointer_default(unique)
2176 interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
2178 void WriteBufferImmediate(UINT count,
2179 const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
2180 const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes);
2183 typedef enum D3D12_TILE_RANGE_FLAGS
2185 D3D12_TILE_RANGE_FLAG_NONE = 0x0,
2186 D3D12_TILE_RANGE_FLAG_NULL = 0x1,
2187 D3D12_TILE_RANGE_FLAG_SKIP = 0x2,
2188 D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 0x4
2189 } D3D12_TILE_RANGE_FLAGS;
2191 typedef enum D3D12_TILE_MAPPING_FLAGS
2193 D3D12_TILE_MAPPING_FLAG_NONE = 0x0,
2194 D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1,
2195 } D3D12_TILE_MAPPING_FLAGS;
2198 uuid(0ec870a6-5d7e-4c22-8cfc-5baae07616ed),
2199 object,
2200 local,
2201 pointer_default(unique)
2203 interface ID3D12CommandQueue : ID3D12Pageable
2205 void UpdateTileMappings(ID3D12Resource *resource, UINT region_count,
2206 const D3D12_TILED_RESOURCE_COORDINATE *region_start_coordinates,
2207 const D3D12_TILE_REGION_SIZE *region_sizes,
2208 UINT range_count,
2209 const D3D12_TILE_RANGE_FLAGS *range_flags,
2210 UINT *heap_range_offsets,
2211 UINT *range_tile_counts,
2212 D3D12_TILE_MAPPING_FLAGS flags);
2214 void CopyTileMappings(ID3D12Resource *dst_resource,
2215 const D3D12_TILED_RESOURCE_COORDINATE *dst_region_start_coordinate,
2216 ID3D12Resource *src_resource,
2217 const D3D12_TILED_RESOURCE_COORDINATE *src_region_start_coordinate,
2218 const D3D12_TILE_REGION_SIZE *region_size,
2219 D3D12_TILE_MAPPING_FLAGS flags);
2221 void ExecuteCommandLists(UINT command_list_count,
2222 ID3D12CommandList * const * command_lists);
2224 void SetMarker(UINT metadata, const void *data, UINT size);
2225 void BeginEvent(UINT metadata, const void *data, UINT size);
2226 void EndEvent();
2228 HRESULT Signal(ID3D12Fence *fence, UINT64 value);
2229 HRESULT Wait(ID3D12Fence *fence, UINT64 value);
2231 HRESULT GetTimestampFrequency(UINT64 *frequency);
2232 HRESULT GetClockCalibration(UINT64 *gpu_timestamp, UINT64 *cpu_timestamp);
2234 D3D12_COMMAND_QUEUE_DESC GetDesc();
2237 typedef enum D3D12_FENCE_FLAGS
2239 D3D12_FENCE_FLAG_NONE = 0x0,
2240 D3D12_FENCE_FLAG_SHARED = 0x1,
2241 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2,
2242 } D3D12_FENCE_FLAGS;
2244 typedef enum D3D12_QUERY_HEAP_TYPE
2246 D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0,
2247 D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1,
2248 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2,
2249 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3,
2250 } D3D12_QUERY_HEAP_TYPE;
2252 typedef struct D3D12_QUERY_HEAP_DESC
2254 D3D12_QUERY_HEAP_TYPE Type;
2255 UINT Count;
2256 UINT NodeMask;
2257 } D3D12_QUERY_HEAP_DESC;
2259 typedef enum D3D12_INDIRECT_ARGUMENT_TYPE
2261 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW,
2262 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED,
2263 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH,
2264 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW,
2265 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW,
2266 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT,
2267 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW,
2268 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW,
2269 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW,
2270 } D3D12_INDIRECT_ARGUMENT_TYPE;
2272 typedef struct D3D12_INDIRECT_ARGUMENT_DESC
2274 D3D12_INDIRECT_ARGUMENT_TYPE Type;
2275 union
2277 struct
2279 UINT Slot;
2280 } VertexBuffer;
2281 struct
2283 UINT RootParameterIndex;
2284 UINT DestOffsetIn32BitValues;
2285 UINT Num32BitValuesToSet;
2286 } Constant;
2287 struct
2289 UINT RootParameterIndex;
2290 } ConstantBufferView;
2291 struct
2293 UINT RootParameterIndex;
2294 } ShaderResourceView;
2295 struct
2297 UINT RootParameterIndex;
2298 } UnorderedAccessView;
2300 } D3D12_INDIRECT_ARGUMENT_DESC;
2302 typedef struct D3D12_COMMAND_SIGNATURE_DESC
2304 UINT ByteStride;
2305 UINT NumArgumentDescs;
2306 const D3D12_INDIRECT_ARGUMENT_DESC *pArgumentDescs;
2307 UINT NodeMask;
2308 } D3D12_COMMAND_SIGNATURE_DESC;
2311 uuid(c54a6b66-72df-4ee8-8be5-a946a1429214),
2312 object,
2313 local,
2314 pointer_default(unique)
2316 interface ID3D12RootSignature : ID3D12DeviceChild
2321 uuid(765a30f3-f624-4c6f-a828-ace948622445),
2322 object,
2323 local,
2324 pointer_default(unique)
2326 interface ID3D12PipelineState : ID3D12Pageable
2328 HRESULT GetCachedBlob(ID3DBlob **blob);
2332 uuid(0a753dcf-c4d8-4b91-adf6-be5a60d95a76),
2333 object,
2334 local,
2335 pointer_default(unique)
2337 interface ID3D12Fence : ID3D12Pageable
2339 UINT64 GetCompletedValue();
2340 HRESULT SetEventOnCompletion(UINT64 value, HANDLE event);
2341 HRESULT Signal(UINT64 value);
2345 uuid(6102dee4-af59-4b09-b999-b44d73f09b24),
2346 object,
2347 local,
2348 pointer_default(unique)
2350 interface ID3D12CommandAllocator : ID3D12Pageable
2352 HRESULT Reset();
2356 uuid(189819f1-1db6-4b57-be54-1821339b85f7),
2357 object,
2358 local,
2359 pointer_default(unique)
2361 interface ID3D12Device : ID3D12Object
2363 UINT GetNodeCount();
2365 HRESULT CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC *desc,
2366 REFIID riid, void **command_queue);
2367 HRESULT CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type,
2368 REFIID riid, void **command_allocator);
2369 HRESULT CreateGraphicsPipelineState(const D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc,
2370 REFIID riid, void **pipeline_state);
2371 HRESULT CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc,
2372 REFIID riid, void **pipeline_state);
2373 HRESULT CreateCommandList(UINT node_mask,
2374 D3D12_COMMAND_LIST_TYPE type,
2375 ID3D12CommandAllocator *command_allocator,
2376 ID3D12PipelineState *initial_pipeline_state,
2377 REFIID riid, void **command_list);
2379 HRESULT CheckFeatureSupport(D3D12_FEATURE feature,
2380 void *feature_data, UINT feature_data_size);
2382 HRESULT CreateDescriptorHeap(const D3D12_DESCRIPTOR_HEAP_DESC *desc,
2383 REFIID riid, void **descriptor_heap);
2384 UINT GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2386 HRESULT CreateRootSignature(UINT node_mask,
2387 const void *bytecode, SIZE_T bytecode_length,
2388 REFIID riid, void **root_signature);
2390 void CreateConstantBufferView(const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc,
2391 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2392 void CreateShaderResourceView(ID3D12Resource *resource,
2393 const D3D12_SHADER_RESOURCE_VIEW_DESC *desc,
2394 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2395 void CreateUnorderedAccessView(ID3D12Resource *resource, ID3D12Resource *counter_resource,
2396 const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc,
2397 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2398 void CreateRenderTargetView(ID3D12Resource *resource,
2399 const D3D12_RENDER_TARGET_VIEW_DESC *desc,
2400 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2401 void CreateDepthStencilView(ID3D12Resource *resource,
2402 const D3D12_DEPTH_STENCIL_VIEW_DESC *desc,
2403 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2404 void CreateSampler(const D3D12_SAMPLER_DESC *desc,
2405 D3D12_CPU_DESCRIPTOR_HANDLE descriptor);
2407 void CopyDescriptors(UINT dst_descriptor_range_count,
2408 const D3D12_CPU_DESCRIPTOR_HANDLE *dst_descriptor_range_offsets,
2409 const UINT *dst_descriptor_range_sizes,
2410 UINT src_descriptor_range_count,
2411 const D3D12_CPU_DESCRIPTOR_HANDLE *src_descriptor_range_offsets,
2412 const UINT *src_descriptor_range_sizes,
2413 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2414 void CopyDescriptorsSimple(UINT descriptor_count,
2415 const D3D12_CPU_DESCRIPTOR_HANDLE dst_descriptor_range_offset,
2416 const D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_offset,
2417 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type);
2419 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(UINT visible_mask,
2420 UINT reource_desc_count, const D3D12_RESOURCE_DESC *resource_descs);
2422 D3D12_HEAP_PROPERTIES GetCustomHeapProperties(UINT node_mask,
2423 D3D12_HEAP_TYPE heap_type);
2425 HRESULT CreateCommittedResource(const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
2426 const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2427 const D3D12_CLEAR_VALUE *optimized_clear_value,
2428 REFIID riid, void **resource);
2430 HRESULT CreateHeap(const D3D12_HEAP_DESC *desc, REFIID riid, void **heap);
2432 HRESULT CreatePlacedResource(ID3D12Heap *heap, UINT64 heap_offset,
2433 const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2434 const D3D12_CLEAR_VALUE *optimized_clear_value,
2435 REFIID riid, void **resource);
2436 HRESULT CreateReservedResource(const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
2437 const D3D12_CLEAR_VALUE *optimized_clear_value,
2438 REFIID riid, void **resource);
2440 HRESULT CreateSharedHandle(ID3D12DeviceChild *object,
2441 const SECURITY_ATTRIBUTES *attributes, DWORD access,
2442 const WCHAR *name, HANDLE *handle);
2443 HRESULT OpenSharedHandle(HANDLE handle,
2444 REFIID riid, void **object);
2445 HRESULT OpenSharedHandleByName(const WCHAR *name, DWORD access, HANDLE *handle);
2447 HRESULT MakeResident(UINT object_count, ID3D12Pageable * const *objects);
2448 HRESULT Evict(UINT object_count, ID3D12Pageable * const *objects);
2450 HRESULT CreateFence(UINT64 initial_value, D3D12_FENCE_FLAGS flags, REFIID riid, void **fence);
2452 HRESULT GetDeviceRemovedReason();
2454 void GetCopyableFootprints(const D3D12_RESOURCE_DESC *desc,
2455 UINT first_sub_resource,
2456 UINT sub_resource_count,
2457 UINT64 base_offset,
2458 D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts,
2459 UINT *row_count,
2460 UINT64 *row_size,
2461 UINT64 *total_bytes);
2463 HRESULT CreateQueryHeap(const D3D12_QUERY_HEAP_DESC *desc,
2464 REFIID riid, void **heap);
2466 HRESULT SetStablePowerState(BOOL enable);
2468 HRESULT CreateCommandSignature(const D3D12_COMMAND_SIGNATURE_DESC *desc,
2469 ID3D12RootSignature *root_signature,
2470 REFIID riid, void **command_signature);
2472 void GetResourceTiling(ID3D12Resource *resource,
2473 UINT *total_tile_count,
2474 D3D12_PACKED_MIP_INFO *packed_mip_info,
2475 D3D12_TILE_SHAPE *standard_tile_shape,
2476 UINT *sub_resource_tiling_count,
2477 UINT first_sub_resource_tiling,
2478 D3D12_SUBRESOURCE_TILING *sub_resource_tilings);
2480 LUID GetAdapterLuid();
2484 uuid(77acce80-638e-4e65-8895-c1f23386863e),
2485 object,
2486 local,
2487 pointer_default(unique)
2489 interface ID3D12Device1 : ID3D12Device
2491 HRESULT CreatePipelineLibrary(const void *blob, SIZE_T blob_size, REFIID iid, void **lib);
2493 HRESULT SetEventOnMultipleFenceCompletion(ID3D12Fence * const *fences,
2494 const UINT64 *values, UINT fence_count, D3D12_MULTIPLE_FENCE_WAIT_FLAGS flags, HANDLE event);
2496 HRESULT SetResidencyPriority(UINT object_count, ID3D12Pageable * const *objects,
2497 const D3D12_RESIDENCY_PRIORITY *priorities);
2501 uuid(34ab647b-3cc8-46ac-841b-c0965645c046),
2502 object,
2503 local,
2504 pointer_default(unique)
2506 interface ID3D12RootSignatureDeserializer : IUnknown
2508 const D3D12_ROOT_SIGNATURE_DESC *GetRootSignatureDesc();
2512 uuid(7f91ce67-090c-4bb7-b78e-ed8ff2e31da0),
2513 object,
2514 local,
2515 pointer_default(unique)
2517 interface ID3D12VersionedRootSignatureDeserializer : IUnknown
2519 HRESULT GetRootSignatureDescAtVersion(D3D_ROOT_SIGNATURE_VERSION version,
2520 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **desc);
2522 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *GetUnconvertedRootSignatureDesc();
2525 [local] HRESULT __stdcall D3D12CreateRootSignatureDeserializer(
2526 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2528 typedef HRESULT (__stdcall *PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER)(
2529 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2531 [local] HRESULT __stdcall D3D12CreateVersionedRootSignatureDeserializer(
2532 const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
2534 [local] HRESULT __stdcall D3D12SerializeRootSignature(
2535 const D3D12_ROOT_SIGNATURE_DESC *root_signature_desc,
2536 D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob);
2538 typedef HRESULT (__stdcall *PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(
2539 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc, ID3DBlob **blob, ID3DBlob **error_blob);
2541 [local] HRESULT __stdcall D3D12SerializeVersionedRootSignature(
2542 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *root_signature_desc,
2543 ID3DBlob **blob, ID3DBlob **error_blob);
2545 typedef HRESULT (__stdcall *PFN_D3D12_CREATE_DEVICE)(IUnknown *adapter,
2546 D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
2548 [local] HRESULT __stdcall D3D12CreateDevice(IUnknown *adapter,
2549 D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
2551 typedef HRESULT (__stdcall *PFN_D3D12_GET_DEBUG_INTERFACE)(REFIID iid, void **debug);
2553 [local] HRESULT __stdcall D3D12GetDebugInterface(REFIID iid, void **debug);
2555 [local] HRESULT __stdcall D3D12EnableExperimentalFeatures(UINT feature_count,
2556 const IID *iids, void *configurations, UINT *configurations_sizes);