aboutsummaryrefslogtreecommitdiff
path: root/contrib/DirectX-Headers/include/directx/d3d12.idl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/DirectX-Headers/include/directx/d3d12.idl')
-rw-r--r--contrib/DirectX-Headers/include/directx/d3d12.idl5457
1 files changed, 5457 insertions, 0 deletions
diff --git a/contrib/DirectX-Headers/include/directx/d3d12.idl b/contrib/DirectX-Headers/include/directx/d3d12.idl
new file mode 100644
index 0000000..838dea0
--- /dev/null
+++ b/contrib/DirectX-Headers/include/directx/d3d12.idl
@@ -0,0 +1,5457 @@
1/*-------------------------------------------------------------------------------------
2 *
3 * Copyright (c) Microsoft Corporation
4 * Licensed under the MIT license
5 *
6 *-------------------------------------------------------------------------------------*/
7import "OAIdl.idl";
8import "OCIdl.idl";
9
10import "dxgicommon.idl";
11import "dxgiformat.idl";
12
13import "d3dcommon.idl";
14
15cpp_quote("#include <winapifamily.h>")
16
17#pragma region App Family
18cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)")
19
20// NOTE: The following constants are generated from the D3D12 hardware spec. Do not edit these values directly.
21cpp_quote( "#ifndef _D3D12_CONSTANTS" )
22cpp_quote( "#define _D3D12_CONSTANTS" )
23const UINT D3D12_16BIT_INDEX_STRIP_CUT_VALUE = 0xffff;
24const UINT D3D12_32BIT_INDEX_STRIP_CUT_VALUE = 0xffffffff;
25const UINT D3D12_8BIT_INDEX_STRIP_CUT_VALUE = 0xff;
26const UINT D3D12_APPEND_ALIGNED_ELEMENT = 0xffffffff;
27const UINT D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9;
28const UINT D3D12_CLIP_OR_CULL_DISTANCE_COUNT = 8;
29const UINT D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2;
30const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14;
31const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4;
32const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32;
33const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15;
34const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT = 16;
35const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
36const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15;
37const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
38const UINT D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
39const UINT D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64;
40const UINT D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
41const UINT D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1;
42const UINT D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
43const UINT D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
44const UINT D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32;
45const UINT D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1;
46const UINT D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128;
47const UINT D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1;
48const UINT D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1;
49const UINT D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128;
50const UINT D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1;
51const UINT D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16;
52const UINT D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1;
53const UINT D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1;
54const UINT D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT = 16;
55const UINT D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32;
56const UINT D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4;
57const UINT D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32;
58const UINT D3D12_COMMONSHADER_TEMP_REGISTER_COUNT = 4096;
59const UINT D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3;
60const UINT D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3;
61const UINT D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10;
62const INT D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10;
63const INT D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8;
64const UINT D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7;
65const UINT D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256;
66const UINT D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 256;
67const UINT D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = 64;
68const UINT D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 240;
69const UINT D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = 68;
70const UINT D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 224;
71const UINT D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = 72;
72const UINT D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 208;
73const UINT D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = 76;
74const UINT D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 192;
75const UINT D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = 84;
76const UINT D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 176;
77const UINT D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = 92;
78const UINT D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 160;
79const UINT D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = 100;
80const UINT D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 144;
81const UINT D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = 112;
82const UINT D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 128;
83const UINT D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = 128;
84const UINT D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 112;
85const UINT D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = 144;
86const UINT D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 96;
87const UINT D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = 168;
88const UINT D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 80;
89const UINT D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = 204;
90const UINT D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 64;
91const UINT D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = 256;
92const UINT D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 48;
93const UINT D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = 340;
94const UINT D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 32;
95const UINT D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = 512;
96const UINT D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 16;
97const UINT D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = 768;
98const UINT D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = 1;
99const UINT D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = 256;
100const UINT D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = 768;
101const UINT D3D12_CS_4_X_THREAD_GROUP_MAX_X = 768;
102const UINT D3D12_CS_4_X_THREAD_GROUP_MAX_Y = 768;
103const UINT D3D12_CS_4_X_UAV_REGISTER_COUNT = 1;
104const UINT D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = 65535;
105const UINT D3D12_CS_TGSM_REGISTER_COUNT = 8192;
106const UINT D3D12_CS_TGSM_REGISTER_READS_PER_INST = 1;
107const UINT D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = 1;
108const UINT D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = 1;
109const UINT D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS = 3;
110const UINT D3D12_CS_THREADGROUPID_REGISTER_COUNT = 1;
111const UINT D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS = 1;
112const UINT D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT = 1;
113const UINT D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS = 3;
114const UINT D3D12_CS_THREADIDINGROUP_REGISTER_COUNT = 1;
115const UINT D3D12_CS_THREADID_REGISTER_COMPONENTS = 3;
116const UINT D3D12_CS_THREADID_REGISTER_COUNT = 1;
117const UINT D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = 1024;
118const UINT D3D12_CS_THREAD_GROUP_MAX_X = 1024;
119const UINT D3D12_CS_THREAD_GROUP_MAX_Y = 1024;
120const UINT D3D12_CS_THREAD_GROUP_MAX_Z = 64;
121const UINT D3D12_CS_THREAD_GROUP_MIN_X = 1;
122const UINT D3D12_CS_THREAD_GROUP_MIN_Y = 1;
123const UINT D3D12_CS_THREAD_GROUP_MIN_Z = 1;
124const UINT D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = 16384;
125cpp_quote( "#define D3D12_DEFAULT_BLEND_FACTOR_ALPHA ( 1.0f )" )
126cpp_quote( "#define D3D12_DEFAULT_BLEND_FACTOR_BLUE ( 1.0f )" )
127cpp_quote( "#define D3D12_DEFAULT_BLEND_FACTOR_GREEN ( 1.0f )" )
128cpp_quote( "#define D3D12_DEFAULT_BLEND_FACTOR_RED ( 1.0f )" )
129cpp_quote( "#define D3D12_DEFAULT_BORDER_COLOR_COMPONENT ( 0.0f )" )
130const UINT D3D12_DEFAULT_DEPTH_BIAS = 0;
131cpp_quote( "#define D3D12_DEFAULT_DEPTH_BIAS_CLAMP ( 0.0f )" )
132const UINT D3D12_DEFAULT_MAX_ANISOTROPY = 16;
133cpp_quote( "#define D3D12_DEFAULT_MIP_LOD_BIAS ( 0.0f )" )
134const UINT D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 4194304;
135const UINT D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0;
136const UINT D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 65536;
137const UINT D3D12_DEFAULT_SAMPLE_MASK = 0xffffffff;
138const UINT D3D12_DEFAULT_SCISSOR_ENDX = 0;
139const UINT D3D12_DEFAULT_SCISSOR_ENDY = 0;
140const UINT D3D12_DEFAULT_SCISSOR_STARTX = 0;
141const UINT D3D12_DEFAULT_SCISSOR_STARTY = 0;
142cpp_quote( "#define D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS ( 0.0f )" )
143const UINT D3D12_DEFAULT_STENCIL_READ_MASK = 0xff;
144const UINT D3D12_DEFAULT_STENCIL_REFERENCE = 0;
145const UINT D3D12_DEFAULT_STENCIL_WRITE_MASK = 0xff;
146const UINT D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0;
147const UINT D3D12_DEFAULT_VIEWPORT_HEIGHT = 0;
148cpp_quote( "#define D3D12_DEFAULT_VIEWPORT_MAX_DEPTH ( 0.0f )" )
149cpp_quote( "#define D3D12_DEFAULT_VIEWPORT_MIN_DEPTH ( 0.0f )" )
150const UINT D3D12_DEFAULT_VIEWPORT_TOPLEFTX = 0;
151const UINT D3D12_DEFAULT_VIEWPORT_TOPLEFTY = 0;
152const UINT D3D12_DEFAULT_VIEWPORT_WIDTH = 0;
153const UINT D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND = 0xffffffff;
154const UINT D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END = 0xfffffff7;
155const UINT D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff0;
156const UINT D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
157const UINT D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = 4;
158const UINT D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
159const UINT D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = 32;
160const UINT D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
161const UINT D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = 1;
162const UINT D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = 3;
163const UINT D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
164const UINT D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = 1;
165const UINT D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = 2;
166const UINT D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = 1;
167const UINT D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
168const UINT D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
169const UINT D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
170const UINT D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
171const UINT D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
172const UINT D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
173const UINT D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
174const UINT D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
175const UINT D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
176const UINT D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
177const UINT D3D12_DS_OUTPUT_REGISTER_COMPONENTS = 4;
178const UINT D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
179const UINT D3D12_DS_OUTPUT_REGISTER_COUNT = 32;
180cpp_quote( "#define D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP ( 0.6 )" )
181cpp_quote( "#define D3D12_FLOAT32_MAX ( 3.402823466e+38f )" )
182cpp_quote( "#define D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP ( 0.6f )" )
183cpp_quote( "#define D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR ( 2.4f )" )
184cpp_quote( "#define D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR ( 1.0f )" )
185cpp_quote( "#define D3D12_FLOAT_TO_SRGB_OFFSET ( 0.055f )" )
186cpp_quote( "#define D3D12_FLOAT_TO_SRGB_SCALE_1 ( 12.92f )" )
187cpp_quote( "#define D3D12_FLOAT_TO_SRGB_SCALE_2 ( 1.055f )" )
188cpp_quote( "#define D3D12_FLOAT_TO_SRGB_THRESHOLD ( 0.0031308f )" )
189cpp_quote( "#define D3D12_FTOI_INSTRUCTION_MAX_INPUT ( 2147483647.999f )" )
190cpp_quote( "#define D3D12_FTOI_INSTRUCTION_MIN_INPUT ( -2147483648.999f )" )
191cpp_quote( "#define D3D12_FTOU_INSTRUCTION_MAX_INPUT ( 4294967295.999f )" )
192cpp_quote( "#define D3D12_FTOU_INSTRUCTION_MIN_INPUT ( 0.0f )" )
193const UINT D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST = 2;
194const UINT D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS = 1;
195const UINT D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = 1;
196const UINT D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
197const UINT D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = 1;
198const UINT D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1;
199const UINT D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32;
200const UINT D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1;
201const UINT D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2;
202const UINT D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1;
203const UINT D3D12_GS_INPUT_REGISTER_COMPONENTS = 4;
204const UINT D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
205const UINT D3D12_GS_INPUT_REGISTER_COUNT = 32;
206const UINT D3D12_GS_INPUT_REGISTER_READS_PER_INST = 2;
207const UINT D3D12_GS_INPUT_REGISTER_READ_PORTS = 1;
208const UINT D3D12_GS_INPUT_REGISTER_VERTICES = 32;
209const UINT D3D12_GS_MAX_INSTANCE_COUNT = 32;
210const UINT D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = 1024;
211const UINT D3D12_GS_OUTPUT_ELEMENTS = 32;
212const UINT D3D12_GS_OUTPUT_REGISTER_COMPONENTS = 4;
213const UINT D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
214const UINT D3D12_GS_OUTPUT_REGISTER_COUNT = 32;
215const UINT D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = 32;
216const UINT D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = 32;
217const UINT D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS = 4;
218const UINT D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
219const UINT D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
220const UINT D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS = 1;
221const UINT D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xFFFFFFFF;
222const UINT D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = 1;
223const UINT D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
224const UINT D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = 1;
225const UINT D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
226const UINT D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = 1;
227const UINT D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = 1;
228const UINT D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
229const UINT D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = 1;
230const UINT D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
231const UINT D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = 1;
232const UINT D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
233const UINT D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
234const UINT D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
235const UINT D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
236const UINT D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
237const UINT D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xFFFFFFFF;
238cpp_quote( "#define D3D12_HS_MAXTESSFACTOR_LOWER_BOUND ( 1.0f )" )
239cpp_quote( "#define D3D12_HS_MAXTESSFACTOR_UPPER_BOUND ( 64.0f )" )
240const UINT D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
241const UINT D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = 1;
242const UINT D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
243const UINT D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = 1;
244const UINT D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = 2;
245const UINT D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = 1;
246const UINT D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
247const UINT D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
248const UINT D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
249const UINT D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
250const UINT D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
251const UINT D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS = 128;
252const UINT D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0;
253const UINT D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0;
254const UINT D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0;
255const UINT D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1;
256const UINT D3D12_IA_INSTANCE_ID_BIT_COUNT = 32;
257const UINT D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32;
258const UINT D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT = 32;
259const UINT D3D12_IA_PRIMITIVE_ID_BIT_COUNT = 32;
260const UINT D3D12_IA_VERTEX_ID_BIT_COUNT = 32;
261const UINT D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
262const UINT D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
263const UINT D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
264const UINT D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xffffffff;
265const UINT D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xffffffff;
266const UINT D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = 0xffffffff;
267const UINT D3D12_KEEP_UNORDERED_ACCESS_VIEWS = 0xffffffff;
268cpp_quote( "#define D3D12_LINEAR_GAMMA ( 1.0f )" )
269const UINT D3D12_MAJOR_VERSION = 12;
270cpp_quote( "#define D3D12_MAX_BORDER_COLOR_COMPONENT ( 1.0f )" )
271cpp_quote( "#define D3D12_MAX_DEPTH ( 1.0f )" )
272const UINT D3D12_MAX_LIVE_STATIC_SAMPLERS = 2032;
273const UINT D3D12_MAX_MAXANISOTROPY = 16;
274const UINT D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT = 32;
275cpp_quote( "#define D3D12_MAX_POSITION_VALUE ( 3.402823466e+34f )" )
276const UINT D3D12_MAX_ROOT_COST = 64;
277const UINT D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 = 1000000;
278const UINT D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 = 1000000;
279const UINT D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE = 2048;
280const UINT D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17;
281const UINT D3D12_MAX_VIEW_INSTANCE_COUNT = 4;
282const UINT D3D12_MINOR_VERSION = 0;
283cpp_quote( "#define D3D12_MIN_BORDER_COLOR_COMPONENT ( 0.0f )" )
284cpp_quote( "#define D3D12_MIN_DEPTH ( 0.0f )" )
285const UINT D3D12_MIN_MAXANISOTROPY = 0;
286cpp_quote( "#define D3D12_MIP_LOD_BIAS_MAX ( 15.99f )" )
287cpp_quote( "#define D3D12_MIP_LOD_BIAS_MIN ( -16.0f )" )
288const UINT D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT = 8;
289const UINT D3D12_MIP_LOD_RANGE_BIT_COUNT = 8;
290cpp_quote( "#define D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH ( 1.4f )" )
291const UINT D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0;
292const UINT D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff;
293const UINT D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff8;
294const UINT D3D12_PACKED_TILE = 0xffffffff;
295const UINT D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15;
296const UINT D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16;
297const UINT D3D12_PS_CS_UAV_REGISTER_COMPONENTS = 1;
298const UINT D3D12_PS_CS_UAV_REGISTER_COUNT = 8;
299const UINT D3D12_PS_CS_UAV_REGISTER_READS_PER_INST = 1;
300const UINT D3D12_PS_CS_UAV_REGISTER_READ_PORTS = 1;
301const UINT D3D12_PS_FRONTFACING_DEFAULT_VALUE = 0xFFFFFFFF;
302const UINT D3D12_PS_FRONTFACING_FALSE_VALUE = 0x00000000;
303const UINT D3D12_PS_FRONTFACING_TRUE_VALUE = 0xFFFFFFFF;
304const UINT D3D12_PS_INPUT_REGISTER_COMPONENTS = 4;
305const UINT D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
306const UINT D3D12_PS_INPUT_REGISTER_COUNT = 32;
307const UINT D3D12_PS_INPUT_REGISTER_READS_PER_INST = 2;
308const UINT D3D12_PS_INPUT_REGISTER_READ_PORTS = 1;
309cpp_quote( "#define D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.0f )" )
310const UINT D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1;
311const UINT D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32;
312const UINT D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1;
313const UINT D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
314const UINT D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
315const UINT D3D12_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
316const UINT D3D12_PS_OUTPUT_REGISTER_COMPONENTS = 4;
317const UINT D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
318const UINT D3D12_PS_OUTPUT_REGISTER_COUNT = 8;
319cpp_quote( "#define D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT ( 0.5f )" )
320const UINT D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = 16;
321const UINT D3D12_RAYTRACING_AABB_BYTE_ALIGNMENT = 8;
322const UINT D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT = 256;
323const UINT D3D12_RAYTRACING_INSTANCE_DESCS_BYTE_ALIGNMENT = 16;
324const UINT D3D12_RAYTRACING_MAX_ATTRIBUTE_SIZE_IN_BYTES = 32;
325const UINT D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH = 31;
326const UINT D3D12_RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE = 16777216;
327const UINT D3D12_RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE = 16777216;
328const UINT D3D12_RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE = 536870912;
329const UINT D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS = 1073741824;
330const UINT D3D12_RAYTRACING_MAX_SHADER_RECORD_STRIDE = 4096;
331const UINT D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT = 32;
332const UINT D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT = 64;
333const UINT D3D12_RAYTRACING_TRANSFORM3X4_BYTE_ALIGNMENT = 16;
334const UINT D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = 4096;
335const UINT D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27;
336const UINT D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
337const UINT D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = 4096;
338const UINT D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32;
339const UINT D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32;
340const UINT D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 16384;
341const UINT D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024;
342const UINT D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
343const UINT D3D12_REQ_MAXANISOTROPY = 16;
344const UINT D3D12_REQ_MIP_LEVELS = 15;
345const UINT D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048;
346const UINT D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = 4096;
347const UINT D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 16384;
348const UINT D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = 128;
349cpp_quote( "#define D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM ( 0.25f )" )
350const UINT D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM = 2048;
351const UINT D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = 20;
352const UINT D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = 4096;
353const UINT D3D12_REQ_SUBRESOURCES = 30720;
354const UINT D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048;
355const UINT D3D12_REQ_TEXTURE1D_U_DIMENSION = 16384;
356const UINT D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048;
357const UINT D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384;
358const UINT D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048;
359const UINT D3D12_REQ_TEXTURECUBE_DIMENSION = 16384;
360const UINT D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0;
361const UINT D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = 0xffffffff;
362const UINT D3D12_RS_SET_SHADING_RATE_COMBINER_COUNT = 2;
363const UINT D3D12_SDK_VERSION = 4;
364const UINT D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES = 32;
365const UINT D3D12_SHADER_MAJOR_VERSION = 5;
366const UINT D3D12_SHADER_MAX_INSTANCES = 65535;
367const UINT D3D12_SHADER_MAX_INTERFACES = 253;
368const UINT D3D12_SHADER_MAX_INTERFACE_CALL_SITES = 4096;
369const UINT D3D12_SHADER_MAX_TYPES = 65535;
370const UINT D3D12_SHADER_MINOR_VERSION = 1;
371const UINT D3D12_SHIFT_INSTRUCTION_PAD_VALUE = 0;
372const UINT D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5;
373const UINT D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
374const UINT D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 65536;
375const UINT D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 4096;
376const UINT D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
377const UINT D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 512;
378const UINT D3D12_SO_BUFFER_SLOT_COUNT = 4;
379const UINT D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff;
380const UINT D3D12_SO_NO_RASTERIZED_STREAM = 0xffffffff;
381const UINT D3D12_SO_OUTPUT_COMPONENT_COUNT = 128;
382const UINT D3D12_SO_STREAM_COUNT = 4;
383const UINT D3D12_SPEC_DATE_DAY = 14;
384const UINT D3D12_SPEC_DATE_MONTH = 11;
385const UINT D3D12_SPEC_DATE_YEAR = 2014;
386cpp_quote( "#define D3D12_SPEC_VERSION ( 1.16 )" )
387cpp_quote( "#define D3D12_SRGB_GAMMA ( 2.2f )" )
388cpp_quote( "#define D3D12_SRGB_TO_FLOAT_DENOMINATOR_1 ( 12.92f )" )
389cpp_quote( "#define D3D12_SRGB_TO_FLOAT_DENOMINATOR_2 ( 1.055f )" )
390cpp_quote( "#define D3D12_SRGB_TO_FLOAT_EXPONENT ( 2.4f )" )
391cpp_quote( "#define D3D12_SRGB_TO_FLOAT_OFFSET ( 0.055f )" )
392cpp_quote( "#define D3D12_SRGB_TO_FLOAT_THRESHOLD ( 0.04045f )" )
393cpp_quote( "#define D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP ( 0.5f )" )
394const UINT D3D12_STANDARD_COMPONENT_BIT_COUNT = 32;
395const UINT D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64;
396const UINT D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4;
397const UINT D3D12_STANDARD_PIXEL_COMPONENT_COUNT = 128;
398const UINT D3D12_STANDARD_PIXEL_ELEMENT_COUNT = 32;
399const UINT D3D12_STANDARD_VECTOR_SIZE = 4;
400const UINT D3D12_STANDARD_VERTEX_ELEMENT_COUNT = 32;
401const UINT D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64;
402const UINT D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
403const UINT D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT = 8;
404const UINT D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff;
405const UINT D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff0;
406const UINT D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = 64;
407const UINT D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = 64;
408const UINT D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = 63;
409const UINT D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR = 64;
410const UINT D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = 2;
411const UINT D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = 1;
412const UINT D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = 1;
413const UINT D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT = 16;
414const UINT D3D12_TEXTURE_DATA_PITCH_ALIGNMENT = 256;
415const UINT D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT = 512;
416const UINT D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES = 65536;
417const UINT D3D12_TRACKED_WORKLOAD_MAX_INSTANCES = 32;
418const UINT D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT = 4096;
419const UINT D3D12_UAV_SLOT_COUNT = 64;
420const UINT D3D12_UNBOUND_MEMORY_ACCESS_RESULT = 0;
421const UINT D3D12_VIDEO_DECODE_MAX_ARGUMENTS = 10;
422const UINT D3D12_VIDEO_DECODE_MAX_HISTOGRAM_COMPONENTS = 4;
423const UINT D3D12_VIDEO_DECODE_MIN_BITSTREAM_OFFSET_ALIGNMENT = 256;
424const UINT D3D12_VIDEO_DECODE_MIN_HISTOGRAM_OFFSET_ALIGNMENT = 256;
425const UINT D3D12_VIDEO_DECODE_STATUS_MACROBLOCKS_AFFECTED_UNKNOWN = 0xffffffff;
426const UINT D3D12_VIDEO_PROCESS_MAX_FILTERS = 32;
427const UINT D3D12_VIDEO_PROCESS_STEREO_VIEWS = 2;
428const UINT D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15;
429const UINT D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16;
430const UINT D3D12_VIEWPORT_BOUNDS_MAX = 32767;
431const INT D3D12_VIEWPORT_BOUNDS_MIN = -32768;
432const UINT D3D12_VS_INPUT_REGISTER_COMPONENTS = 4;
433const UINT D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
434const UINT D3D12_VS_INPUT_REGISTER_COUNT = 32;
435const UINT D3D12_VS_INPUT_REGISTER_READS_PER_INST = 2;
436const UINT D3D12_VS_INPUT_REGISTER_READ_PORTS = 1;
437const UINT D3D12_VS_OUTPUT_REGISTER_COMPONENTS = 4;
438const UINT D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
439const UINT D3D12_VS_OUTPUT_REGISTER_COUNT = 32;
440const UINT D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10;
441const UINT D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25;
442const UINT D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25;
443cpp_quote( "#endif" )
444
445
446// Forward declarations
447interface ID3D12CommandQueue;
448
449
450typedef UINT64 D3D12_GPU_VIRTUAL_ADDRESS;
451
452typedef enum D3D12_COMMAND_LIST_TYPE
453{
454 D3D12_COMMAND_LIST_TYPE_DIRECT = 0,
455 D3D12_COMMAND_LIST_TYPE_BUNDLE = 1,
456 D3D12_COMMAND_LIST_TYPE_COMPUTE = 2,
457 D3D12_COMMAND_LIST_TYPE_COPY = 3,
458 D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE = 4,
459 D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS = 5,
460 D3D12_COMMAND_LIST_TYPE_VIDEO_ENCODE = 6,
461
462} D3D12_COMMAND_LIST_TYPE;
463
464typedef enum D3D12_COMMAND_QUEUE_FLAGS
465{
466 D3D12_COMMAND_QUEUE_FLAG_NONE = 0x0,
467 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1,
468} D3D12_COMMAND_QUEUE_FLAGS;
469cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_QUEUE_FLAGS );" )
470
471typedef enum D3D12_COMMAND_QUEUE_PRIORITY
472{
473 D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0,
474 D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100,
475 D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME = 10000
476} D3D12_COMMAND_QUEUE_PRIORITY;
477
478typedef struct D3D12_COMMAND_QUEUE_DESC
479{
480 D3D12_COMMAND_LIST_TYPE Type;
481 INT Priority;
482 D3D12_COMMAND_QUEUE_FLAGS Flags;
483 UINT NodeMask;
484} D3D12_COMMAND_QUEUE_DESC;
485
486typedef enum D3D12_PRIMITIVE_TOPOLOGY_TYPE
487{
488 D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0,
489 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1,
490 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2,
491 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3,
492 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4
493} D3D12_PRIMITIVE_TOPOLOGY_TYPE;
494
495typedef enum D3D12_INPUT_CLASSIFICATION
496{
497 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0,
498 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1
499} D3D12_INPUT_CLASSIFICATION;
500
501typedef struct D3D12_INPUT_ELEMENT_DESC
502{
503 LPCSTR SemanticName;
504 UINT SemanticIndex;
505 DXGI_FORMAT Format;
506 UINT InputSlot;
507 UINT AlignedByteOffset;
508 D3D12_INPUT_CLASSIFICATION InputSlotClass;
509 UINT InstanceDataStepRate;
510} D3D12_INPUT_ELEMENT_DESC;
511
512// Keep FILL_MODE values in sync with earlier DX versions (HW consumes values directly).
513typedef enum D3D12_FILL_MODE
514{
515 // 1 was POINT in D3D, unused in D3D12
516 D3D12_FILL_MODE_WIREFRAME = 2,
517 D3D12_FILL_MODE_SOLID = 3
518} D3D12_FILL_MODE;
519
520typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY;
521
522typedef D3D_PRIMITIVE D3D12_PRIMITIVE;
523
524// Keep CULL_MODE values in sync with earlier DX versions (HW consumes values directly).
525typedef enum D3D12_CULL_MODE
526{
527 D3D12_CULL_MODE_NONE = 1,
528 D3D12_CULL_MODE_FRONT = 2,
529 D3D12_CULL_MODE_BACK = 3
530} D3D12_CULL_MODE;
531
532typedef struct D3D12_SO_DECLARATION_ENTRY
533{
534 UINT Stream;
535 LPCSTR SemanticName;
536 UINT SemanticIndex;
537 BYTE StartComponent;
538 BYTE ComponentCount;
539 BYTE OutputSlot;
540} D3D12_SO_DECLARATION_ENTRY;
541
542typedef struct D3D12_VIEWPORT
543{
544 FLOAT TopLeftX;
545 FLOAT TopLeftY;
546 FLOAT Width;
547 FLOAT Height;
548 FLOAT MinDepth;
549 FLOAT MaxDepth;
550} D3D12_VIEWPORT;
551
552
553typedef RECT D3D12_RECT;
554
555
556typedef struct D3D12_BOX
557{
558 UINT left;
559 UINT top;
560 UINT front;
561 UINT right;
562 UINT bottom;
563 UINT back;
564} D3D12_BOX;
565
566
567////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
568//
569// Depth-Stencil State
570//
571////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
572
573// Keep COMPARISON_FUNC values in sync with earlier DX versions (HW consumes values directly).
574typedef enum D3D12_COMPARISON_FUNC
575{
576 D3D12_COMPARISON_FUNC_NEVER = 1,
577 D3D12_COMPARISON_FUNC_LESS = 2,
578 D3D12_COMPARISON_FUNC_EQUAL = 3,
579 D3D12_COMPARISON_FUNC_LESS_EQUAL = 4,
580 D3D12_COMPARISON_FUNC_GREATER = 5,
581 D3D12_COMPARISON_FUNC_NOT_EQUAL = 6,
582 D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7,
583 D3D12_COMPARISON_FUNC_ALWAYS = 8
584} D3D12_COMPARISON_FUNC;
585
586typedef enum D3D12_DEPTH_WRITE_MASK
587{
588 D3D12_DEPTH_WRITE_MASK_ZERO = 0,
589 D3D12_DEPTH_WRITE_MASK_ALL = 1
590} D3D12_DEPTH_WRITE_MASK;
591
592// Keep STENCILOP values in sync with earlier DX versions (HW consumes values directly).
593typedef enum D3D12_STENCIL_OP
594{
595 D3D12_STENCIL_OP_KEEP = 1,
596 D3D12_STENCIL_OP_ZERO = 2,
597 D3D12_STENCIL_OP_REPLACE = 3,
598 D3D12_STENCIL_OP_INCR_SAT = 4,
599 D3D12_STENCIL_OP_DECR_SAT = 5,
600 D3D12_STENCIL_OP_INVERT = 6,
601 D3D12_STENCIL_OP_INCR = 7,
602 D3D12_STENCIL_OP_DECR = 8
603} D3D12_STENCIL_OP;
604
605typedef struct D3D12_DEPTH_STENCILOP_DESC
606{
607 D3D12_STENCIL_OP StencilFailOp;
608 D3D12_STENCIL_OP StencilDepthFailOp;
609 D3D12_STENCIL_OP StencilPassOp;
610 D3D12_COMPARISON_FUNC StencilFunc;
611} D3D12_DEPTH_STENCILOP_DESC;
612
613typedef struct D3D12_DEPTH_STENCIL_DESC
614{
615 BOOL DepthEnable;
616 D3D12_DEPTH_WRITE_MASK DepthWriteMask;
617 D3D12_COMPARISON_FUNC DepthFunc;
618 BOOL StencilEnable;
619 UINT8 StencilReadMask;
620 UINT8 StencilWriteMask;
621 D3D12_DEPTH_STENCILOP_DESC FrontFace;
622 D3D12_DEPTH_STENCILOP_DESC BackFace;
623} D3D12_DEPTH_STENCIL_DESC;
624
625typedef struct D3D12_DEPTH_STENCIL_DESC1
626{
627 BOOL DepthEnable;
628 D3D12_DEPTH_WRITE_MASK DepthWriteMask;
629 D3D12_COMPARISON_FUNC DepthFunc;
630 BOOL StencilEnable;
631 UINT8 StencilReadMask;
632 UINT8 StencilWriteMask;
633 D3D12_DEPTH_STENCILOP_DESC FrontFace;
634 D3D12_DEPTH_STENCILOP_DESC BackFace;
635 BOOL DepthBoundsTestEnable;
636} D3D12_DEPTH_STENCIL_DESC1;
637
638
639////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
640//
641// Blend State
642//
643////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
644
645// Keep BLEND values in sync with earlier DX versions (HW consumes values directly).
646typedef enum D3D12_BLEND
647{
648 D3D12_BLEND_ZERO = 1,
649 D3D12_BLEND_ONE = 2,
650 D3D12_BLEND_SRC_COLOR = 3, // PS output oN.rgb (N is current RT being blended)
651 D3D12_BLEND_INV_SRC_COLOR = 4, // 1.0f - PS output oN.rgb
652 D3D12_BLEND_SRC_ALPHA = 5, // PS output oN.a
653 D3D12_BLEND_INV_SRC_ALPHA = 6, // 1.0f - PS output oN.a
654 D3D12_BLEND_DEST_ALPHA = 7, // RT(N).a (N is current RT being blended)
655 D3D12_BLEND_INV_DEST_ALPHA = 8, // 1.0f - RT(N).a
656 D3D12_BLEND_DEST_COLOR = 9, // RT(N).rgb
657 D3D12_BLEND_INV_DEST_COLOR = 10,// 1.0f - RT(N).rgb
658 D3D12_BLEND_SRC_ALPHA_SAT = 11,// (f,f,f,1), f = min(1 - RT(N).a, oN.a)
659 // 12 reserved (was BOTHSRCALPHA)
660 // 13 reserved (was BOTHSRCALPHA)
661 D3D12_BLEND_BLEND_FACTOR = 14,
662 D3D12_BLEND_INV_BLEND_FACTOR = 15,
663 D3D12_BLEND_SRC1_COLOR = 16, // PS output o1.rgb
664 D3D12_BLEND_INV_SRC1_COLOR = 17, // 1.0f - PS output o1.rgb
665 D3D12_BLEND_SRC1_ALPHA = 18, // PS output o1.a
666 D3D12_BLEND_INV_SRC1_ALPHA = 19, // 1.0f - PS output o1.a
667} D3D12_BLEND;
668
669// Keep BLENDOP values in sync with earlier DX versions (HW consumes values directly).
670typedef enum D3D12_BLEND_OP
671{
672 D3D12_BLEND_OP_ADD = 1,
673 D3D12_BLEND_OP_SUBTRACT = 2,
674 D3D12_BLEND_OP_REV_SUBTRACT = 3,
675 D3D12_BLEND_OP_MIN = 4, // min semantics are like min shader instruction
676 D3D12_BLEND_OP_MAX = 5, // max semantics are like max shader instruction
677} D3D12_BLEND_OP;
678
679typedef enum D3D12_COLOR_WRITE_ENABLE
680{
681 D3D12_COLOR_WRITE_ENABLE_RED = 1,
682 D3D12_COLOR_WRITE_ENABLE_GREEN = 2,
683 D3D12_COLOR_WRITE_ENABLE_BLUE = 4,
684 D3D12_COLOR_WRITE_ENABLE_ALPHA = 8,
685 D3D12_COLOR_WRITE_ENABLE_ALL = (D3D12_COLOR_WRITE_ENABLE_RED|D3D12_COLOR_WRITE_ENABLE_GREEN|
686 D3D12_COLOR_WRITE_ENABLE_BLUE|D3D12_COLOR_WRITE_ENABLE_ALPHA),
687} D3D12_COLOR_WRITE_ENABLE;
688
689typedef enum D3D12_LOGIC_OP
690{
691 // Operation:
692 // (s == PS output, d = RTV contents)
693 D3D12_LOGIC_OP_CLEAR = 0, // 0
694 D3D12_LOGIC_OP_SET, // 1
695 D3D12_LOGIC_OP_COPY, // s
696 D3D12_LOGIC_OP_COPY_INVERTED, // ~s
697 D3D12_LOGIC_OP_NOOP, // d
698 D3D12_LOGIC_OP_INVERT, // ~d
699 D3D12_LOGIC_OP_AND, // s & d
700 D3D12_LOGIC_OP_NAND, // ~(s & d)
701 D3D12_LOGIC_OP_OR, // s | d
702 D3D12_LOGIC_OP_NOR, // ~(s | d)
703 D3D12_LOGIC_OP_XOR, // s ^ d
704 D3D12_LOGIC_OP_EQUIV, // ~(s ^ d)
705 D3D12_LOGIC_OP_AND_REVERSE, // s & ~d
706 D3D12_LOGIC_OP_AND_INVERTED, // ~s & d
707 D3D12_LOGIC_OP_OR_REVERSE, // s | ~d
708 D3D12_LOGIC_OP_OR_INVERTED, // ~s | d
709} D3D12_LOGIC_OP;
710
711typedef struct D3D12_RENDER_TARGET_BLEND_DESC
712{
713 BOOL BlendEnable;
714 BOOL LogicOpEnable; // LogicOpEnable and BlendEnable can't both be true
715 D3D12_BLEND SrcBlend;
716 D3D12_BLEND DestBlend;
717 D3D12_BLEND_OP BlendOp;
718 D3D12_BLEND SrcBlendAlpha;
719 D3D12_BLEND DestBlendAlpha;
720 D3D12_BLEND_OP BlendOpAlpha;
721 D3D12_LOGIC_OP LogicOp; // applies to RGBA
722 UINT8 RenderTargetWriteMask; // D3D12_COLOR_WRITE_ENABLE
723} D3D12_RENDER_TARGET_BLEND_DESC;
724
725typedef struct D3D12_BLEND_DESC
726{
727 BOOL AlphaToCoverageEnable; // relevant to multisample antialiasing only
728 BOOL IndependentBlendEnable; // if FALSE, then replicate the first entry in RenderTarget array to other entries
729 D3D12_RENDER_TARGET_BLEND_DESC RenderTarget[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
730} D3D12_BLEND_DESC;
731
732cpp_quote( "/* Note, the array size for RenderTarget[] above is D3D12_SIMULTANEOUS_RENDERTARGET_COUNT. ")
733cpp_quote( " IDL processing/generation of this header replaces the define; this comment is merely explaining what happened. */" )
734
735
736////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
737//
738// Rasterizer State
739//
740////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
741
742typedef enum D3D12_CONSERVATIVE_RASTERIZATION_MODE
743{
744 D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, // Default
745 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1,
746} D3D12_CONSERVATIVE_RASTERIZATION_MODE;
747
748typedef struct D3D12_RASTERIZER_DESC
749{
750 D3D12_FILL_MODE FillMode;
751 D3D12_CULL_MODE CullMode;
752 BOOL FrontCounterClockwise;
753 INT DepthBias;
754 FLOAT DepthBiasClamp;
755 FLOAT SlopeScaledDepthBias;
756 BOOL DepthClipEnable;
757 BOOL MultisampleEnable;
758 BOOL AntialiasedLineEnable;
759 UINT ForcedSampleCount;
760 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster;
761} D3D12_RASTERIZER_DESC;
762
763////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
764//
765// Pipeline State v1
766//
767////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
768
769[ uuid( c54a6b66-72df-4ee8-8be5-a946a1429214 ), object, local, pointer_default( unique ) ]
770interface ID3D12RootSignature
771 : ID3D12DeviceChild
772{
773}
774
775typedef struct D3D12_SHADER_BYTECODE
776{
777 [annotation("_Field_size_bytes_full_(BytecodeLength)")] const void* pShaderBytecode;
778 SIZE_T BytecodeLength;
779} D3D12_SHADER_BYTECODE;
780
781typedef struct D3D12_STREAM_OUTPUT_DESC
782{
783 [annotation("_Field_size_full_(NumEntries)")] const D3D12_SO_DECLARATION_ENTRY* pSODeclaration;
784 UINT NumEntries;
785 [annotation("_Field_size_full_(NumStrides)")] const UINT* pBufferStrides;
786 UINT NumStrides;
787 UINT RasterizedStream;
788} D3D12_STREAM_OUTPUT_DESC;
789
790typedef struct D3D12_INPUT_LAYOUT_DESC
791{
792 [annotation("_Field_size_full_(NumElements)")] const D3D12_INPUT_ELEMENT_DESC* pInputElementDescs;
793 UINT NumElements;
794} D3D12_INPUT_LAYOUT_DESC;
795
796typedef enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
797{
798 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0,
799 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1,
800 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2
801} D3D12_INDEX_BUFFER_STRIP_CUT_VALUE;
802
803typedef struct D3D12_CACHED_PIPELINE_STATE
804{
805 [annotation("_Field_size_bytes_full_(CachedBlobSizeInBytes)")] const void* pCachedBlob;
806 SIZE_T CachedBlobSizeInBytes;
807} D3D12_CACHED_PIPELINE_STATE;
808
809typedef enum D3D12_PIPELINE_STATE_FLAGS
810{
811 D3D12_PIPELINE_STATE_FLAG_NONE = 0x0,
812 D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1,
813
814} D3D12_PIPELINE_STATE_FLAGS;
815cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_PIPELINE_STATE_FLAGS );" )
816
817typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
818{
819 ID3D12RootSignature* pRootSignature;
820 D3D12_SHADER_BYTECODE VS;
821 D3D12_SHADER_BYTECODE PS;
822 D3D12_SHADER_BYTECODE DS;
823 D3D12_SHADER_BYTECODE HS;
824 D3D12_SHADER_BYTECODE GS;
825 D3D12_STREAM_OUTPUT_DESC StreamOutput;
826 D3D12_BLEND_DESC BlendState;
827 UINT SampleMask;
828 D3D12_RASTERIZER_DESC RasterizerState;
829 D3D12_DEPTH_STENCIL_DESC DepthStencilState;
830 D3D12_INPUT_LAYOUT_DESC InputLayout;
831 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue;
832 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
833 UINT NumRenderTargets;
834 DXGI_FORMAT RTVFormats[ D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT ];
835 DXGI_FORMAT DSVFormat;
836 DXGI_SAMPLE_DESC SampleDesc;
837 UINT NodeMask;
838 D3D12_CACHED_PIPELINE_STATE CachedPSO;
839 D3D12_PIPELINE_STATE_FLAGS Flags;
840} D3D12_GRAPHICS_PIPELINE_STATE_DESC;
841
842typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
843{
844 ID3D12RootSignature* pRootSignature;
845 D3D12_SHADER_BYTECODE CS;
846 UINT NodeMask;
847 D3D12_CACHED_PIPELINE_STATE CachedPSO;
848 D3D12_PIPELINE_STATE_FLAGS Flags;
849} D3D12_COMPUTE_PIPELINE_STATE_DESC;
850
851////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
852//
853// Pipeline State v2
854//
855////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
856
857struct D3D12_RT_FORMAT_ARRAY
858{
859 DXGI_FORMAT RTFormats[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
860 UINT NumRenderTargets;
861};
862
863typedef struct D3D12_PIPELINE_STATE_STREAM_DESC
864{
865 [annotation("_In_")] SIZE_T SizeInBytes;
866 [annotation("_In_reads_(_Inexpressible_(\"Dependent on size of subobjects\"))")] void* pPipelineStateSubobjectStream;
867} D3D12_PIPELINE_STATE_STREAM_DESC;
868
869typedef enum D3D12_PIPELINE_STATE_SUBOBJECT_TYPE
870{
871 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE, // ID3D12RootSignature*
872 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS, // D3D12_SHADER_BYTECODE
873 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS, // D3D12_SHADER_BYTECODE
874 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS, // D3D12_SHADER_BYTECODE
875 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS, // D3D12_SHADER_BYTECODE
876 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS, // D3D12_SHADER_BYTECODE
877 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS, // D3D12_SHADER_BYTECODE
878 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT, // D3D12_STREAM_OUTPUT_DESC
879 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND, // D3D12_BLEND_DESC
880 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK, // UINT
881 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER, // D3D12_RASTERIZER_DESC
882 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL, // D3D12_DEPTH_STENCIL_DESC
883 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT, // D3D12_INPUT_LAYOUT_DESC
884 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE, // D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
885 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY, // D3D12_PRIMITIVE_TOPOLOGY_TYPE
886 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS, // D3D12_RT_FORMAT_ARRAY
887 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT, // DXGI_FORMAT
888 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC, // DXGI_SAMPLE_DESC
889 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK, // UINT
890 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO, // D3D12_CACHED_PIPELINE_STATE
891 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS, // D3D12_PIPELINE_STATE_FLAGS
892 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1, // D3D12_DEPTH_STENCIL_DESC1
893 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING, // D3D12_VIEW_INSTANCING_DESC
894 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_AS = 24, // D3D12_SHADER_BYTECODE
895 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS = 25, // D3D12_SHADER_BYTECODE
896 D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID,
897} D3D12_PIPELINE_STATE_SUBOBJECT_TYPE;
898
899////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
900//
901// D3D12 Caps
902//
903////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
904
905typedef enum D3D12_FEATURE
906{
907 D3D12_FEATURE_D3D12_OPTIONS = 0,
908 D3D12_FEATURE_ARCHITECTURE = 1, // Deprecated by D3D12_FEATURE_ARCHITECTURE1
909 D3D12_FEATURE_FEATURE_LEVELS = 2,
910 D3D12_FEATURE_FORMAT_SUPPORT = 3,
911 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4,
912 D3D12_FEATURE_FORMAT_INFO = 5,
913 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6,
914 D3D12_FEATURE_SHADER_MODEL = 7,
915 D3D12_FEATURE_D3D12_OPTIONS1 = 8,
916 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT = 10,
917 D3D12_FEATURE_ROOT_SIGNATURE = 12,
918 D3D12_FEATURE_ARCHITECTURE1 = 16,
919 D3D12_FEATURE_D3D12_OPTIONS2 = 18,
920 D3D12_FEATURE_SHADER_CACHE = 19,
921 D3D12_FEATURE_COMMAND_QUEUE_PRIORITY = 20,
922 D3D12_FEATURE_D3D12_OPTIONS3 = 21,
923 D3D12_FEATURE_EXISTING_HEAPS = 22,
924 D3D12_FEATURE_D3D12_OPTIONS4 = 23,
925 D3D12_FEATURE_SERIALIZATION = 24,
926 D3D12_FEATURE_CROSS_NODE = 25,
927 D3D12_FEATURE_D3D12_OPTIONS5 = 27,
928 D3D12_FEATURE_DISPLAYABLE = 28,
929 D3D12_FEATURE_D3D12_OPTIONS6 = 30,
930 D3D12_FEATURE_QUERY_META_COMMAND = 31,
931 D3D12_FEATURE_D3D12_OPTIONS7 = 32,
932 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT = 33,
933 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES = 34,
934 D3D12_FEATURE_D3D12_OPTIONS8 = 36,
935 D3D12_FEATURE_D3D12_OPTIONS9 = 37,
936 D3D12_FEATURE_D3D12_OPTIONS10 = 39,
937 D3D12_FEATURE_D3D12_OPTIONS11 = 40,
938} D3D12_FEATURE;
939
940typedef enum D3D12_SHADER_MIN_PRECISION_SUPPORT
941{
942 D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0x0,
943 D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1,
944 D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2
945} D3D12_SHADER_MIN_PRECISION_SUPPORT;
946cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_MIN_PRECISION_SUPPORT );" )
947
948typedef enum D3D12_TILED_RESOURCES_TIER
949{
950 D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0,
951 D3D12_TILED_RESOURCES_TIER_1 = 1,
952 D3D12_TILED_RESOURCES_TIER_2 = 2,
953 D3D12_TILED_RESOURCES_TIER_3 = 3,
954 D3D12_TILED_RESOURCES_TIER_4 = 4,
955} D3D12_TILED_RESOURCES_TIER;
956
957typedef enum D3D12_RESOURCE_BINDING_TIER
958{
959 D3D12_RESOURCE_BINDING_TIER_1 = 1,
960 D3D12_RESOURCE_BINDING_TIER_2 = 2,
961 D3D12_RESOURCE_BINDING_TIER_3 = 3,
962} D3D12_RESOURCE_BINDING_TIER;
963
964typedef enum D3D12_CONSERVATIVE_RASTERIZATION_TIER {
965 D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0,
966 D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1,
967 D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2,
968 D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3,
969} D3D12_CONSERVATIVE_RASTERIZATION_TIER;
970
971
972typedef enum D3D12_FORMAT_SUPPORT1
973{
974 D3D12_FORMAT_SUPPORT1_NONE = 0,
975 D3D12_FORMAT_SUPPORT1_BUFFER = 0x00000001,
976 D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x00000002,
977 D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x00000004,
978 D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x00000008,
979 D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x00000010,
980 D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x00000020,
981 D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x00000040,
982 D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x00000080,
983 D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x00000100,
984 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x00000200,
985 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x00000400,
986 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x00000800,
987 D3D12_FORMAT_SUPPORT1_MIP = 0x00001000,
988 D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x00004000,
989 D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x00008000,
990 D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x00010000,
991 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x00040000,
992 D3D12_FORMAT_SUPPORT1_DISPLAY = 0x00080000,
993 D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x00100000,
994 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x00200000,
995 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x00400000,
996 D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x00800000,
997 D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x01000000,
998 D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x02000000,
999 D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x04000000,
1000 D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x08000000,
1001 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000,
1002 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000,
1003 D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000,
1004} D3D12_FORMAT_SUPPORT1;
1005cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_FORMAT_SUPPORT1 );" )
1006
1007typedef enum D3D12_FORMAT_SUPPORT2
1008{
1009 D3D12_FORMAT_SUPPORT2_NONE = 0,
1010 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x00000001,
1011 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x00000002,
1012 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x00000004,
1013 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x00000008,
1014 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x00000010,
1015 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x00000020,
1016 D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x00000040,
1017 D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x00000080,
1018 D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x00000100,
1019 D3D12_FORMAT_SUPPORT2_TILED = 0x00000200,
1020 D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x00004000,
1021 D3D12_FORMAT_SUPPORT2_SAMPLER_FEEDBACK = 0x00008000,
1022} D3D12_FORMAT_SUPPORT2;
1023cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_FORMAT_SUPPORT2 );" )
1024
1025typedef enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS
1026{
1027 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0,
1028 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x00000001,
1029} D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS;
1030cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS );" )
1031
1032typedef enum D3D12_CROSS_NODE_SHARING_TIER
1033{
1034 D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0,
1035 D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1,
1036 D3D12_CROSS_NODE_SHARING_TIER_1 = 2,
1037 D3D12_CROSS_NODE_SHARING_TIER_2 = 3,
1038 D3D12_CROSS_NODE_SHARING_TIER_3 = 4,
1039} D3D12_CROSS_NODE_SHARING_TIER;
1040
1041typedef enum D3D12_RESOURCE_HEAP_TIER
1042{
1043 D3D12_RESOURCE_HEAP_TIER_1 = 1,
1044 D3D12_RESOURCE_HEAP_TIER_2 = 2,
1045} D3D12_RESOURCE_HEAP_TIER;
1046
1047typedef enum D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER
1048{
1049 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED = 0,
1050 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_1 = 1,
1051 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_2 = 2,
1052} D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER;
1053
1054typedef enum D3D12_VIEW_INSTANCING_TIER
1055{
1056 D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED = 0,
1057 D3D12_VIEW_INSTANCING_TIER_1 = 1,
1058 D3D12_VIEW_INSTANCING_TIER_2 = 2,
1059 D3D12_VIEW_INSTANCING_TIER_3 = 3,
1060} D3D12_VIEW_INSTANCING_TIER;
1061
1062// D3D12_FEATURE_D3D12_OPTIONS
1063typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS
1064{
1065 [annotation("_Out_")] BOOL DoublePrecisionFloatShaderOps;
1066 [annotation("_Out_")] BOOL OutputMergerLogicOp;
1067 [annotation("_Out_")] D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport;
1068 [annotation("_Out_")] D3D12_TILED_RESOURCES_TIER TiledResourcesTier;
1069 [annotation("_Out_")] D3D12_RESOURCE_BINDING_TIER ResourceBindingTier;
1070 [annotation("_Out_")] BOOL PSSpecifiedStencilRefSupported;
1071 [annotation("_Out_")] BOOL TypedUAVLoadAdditionalFormats;
1072 [annotation("_Out_")] BOOL ROVsSupported;
1073 [annotation("_Out_")] D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier;
1074 [annotation("_Out_")] UINT MaxGPUVirtualAddressBitsPerResource;
1075 [annotation("_Out_")] BOOL StandardSwizzle64KBSupported;
1076 [annotation("_Out_")] D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier;
1077 [annotation("_Out_")] BOOL CrossAdapterRowMajorTextureSupported;
1078 [annotation("_Out_")] BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation;
1079 [annotation("_Out_")] D3D12_RESOURCE_HEAP_TIER ResourceHeapTier;
1080} D3D12_FEATURE_DATA_D3D12_OPTIONS;
1081
1082// D3D12_FEATURE_D3D12_OPTIONS1
1083typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
1084{
1085 [annotation("_Out_")] BOOL WaveOps;
1086 [annotation("_Out_")] UINT WaveLaneCountMin;
1087 [annotation("_Out_")] UINT WaveLaneCountMax;
1088 [annotation("_Out_")] UINT TotalLaneCount;
1089 [annotation("_Out_")] BOOL ExpandedComputeResourceStates;
1090 [annotation("_Out_")] BOOL Int64ShaderOps;
1091} D3D12_FEATURE_DATA_D3D12_OPTIONS1;
1092
1093// D3D12_FEATURE_D3D12_OPTIONS2
1094typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS2
1095{
1096 [annotation("_Out_")] BOOL DepthBoundsTestSupported;
1097 [annotation("_Out_")] D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier;
1098} D3D12_FEATURE_DATA_D3D12_OPTIONS2;
1099
1100// D3D12_FEATURE_ROOT_SIGNATURE
1101typedef enum D3D_ROOT_SIGNATURE_VERSION
1102{
1103 D3D_ROOT_SIGNATURE_VERSION_1 = 0x1,
1104 D3D_ROOT_SIGNATURE_VERSION_1_0 = 0x1,
1105 D3D_ROOT_SIGNATURE_VERSION_1_1 = 0x2,
1106} D3D_ROOT_SIGNATURE_VERSION;
1107
1108typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
1109{
1110 [annotation("_Inout_")] D3D_ROOT_SIGNATURE_VERSION HighestVersion;
1111} D3D12_FEATURE_DATA_ROOT_SIGNATURE;
1112
1113// D3D12_FEATURE_ARCHITECTURE
1114typedef struct D3D12_FEATURE_DATA_ARCHITECTURE // Deprecated by D3D12_FEATURE_DATA_ARCHITECTURE1
1115{
1116 [annotation("_In_")] UINT NodeIndex;
1117 [annotation("_Out_")] BOOL TileBasedRenderer;
1118 [annotation("_Out_")] BOOL UMA; // Needed for applications to understand WRITE_COMBINE
1119 [annotation("_Out_")] BOOL CacheCoherentUMA; // Only TRUE when UMA is also TRUE
1120} D3D12_FEATURE_DATA_ARCHITECTURE;
1121
1122// D3D12_FEATURE_ARCHITECTURE1
1123typedef struct D3D12_FEATURE_DATA_ARCHITECTURE1
1124{
1125 [annotation("_In_")] UINT NodeIndex;
1126 [annotation("_Out_")] BOOL TileBasedRenderer;
1127 [annotation("_Out_")] BOOL UMA; // Needed for applications to understand WRITE_COMBINE
1128 [annotation("_Out_")] BOOL CacheCoherentUMA; // Only TRUE when UMA is also TRUE
1129 [annotation("_Out_")] BOOL IsolatedMMU; // GPU accesses don't honor the same MMU functionality as the CPU
1130} D3D12_FEATURE_DATA_ARCHITECTURE1;
1131
1132// D3D12_FEATURE_FEATURE_LEVELS
1133typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS
1134{
1135 [annotation("_In_")] UINT NumFeatureLevels;
1136 [annotation("_In_reads_(NumFeatureLevels)")] const D3D_FEATURE_LEVEL* pFeatureLevelsRequested;
1137 [annotation("_Out_")] D3D_FEATURE_LEVEL MaxSupportedFeatureLevel;
1138} D3D12_FEATURE_DATA_FEATURE_LEVELS;
1139
1140// D3D_SHADER_MODEL
1141typedef enum D3D_SHADER_MODEL
1142{
1143 D3D_SHADER_MODEL_5_1 = 0x51,
1144 D3D_SHADER_MODEL_6_0 = 0x60,
1145 D3D_SHADER_MODEL_6_1 = 0x61,
1146 D3D_SHADER_MODEL_6_2 = 0x62,
1147 D3D_SHADER_MODEL_6_3 = 0x63,
1148 D3D_SHADER_MODEL_6_4 = 0x64,
1149 D3D_SHADER_MODEL_6_5 = 0x65,
1150 D3D_SHADER_MODEL_6_6 = 0x66,
1151 D3D_SHADER_MODEL_6_7 = 0x67,
1152} D3D_SHADER_MODEL;
1153
1154typedef struct D3D12_FEATURE_DATA_SHADER_MODEL
1155{
1156 [annotation("_Inout_")] D3D_SHADER_MODEL HighestShaderModel;
1157} D3D12_FEATURE_DATA_SHADER_MODEL;
1158
1159// D3D12_FEATURE_FORMAT_SUPPORT
1160typedef struct D3D12_FEATURE_DATA_FORMAT_SUPPORT
1161{
1162 [annotation("_In_")] DXGI_FORMAT Format;
1163 [annotation("_Out_")] D3D12_FORMAT_SUPPORT1 Support1;
1164 [annotation("_Out_")] D3D12_FORMAT_SUPPORT2 Support2;
1165} D3D12_FEATURE_DATA_FORMAT_SUPPORT;
1166
1167// D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS
1168typedef struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS
1169{
1170 [annotation("_In_")] DXGI_FORMAT Format;
1171 [annotation("_In_")] UINT SampleCount;
1172 [annotation("_In_")] D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags;
1173 [annotation("_Out_")] UINT NumQualityLevels;
1174} D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS;
1175
1176// D3D12_FEATURE_FORMAT_INFO
1177typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
1178{
1179 DXGI_FORMAT Format;
1180 UINT8 PlaneCount;
1181} D3D12_FEATURE_DATA_FORMAT_INFO;
1182
1183// D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT
1184typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
1185{
1186 UINT MaxGPUVirtualAddressBitsPerResource;
1187 UINT MaxGPUVirtualAddressBitsPerProcess;
1188} D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT;
1189
1190
1191typedef enum D3D12_SHADER_CACHE_SUPPORT_FLAGS
1192{
1193 D3D12_SHADER_CACHE_SUPPORT_NONE = 0x0,
1194 D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO = 0x1, // Always supported
1195 D3D12_SHADER_CACHE_SUPPORT_LIBRARY = 0x2,
1196 D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE = 0x4,
1197 D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE = 0x8,
1198 D3D12_SHADER_CACHE_SUPPORT_DRIVER_MANAGED_CACHE = 0x10,
1199 D3D12_SHADER_CACHE_SUPPORT_SHADER_CONTROL_CLEAR = 0x20,
1200 D3D12_SHADER_CACHE_SUPPORT_SHADER_SESSION_DELETE = 0x40
1201} D3D12_SHADER_CACHE_SUPPORT_FLAGS;
1202cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_CACHE_SUPPORT_FLAGS );" )
1203
1204// D3D12_FEATURE_SHADER_CACHE
1205typedef struct D3D12_FEATURE_DATA_SHADER_CACHE
1206{
1207 [annotation("_Out_")] D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags;
1208} D3D12_FEATURE_DATA_SHADER_CACHE;
1209
1210// D3D12_FEATURE_COMMAND_QUEUE_PRIORITY
1211typedef struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
1212{
1213 [annotation("_In_")] D3D12_COMMAND_LIST_TYPE CommandListType;
1214 [annotation("_In_")] UINT Priority;
1215 [annotation("_Out_")] BOOL PriorityForTypeIsSupported;
1216} D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY;
1217
1218typedef enum D3D12_COMMAND_LIST_SUPPORT_FLAGS
1219{
1220 D3D12_COMMAND_LIST_SUPPORT_FLAG_NONE = 0x00000000,
1221 D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT = 1 << D3D12_COMMAND_LIST_TYPE_DIRECT,
1222 D3D12_COMMAND_LIST_SUPPORT_FLAG_BUNDLE = 1 << D3D12_COMMAND_LIST_TYPE_BUNDLE,
1223 D3D12_COMMAND_LIST_SUPPORT_FLAG_COMPUTE = 1 << D3D12_COMMAND_LIST_TYPE_COMPUTE,
1224 D3D12_COMMAND_LIST_SUPPORT_FLAG_COPY = 1 << D3D12_COMMAND_LIST_TYPE_COPY,
1225 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_DECODE = 1 << D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE,
1226 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_PROCESS = 1 << D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS,
1227 D3D12_COMMAND_LIST_SUPPORT_FLAG_VIDEO_ENCODE = 1 << D3D12_COMMAND_LIST_TYPE_VIDEO_ENCODE,
1228
1229} D3D12_COMMAND_LIST_SUPPORT_FLAGS;
1230cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_LIST_SUPPORT_FLAGS );")
1231
1232// D3D12_FEATURE_D3D12_OPTIONS3
1233typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS3
1234{
1235 [annotation("_Out_")] BOOL CopyQueueTimestampQueriesSupported;
1236 [annotation("_Out_")] BOOL CastingFullyTypedFormatSupported;
1237 [annotation("_Out_")] D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags;
1238 [annotation("_Out_")] D3D12_VIEW_INSTANCING_TIER ViewInstancingTier;
1239 [annotation("_Out_")] BOOL BarycentricsSupported;
1240} D3D12_FEATURE_DATA_D3D12_OPTIONS3;
1241
1242// D3D12_FEATURE_EXISTING_HEAPS
1243typedef struct D3D12_FEATURE_DATA_EXISTING_HEAPS
1244{
1245 [annotation("_Out_")] BOOL Supported;
1246} D3D12_FEATURE_DATA_EXISTING_HEAPS;
1247
1248typedef enum D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER
1249{
1250 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0,
1251 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_1,
1252 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_2,
1253 D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_3,
1254} D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER;
1255
1256typedef struct D3D12_FEATURE_DATA_DISPLAYABLE
1257{
1258 [annotation("_Out_")] BOOL DisplayableTexture;
1259 [annotation("_Out_")] D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER SharedResourceCompatibilityTier;
1260} D3D12_FEATURE_DATA_DISPLAYABLE;
1261
1262// D3D12_FEATURE_D3D12_OPTIONS4
1263typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS4
1264{
1265 [annotation("_Out_")] BOOL MSAA64KBAlignedTextureSupported;
1266 [annotation("_Out_")] D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER SharedResourceCompatibilityTier;
1267 [annotation("_Out_")] BOOL Native16BitShaderOpsSupported;
1268} D3D12_FEATURE_DATA_D3D12_OPTIONS4;
1269
1270typedef enum D3D12_HEAP_SERIALIZATION_TIER
1271{
1272 D3D12_HEAP_SERIALIZATION_TIER_0 = 0,
1273 D3D12_HEAP_SERIALIZATION_TIER_10 = 10,
1274} D3D12_HEAP_SERIALIZATION_TIER;
1275
1276// D3D12_FEATURE_SERIALIZATION
1277typedef struct D3D12_FEATURE_DATA_SERIALIZATION
1278{
1279 [annotation("_In_")] UINT NodeIndex;
1280 [annotation("_Out_")] D3D12_HEAP_SERIALIZATION_TIER HeapSerializationTier;
1281} D3D12_FEATURE_DATA_SERIALIZATION;
1282
1283// D3D12_FEATURE_CROSS_NODE
1284typedef struct D3D12_FEATURE_DATA_CROSS_NODE
1285{
1286 D3D12_CROSS_NODE_SHARING_TIER SharingTier;
1287 BOOL AtomicShaderInstructions;
1288} D3D12_FEATURE_DATA_CROSS_NODE;
1289
1290
1291typedef enum D3D12_RENDER_PASS_TIER
1292{
1293 D3D12_RENDER_PASS_TIER_0 = 0,
1294 D3D12_RENDER_PASS_TIER_1 = 1,
1295 D3D12_RENDER_PASS_TIER_2 = 2,
1296
1297
1298} D3D12_RENDER_PASS_TIER;
1299
1300typedef enum D3D12_RAYTRACING_TIER
1301{
1302 D3D12_RAYTRACING_TIER_NOT_SUPPORTED = 0,
1303 D3D12_RAYTRACING_TIER_1_0 = 10,
1304 D3D12_RAYTRACING_TIER_1_1 = 11,
1305} D3D12_RAYTRACING_TIER;
1306
1307// D3D12_FEATURE_D3D12_OPTIONS5
1308typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS5
1309{
1310 [annotation("_Out_")] BOOL SRVOnlyTiledResourceTier3;
1311 [annotation("_Out_")] D3D12_RENDER_PASS_TIER RenderPassesTier;
1312 [annotation("_Out_")] D3D12_RAYTRACING_TIER RaytracingTier;
1313} D3D12_FEATURE_DATA_D3D12_OPTIONS5;
1314
1315typedef enum D3D12_VARIABLE_SHADING_RATE_TIER
1316{
1317 D3D12_VARIABLE_SHADING_RATE_TIER_NOT_SUPPORTED = 0,
1318 D3D12_VARIABLE_SHADING_RATE_TIER_1 = 1,
1319 D3D12_VARIABLE_SHADING_RATE_TIER_2 = 2,
1320} D3D12_VARIABLE_SHADING_RATE_TIER;
1321
1322// D3D12_FEATURE_D3D12_OPTIONS6
1323typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS6
1324{
1325 [annotation("_Out_")] BOOL AdditionalShadingRatesSupported;
1326 [annotation("_Out_")] BOOL PerPrimitiveShadingRateSupportedWithViewportIndexing;
1327 [annotation("_Out_")] D3D12_VARIABLE_SHADING_RATE_TIER VariableShadingRateTier;
1328 [annotation("_Out_")] UINT ShadingRateImageTileSize;
1329 [annotation("_Out_")] BOOL BackgroundProcessingSupported;
1330} D3D12_FEATURE_DATA_D3D12_OPTIONS6;
1331
1332typedef enum D3D12_MESH_SHADER_TIER
1333{
1334 D3D12_MESH_SHADER_TIER_NOT_SUPPORTED = 0,
1335 D3D12_MESH_SHADER_TIER_1 = 10,
1336} D3D12_MESH_SHADER_TIER;
1337
1338typedef enum D3D12_SAMPLER_FEEDBACK_TIER
1339{
1340 D3D12_SAMPLER_FEEDBACK_TIER_NOT_SUPPORTED = 0,
1341 D3D12_SAMPLER_FEEDBACK_TIER_0_9 = 90,
1342 D3D12_SAMPLER_FEEDBACK_TIER_1_0 = 100
1343} D3D12_SAMPLER_FEEDBACK_TIER;
1344
1345// D3D12_FEATURE_D3D12_OPTIONS7
1346typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS7
1347{
1348 [annotation("_Out_")] D3D12_MESH_SHADER_TIER MeshShaderTier;
1349 [annotation("_Out_")] D3D12_SAMPLER_FEEDBACK_TIER SamplerFeedbackTier;
1350
1351} D3D12_FEATURE_DATA_D3D12_OPTIONS7;
1352
1353typedef struct D3D12_FEATURE_DATA_QUERY_META_COMMAND
1354{
1355 [annotation("_In_")] GUID CommandId;
1356 [annotation("_In_")] UINT NodeMask;
1357 [annotation("_Field_size_bytes_full_opt_( QueryInputDataSizeInBytes )")] const void* pQueryInputData;
1358 [annotation("_In_")] SIZE_T QueryInputDataSizeInBytes;
1359 [annotation("_Field_size_bytes_full_( QueryOutputDataSizeInBytes )")] void* pQueryOutputData;
1360 [annotation("_In_")] SIZE_T QueryOutputDataSizeInBytes;
1361} D3D12_FEATURE_DATA_QUERY_META_COMMAND;
1362
1363// D3D12_FEATURE_D3D12_OPTIONS8
1364typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS8
1365{
1366 [annotation("_Out_")] BOOL UnalignedBlockTexturesSupported;
1367} D3D12_FEATURE_DATA_D3D12_OPTIONS8;
1368
1369typedef enum D3D12_WAVE_MMA_TIER {
1370 D3D12_WAVE_MMA_TIER_NOT_SUPPORTED = 0,
1371 D3D12_WAVE_MMA_TIER_1_0 = 10,
1372} D3D12_WAVE_MMA_TIER;
1373
1374// D3D12_FEATURE_D3D12_OPTIONS9
1375typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS9
1376{
1377 [annotation("_Out_")] BOOL MeshShaderPipelineStatsSupported;
1378 [annotation("_Out_")] BOOL MeshShaderSupportsFullRangeRenderTargetArrayIndex;
1379 [annotation("_Out_")] BOOL AtomicInt64OnTypedResourceSupported;
1380 [annotation("_Out_")] BOOL AtomicInt64OnGroupSharedSupported;
1381 [annotation("_Out_")] BOOL DerivativesInMeshAndAmplificationShadersSupported;
1382 [annotation("_Out_")] D3D12_WAVE_MMA_TIER WaveMMATier;
1383} D3D12_FEATURE_DATA_D3D12_OPTIONS9;
1384
1385// D3D12_FEATURE_D3D12_OPTIONS10
1386typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS10
1387{
1388 [annotation("_Out_")] BOOL VariableRateShadingSumCombinerSupported;
1389 [annotation("_Out_")] BOOL MeshShaderPerPrimitiveShadingRateSupported;
1390} D3D12_FEATURE_DATA_D3D12_OPTIONS10;
1391
1392// D3D12_FEATURE_D3D12_OPTIONS11
1393typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS11
1394{
1395 [annotation("_Out_")] BOOL AtomicInt64OnDescriptorHeapResourceSupported;
1396} D3D12_FEATURE_DATA_D3D12_OPTIONS11;
1397
1398
1399typedef struct D3D12_RESOURCE_ALLOCATION_INFO
1400{
1401 UINT64 SizeInBytes;
1402 UINT64 Alignment;
1403} D3D12_RESOURCE_ALLOCATION_INFO;
1404
1405typedef struct D3D12_RESOURCE_ALLOCATION_INFO1
1406{
1407 UINT64 Offset;
1408 UINT64 Alignment;
1409 UINT64 SizeInBytes;
1410} D3D12_RESOURCE_ALLOCATION_INFO1;
1411
1412typedef enum D3D12_HEAP_TYPE
1413{
1414 D3D12_HEAP_TYPE_DEFAULT = 1,
1415 D3D12_HEAP_TYPE_UPLOAD = 2,
1416 D3D12_HEAP_TYPE_READBACK = 3,
1417 D3D12_HEAP_TYPE_CUSTOM = 4,
1418} D3D12_HEAP_TYPE;
1419
1420typedef enum D3D12_CPU_PAGE_PROPERTY
1421{
1422 D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0,
1423 D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1,
1424 D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2,
1425 D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3,
1426} D3D12_CPU_PAGE_PROPERTY;
1427
1428typedef enum D3D12_MEMORY_POOL
1429{
1430 D3D12_MEMORY_POOL_UNKNOWN = 0,
1431 D3D12_MEMORY_POOL_L0 = 1, // Maximum bandwidth for CPU
1432 D3D12_MEMORY_POOL_L1 = 2, // More bandwidth for GPU, less for CPU
1433} D3D12_MEMORY_POOL;
1434
1435typedef struct D3D12_HEAP_PROPERTIES
1436{
1437 D3D12_HEAP_TYPE Type;
1438 D3D12_CPU_PAGE_PROPERTY CPUPageProperty;
1439 D3D12_MEMORY_POOL MemoryPoolPreference;
1440 UINT CreationNodeMask;
1441 UINT VisibleNodeMask;
1442} D3D12_HEAP_PROPERTIES;
1443
1444typedef enum D3D12_HEAP_FLAGS
1445{
1446 D3D12_HEAP_FLAG_NONE = 0x0,
1447 D3D12_HEAP_FLAG_SHARED = 0x1,
1448 D3D12_HEAP_FLAG_DENY_BUFFERS = 0x4,
1449 D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x8,
1450 D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20,
1451 D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40,
1452 D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80,
1453 D3D12_HEAP_FLAG_HARDWARE_PROTECTED = 0x100,
1454 D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH = 0x200,
1455 D3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICS = 0x400,
1456 D3D12_HEAP_FLAG_CREATE_NOT_RESIDENT = 0x800,
1457 D3D12_HEAP_FLAG_CREATE_NOT_ZEROED = 0x1000,
1458
1459 // These are convenience aliases to manage resource heap tier restrictions. They cannot be bitwise OR'ed together cleanly.
1460 D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0x0,
1461 D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xC0,
1462 D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44,
1463 D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84,
1464
1465
1466} D3D12_HEAP_FLAGS;
1467cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_HEAP_FLAGS );" )
1468
1469typedef struct D3D12_HEAP_DESC
1470{
1471 UINT64 SizeInBytes;
1472 D3D12_HEAP_PROPERTIES Properties;
1473 UINT64 Alignment;
1474 D3D12_HEAP_FLAGS Flags;
1475} D3D12_HEAP_DESC;
1476
1477typedef enum D3D12_RESOURCE_DIMENSION
1478{
1479 D3D12_RESOURCE_DIMENSION_UNKNOWN = 0,
1480 D3D12_RESOURCE_DIMENSION_BUFFER = 1,
1481 D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2,
1482 D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3,
1483 D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4,
1484} D3D12_RESOURCE_DIMENSION;
1485
1486typedef enum D3D12_TEXTURE_LAYOUT
1487{
1488 D3D12_TEXTURE_LAYOUT_UNKNOWN = 0,
1489 D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1, // Must be used with buffers. Can be used with cross-adapter shared textures.
1490 D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2,
1491 D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3,
1492} D3D12_TEXTURE_LAYOUT;
1493
1494typedef enum D3D12_RESOURCE_FLAGS
1495{
1496 D3D12_RESOURCE_FLAG_NONE = 0x0,
1497 D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1,
1498 D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2,
1499 D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4,
1500 D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8,
1501 D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10,
1502 D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20,
1503 D3D12_RESOURCE_FLAG_VIDEO_DECODE_REFERENCE_ONLY = 0x40,
1504 D3D12_RESOURCE_FLAG_VIDEO_ENCODE_REFERENCE_ONLY = 0x80,
1505
1506} D3D12_RESOURCE_FLAGS;
1507cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_FLAGS );" )
1508
1509typedef struct D3D12_MIP_REGION
1510{
1511 UINT Width;
1512 UINT Height;
1513 UINT Depth;
1514} D3D12_MIP_REGION;
1515
1516typedef struct D3D12_RESOURCE_DESC
1517{
1518 D3D12_RESOURCE_DIMENSION Dimension;
1519 UINT64 Alignment;
1520 UINT64 Width;
1521 UINT Height;
1522 UINT16 DepthOrArraySize;
1523 UINT16 MipLevels;
1524 DXGI_FORMAT Format;
1525 DXGI_SAMPLE_DESC SampleDesc;
1526 D3D12_TEXTURE_LAYOUT Layout;
1527 D3D12_RESOURCE_FLAGS Flags;
1528} D3D12_RESOURCE_DESC;
1529
1530typedef struct D3D12_RESOURCE_DESC1
1531{
1532 D3D12_RESOURCE_DIMENSION Dimension;
1533 UINT64 Alignment;
1534 UINT64 Width;
1535 UINT Height;
1536 UINT16 DepthOrArraySize;
1537 UINT16 MipLevels;
1538 DXGI_FORMAT Format;
1539 DXGI_SAMPLE_DESC SampleDesc;
1540 D3D12_TEXTURE_LAYOUT Layout;
1541 D3D12_RESOURCE_FLAGS Flags;
1542 D3D12_MIP_REGION SamplerFeedbackMipRegion;
1543} D3D12_RESOURCE_DESC1;
1544
1545
1546typedef struct D3D12_DEPTH_STENCIL_VALUE
1547{
1548 FLOAT Depth;
1549 UINT8 Stencil;
1550} D3D12_DEPTH_STENCIL_VALUE;
1551
1552typedef struct D3D12_CLEAR_VALUE
1553{
1554 DXGI_FORMAT Format;
1555 union
1556 {
1557 FLOAT Color[4];
1558 D3D12_DEPTH_STENCIL_VALUE DepthStencil;
1559 };
1560} D3D12_CLEAR_VALUE;
1561
1562typedef struct D3D12_RANGE
1563{
1564 SIZE_T Begin;
1565 SIZE_T End; // One past end, so (End - Begin) = Size
1566} D3D12_RANGE;
1567
1568typedef struct D3D12_RANGE_UINT64
1569{
1570 UINT64 Begin;
1571 UINT64 End; // One past end, so (End - Begin) = Size
1572} D3D12_RANGE_UINT64;
1573
1574typedef struct D3D12_SUBRESOURCE_RANGE_UINT64
1575{
1576 UINT Subresource;
1577 D3D12_RANGE_UINT64 Range;
1578} D3D12_SUBRESOURCE_RANGE_UINT64;
1579
1580typedef struct D3D12_SUBRESOURCE_INFO
1581{
1582 UINT64 Offset;
1583 UINT RowPitch;
1584 UINT DepthPitch;
1585} D3D12_SUBRESOURCE_INFO;
1586
1587typedef struct D3D12_TILED_RESOURCE_COORDINATE
1588{
1589 UINT X;
1590 UINT Y;
1591 UINT Z;
1592 UINT Subresource;
1593} D3D12_TILED_RESOURCE_COORDINATE;
1594
1595typedef struct D3D12_TILE_REGION_SIZE
1596{
1597 UINT NumTiles;
1598 BOOL UseBox;
1599 UINT Width;
1600 UINT16 Height;
1601 UINT16 Depth;
1602} D3D12_TILE_REGION_SIZE;
1603
1604typedef enum D3D12_TILE_RANGE_FLAGS
1605{
1606 D3D12_TILE_RANGE_FLAG_NONE = 0,
1607 D3D12_TILE_RANGE_FLAG_NULL = 1,
1608 D3D12_TILE_RANGE_FLAG_SKIP = 2,
1609 D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 4,
1610
1611} D3D12_TILE_RANGE_FLAGS;
1612
1613typedef struct D3D12_SUBRESOURCE_TILING
1614{
1615 UINT WidthInTiles;
1616 UINT16 HeightInTiles;
1617 UINT16 DepthInTiles;
1618 UINT StartTileIndexInOverallResource;
1619} D3D12_SUBRESOURCE_TILING;
1620
1621typedef struct D3D12_TILE_SHAPE
1622{
1623 UINT WidthInTexels;
1624 UINT HeightInTexels;
1625 UINT DepthInTexels;
1626} D3D12_TILE_SHAPE;
1627
1628typedef struct D3D12_PACKED_MIP_INFO
1629{
1630 UINT8 NumStandardMips;
1631 UINT8 NumPackedMips;
1632 UINT NumTilesForPackedMips;
1633 UINT StartTileIndexInOverallResource;
1634} D3D12_PACKED_MIP_INFO;
1635
1636typedef enum D3D12_TILE_MAPPING_FLAGS
1637{
1638 D3D12_TILE_MAPPING_FLAG_NONE = 0x0,
1639 D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1,
1640} D3D12_TILE_MAPPING_FLAGS;
1641cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_TILE_MAPPING_FLAGS );" )
1642
1643typedef enum D3D12_TILE_COPY_FLAGS
1644{
1645 D3D12_TILE_COPY_FLAG_NONE = 0x0,
1646 D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1,
1647 D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2,
1648 D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4,
1649} D3D12_TILE_COPY_FLAGS;
1650cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_TILE_COPY_FLAGS );")
1651
1652// Resource Barrier
1653typedef enum D3D12_RESOURCE_STATES
1654{
1655 D3D12_RESOURCE_STATE_COMMON = 0,
1656
1657 D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x00001,
1658 D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x00002,
1659 D3D12_RESOURCE_STATE_RENDER_TARGET = 0x00004,
1660 D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x00008,
1661 D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x00010,
1662 D3D12_RESOURCE_STATE_DEPTH_READ = 0x00020,
1663 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x00040,
1664 D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x00080,
1665 D3D12_RESOURCE_STATE_STREAM_OUT = 0x00100,
1666 D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x00200,
1667 D3D12_RESOURCE_STATE_COPY_DEST = 0x00400,
1668 D3D12_RESOURCE_STATE_COPY_SOURCE = 0x00800,
1669 D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x01000,
1670 D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x02000,
1671 D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE = 0x400000,
1672 D3D12_RESOURCE_STATE_SHADING_RATE_SOURCE = 0x1000000,
1673
1674 D3D12_RESOURCE_STATE_GENERIC_READ =
1675 /*D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER*/ 0x0001 |
1676 /*D3D12_RESOURCE_STATE_INDEX_BUFFER*/ 0x0002 |
1677 /*D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE*/ 0x0040 |
1678 /*D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE*/ 0x0080 |
1679 /*D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT*/ 0x0200 |
1680 /*D3D12_RESOURCE_STATE_COPY_SOURCE*/ 0x0800,
1681
1682 D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE =
1683 /*D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE*/ 0x40 |
1684 /*D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE*/ 0x80,
1685
1686 D3D12_RESOURCE_STATE_PRESENT = 0,
1687 D3D12_RESOURCE_STATE_PREDICATION = /*D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT*/ 0x0200,
1688
1689 D3D12_RESOURCE_STATE_VIDEO_DECODE_READ = 0x00010000,
1690 D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE = 0x00020000,
1691 D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ = 0x00040000,
1692 D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE = 0x00080000,
1693 D3D12_RESOURCE_STATE_VIDEO_ENCODE_READ = 0x00200000,
1694 D3D12_RESOURCE_STATE_VIDEO_ENCODE_WRITE = 0x00800000,
1695
1696} D3D12_RESOURCE_STATES;
1697cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_STATES );" )
1698
1699typedef enum D3D12_RESOURCE_BARRIER_TYPE
1700{
1701 D3D12_RESOURCE_BARRIER_TYPE_TRANSITION,
1702 D3D12_RESOURCE_BARRIER_TYPE_ALIASING,
1703 D3D12_RESOURCE_BARRIER_TYPE_UAV,
1704} D3D12_RESOURCE_BARRIER_TYPE;
1705
1706interface ID3D12Resource;
1707
1708typedef struct D3D12_RESOURCE_TRANSITION_BARRIER
1709{
1710 ID3D12Resource* pResource;
1711 UINT Subresource;
1712 D3D12_RESOURCE_STATES StateBefore;
1713 D3D12_RESOURCE_STATES StateAfter;
1714} D3D12_RESOURCE_TRANSITION_BARRIER;
1715
1716typedef struct D3D12_RESOURCE_ALIASING_BARRIER
1717{
1718 ID3D12Resource* pResourceBefore;
1719 ID3D12Resource* pResourceAfter;
1720} D3D12_RESOURCE_ALIASING_BARRIER;
1721
1722typedef struct D3D12_RESOURCE_UAV_BARRIER
1723{
1724 ID3D12Resource* pResource;
1725} D3D12_RESOURCE_UAV_BARRIER;
1726
1727typedef enum D3D12_RESOURCE_BARRIER_FLAGS
1728{
1729 D3D12_RESOURCE_BARRIER_FLAG_NONE = 0x0,
1730 D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1,
1731 D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2,
1732} D3D12_RESOURCE_BARRIER_FLAGS;
1733cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_BARRIER_FLAGS );" )
1734
1735typedef struct D3D12_RESOURCE_BARRIER
1736{
1737 D3D12_RESOURCE_BARRIER_TYPE Type;
1738 D3D12_RESOURCE_BARRIER_FLAGS Flags;
1739
1740 union
1741 {
1742 D3D12_RESOURCE_TRANSITION_BARRIER Transition;
1743 D3D12_RESOURCE_ALIASING_BARRIER Aliasing;
1744 D3D12_RESOURCE_UAV_BARRIER UAV;
1745 };
1746} D3D12_RESOURCE_BARRIER;
1747
1748typedef struct D3D12_SUBRESOURCE_FOOTPRINT
1749{
1750 DXGI_FORMAT Format;
1751 UINT Width;
1752 UINT Height;
1753 UINT Depth;
1754 UINT RowPitch; // Must be a multiple of D3D12_TEXTURE_DATA_PITCH_ALIGNMENT
1755} D3D12_SUBRESOURCE_FOOTPRINT;
1756
1757typedef struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT
1758{
1759 UINT64 Offset; // Must be a multiple of D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT
1760 D3D12_SUBRESOURCE_FOOTPRINT Footprint;
1761} D3D12_PLACED_SUBRESOURCE_FOOTPRINT;
1762
1763typedef enum D3D12_TEXTURE_COPY_TYPE
1764{
1765 D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0,
1766 D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1,
1767} D3D12_TEXTURE_COPY_TYPE;
1768
1769typedef struct D3D12_TEXTURE_COPY_LOCATION
1770{
1771 ID3D12Resource* pResource;
1772 D3D12_TEXTURE_COPY_TYPE Type;
1773 union
1774 {
1775 D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint;
1776 UINT SubresourceIndex;
1777 };
1778} D3D12_TEXTURE_COPY_LOCATION;
1779
1780typedef enum D3D12_RESOLVE_MODE
1781{
1782 D3D12_RESOLVE_MODE_DECOMPRESS = 0,
1783 D3D12_RESOLVE_MODE_MIN = 1,
1784 D3D12_RESOLVE_MODE_MAX = 2,
1785 D3D12_RESOLVE_MODE_AVERAGE = 3,
1786 D3D12_RESOLVE_MODE_ENCODE_SAMPLER_FEEDBACK = 4,
1787 D3D12_RESOLVE_MODE_DECODE_SAMPLER_FEEDBACK = 5
1788} D3D12_RESOLVE_MODE;
1789
1790typedef struct D3D12_SAMPLE_POSITION
1791{
1792 INT8 X;
1793 INT8 Y;
1794} D3D12_SAMPLE_POSITION;
1795
1796typedef struct D3D12_VIEW_INSTANCE_LOCATION
1797{
1798 UINT ViewportArrayIndex;
1799 UINT RenderTargetArrayIndex;
1800} D3D12_VIEW_INSTANCE_LOCATION;
1801
1802typedef enum D3D12_VIEW_INSTANCING_FLAGS
1803{
1804 D3D12_VIEW_INSTANCING_FLAG_NONE = 0x0,
1805 D3D12_VIEW_INSTANCING_FLAG_ENABLE_VIEW_INSTANCE_MASKING = 0x1,
1806} D3D12_VIEW_INSTANCING_FLAGS;
1807cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_VIEW_INSTANCING_FLAGS );")
1808
1809typedef struct D3D12_VIEW_INSTANCING_DESC
1810{
1811 UINT ViewInstanceCount;
1812 [annotation("_Field_size_full_(ViewInstanceCount)")] const D3D12_VIEW_INSTANCE_LOCATION* pViewInstanceLocations;
1813 D3D12_VIEW_INSTANCING_FLAGS Flags;
1814} D3D12_VIEW_INSTANCING_DESC;
1815
1816// D3D12 view descriptions
1817typedef enum D3D12_SHADER_COMPONENT_MAPPING
1818{
1819 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0,
1820 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1,
1821 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2,
1822 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3,
1823 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4,
1824 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5,
1825} D3D12_SHADER_COMPONENT_MAPPING;
1826
1827cpp_quote( "#define D3D12_SHADER_COMPONENT_MAPPING_MASK 0x7 ")
1828cpp_quote( "#define D3D12_SHADER_COMPONENT_MAPPING_SHIFT 3 ")
1829cpp_quote( "#define D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES (1<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*4)) ")
1830cpp_quote( "#define D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(Src0,Src1,Src2,Src3) ((((Src0)&D3D12_SHADER_COMPONENT_MAPPING_MASK)| \\")
1831cpp_quote( " (((Src1)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<<D3D12_SHADER_COMPONENT_MAPPING_SHIFT)| \\")
1832cpp_quote( " (((Src2)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*2))| \\")
1833cpp_quote( " (((Src3)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*3))| \\")
1834cpp_quote( " D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES))")
1835cpp_quote( "#define D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(ComponentToExtract,Mapping) ((D3D12_SHADER_COMPONENT_MAPPING)(Mapping >> (D3D12_SHADER_COMPONENT_MAPPING_SHIFT*ComponentToExtract) & D3D12_SHADER_COMPONENT_MAPPING_MASK))")
1836cpp_quote( "#define D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0,1,2,3) ")
1837typedef enum D3D12_BUFFER_SRV_FLAGS
1838{
1839 D3D12_BUFFER_SRV_FLAG_NONE = 0,
1840 D3D12_BUFFER_SRV_FLAG_RAW = 0x00000001, // allow device multi-component reads with DWORD addressing
1841} D3D12_BUFFER_SRV_FLAGS;
1842cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_BUFFER_SRV_FLAGS );" )
1843
1844typedef struct D3D12_BUFFER_SRV
1845{
1846 UINT64 FirstElement;
1847 UINT NumElements;
1848 UINT StructureByteStride; // if nonzero, format must be DXGI_FORMAT_UNKNOWN
1849 D3D12_BUFFER_SRV_FLAGS Flags;
1850} D3D12_BUFFER_SRV;
1851
1852typedef struct D3D12_TEX1D_SRV
1853{
1854 UINT MostDetailedMip;
1855 UINT MipLevels;
1856 FLOAT ResourceMinLODClamp;
1857} D3D12_TEX1D_SRV;
1858
1859typedef struct D3D12_TEX1D_ARRAY_SRV
1860{
1861 UINT MostDetailedMip;
1862 UINT MipLevels;
1863 UINT FirstArraySlice;
1864 UINT ArraySize;
1865 FLOAT ResourceMinLODClamp;
1866} D3D12_TEX1D_ARRAY_SRV;
1867
1868typedef struct D3D12_TEX2D_SRV
1869{
1870 UINT MostDetailedMip;
1871 UINT MipLevels;
1872 UINT PlaneSlice;
1873 FLOAT ResourceMinLODClamp;
1874} D3D12_TEX2D_SRV;
1875
1876typedef struct D3D12_TEX2D_ARRAY_SRV
1877{
1878 UINT MostDetailedMip;
1879 UINT MipLevels;
1880 UINT FirstArraySlice;
1881 UINT ArraySize;
1882 UINT PlaneSlice;
1883 FLOAT ResourceMinLODClamp;
1884} D3D12_TEX2D_ARRAY_SRV;
1885
1886typedef struct D3D12_TEX3D_SRV
1887{
1888 UINT MostDetailedMip;
1889 UINT MipLevels;
1890 FLOAT ResourceMinLODClamp;
1891} D3D12_TEX3D_SRV;
1892
1893typedef struct D3D12_TEXCUBE_SRV
1894{
1895 UINT MostDetailedMip;
1896 UINT MipLevels;
1897 FLOAT ResourceMinLODClamp;
1898} D3D12_TEXCUBE_SRV;
1899
1900typedef struct D3D12_TEXCUBE_ARRAY_SRV
1901{
1902 UINT MostDetailedMip;
1903 UINT MipLevels;
1904 UINT First2DArrayFace;
1905 UINT NumCubes;
1906 FLOAT ResourceMinLODClamp;
1907} D3D12_TEXCUBE_ARRAY_SRV;
1908
1909typedef struct D3D12_TEX2DMS_SRV
1910{
1911 // don't need to define anything specific for this view dimension
1912 UINT UnusedField_NothingToDefine;
1913} D3D12_TEX2DMS_SRV;
1914
1915typedef struct D3D12_TEX2DMS_ARRAY_SRV
1916{
1917 UINT FirstArraySlice;
1918 UINT ArraySize;
1919} D3D12_TEX2DMS_ARRAY_SRV;
1920
1921typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV
1922{
1923 D3D12_GPU_VIRTUAL_ADDRESS Location;
1924} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV;
1925
1926typedef enum D3D12_SRV_DIMENSION {
1927 D3D12_SRV_DIMENSION_UNKNOWN = 0,
1928 D3D12_SRV_DIMENSION_BUFFER = 1,
1929 D3D12_SRV_DIMENSION_TEXTURE1D = 2,
1930 D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3,
1931 D3D12_SRV_DIMENSION_TEXTURE2D = 4,
1932 D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5,
1933 D3D12_SRV_DIMENSION_TEXTURE2DMS = 6,
1934 D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7,
1935 D3D12_SRV_DIMENSION_TEXTURE3D = 8,
1936 D3D12_SRV_DIMENSION_TEXTURECUBE = 9,
1937 D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10,
1938 D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE = 11,
1939} D3D12_SRV_DIMENSION;
1940
1941typedef struct D3D12_SHADER_RESOURCE_VIEW_DESC
1942{
1943 DXGI_FORMAT Format;
1944 D3D12_SRV_DIMENSION ViewDimension;
1945 UINT Shader4ComponentMapping;
1946
1947 union
1948 {
1949 D3D12_BUFFER_SRV Buffer;
1950 D3D12_TEX1D_SRV Texture1D;
1951 D3D12_TEX1D_ARRAY_SRV Texture1DArray;
1952 D3D12_TEX2D_SRV Texture2D;
1953 D3D12_TEX2D_ARRAY_SRV Texture2DArray;
1954 D3D12_TEX2DMS_SRV Texture2DMS;
1955 D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray;
1956 D3D12_TEX3D_SRV Texture3D;
1957 D3D12_TEXCUBE_SRV TextureCube;
1958 D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray;
1959 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV RaytracingAccelerationStructure;
1960 };
1961} D3D12_SHADER_RESOURCE_VIEW_DESC;
1962
1963typedef struct D3D12_CONSTANT_BUFFER_VIEW_DESC
1964{
1965 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
1966 UINT SizeInBytes;
1967} D3D12_CONSTANT_BUFFER_VIEW_DESC;
1968
1969////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1970//
1971// Sampler
1972//
1973////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1974typedef enum D3D12_FILTER
1975{
1976 // Bits used in defining enumeration of valid filters:
1977 // bits [1:0] - mip: 0 == point, 1 == linear, 2,3 unused
1978 // bits [3:2] - mag: 0 == point, 1 == linear, 2,3 unused
1979 // bits [5:4] - min: 0 == point, 1 == linear, 2,3 unused
1980 // bit [6] - aniso
1981 // bits [8:7] - reduction type:
1982 // 0 == standard filtering
1983 // 1 == comparison
1984 // 2 == min
1985 // 3 == max
1986 // bit [31] - mono 1-bit (narrow-purpose filter) [no longer supported in D3D12]
1987
1988 D3D12_FILTER_MIN_MAG_MIP_POINT = 0x00000000,
1989 D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x00000001,
1990 D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x00000004,
1991 D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x00000005,
1992 D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x00000010,
1993 D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x00000011,
1994 D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x00000014,
1995 D3D12_FILTER_MIN_MAG_MIP_LINEAR = 0x00000015,
1996 D3D12_FILTER_ANISOTROPIC = 0x00000055,
1997 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x00000080,
1998 D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x00000081,
1999 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x00000084,
2000 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x00000085,
2001 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x00000090,
2002 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x00000091,
2003 D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x00000094,
2004 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x00000095,
2005 D3D12_FILTER_COMPARISON_ANISOTROPIC = 0x000000d5,
2006 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x00000100,
2007 D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x00000101,
2008 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x00000104,
2009 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x00000105,
2010 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x00000110,
2011 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x00000111,
2012 D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x00000114,
2013 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x00000115,
2014 D3D12_FILTER_MINIMUM_ANISOTROPIC = 0x00000155,
2015 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x00000180,
2016 D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x00000181,
2017 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x00000184,
2018 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x00000185,
2019 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x00000190,
2020 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x00000191,
2021 D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x00000194,
2022 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x00000195,
2023 D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x000001d5
2024} D3D12_FILTER;
2025
2026typedef enum D3D12_FILTER_TYPE
2027{
2028 D3D12_FILTER_TYPE_POINT = 0,
2029 D3D12_FILTER_TYPE_LINEAR = 1,
2030} D3D12_FILTER_TYPE;
2031
2032typedef enum D3D12_FILTER_REDUCTION_TYPE
2033{
2034 D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0,
2035 D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1,
2036 D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2,
2037 D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3,
2038} D3D12_FILTER_REDUCTION_TYPE;
2039
2040const UINT D3D12_FILTER_REDUCTION_TYPE_MASK = 0x00000003;
2041const UINT D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7;
2042
2043const UINT D3D12_FILTER_TYPE_MASK = 0x00000003;
2044const UINT D3D12_MIN_FILTER_SHIFT = 4;
2045const UINT D3D12_MAG_FILTER_SHIFT = 2;
2046const UINT D3D12_MIP_FILTER_SHIFT = 0;
2047
2048const UINT D3D12_ANISOTROPIC_FILTERING_BIT = 0x00000040;
2049
2050// encode enum entry for most filters except anisotropic filtering
2051cpp_quote( "#define D3D12_ENCODE_BASIC_FILTER( min, mag, mip, reduction ) \\" )
2052cpp_quote( " ( ( D3D12_FILTER ) ( \\" )
2053cpp_quote( " ( ( ( min ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MIN_FILTER_SHIFT ) | \\" )
2054cpp_quote( " ( ( ( mag ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MAG_FILTER_SHIFT ) | \\" )
2055cpp_quote( " ( ( ( mip ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MIP_FILTER_SHIFT ) | \\" )
2056cpp_quote( " ( ( ( reduction ) & D3D12_FILTER_REDUCTION_TYPE_MASK ) << D3D12_FILTER_REDUCTION_TYPE_SHIFT ) ) ) " )
2057
2058// encode enum entry for anisotropic filtering (with or without comparison filtering)
2059cpp_quote( "#define D3D12_ENCODE_ANISOTROPIC_FILTER( reduction ) \\" )
2060cpp_quote( " ( ( D3D12_FILTER ) ( \\" )
2061cpp_quote( " D3D12_ANISOTROPIC_FILTERING_BIT | \\" )
2062cpp_quote( " D3D12_ENCODE_BASIC_FILTER( D3D12_FILTER_TYPE_LINEAR, \\" )
2063cpp_quote( " D3D12_FILTER_TYPE_LINEAR, \\" )
2064cpp_quote( " D3D12_FILTER_TYPE_LINEAR, \\" )
2065cpp_quote( " reduction ) ) ) " )
2066
2067cpp_quote( "#define D3D12_DECODE_MIN_FILTER( D3D12Filter ) \\" )
2068cpp_quote( " ( ( D3D12_FILTER_TYPE ) \\" )
2069cpp_quote( " ( ( ( D3D12Filter ) >> D3D12_MIN_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) " )
2070
2071cpp_quote( "#define D3D12_DECODE_MAG_FILTER( D3D12Filter ) \\" )
2072cpp_quote( " ( ( D3D12_FILTER_TYPE ) \\" )
2073cpp_quote( " ( ( ( D3D12Filter ) >> D3D12_MAG_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) " )
2074
2075cpp_quote( "#define D3D12_DECODE_MIP_FILTER( D3D12Filter ) \\" )
2076cpp_quote( " ( ( D3D12_FILTER_TYPE ) \\" )
2077cpp_quote( " ( ( ( D3D12Filter ) >> D3D12_MIP_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) " )
2078
2079cpp_quote( "#define D3D12_DECODE_FILTER_REDUCTION( D3D12Filter ) \\" )
2080cpp_quote( " ( ( D3D12_FILTER_REDUCTION_TYPE ) \\" )
2081cpp_quote( " ( ( ( D3D12Filter ) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT ) & D3D12_FILTER_REDUCTION_TYPE_MASK ) ) " )
2082
2083cpp_quote( "#define D3D12_DECODE_IS_COMPARISON_FILTER( D3D12Filter ) \\" )
2084cpp_quote( " ( D3D12_DECODE_FILTER_REDUCTION( D3D12Filter ) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON ) " )
2085
2086cpp_quote( "#define D3D12_DECODE_IS_ANISOTROPIC_FILTER( D3D12Filter ) \\" )
2087cpp_quote( " ( ( ( D3D12Filter ) & D3D12_ANISOTROPIC_FILTERING_BIT ) && \\" )
2088cpp_quote( " ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIN_FILTER( D3D12Filter ) ) && \\" )
2089cpp_quote( " ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MAG_FILTER( D3D12Filter ) ) && \\" )
2090cpp_quote( " ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIP_FILTER( D3D12Filter ) ) ) " )
2091
2092typedef enum D3D12_TEXTURE_ADDRESS_MODE
2093{
2094 D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1,
2095 D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2,
2096 D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3,
2097 D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4,
2098 D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5
2099} D3D12_TEXTURE_ADDRESS_MODE;
2100
2101typedef struct D3D12_SAMPLER_DESC
2102{
2103 D3D12_FILTER Filter;
2104 D3D12_TEXTURE_ADDRESS_MODE AddressU;
2105 D3D12_TEXTURE_ADDRESS_MODE AddressV;
2106 D3D12_TEXTURE_ADDRESS_MODE AddressW;
2107 FLOAT MipLODBias;
2108 UINT MaxAnisotropy;
2109 D3D12_COMPARISON_FUNC ComparisonFunc;
2110 FLOAT BorderColor[4]; // RGBA
2111 FLOAT MinLOD;
2112 FLOAT MaxLOD;
2113} D3D12_SAMPLER_DESC;
2114
2115typedef enum D3D12_BUFFER_UAV_FLAGS
2116{
2117 D3D12_BUFFER_UAV_FLAG_NONE = 0,
2118 D3D12_BUFFER_UAV_FLAG_RAW = 0x00000001,
2119} D3D12_BUFFER_UAV_FLAGS;
2120cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_BUFFER_UAV_FLAGS );" )
2121
2122typedef struct D3D12_BUFFER_UAV
2123{
2124 UINT64 FirstElement;
2125 UINT NumElements;
2126 UINT StructureByteStride; // if nonzero, format must be DXGI_FORMAT_UNKNOWN
2127 UINT64 CounterOffsetInBytes;
2128 D3D12_BUFFER_UAV_FLAGS Flags;
2129} D3D12_BUFFER_UAV;
2130
2131typedef struct D3D12_TEX1D_UAV
2132{
2133 UINT MipSlice;
2134} D3D12_TEX1D_UAV;
2135
2136typedef struct D3D12_TEX1D_ARRAY_UAV
2137{
2138 UINT MipSlice;
2139 UINT FirstArraySlice;
2140 UINT ArraySize;
2141} D3D12_TEX1D_ARRAY_UAV;
2142
2143typedef struct D3D12_TEX2D_UAV
2144{
2145 UINT MipSlice;
2146 UINT PlaneSlice;
2147} D3D12_TEX2D_UAV;
2148
2149typedef struct D3D12_TEX2D_ARRAY_UAV
2150{
2151 UINT MipSlice;
2152 UINT FirstArraySlice;
2153 UINT ArraySize;
2154 UINT PlaneSlice;
2155} D3D12_TEX2D_ARRAY_UAV;
2156
2157typedef struct D3D12_TEX3D_UAV
2158{
2159 UINT MipSlice;
2160 UINT FirstWSlice;
2161 UINT WSize;
2162} D3D12_TEX3D_UAV;
2163
2164typedef enum D3D12_UAV_DIMENSION
2165{
2166 D3D12_UAV_DIMENSION_UNKNOWN = 0,
2167 D3D12_UAV_DIMENSION_BUFFER = 1,
2168 D3D12_UAV_DIMENSION_TEXTURE1D = 2,
2169 D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3,
2170 D3D12_UAV_DIMENSION_TEXTURE2D = 4,
2171 D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5,
2172 D3D12_UAV_DIMENSION_TEXTURE3D = 8,
2173} D3D12_UAV_DIMENSION;
2174
2175typedef struct D3D12_UNORDERED_ACCESS_VIEW_DESC
2176{
2177 DXGI_FORMAT Format;
2178 D3D12_UAV_DIMENSION ViewDimension;
2179
2180 union
2181 {
2182 D3D12_BUFFER_UAV Buffer;
2183 D3D12_TEX1D_UAV Texture1D;
2184 D3D12_TEX1D_ARRAY_UAV Texture1DArray;
2185 D3D12_TEX2D_UAV Texture2D;
2186 D3D12_TEX2D_ARRAY_UAV Texture2DArray;
2187 D3D12_TEX3D_UAV Texture3D;
2188 };
2189} D3D12_UNORDERED_ACCESS_VIEW_DESC;
2190
2191typedef struct D3D12_BUFFER_RTV
2192{
2193 UINT64 FirstElement;
2194 UINT NumElements;
2195} D3D12_BUFFER_RTV;
2196
2197typedef struct D3D12_TEX1D_RTV
2198{
2199 UINT MipSlice;
2200} D3D12_TEX1D_RTV;
2201
2202typedef struct D3D12_TEX1D_ARRAY_RTV
2203{
2204 UINT MipSlice;
2205 UINT FirstArraySlice;
2206 UINT ArraySize;
2207} D3D12_TEX1D_ARRAY_RTV;
2208
2209typedef struct D3D12_TEX2D_RTV
2210{
2211 UINT MipSlice;
2212 UINT PlaneSlice;
2213} D3D12_TEX2D_RTV;
2214
2215typedef struct D3D12_TEX2DMS_RTV
2216{
2217 UINT UnusedField_NothingToDefine;
2218} D3D12_TEX2DMS_RTV;
2219
2220typedef struct D3D12_TEX2D_ARRAY_RTV
2221{
2222 UINT MipSlice;
2223 UINT FirstArraySlice;
2224 UINT ArraySize;
2225 UINT PlaneSlice;
2226} D3D12_TEX2D_ARRAY_RTV;
2227
2228typedef struct D3D12_TEX2DMS_ARRAY_RTV
2229{
2230 UINT FirstArraySlice;
2231 UINT ArraySize;
2232} D3D12_TEX2DMS_ARRAY_RTV;
2233
2234typedef struct D3D12_TEX3D_RTV
2235{
2236 UINT MipSlice;
2237 UINT FirstWSlice;
2238 UINT WSize;
2239} D3D12_TEX3D_RTV;
2240
2241typedef enum D3D12_RTV_DIMENSION
2242{
2243 D3D12_RTV_DIMENSION_UNKNOWN = 0,
2244 D3D12_RTV_DIMENSION_BUFFER = 1,
2245 D3D12_RTV_DIMENSION_TEXTURE1D = 2,
2246 D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3,
2247 D3D12_RTV_DIMENSION_TEXTURE2D = 4,
2248 D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5,
2249 D3D12_RTV_DIMENSION_TEXTURE2DMS = 6,
2250 D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7,
2251 D3D12_RTV_DIMENSION_TEXTURE3D = 8,
2252} D3D12_RTV_DIMENSION;
2253
2254typedef struct D3D12_RENDER_TARGET_VIEW_DESC
2255{
2256 DXGI_FORMAT Format;
2257 D3D12_RTV_DIMENSION ViewDimension;
2258
2259 union
2260 {
2261 D3D12_BUFFER_RTV Buffer;
2262 D3D12_TEX1D_RTV Texture1D;
2263 D3D12_TEX1D_ARRAY_RTV Texture1DArray;
2264 D3D12_TEX2D_RTV Texture2D;
2265 D3D12_TEX2D_ARRAY_RTV Texture2DArray;
2266 D3D12_TEX2DMS_RTV Texture2DMS;
2267 D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray;
2268 D3D12_TEX3D_RTV Texture3D;
2269 };
2270} D3D12_RENDER_TARGET_VIEW_DESC;
2271
2272typedef struct D3D12_TEX1D_DSV
2273{
2274 UINT MipSlice;
2275} D3D12_TEX1D_DSV;
2276
2277typedef struct D3D12_TEX1D_ARRAY_DSV
2278{
2279 UINT MipSlice;
2280 UINT FirstArraySlice;
2281 UINT ArraySize;
2282} D3D12_TEX1D_ARRAY_DSV;
2283
2284typedef struct D3D12_TEX2D_DSV
2285{
2286 UINT MipSlice;
2287} D3D12_TEX2D_DSV;
2288
2289typedef struct D3D12_TEX2D_ARRAY_DSV
2290{
2291 UINT MipSlice;
2292 UINT FirstArraySlice;
2293 UINT ArraySize;
2294} D3D12_TEX2D_ARRAY_DSV;
2295
2296typedef struct D3D12_TEX2DMS_DSV
2297{
2298 UINT UnusedField_NothingToDefine;
2299} D3D12_TEX2DMS_DSV;
2300
2301typedef struct D3D12_TEX2DMS_ARRAY_DSV
2302{
2303 UINT FirstArraySlice;
2304 UINT ArraySize;
2305} D3D12_TEX2DMS_ARRAY_DSV;
2306
2307typedef enum D3D12_DSV_FLAGS
2308{
2309 D3D12_DSV_FLAG_NONE = 0x0,
2310 D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1,
2311 D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2,
2312} D3D12_DSV_FLAGS;
2313cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_DSV_FLAGS );" )
2314
2315typedef enum D3D12_DSV_DIMENSION
2316{
2317 D3D12_DSV_DIMENSION_UNKNOWN = 0,
2318 D3D12_DSV_DIMENSION_TEXTURE1D = 1,
2319 D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2,
2320 D3D12_DSV_DIMENSION_TEXTURE2D = 3,
2321 D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4,
2322 D3D12_DSV_DIMENSION_TEXTURE2DMS = 5,
2323 D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6,
2324} D3D12_DSV_DIMENSION;
2325
2326typedef struct D3D12_DEPTH_STENCIL_VIEW_DESC
2327{
2328 DXGI_FORMAT Format;
2329 D3D12_DSV_DIMENSION ViewDimension;
2330 D3D12_DSV_FLAGS Flags;
2331
2332 union
2333 {
2334 D3D12_TEX1D_DSV Texture1D;
2335 D3D12_TEX1D_ARRAY_DSV Texture1DArray;
2336 D3D12_TEX2D_DSV Texture2D;
2337 D3D12_TEX2D_ARRAY_DSV Texture2DArray;
2338 D3D12_TEX2DMS_DSV Texture2DMS;
2339 D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray;
2340 };
2341} D3D12_DEPTH_STENCIL_VIEW_DESC;
2342
2343typedef enum D3D12_CLEAR_FLAGS
2344{
2345 // Intentionally no flag for NONE
2346 D3D12_CLEAR_FLAG_DEPTH = 0x01,
2347 D3D12_CLEAR_FLAG_STENCIL = 0x02,
2348} D3D12_CLEAR_FLAGS;
2349cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_CLEAR_FLAGS );" )
2350
2351typedef enum D3D12_FENCE_FLAGS
2352{
2353 D3D12_FENCE_FLAG_NONE = 0x0,
2354 D3D12_FENCE_FLAG_SHARED = 0x1,
2355 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2,
2356 D3D12_FENCE_FLAG_NON_MONITORED = 0x4,
2357} D3D12_FENCE_FLAGS;
2358cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_FENCE_FLAGS );" )
2359
2360typedef enum D3D12_DESCRIPTOR_HEAP_TYPE
2361{
2362 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
2363 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
2364 D3D12_DESCRIPTOR_HEAP_TYPE_RTV,
2365 D3D12_DESCRIPTOR_HEAP_TYPE_DSV,
2366 D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES
2367} D3D12_DESCRIPTOR_HEAP_TYPE;
2368
2369typedef enum D3D12_DESCRIPTOR_HEAP_FLAGS
2370{
2371 D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0x0,
2372 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1,
2373} D3D12_DESCRIPTOR_HEAP_FLAGS;
2374cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_DESCRIPTOR_HEAP_FLAGS );" )
2375
2376typedef struct D3D12_DESCRIPTOR_HEAP_DESC
2377{
2378 D3D12_DESCRIPTOR_HEAP_TYPE Type;
2379 UINT NumDescriptors;
2380 D3D12_DESCRIPTOR_HEAP_FLAGS Flags;
2381 UINT NodeMask;
2382} D3D12_DESCRIPTOR_HEAP_DESC;
2383
2384typedef enum D3D12_DESCRIPTOR_RANGE_TYPE
2385{
2386 D3D12_DESCRIPTOR_RANGE_TYPE_SRV,
2387 D3D12_DESCRIPTOR_RANGE_TYPE_UAV,
2388 D3D12_DESCRIPTOR_RANGE_TYPE_CBV,
2389 D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER
2390} D3D12_DESCRIPTOR_RANGE_TYPE;
2391
2392typedef struct D3D12_DESCRIPTOR_RANGE
2393{
2394 D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
2395 UINT NumDescriptors;
2396 UINT BaseShaderRegister;
2397 UINT RegisterSpace;
2398 UINT OffsetInDescriptorsFromTableStart;
2399} D3D12_DESCRIPTOR_RANGE;
2400
2401
2402typedef struct D3D12_ROOT_DESCRIPTOR_TABLE
2403{
2404 UINT NumDescriptorRanges;
2405 [annotation("_Field_size_full_(NumDescriptorRanges)")] const D3D12_DESCRIPTOR_RANGE* pDescriptorRanges;
2406} D3D12_ROOT_DESCRIPTOR_TABLE;
2407
2408
2409typedef struct D3D12_ROOT_CONSTANTS
2410{
2411 UINT ShaderRegister;
2412 UINT RegisterSpace;
2413 UINT Num32BitValues;
2414} D3D12_ROOT_CONSTANTS;
2415
2416typedef struct D3D12_ROOT_DESCRIPTOR
2417{
2418 UINT ShaderRegister;
2419 UINT RegisterSpace;
2420} D3D12_ROOT_DESCRIPTOR;
2421
2422typedef enum D3D12_SHADER_VISIBILITY
2423{
2424 D3D12_SHADER_VISIBILITY_ALL = 0,
2425 D3D12_SHADER_VISIBILITY_VERTEX = 1,
2426 D3D12_SHADER_VISIBILITY_HULL = 2,
2427 D3D12_SHADER_VISIBILITY_DOMAIN = 3,
2428 D3D12_SHADER_VISIBILITY_GEOMETRY = 4,
2429 D3D12_SHADER_VISIBILITY_PIXEL = 5,
2430 D3D12_SHADER_VISIBILITY_AMPLIFICATION = 6,
2431 D3D12_SHADER_VISIBILITY_MESH = 7,
2432} D3D12_SHADER_VISIBILITY;
2433
2434typedef enum D3D12_ROOT_PARAMETER_TYPE
2435{
2436 D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE,
2437 D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS,
2438 D3D12_ROOT_PARAMETER_TYPE_CBV,
2439 D3D12_ROOT_PARAMETER_TYPE_SRV,
2440 D3D12_ROOT_PARAMETER_TYPE_UAV
2441} D3D12_ROOT_PARAMETER_TYPE;
2442
2443typedef struct D3D12_ROOT_PARAMETER
2444{
2445 D3D12_ROOT_PARAMETER_TYPE ParameterType;
2446 union
2447 {
2448 D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable;
2449 D3D12_ROOT_CONSTANTS Constants;
2450 D3D12_ROOT_DESCRIPTOR Descriptor;
2451 };
2452 D3D12_SHADER_VISIBILITY ShaderVisibility;
2453} D3D12_ROOT_PARAMETER;
2454
2455typedef enum D3D12_ROOT_SIGNATURE_FLAGS
2456{
2457 D3D12_ROOT_SIGNATURE_FLAG_NONE = 0x0,
2458 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1,
2459 D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2,
2460 D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x4,
2461 D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8,
2462 D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
2463 D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
2464 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40,
2465 D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE = 0x80,
2466 D3D12_ROOT_SIGNATURE_FLAG_DENY_AMPLIFICATION_SHADER_ROOT_ACCESS = 0x100,
2467 D3D12_ROOT_SIGNATURE_FLAG_DENY_MESH_SHADER_ROOT_ACCESS = 0x200,
2468 D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED = 0x400,
2469 D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED = 0x800,
2470} D3D12_ROOT_SIGNATURE_FLAGS;
2471cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_ROOT_SIGNATURE_FLAGS );" )
2472
2473typedef enum D3D12_STATIC_BORDER_COLOR
2474{
2475 D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK, // 0.0f,0.0f,0.0f,0.0f
2476 D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK, // 0.0f,0.0f,0.0f,1.0f
2477 D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE, // 1.0f,1.0f,1.0f,1.0f
2478} D3D12_STATIC_BORDER_COLOR;
2479
2480typedef struct D3D12_STATIC_SAMPLER_DESC
2481{
2482 D3D12_FILTER Filter;
2483 D3D12_TEXTURE_ADDRESS_MODE AddressU;
2484 D3D12_TEXTURE_ADDRESS_MODE AddressV;
2485 D3D12_TEXTURE_ADDRESS_MODE AddressW;
2486 FLOAT MipLODBias;
2487 UINT MaxAnisotropy;
2488 D3D12_COMPARISON_FUNC ComparisonFunc;
2489 D3D12_STATIC_BORDER_COLOR BorderColor;
2490 FLOAT MinLOD;
2491 FLOAT MaxLOD;
2492 UINT ShaderRegister;
2493 UINT RegisterSpace;
2494 D3D12_SHADER_VISIBILITY ShaderVisibility;
2495} D3D12_STATIC_SAMPLER_DESC;
2496
2497
2498typedef struct D3D12_ROOT_SIGNATURE_DESC
2499{
2500 UINT NumParameters;
2501 [annotation("_Field_size_full_(NumParameters)")] const D3D12_ROOT_PARAMETER* pParameters;
2502 UINT NumStaticSamplers;
2503 [annotation("_Field_size_full_(NumStaticSamplers)")] const D3D12_STATIC_SAMPLER_DESC* pStaticSamplers;
2504 D3D12_ROOT_SIGNATURE_FLAGS Flags;
2505} D3D12_ROOT_SIGNATURE_DESC;
2506
2507typedef enum D3D12_DESCRIPTOR_RANGE_FLAGS
2508{
2509 D3D12_DESCRIPTOR_RANGE_FLAG_NONE = 0x0,
2510 D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1,
2511 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2,
2512 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
2513 D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8,
2514 D3D12_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x10000,
2515} D3D12_DESCRIPTOR_RANGE_FLAGS;
2516cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_DESCRIPTOR_RANGE_FLAGS );")
2517
2518typedef struct D3D12_DESCRIPTOR_RANGE1
2519{
2520 D3D12_DESCRIPTOR_RANGE_TYPE RangeType;
2521 UINT NumDescriptors;
2522 UINT BaseShaderRegister;
2523 UINT RegisterSpace;
2524 D3D12_DESCRIPTOR_RANGE_FLAGS Flags;
2525 UINT OffsetInDescriptorsFromTableStart;
2526} D3D12_DESCRIPTOR_RANGE1;
2527
2528typedef struct D3D12_ROOT_DESCRIPTOR_TABLE1
2529{
2530 UINT NumDescriptorRanges;
2531 [annotation("_Field_size_full_(NumDescriptorRanges)")] const D3D12_DESCRIPTOR_RANGE1* pDescriptorRanges;
2532} D3D12_ROOT_DESCRIPTOR_TABLE1;
2533
2534typedef enum D3D12_ROOT_DESCRIPTOR_FLAGS
2535{
2536 D3D12_ROOT_DESCRIPTOR_FLAG_NONE = 0x0,
2537 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2,
2538 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
2539 D3D12_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8,
2540} D3D12_ROOT_DESCRIPTOR_FLAGS;
2541cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_ROOT_DESCRIPTOR_FLAGS );")
2542
2543typedef struct D3D12_ROOT_DESCRIPTOR1
2544{
2545 UINT ShaderRegister;
2546 UINT RegisterSpace;
2547 D3D12_ROOT_DESCRIPTOR_FLAGS Flags;
2548} D3D12_ROOT_DESCRIPTOR1;
2549
2550typedef struct D3D12_ROOT_PARAMETER1
2551{
2552 D3D12_ROOT_PARAMETER_TYPE ParameterType;
2553 union
2554 {
2555 D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable;
2556 D3D12_ROOT_CONSTANTS Constants;
2557 D3D12_ROOT_DESCRIPTOR1 Descriptor;
2558 };
2559 D3D12_SHADER_VISIBILITY ShaderVisibility;
2560} D3D12_ROOT_PARAMETER1;
2561
2562typedef struct D3D12_ROOT_SIGNATURE_DESC1
2563{
2564 UINT NumParameters;
2565 [annotation("_Field_size_full_(NumParameters)")] const D3D12_ROOT_PARAMETER1* pParameters;
2566 UINT NumStaticSamplers;
2567 [annotation("_Field_size_full_(NumStaticSamplers)")] const D3D12_STATIC_SAMPLER_DESC* pStaticSamplers;
2568 D3D12_ROOT_SIGNATURE_FLAGS Flags;
2569} D3D12_ROOT_SIGNATURE_DESC1;
2570
2571
2572typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC
2573{
2574 D3D_ROOT_SIGNATURE_VERSION Version;
2575 union
2576 {
2577 D3D12_ROOT_SIGNATURE_DESC Desc_1_0;
2578 D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1;
2579 };
2580} D3D12_VERSIONED_ROOT_SIGNATURE_DESC;
2581
2582[ uuid( 34AB647B-3CC8-46AC-841B-C0965645C046 ), object, local, pointer_default( unique ) ]
2583interface ID3D12RootSignatureDeserializer
2584 : IUnknown
2585{
2586 const D3D12_ROOT_SIGNATURE_DESC * GetRootSignatureDesc();
2587};
2588
2589[ uuid( 7F91CE67-090C-4BB7-B78E-ED8FF2E31DA0 ), object, local, pointer_default( unique ) ]
2590interface ID3D12VersionedRootSignatureDeserializer
2591 : IUnknown
2592{
2593 HRESULT GetRootSignatureDescAtVersion(D3D_ROOT_SIGNATURE_VERSION convertToVersion, [annotation("_Out_")] const D3D12_VERSIONED_ROOT_SIGNATURE_DESC** ppDesc);
2594 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* GetUnconvertedRootSignatureDesc();
2595};
2596
2597cpp_quote( "typedef HRESULT (WINAPI* PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(")
2598cpp_quote( " _In_ const D3D12_ROOT_SIGNATURE_DESC* pRootSignature," )
2599cpp_quote( " _In_ D3D_ROOT_SIGNATURE_VERSION Version," )
2600cpp_quote( " _Out_ ID3DBlob** ppBlob," )
2601cpp_quote( " _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);" )
2602cpp_quote( "" )
2603cpp_quote( "HRESULT WINAPI D3D12SerializeRootSignature(")
2604cpp_quote( " _In_ const D3D12_ROOT_SIGNATURE_DESC* pRootSignature," )
2605cpp_quote( " _In_ D3D_ROOT_SIGNATURE_VERSION Version," )
2606cpp_quote( " _Out_ ID3DBlob** ppBlob," )
2607cpp_quote( " _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);" )
2608cpp_quote( "" )
2609cpp_quote( "typedef HRESULT (WINAPI* PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER)(")
2610cpp_quote( " _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData," )
2611cpp_quote( " _In_ SIZE_T SrcDataSizeInBytes," )
2612cpp_quote( " _In_ REFIID pRootSignatureDeserializerInterface," )
2613cpp_quote( " _Out_ void** ppRootSignatureDeserializer);" )
2614cpp_quote( "" )
2615cpp_quote( "HRESULT WINAPI D3D12CreateRootSignatureDeserializer(")
2616cpp_quote( " _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData," )
2617cpp_quote( " _In_ SIZE_T SrcDataSizeInBytes," )
2618cpp_quote( " _In_ REFIID pRootSignatureDeserializerInterface," )
2619cpp_quote( " _Out_ void** ppRootSignatureDeserializer);" )
2620cpp_quote( "" )
2621cpp_quote( "typedef HRESULT (WINAPI* PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(" )
2622cpp_quote( " _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature," )
2623cpp_quote( " _Out_ ID3DBlob** ppBlob," )
2624cpp_quote( " _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);" )
2625cpp_quote( "" )
2626cpp_quote( "HRESULT WINAPI D3D12SerializeVersionedRootSignature(" )
2627cpp_quote( " _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature," )
2628cpp_quote( " _Out_ ID3DBlob** ppBlob," )
2629cpp_quote( " _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);" )
2630cpp_quote( "" )
2631cpp_quote( "typedef HRESULT (WINAPI* PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER)(" )
2632cpp_quote( " _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData," )
2633cpp_quote( " _In_ SIZE_T SrcDataSizeInBytes," )
2634cpp_quote( " _In_ REFIID pRootSignatureDeserializerInterface," )
2635cpp_quote( " _Out_ void** ppRootSignatureDeserializer);" )
2636cpp_quote( "" )
2637cpp_quote( "HRESULT WINAPI D3D12CreateVersionedRootSignatureDeserializer(")
2638cpp_quote( " _In_reads_bytes_(SrcDataSizeInBytes) LPCVOID pSrcData," )
2639cpp_quote( " _In_ SIZE_T SrcDataSizeInBytes," )
2640cpp_quote( " _In_ REFIID pRootSignatureDeserializerInterface," )
2641cpp_quote( " _Out_ void** ppRootSignatureDeserializer);" )
2642cpp_quote( "" )
2643
2644
2645
2646typedef struct D3D12_CPU_DESCRIPTOR_HANDLE
2647{
2648 SIZE_T ptr;
2649} D3D12_CPU_DESCRIPTOR_HANDLE;
2650
2651
2652typedef struct D3D12_GPU_DESCRIPTOR_HANDLE
2653{
2654 UINT64 ptr;
2655} D3D12_GPU_DESCRIPTOR_HANDLE;
2656
2657cpp_quote( "// If rects are supplied in D3D12_DISCARD_REGION, below, the resource " )
2658cpp_quote( "// must have 2D subresources with all specified subresources the same dimension." )
2659typedef struct D3D12_DISCARD_REGION
2660{
2661 UINT NumRects;
2662 [annotation("_In_reads_(NumRects)")] const D3D12_RECT* pRects;
2663 UINT FirstSubresource;
2664 UINT NumSubresources;
2665} D3D12_DISCARD_REGION;
2666
2667typedef enum D3D12_QUERY_HEAP_TYPE
2668{
2669 D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0,
2670 D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1,
2671 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2,
2672 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3,
2673 D3D12_QUERY_HEAP_TYPE_VIDEO_DECODE_STATISTICS = 4,
2674 D3D12_QUERY_HEAP_TYPE_COPY_QUEUE_TIMESTAMP = 5,
2675 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS1 = 7,
2676
2677} D3D12_QUERY_HEAP_TYPE;
2678
2679typedef struct D3D12_QUERY_HEAP_DESC
2680{
2681 D3D12_QUERY_HEAP_TYPE Type;
2682 UINT Count;
2683 UINT NodeMask;
2684} D3D12_QUERY_HEAP_DESC;
2685
2686typedef enum D3D12_QUERY_TYPE
2687{
2688 D3D12_QUERY_TYPE_OCCLUSION = 0,
2689 D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1,
2690 D3D12_QUERY_TYPE_TIMESTAMP = 2,
2691 D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3,
2692 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4,
2693 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5,
2694 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6,
2695 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7,
2696 D3D12_QUERY_TYPE_VIDEO_DECODE_STATISTICS = 8,
2697 D3D12_QUERY_TYPE_PIPELINE_STATISTICS1 = 10,
2698
2699} D3D12_QUERY_TYPE;
2700
2701typedef enum D3D12_PREDICATION_OP
2702{
2703 D3D12_PREDICATION_OP_EQUAL_ZERO = 0,
2704 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1,
2705} D3D12_PREDICATION_OP;
2706
2707typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
2708{
2709 UINT64 IAVertices;
2710 UINT64 IAPrimitives;
2711 UINT64 VSInvocations;
2712 UINT64 GSInvocations;
2713 UINT64 GSPrimitives;
2714 UINT64 CInvocations;
2715 UINT64 CPrimitives;
2716 UINT64 PSInvocations;
2717 UINT64 HSInvocations;
2718 UINT64 DSInvocations;
2719 UINT64 CSInvocations;
2720} D3D12_QUERY_DATA_PIPELINE_STATISTICS;
2721
2722typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS1
2723{
2724 UINT64 IAVertices;
2725 UINT64 IAPrimitives;
2726 UINT64 VSInvocations;
2727 UINT64 GSInvocations;
2728 UINT64 GSPrimitives;
2729 UINT64 CInvocations;
2730 UINT64 CPrimitives;
2731 UINT64 PSInvocations;
2732 UINT64 HSInvocations;
2733 UINT64 DSInvocations;
2734 UINT64 CSInvocations;
2735 UINT64 ASInvocations;
2736 UINT64 MSInvocations;
2737 UINT64 MSPrimitives;
2738} D3D12_QUERY_DATA_PIPELINE_STATISTICS1;
2739
2740typedef struct D3D12_QUERY_DATA_SO_STATISTICS
2741{
2742 UINT64 NumPrimitivesWritten;
2743 UINT64 PrimitivesStorageNeeded;
2744} D3D12_QUERY_DATA_SO_STATISTICS;
2745
2746typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
2747{
2748 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
2749 UINT64 SizeInBytes;
2750 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation;
2751} D3D12_STREAM_OUTPUT_BUFFER_VIEW;
2752
2753typedef struct D3D12_DRAW_ARGUMENTS
2754{
2755 UINT VertexCountPerInstance;
2756 UINT InstanceCount;
2757 UINT StartVertexLocation;
2758 UINT StartInstanceLocation;
2759} D3D12_DRAW_ARGUMENTS;
2760
2761typedef struct D3D12_DRAW_INDEXED_ARGUMENTS
2762{
2763 UINT IndexCountPerInstance;
2764 UINT InstanceCount;
2765 UINT StartIndexLocation;
2766 INT BaseVertexLocation;
2767 UINT StartInstanceLocation;
2768} D3D12_DRAW_INDEXED_ARGUMENTS;
2769
2770typedef struct D3D12_DISPATCH_ARGUMENTS
2771{
2772 UINT ThreadGroupCountX;
2773 UINT ThreadGroupCountY;
2774 UINT ThreadGroupCountZ;
2775} D3D12_DISPATCH_ARGUMENTS;
2776
2777typedef struct D3D12_VERTEX_BUFFER_VIEW
2778{
2779 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
2780 UINT SizeInBytes;
2781 UINT StrideInBytes;
2782} D3D12_VERTEX_BUFFER_VIEW;
2783
2784typedef struct D3D12_INDEX_BUFFER_VIEW
2785{
2786 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
2787 UINT SizeInBytes;
2788 DXGI_FORMAT Format;
2789} D3D12_INDEX_BUFFER_VIEW;
2790
2791typedef enum D3D12_INDIRECT_ARGUMENT_TYPE
2792{
2793 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW,
2794 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED,
2795 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH,
2796 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW,
2797 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW,
2798 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT,
2799 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW,
2800 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW,
2801 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW,
2802 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS,
2803 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH,
2804} D3D12_INDIRECT_ARGUMENT_TYPE;
2805
2806typedef struct D3D12_INDIRECT_ARGUMENT_DESC
2807{
2808 D3D12_INDIRECT_ARGUMENT_TYPE Type;
2809
2810 union
2811 {
2812 struct
2813 {
2814 UINT Slot;
2815 } VertexBuffer;
2816
2817 struct
2818 {
2819 UINT RootParameterIndex;
2820 UINT DestOffsetIn32BitValues;
2821 UINT Num32BitValuesToSet;
2822 } Constant;
2823
2824 struct
2825 {
2826 UINT RootParameterIndex;
2827 } ConstantBufferView;
2828
2829 struct
2830 {
2831 UINT RootParameterIndex;
2832 } ShaderResourceView;
2833
2834 struct
2835 {
2836 UINT RootParameterIndex;
2837 } UnorderedAccessView;
2838 };
2839} D3D12_INDIRECT_ARGUMENT_DESC;
2840
2841typedef struct D3D12_COMMAND_SIGNATURE_DESC
2842{
2843 // The number of bytes between each drawing structure
2844 UINT ByteStride;
2845 UINT NumArgumentDescs;
2846 [annotation("_Field_size_full_(NumArgumentDescs)")] const D3D12_INDIRECT_ARGUMENT_DESC* pArgumentDescs;
2847 UINT NodeMask;
2848} D3D12_COMMAND_SIGNATURE_DESC;
2849
2850interface ID3D12Device;
2851
2852[ uuid( c4fec28f-7966-4e95-9f94-f431cb56c3b8 ), object, local, pointer_default( unique ) ]
2853interface ID3D12Object
2854 : IUnknown
2855{
2856 HRESULT GetPrivateData(
2857 [annotation("_In_")] REFGUID guid,
2858 [annotation("_Inout_")] UINT* pDataSize,
2859 [annotation("_Out_writes_bytes_opt_( *pDataSize )")] void* pData );
2860 HRESULT SetPrivateData(
2861 [annotation("_In_")] REFGUID guid,
2862 [annotation("_In_")] UINT DataSize,
2863 [annotation("_In_reads_bytes_opt_( DataSize )")] const void* pData );
2864 HRESULT SetPrivateDataInterface(
2865 [annotation("_In_")] REFGUID guid,
2866 [annotation("_In_opt_")] const IUnknown* pData );
2867 HRESULT SetName(
2868 [annotation("_In_z_")] LPCWSTR Name );
2869}
2870
2871[ uuid( 905db94b-a00c-4140-9df5-2b64ca9ea357 ), object, local, pointer_default( unique ) ]
2872interface ID3D12DeviceChild
2873 : ID3D12Object
2874{
2875 HRESULT GetDevice(
2876 [in] REFIID riid,
2877 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvDevice
2878 );
2879}
2880
2881[ uuid( 63ee58fb-1268-4835-86da-f008ce62f0d6 ), object, local, pointer_default( unique ) ]
2882interface ID3D12Pageable
2883 : ID3D12DeviceChild
2884{
2885}
2886
2887[ uuid( 6b3b2502-6e51-45b3-90ee-9884265e8df3 ), object, local, pointer_default( unique ) ]
2888interface ID3D12Heap
2889 : ID3D12Pageable
2890{
2891 D3D12_HEAP_DESC GetDesc();
2892}
2893
2894[ uuid( 696442be-a72e-4059-bc79-5b5c98040fad ), object, local, pointer_default( unique ) ]
2895interface ID3D12Resource
2896 : ID3D12Pageable
2897{
2898 HRESULT Map(
2899 UINT Subresource,
2900 [annotation("_In_opt_")] const D3D12_RANGE* pReadRange,
2901 [annotation("_Outptr_opt_result_bytebuffer_(_Inexpressible_(\"Dependent on resource\"))")] void** ppData);
2902
2903 void Unmap(UINT Subresource, [annotation("_In_opt_")] const D3D12_RANGE* pWrittenRange );
2904
2905 D3D12_RESOURCE_DESC GetDesc();
2906
2907 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress();
2908
2909 HRESULT WriteToSubresource(
2910 UINT DstSubresource,
2911 [annotation("_In_opt_")] const D3D12_BOX* pDstBox,
2912 [annotation("_In_")] const void* pSrcData,
2913 UINT SrcRowPitch,
2914 UINT SrcDepthPitch );
2915
2916 HRESULT ReadFromSubresource(
2917 [annotation("_Out_")] void* pDstData,
2918 UINT DstRowPitch,
2919 UINT DstDepthPitch,
2920 UINT SrcSubresource,
2921 [annotation("_In_opt_")] const D3D12_BOX* pSrcBox );
2922
2923 HRESULT GetHeapProperties(
2924 [annotation("_Out_opt_")] D3D12_HEAP_PROPERTIES* pHeapProperties,
2925 [annotation("_Out_opt_")] D3D12_HEAP_FLAGS* pHeapFlags
2926 );
2927}
2928
2929[ uuid( 6102dee4-af59-4b09-b999-b44d73f09b24 ), object, local, pointer_default( unique ) ]
2930interface ID3D12CommandAllocator
2931 : ID3D12Pageable
2932{
2933 HRESULT Reset();
2934}
2935
2936[ uuid( 0a753dcf-c4d8-4b91-adf6-be5a60d95a76 ), object, local, pointer_default( unique ) ]
2937interface ID3D12Fence
2938 : ID3D12Pageable
2939{
2940 UINT64 GetCompletedValue();
2941 HRESULT SetEventOnCompletion(UINT64 Value, HANDLE hEvent);
2942 HRESULT Signal(UINT64 Value);
2943};
2944
2945[ uuid( 433685fe-e22b-4ca0-a8db-b5b4f4dd0e4a ), object, local, pointer_default( unique ) ]
2946interface ID3D12Fence1
2947 : ID3D12Fence
2948{
2949 D3D12_FENCE_FLAGS GetCreationFlags();
2950};
2951
2952[ uuid( 765a30f3-f624-4c6f-a828-ace948622445 ), object, local, pointer_default( unique ) ]
2953interface ID3D12PipelineState
2954 : ID3D12Pageable
2955{
2956 HRESULT GetCachedBlob([annotation("_COM_Outptr_")] ID3DBlob** ppBlob);
2957}
2958
2959[ uuid( 8efb471d-616c-4f49-90f7-127bb763fa51 ), object, local, pointer_default( unique ) ]
2960interface ID3D12DescriptorHeap
2961 : ID3D12Pageable
2962{
2963 D3D12_DESCRIPTOR_HEAP_DESC GetDesc();
2964
2965 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart();
2966 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart();
2967}
2968
2969[ uuid( 0d9658ae-ed45-469e-a61d-970ec583cab4 ), object, local, pointer_default( unique ) ]
2970interface ID3D12QueryHeap
2971 : ID3D12Pageable
2972{
2973};
2974
2975[ uuid( c36a797c-ec80-4f0a-8985-a7b2475082d1 ), object, local, pointer_default( unique ) ]
2976interface ID3D12CommandSignature
2977 : ID3D12Pageable
2978{
2979};
2980
2981[ uuid( 7116d91c-e7e4-47ce-b8c6-ec8168f437e5 ), object, local, pointer_default( unique ) ]
2982interface ID3D12CommandList
2983 : ID3D12DeviceChild
2984{
2985 D3D12_COMMAND_LIST_TYPE GetType();
2986}
2987
2988// Superseded by ID3D12GraphicsCommandList1
2989[ uuid( 5b160d0f-ac1b-4185-8ba8-b3ae42a5a455 ), object, local, pointer_default( unique ) ]
2990interface ID3D12GraphicsCommandList
2991 : ID3D12CommandList
2992{
2993 HRESULT Close();
2994
2995 HRESULT Reset(
2996 [annotation("_In_")] ID3D12CommandAllocator* pAllocator,
2997 [annotation("_In_opt_")] ID3D12PipelineState* pInitialState
2998 );
2999
3000 void ClearState(
3001 [annotation("_In_opt_")] ID3D12PipelineState* pPipelineState
3002 );
3003
3004 void DrawInstanced(
3005 [annotation("_In_")] UINT VertexCountPerInstance,
3006 [annotation("_In_")] UINT InstanceCount,
3007 [annotation("_In_")] UINT StartVertexLocation,
3008 [annotation("_In_")] UINT StartInstanceLocation
3009 );
3010
3011 void DrawIndexedInstanced(
3012 [annotation("_In_")] UINT IndexCountPerInstance,
3013 [annotation("_In_")] UINT InstanceCount,
3014 [annotation("_In_")] UINT StartIndexLocation,
3015 [annotation("_In_")] INT BaseVertexLocation,
3016 [annotation("_In_")] UINT StartInstanceLocation
3017 );
3018
3019 void Dispatch(
3020 [annotation("_In_")] UINT ThreadGroupCountX,
3021 [annotation("_In_")] UINT ThreadGroupCountY,
3022 [annotation("_In_")] UINT ThreadGroupCountZ
3023 );
3024
3025 void CopyBufferRegion(
3026 [annotation("_In_")] ID3D12Resource* pDstBuffer,
3027 UINT64 DstOffset,
3028 [annotation("_In_")] ID3D12Resource* pSrcBuffer,
3029 UINT64 SrcOffset,
3030 UINT64 NumBytes
3031 );
3032
3033 void CopyTextureRegion(
3034 [annotation("_In_")] const D3D12_TEXTURE_COPY_LOCATION* pDst,
3035 UINT DstX, UINT DstY, UINT DstZ,
3036 [annotation("_In_")] const D3D12_TEXTURE_COPY_LOCATION* pSrc,
3037 [annotation("_In_opt_")] const D3D12_BOX* pSrcBox
3038 );
3039
3040 void CopyResource(
3041 [annotation("_In_")] ID3D12Resource* pDstResource,
3042 [annotation("_In_")] ID3D12Resource* pSrcResource
3043 );
3044
3045 void CopyTiles(
3046 [annotation("_In_")] ID3D12Resource* pTiledResource,
3047 [annotation("_In_")] const D3D12_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate,
3048 [annotation("_In_")] const D3D12_TILE_REGION_SIZE* pTileRegionSize,
3049 [annotation("_In_")] ID3D12Resource* pBuffer,
3050 UINT64 BufferStartOffsetInBytes,
3051 D3D12_TILE_COPY_FLAGS Flags
3052 );
3053
3054 void ResolveSubresource(
3055 [annotation("_In_")] ID3D12Resource* pDstResource,
3056 [annotation("_In_")] UINT DstSubresource,
3057 [annotation("_In_")] ID3D12Resource* pSrcResource,
3058 [annotation("_In_")] UINT SrcSubresource,
3059 [annotation("_In_")] DXGI_FORMAT Format
3060 );
3061
3062 void IASetPrimitiveTopology(
3063 [annotation("_In_")] D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology
3064 );
3065
3066 void RSSetViewports(
3067 [annotation("_In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE)")] UINT NumViewports,
3068 [annotation("_In_reads_( NumViewports)")] const D3D12_VIEWPORT* pViewports
3069 );
3070
3071 void RSSetScissorRects(
3072 [annotation("_In_range_(0, D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE)")] UINT NumRects,
3073 [annotation("_In_reads_( NumRects)")] const D3D12_RECT* pRects
3074 );
3075
3076 void OMSetBlendFactor(
3077 [annotation("_In_reads_opt_(4)")] const FLOAT BlendFactor[ 4 ]
3078 );
3079
3080 void OMSetStencilRef(
3081 [annotation("_In_")] UINT StencilRef
3082 );
3083
3084 void SetPipelineState(
3085 [annotation("_In_")] ID3D12PipelineState* pPipelineState
3086 );
3087
3088 void ResourceBarrier(
3089 [annotation("_In_")] UINT NumBarriers,
3090 [annotation("_In_reads_(NumBarriers)")] const D3D12_RESOURCE_BARRIER* pBarriers
3091 );
3092
3093 void ExecuteBundle(
3094 [annotation("_In_")] ID3D12GraphicsCommandList* pCommandList
3095 );
3096
3097 void SetDescriptorHeaps(
3098 [annotation("_In_")] UINT NumDescriptorHeaps,
3099 [annotation("_In_reads_(NumDescriptorHeaps)")] ID3D12DescriptorHeap* const* ppDescriptorHeaps
3100 );
3101
3102 void SetComputeRootSignature(
3103 [annotation("_In_opt_")] ID3D12RootSignature* pRootSignature
3104 );
3105
3106 void SetGraphicsRootSignature(
3107 [annotation("_In_opt_")] ID3D12RootSignature* pRootSignature
3108 );
3109
3110 void SetComputeRootDescriptorTable(
3111 [annotation("_In_")] UINT RootParameterIndex,
3112 [annotation("_In_")] D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor
3113 );
3114
3115 void SetGraphicsRootDescriptorTable(
3116 [annotation("_In_")] UINT RootParameterIndex,
3117 [annotation("_In_")] D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor
3118 );
3119
3120 // Single constant
3121 void SetComputeRoot32BitConstant(
3122 [annotation("_In_")] UINT RootParameterIndex,
3123 [annotation("_In_")] UINT SrcData,
3124 [annotation("_In_")] UINT DestOffsetIn32BitValues
3125 );
3126
3127 void SetGraphicsRoot32BitConstant(
3128 [annotation("_In_")] UINT RootParameterIndex,
3129 [annotation("_In_")] UINT SrcData,
3130 [annotation("_In_")] UINT DestOffsetIn32BitValues
3131 );
3132
3133 // Group of constants
3134 void SetComputeRoot32BitConstants(
3135 [annotation("_In_")] UINT RootParameterIndex,
3136 [annotation("_In_")] UINT Num32BitValuesToSet,
3137 [annotation("_In_reads_(Num32BitValuesToSet*sizeof(UINT))")] const void* pSrcData,
3138 [annotation("_In_")] UINT DestOffsetIn32BitValues
3139 );
3140
3141 void SetGraphicsRoot32BitConstants(
3142 [annotation("_In_")] UINT RootParameterIndex,
3143 [annotation("_In_")] UINT Num32BitValuesToSet,
3144 [annotation("_In_reads_(Num32BitValuesToSet*sizeof(UINT))")] const void* pSrcData,
3145 [annotation("_In_")] UINT DestOffsetIn32BitValues
3146 );
3147
3148 // CBV
3149 void SetComputeRootConstantBufferView(
3150 [annotation("_In_")] UINT RootParameterIndex,
3151 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
3152 );
3153
3154 void SetGraphicsRootConstantBufferView(
3155 [annotation("_In_")] UINT RootParameterIndex,
3156 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
3157 );
3158
3159 // SRV
3160 void SetComputeRootShaderResourceView(
3161 [annotation("_In_")] UINT RootParameterIndex,
3162 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
3163 );
3164
3165 void SetGraphicsRootShaderResourceView(
3166 [annotation("_In_")] UINT RootParameterIndex,
3167 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
3168 );
3169
3170 // UAV
3171 void SetComputeRootUnorderedAccessView(
3172 [annotation("_In_")] UINT RootParameterIndex,
3173 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
3174 );
3175
3176 void SetGraphicsRootUnorderedAccessView(
3177 [annotation("_In_")] UINT RootParameterIndex,
3178 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
3179 );
3180
3181 void IASetIndexBuffer(
3182 [annotation("_In_opt_")] const D3D12_INDEX_BUFFER_VIEW* pView
3183 );
3184
3185 void IASetVertexBuffers(
3186 [annotation("_In_")] UINT StartSlot,
3187 [annotation("_In_")] UINT NumViews,
3188 [annotation("_In_reads_opt_(NumViews)")] const D3D12_VERTEX_BUFFER_VIEW* pViews
3189 );
3190
3191 void SOSetTargets(
3192 [annotation("_In_")] UINT StartSlot,
3193 [annotation("_In_")] UINT NumViews,
3194 [annotation("_In_reads_opt_(NumViews)")] const D3D12_STREAM_OUTPUT_BUFFER_VIEW* pViews
3195 );
3196
3197 void OMSetRenderTargets(
3198 [annotation("_In_")] UINT NumRenderTargetDescriptors,
3199 [annotation("_In_opt_")] const D3D12_CPU_DESCRIPTOR_HANDLE* pRenderTargetDescriptors,
3200 [annotation("_In_")] BOOL RTsSingleHandleToDescriptorRange,
3201 [annotation("_In_opt_")] const D3D12_CPU_DESCRIPTOR_HANDLE* pDepthStencilDescriptor
3202 );
3203
3204 void ClearDepthStencilView(
3205 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView,
3206 [annotation("_In_")] D3D12_CLEAR_FLAGS ClearFlags,
3207 [annotation("_In_")] FLOAT Depth,
3208 [annotation("_In_")] UINT8 Stencil,
3209 [annotation("_In_")] UINT NumRects,
3210 [annotation("_In_reads_(NumRects)")] const D3D12_RECT* pRects
3211 );
3212
3213 void ClearRenderTargetView(
3214 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView,
3215 [annotation("_In_")] const FLOAT ColorRGBA[4],
3216 [annotation("_In_")] UINT NumRects,
3217 [annotation("_In_reads_(NumRects)")] const D3D12_RECT* pRects
3218 );
3219
3220 void ClearUnorderedAccessViewUint(
3221 [annotation("_In_")] D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap,
3222 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle,
3223 [annotation("_In_")] ID3D12Resource* pResource,
3224 [annotation("_In_")] const UINT Values[4],
3225 [annotation("_In_")] UINT NumRects,
3226 [annotation("_In_reads_(NumRects)")] const D3D12_RECT* pRects
3227 );
3228
3229 void ClearUnorderedAccessViewFloat(
3230 [annotation("_In_")] D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap,
3231 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle,
3232 [annotation("_In_")] ID3D12Resource* pResource,
3233 [annotation("_In_")] const FLOAT Values[4],
3234 [annotation("_In_")] UINT NumRects,
3235 [annotation("_In_reads_(NumRects)")] const D3D12_RECT* pRects
3236 );
3237
3238 void DiscardResource(
3239 [annotation("_In_")] ID3D12Resource* pResource,
3240 [annotation("_In_opt_")] const D3D12_DISCARD_REGION* pRegion
3241 );
3242
3243 void BeginQuery(
3244 [annotation("_In_")] ID3D12QueryHeap* pQueryHeap,
3245 [annotation("_In_")] D3D12_QUERY_TYPE Type,
3246 [annotation("_In_")] UINT Index
3247 );
3248
3249 void EndQuery(
3250 [annotation("_In_")] ID3D12QueryHeap* pQueryHeap,
3251 [annotation("_In_")] D3D12_QUERY_TYPE Type,
3252 [annotation("_In_")] UINT Index
3253 );
3254
3255 void ResolveQueryData(
3256 [annotation("_In_")] ID3D12QueryHeap* pQueryHeap,
3257 [annotation("_In_")] D3D12_QUERY_TYPE Type,
3258 [annotation("_In_")] UINT StartIndex,
3259 [annotation("_In_")] UINT NumQueries,
3260 [annotation("_In_")] ID3D12Resource* pDestinationBuffer,
3261 [annotation("_In_")] UINT64 AlignedDestinationBufferOffset
3262 );
3263
3264 void SetPredication(
3265 [annotation("_In_opt_")] ID3D12Resource* pBuffer,
3266 [annotation("_In_")] UINT64 AlignedBufferOffset,
3267 [annotation("_In_")] D3D12_PREDICATION_OP Operation
3268 );
3269
3270 void SetMarker(UINT Metadata, [annotation("_In_reads_bytes_opt_(Size)")] const void* pData, UINT Size);
3271 void BeginEvent(UINT Metadata, [annotation("_In_reads_bytes_opt_(Size)")] const void* pData, UINT Size);
3272 void EndEvent();
3273
3274 void ExecuteIndirect(
3275 [annotation("_In_")] ID3D12CommandSignature* pCommandSignature,
3276 [annotation("_In_")] UINT MaxCommandCount,
3277 [annotation("_In_")] ID3D12Resource* pArgumentBuffer,
3278 [annotation("_In_")] UINT64 ArgumentBufferOffset,
3279 [annotation("_In_opt_")] ID3D12Resource* pCountBuffer,
3280 [annotation("_In_")] UINT64 CountBufferOffset
3281 );
3282}
3283
3284[ uuid( 553103fb-1fe7-4557-bb38-946d7d0e7ca7 ), object, local, pointer_default( unique ) ]
3285interface ID3D12GraphicsCommandList1
3286 : ID3D12GraphicsCommandList
3287{
3288 void AtomicCopyBufferUINT(
3289 [annotation("_In_")] ID3D12Resource* pDstBuffer,
3290 UINT64 DstOffset,
3291 [annotation("_In_")] ID3D12Resource* pSrcBuffer,
3292 UINT64 SrcOffset,
3293 UINT Dependencies, // 0 Dependencies means only the dst buffer offset is synchronized
3294 [annotation("_In_reads_(Dependencies)")] ID3D12Resource*const* ppDependentResources,
3295 [annotation("_In_reads_(Dependencies)")] const D3D12_SUBRESOURCE_RANGE_UINT64* pDependentSubresourceRanges
3296 );
3297
3298 // UINT64 is only valid on UMA architectures
3299 void AtomicCopyBufferUINT64(
3300 [annotation("_In_")] ID3D12Resource* pDstBuffer,
3301 UINT64 DstOffset,
3302 [annotation("_In_")] ID3D12Resource* pSrcBuffer,
3303 UINT64 SrcOffset,
3304 UINT Dependencies, // 0 Dependencies means only the dst buffer offset is synchronized
3305 [annotation("_In_reads_(Dependencies)")] ID3D12Resource*const* ppDependentResources,
3306 [annotation("_In_reads_(Dependencies)")] const D3D12_SUBRESOURCE_RANGE_UINT64* pDependentSubresourceRanges
3307 );
3308
3309 void OMSetDepthBounds(
3310 [annotation("_In_")] FLOAT Min,
3311 [annotation("_In_")] FLOAT Max
3312 );
3313
3314 void SetSamplePositions(
3315 [annotation("_In_")] UINT NumSamplesPerPixel,
3316 [annotation("_In_")] UINT NumPixels,
3317 [annotation("_In_reads_(NumSamplesPerPixel*NumPixels)")] D3D12_SAMPLE_POSITION* pSamplePositions
3318 );
3319
3320 void ResolveSubresourceRegion(
3321 [annotation("_In_")] ID3D12Resource* pDstResource,
3322 [annotation("_In_")] UINT DstSubresource,
3323 [annotation("_In_")] UINT DstX,
3324 [annotation("_In_")] UINT DstY,
3325 [annotation("_In_")] ID3D12Resource* pSrcResource,
3326 [annotation("_In_")] UINT SrcSubresource,
3327 [annotation("_In_opt_")] D3D12_RECT* pSrcRect,
3328 [annotation("_In_")] DXGI_FORMAT Format,
3329 [annotation("_In_")] D3D12_RESOLVE_MODE ResolveMode
3330 );
3331
3332 void SetViewInstanceMask(
3333 [annotation("_In_")] UINT Mask
3334 );
3335
3336}
3337
3338typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
3339{
3340 D3D12_GPU_VIRTUAL_ADDRESS Dest;
3341 UINT32 Value;
3342} D3D12_WRITEBUFFERIMMEDIATE_PARAMETER;
3343
3344typedef enum D3D12_WRITEBUFFERIMMEDIATE_MODE
3345{
3346 D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0x0,
3347 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1,
3348 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2,
3349
3350} D3D12_WRITEBUFFERIMMEDIATE_MODE;
3351
3352[uuid(38C3E585-FF17-412C-9150-4FC6F9D72A28), object, local, pointer_default(unique)]
3353interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
3354{
3355 void WriteBufferImmediate(
3356 UINT Count,
3357 [annotation("_In_reads_(Count)")] const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
3358 [annotation("_In_reads_opt_(Count)")] const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes
3359 );
3360}
3361
3362[ uuid( 0ec870a6-5d7e-4c22-8cfc-5baae07616ed ), object, local, pointer_default( unique ) ]
3363interface ID3D12CommandQueue
3364 : ID3D12Pageable
3365{
3366 void UpdateTileMappings(
3367 [annotation("_In_")] ID3D12Resource* pResource,
3368 UINT NumResourceRegions,
3369 [annotation("_In_reads_opt_(NumResourceRegions)")] const D3D12_TILED_RESOURCE_COORDINATE* pResourceRegionStartCoordinates,
3370 [annotation("_In_reads_opt_(NumResourceRegions)")] const D3D12_TILE_REGION_SIZE* pResourceRegionSizes,
3371 [annotation("_In_opt_")] ID3D12Heap* pHeap,
3372 UINT NumRanges,
3373 [annotation("_In_reads_opt_(NumRanges)")] const D3D12_TILE_RANGE_FLAGS* pRangeFlags,
3374 [annotation("_In_reads_opt_(NumRanges)")] const UINT* pHeapRangeStartOffsets,
3375 [annotation("_In_reads_opt_(NumRanges)")] const UINT* pRangeTileCounts,
3376 D3D12_TILE_MAPPING_FLAGS Flags );
3377
3378 void CopyTileMappings(
3379 [annotation("_In_")] ID3D12Resource* pDstResource,
3380 [annotation("_In_")] const D3D12_TILED_RESOURCE_COORDINATE* pDstRegionStartCoordinate,
3381 [annotation("_In_")] ID3D12Resource* pSrcResource,
3382 [annotation("_In_")] const D3D12_TILED_RESOURCE_COORDINATE* pSrcRegionStartCoordinate,
3383 [annotation("_In_")] const D3D12_TILE_REGION_SIZE* pRegionSize,
3384 D3D12_TILE_MAPPING_FLAGS Flags );
3385
3386 void ExecuteCommandLists(
3387 [annotation("_In_")] UINT NumCommandLists,
3388 [annotation("_In_reads_(NumCommandLists)")] ID3D12CommandList * const * ppCommandLists
3389 );
3390
3391 void SetMarker(UINT Metadata, [annotation("_In_reads_bytes_opt_(Size)")] const void* pData, UINT Size);
3392 void BeginEvent(UINT Metadata, [annotation("_In_reads_bytes_opt_(Size)")] const void* pData, UINT Size);
3393 void EndEvent();
3394
3395 HRESULT Signal(ID3D12Fence* pFence, UINT64 Value);
3396 HRESULT Wait(ID3D12Fence* pFence, UINT64 Value);
3397
3398 HRESULT GetTimestampFrequency(
3399 [annotation("_Out_")] UINT64* pFrequency
3400 );
3401
3402 HRESULT GetClockCalibration(
3403 [annotation("_Out_")] UINT64* pGpuTimestamp,
3404 [annotation("_Out_")] UINT64* pCpuTimestamp
3405 );
3406
3407 D3D12_COMMAND_QUEUE_DESC GetDesc();
3408}
3409
3410//--------------------------------------------------------------------------------------------------------
3411// The system LUID struct isn't defined in wtypes, so we repeat it here just
3412// for the MIDL compiler.
3413cpp_quote("#ifdef __midl")
3414cpp_quote("#ifndef LUID_DEFINED")
3415cpp_quote("#define LUID_DEFINED 1")
3416typedef struct __LUID {
3417 DWORD LowPart;
3418 LONG HighPart;
3419} LUID, *PLUID;
3420cpp_quote("#endif")
3421cpp_quote("#endif")
3422
3423[ uuid( 189819f1-1db6-4b57-be54-1821339b85f7 ), object, local, pointer_default( unique ) ]
3424interface ID3D12Device
3425 : ID3D12Object
3426{
3427 UINT GetNodeCount();
3428
3429 HRESULT CreateCommandQueue(
3430 [annotation("_In_")] const D3D12_COMMAND_QUEUE_DESC* pDesc,
3431 [in] REFIID riid, // Expected: ID3D12CommandQueue
3432 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppCommandQueue
3433 );
3434
3435 HRESULT CreateCommandAllocator(
3436 [annotation("_In_")] D3D12_COMMAND_LIST_TYPE type,
3437 [in] REFIID riid, // Expected: ID3D12CommandAllocator
3438 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppCommandAllocator
3439 );
3440
3441 HRESULT CreateGraphicsPipelineState(
3442 [annotation("_In_")] const D3D12_GRAPHICS_PIPELINE_STATE_DESC* pDesc,
3443 [in] REFIID riid, // Expected: ID3D12PipelineState
3444 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineState
3445 );
3446
3447 HRESULT CreateComputePipelineState(
3448 [annotation("_In_")] const D3D12_COMPUTE_PIPELINE_STATE_DESC* pDesc,
3449 [in] REFIID riid, // Expected: ID3D12PipelineState
3450 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineState
3451 );
3452
3453 HRESULT CreateCommandList(
3454 [annotation("_In_")] UINT nodeMask,
3455 [annotation("_In_")] D3D12_COMMAND_LIST_TYPE type,
3456 [annotation("_In_")] ID3D12CommandAllocator* pCommandAllocator,
3457 [annotation("_In_opt_")] ID3D12PipelineState* pInitialState,
3458 [in] REFIID riid, // Expected: ID3D12CommandList
3459 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppCommandList
3460 );
3461
3462 HRESULT CheckFeatureSupport(
3463 D3D12_FEATURE Feature,
3464 [annotation("_Inout_updates_bytes_(FeatureSupportDataSize)")] void* pFeatureSupportData,
3465 UINT FeatureSupportDataSize
3466 );
3467
3468 HRESULT CreateDescriptorHeap(
3469 [annotation("_In_")] const D3D12_DESCRIPTOR_HEAP_DESC* pDescriptorHeapDesc,
3470 [in] REFIID riid, // Expected ID3D12DescriptorHeap
3471 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvHeap);
3472
3473 UINT GetDescriptorHandleIncrementSize(
3474 [annotation("_In_")] D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType);
3475
3476 HRESULT CreateRootSignature(
3477 [annotation("_In_")] UINT nodeMask,
3478 [annotation("_In_reads_(blobLengthInBytes)")] const void* pBlobWithRootSignature,
3479 [annotation("_In_")] SIZE_T blobLengthInBytes,
3480 [in] REFIID riid, // Expected ID3D12RootSignature
3481 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvRootSignature);
3482
3483 void CreateConstantBufferView(
3484 [annotation("_In_opt_")] const D3D12_CONSTANT_BUFFER_VIEW_DESC* pDesc,
3485 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
3486
3487 void CreateShaderResourceView(
3488 [annotation("_In_opt_")] ID3D12Resource* pResource,
3489 [annotation("_In_opt_")] const D3D12_SHADER_RESOURCE_VIEW_DESC* pDesc,
3490 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
3491
3492 void CreateUnorderedAccessView(
3493 [annotation("_In_opt_")] ID3D12Resource* pResource,
3494 [annotation("_In_opt_")] ID3D12Resource* pCounterResource,
3495 [annotation("_In_opt_")] const D3D12_UNORDERED_ACCESS_VIEW_DESC* pDesc,
3496 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
3497
3498 void CreateRenderTargetView(
3499 [annotation("_In_opt_")] ID3D12Resource* pResource,
3500 [annotation("_In_opt_")] const D3D12_RENDER_TARGET_VIEW_DESC* pDesc,
3501 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
3502
3503 void CreateDepthStencilView(
3504 [annotation("_In_opt_")] ID3D12Resource* pResource,
3505 [annotation("_In_opt_")] const D3D12_DEPTH_STENCIL_VIEW_DESC* pDesc,
3506 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
3507
3508 void CreateSampler(
3509 [annotation("_In_")] const D3D12_SAMPLER_DESC* pDesc,
3510 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
3511
3512 void CopyDescriptors(
3513 [annotation("_In_")] UINT NumDestDescriptorRanges,
3514 [annotation("_In_reads_(NumDestDescriptorRanges)")] const D3D12_CPU_DESCRIPTOR_HANDLE* pDestDescriptorRangeStarts,
3515 [annotation("_In_reads_opt_(NumDestDescriptorRanges)")] const UINT* pDestDescriptorRangeSizes, // NULL means all ranges 1
3516 [annotation("_In_")] UINT NumSrcDescriptorRanges,
3517 [annotation("_In_reads_(NumSrcDescriptorRanges)")] const D3D12_CPU_DESCRIPTOR_HANDLE* pSrcDescriptorRangeStarts,
3518 [annotation("_In_reads_opt_(NumSrcDescriptorRanges)")] const UINT* pSrcDescriptorRangeSizes, // NULL means all ranges 1
3519 [annotation("_In_")] D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType);
3520
3521 void CopyDescriptorsSimple(
3522 [annotation("_In_")] UINT NumDescriptors,
3523 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart,
3524 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart,
3525 [annotation("_In_")] D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType);
3526
3527 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(
3528 [annotation("_In_")] UINT visibleMask,
3529 [annotation("_In_")] UINT numResourceDescs,
3530 [annotation("_In_reads_(numResourceDescs)")] const D3D12_RESOURCE_DESC* pResourceDescs );
3531
3532 D3D12_HEAP_PROPERTIES GetCustomHeapProperties(
3533 [annotation("_In_")] UINT nodeMask,
3534 D3D12_HEAP_TYPE heapType
3535 );
3536
3537 HRESULT CreateCommittedResource(
3538 [annotation("_In_")] const D3D12_HEAP_PROPERTIES* pHeapProperties,
3539 D3D12_HEAP_FLAGS HeapFlags,
3540 [annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
3541 D3D12_RESOURCE_STATES InitialResourceState,
3542 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
3543 [in] REFIID riidResource, // Expected: ID3D12Resource*
3544 [out, iid_is(riidResource), annotation("_COM_Outptr_opt_")] void** ppvResource );
3545
3546 HRESULT CreateHeap(
3547 [annotation("_In_")] const D3D12_HEAP_DESC* pDesc,
3548 [in] REFIID riid, // Expected: ID3D12Heap*
3549 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvHeap );
3550
3551 HRESULT CreatePlacedResource(
3552 [annotation("_In_")] ID3D12Heap* pHeap,
3553 UINT64 HeapOffset,
3554 [annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
3555 D3D12_RESOURCE_STATES InitialState,
3556 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
3557 [in] REFIID riid, // Expected: ID3D12Resource*
3558 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvResource );
3559
3560 HRESULT CreateReservedResource(
3561 [annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
3562 D3D12_RESOURCE_STATES InitialState,
3563 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
3564 [in] REFIID riid, // Expected: ID3D12Resource*
3565 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvResource );
3566
3567 HRESULT CreateSharedHandle(
3568 [annotation("_In_")] ID3D12DeviceChild* pObject,
3569 [annotation("_In_opt_")] const SECURITY_ATTRIBUTES* pAttributes,
3570 DWORD Access,
3571 [annotation("_In_opt_")] LPCWSTR Name,
3572 [annotation("_Out_")] HANDLE* pHandle );
3573
3574 HRESULT OpenSharedHandle(
3575 [annotation("_In_")] HANDLE NTHandle,
3576 [in] REFIID riid, // Expected: ID3D12Resource*, ID3D12Heap*, or ID3D12Fence
3577 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvObj );
3578
3579 HRESULT OpenSharedHandleByName(
3580 [annotation("_In_")] LPCWSTR Name,
3581 DWORD Access,
3582 [out, annotation("_Out_")] HANDLE* pNTHandle );
3583
3584 HRESULT MakeResident(
3585 UINT NumObjects,
3586 [annotation("_In_reads_(NumObjects)")] ID3D12Pageable*const* ppObjects );
3587
3588 HRESULT Evict(
3589 UINT NumObjects,
3590 [annotation("_In_reads_(NumObjects)")] ID3D12Pageable*const* ppObjects );
3591
3592 HRESULT CreateFence(
3593 UINT64 InitialValue,
3594 D3D12_FENCE_FLAGS Flags,
3595 [in] REFIID riid, // Expected: ID3D12Fence
3596 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppFence);
3597
3598 HRESULT GetDeviceRemovedReason();
3599
3600 void GetCopyableFootprints(
3601 [annotation("_In_")] const D3D12_RESOURCE_DESC* pResourceDesc,
3602 [annotation("_In_range_(0,D3D12_REQ_SUBRESOURCES)")] UINT FirstSubresource,
3603 [annotation("_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource)")] UINT NumSubresources,
3604 UINT64 BaseOffset,
3605 [annotation("_Out_writes_opt_(NumSubresources)")] D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
3606 [annotation("_Out_writes_opt_(NumSubresources)")] UINT* pNumRows,
3607 [annotation("_Out_writes_opt_(NumSubresources)")] UINT64* pRowSizeInBytes,
3608 [annotation("_Out_opt_")] UINT64* pTotalBytes );
3609
3610 HRESULT CreateQueryHeap(
3611 [annotation("_In_")] const D3D12_QUERY_HEAP_DESC* pDesc,
3612 [in] REFIID riid, // Expected: ID3D12QueryHeap
3613 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvHeap
3614 );
3615
3616 HRESULT SetStablePowerState(BOOL Enable);
3617
3618 HRESULT CreateCommandSignature(
3619 [annotation("_In_")] const D3D12_COMMAND_SIGNATURE_DESC* pDesc,
3620 [annotation("_In_opt_")] ID3D12RootSignature* pRootSignature,
3621 [in] REFIID riid, // Expected: ID3D12CommandSignature
3622 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvCommandSignature
3623 );
3624
3625 void GetResourceTiling(
3626 [annotation("_In_")] ID3D12Resource* pTiledResource,
3627 [annotation("_Out_opt_")] UINT* pNumTilesForEntireResource,
3628 [annotation("_Out_opt_")] D3D12_PACKED_MIP_INFO* pPackedMipDesc,
3629 [annotation("_Out_opt_")] D3D12_TILE_SHAPE* pStandardTileShapeForNonPackedMips,
3630 [annotation("_Inout_opt_")] UINT* pNumSubresourceTilings,
3631 [annotation("_In_")] UINT FirstSubresourceTilingToGet,
3632 [annotation("_Out_writes_(*pNumSubresourceTilings)")] D3D12_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips
3633 );
3634
3635 LUID GetAdapterLuid();
3636}
3637
3638// D3D12 Revision 1
3639[ uuid( c64226a8-9201-46af-b4cc-53fb9ff7414f ), object, local, pointer_default( unique ) ]
3640interface ID3D12PipelineLibrary
3641 : ID3D12DeviceChild
3642{
3643 HRESULT StorePipeline(
3644 [annotation("_In_opt_")] LPCWSTR pName,
3645 [annotation("_In_")] ID3D12PipelineState *pPipeline
3646 );
3647
3648 HRESULT LoadGraphicsPipeline(
3649 [annotation("_In_")] LPCWSTR pName,
3650 [annotation("_In_")] const D3D12_GRAPHICS_PIPELINE_STATE_DESC* pDesc,
3651 [in] REFIID riid, // Expected: ID3D12PipelineState
3652 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineState
3653 );
3654
3655 HRESULT LoadComputePipeline(
3656 [annotation("_In_")] LPCWSTR pName,
3657 [annotation("_In_")] const D3D12_COMPUTE_PIPELINE_STATE_DESC* pDesc,
3658 [in] REFIID riid, // Expected: ID3D12PipelineState
3659 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineState
3660 );
3661
3662 SIZE_T GetSerializedSize();
3663
3664 HRESULT Serialize(
3665 [annotation("_Out_writes_(DataSizeInBytes)")] void* pData,
3666 SIZE_T DataSizeInBytes
3667 );
3668}
3669
3670// Pipeline State v2
3671[ uuid( 80eabf42-2568-4e5e-bd82-c37f86961dc3 ), object, local, pointer_default( unique ) ]
3672interface ID3D12PipelineLibrary1
3673 : ID3D12PipelineLibrary
3674{
3675 HRESULT LoadPipeline(
3676 [annotation("_In_")] LPCWSTR pName,
3677 [annotation("_In_")] const D3D12_PIPELINE_STATE_STREAM_DESC* pDesc,
3678 [in] REFIID riid, // Expected: ID3D12PipelineState
3679 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineState
3680 );
3681}
3682
3683typedef enum D3D12_MULTIPLE_FENCE_WAIT_FLAGS
3684{
3685 D3D12_MULTIPLE_FENCE_WAIT_FLAG_NONE = 0x0,
3686 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ANY = 0x1,
3687
3688 D3D12_MULTIPLE_FENCE_WAIT_FLAG_ALL = 0x0, // Alias, default behavior is ALL
3689} D3D12_MULTIPLE_FENCE_WAIT_FLAGS;
3690cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_MULTIPLE_FENCE_WAIT_FLAGS );" )
3691
3692// Applications may use the whole value range of UINT for a priority.
3693// These names are merely semantic suggestions.
3694typedef enum D3D12_RESIDENCY_PRIORITY
3695{
3696 D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
3697 D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
3698 D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
3699 D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
3700 D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000,
3701} D3D12_RESIDENCY_PRIORITY;
3702
3703[uuid(77acce80-638e-4e65-8895-c1f23386863e), object, local, pointer_default(unique)]
3704interface ID3D12Device1
3705 : ID3D12Device
3706{
3707 HRESULT CreatePipelineLibrary(
3708 [annotation("_In_reads_(BlobLength)")] const void *pLibraryBlob,
3709 SIZE_T BlobLength,
3710 [in] REFIID riid, // Expected: ID3D12PipelineLibrary
3711 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineLibrary
3712 );
3713
3714 HRESULT SetEventOnMultipleFenceCompletion(
3715 [annotation("_In_reads_(NumFences)")] ID3D12Fence* const* ppFences,
3716 [annotation("_In_reads_(NumFences)")] const UINT64* pFenceValues,
3717 UINT NumFences,
3718 D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags,
3719 HANDLE hEvent
3720 );
3721
3722 HRESULT SetResidencyPriority(
3723 UINT NumObjects,
3724 [annotation("_In_reads_(NumObjects)")] ID3D12Pageable*const* ppObjects,
3725 [annotation("_In_reads_(NumObjects)")] const D3D12_RESIDENCY_PRIORITY* pPriorities );
3726}
3727
3728[uuid(30baa41e-b15b-475c-a0bb-1af5c5b64328), object, local, pointer_default(unique)]
3729interface ID3D12Device2
3730 : ID3D12Device1
3731{
3732 HRESULT CreatePipelineState(
3733 [in] const D3D12_PIPELINE_STATE_STREAM_DESC* pDesc,
3734 [in] REFIID riid, // Can be any pipeline state interface, provided the pipeline subobjects match
3735 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppPipelineState
3736 );
3737}
3738
3739typedef enum D3D12_RESIDENCY_FLAGS
3740{
3741 D3D12_RESIDENCY_FLAG_NONE = 0x0,
3742 D3D12_RESIDENCY_FLAG_DENY_OVERBUDGET = 0x1,
3743} D3D12_RESIDENCY_FLAGS;
3744cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESIDENCY_FLAGS );" )
3745
3746[uuid(81dadc15-2bad-4392-93c5-101345c4aa98), object, local, pointer_default(unique)]
3747interface ID3D12Device3
3748 : ID3D12Device2
3749{
3750 HRESULT OpenExistingHeapFromAddress(
3751 [annotation("_In_")] const void* pAddress,
3752 [in] REFIID riid, // Expected: ID3D12Heap
3753 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvHeap
3754 );
3755 HRESULT OpenExistingHeapFromFileMapping(
3756 [annotation("_In_")] HANDLE hFileMapping,
3757 [in] REFIID riid, // Expected: ID3D12Heap
3758 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvHeap
3759 );
3760 HRESULT EnqueueMakeResident(
3761 D3D12_RESIDENCY_FLAGS Flags,
3762 UINT NumObjects,
3763 [annotation("_In_reads_(NumObjects)")] ID3D12Pageable*const* ppObjects,
3764 [annotation("_In_")] ID3D12Fence* pFenceToSignal,
3765 UINT64 FenceValueToSignal
3766 );
3767}
3768
3769typedef enum D3D12_COMMAND_LIST_FLAGS
3770{
3771 D3D12_COMMAND_LIST_FLAG_NONE = 0x0,
3772} D3D12_COMMAND_LIST_FLAGS;
3773cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_LIST_FLAGS );")
3774
3775
3776typedef enum D3D12_COMMAND_POOL_FLAGS
3777{
3778 D3D12_COMMAND_POOL_FLAG_NONE = 0x0,
3779
3780} D3D12_COMMAND_POOL_FLAGS;
3781cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_POOL_FLAGS );")
3782
3783typedef enum D3D12_COMMAND_RECORDER_FLAGS
3784{
3785 D3D12_COMMAND_RECORDER_FLAG_NONE = 0x0,
3786
3787} D3D12_COMMAND_RECORDER_FLAGS;
3788cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMMAND_RECORDER_FLAGS );")
3789
3790typedef enum D3D12_PROTECTED_SESSION_STATUS
3791{
3792 D3D12_PROTECTED_SESSION_STATUS_OK = 0,
3793 D3D12_PROTECTED_SESSION_STATUS_INVALID = 1,
3794} D3D12_PROTECTED_SESSION_STATUS;
3795
3796[uuid(A1533D18-0AC1-4084-85B9-89A96116806B), object, local, pointer_default(unique)]
3797interface ID3D12ProtectedSession
3798 : ID3D12DeviceChild
3799{
3800 HRESULT GetStatusFence(
3801 [in] REFIID riid,
3802 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppFence);
3803
3804 D3D12_PROTECTED_SESSION_STATUS GetSessionStatus();
3805}
3806
3807typedef enum D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS
3808{
3809 D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_NONE = 0x0,
3810 D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_SUPPORTED = 0x1,
3811
3812} D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS;
3813cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS );")
3814
3815typedef struct D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_SUPPORT
3816{
3817 UINT NodeIndex; // input
3818 D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS Support; // output
3819} D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_SUPPORT;
3820
3821typedef enum D3D12_PROTECTED_RESOURCE_SESSION_FLAGS
3822{
3823 D3D12_PROTECTED_RESOURCE_SESSION_FLAG_NONE = 0x0,
3824
3825} D3D12_PROTECTED_RESOURCE_SESSION_FLAGS;
3826cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_PROTECTED_RESOURCE_SESSION_FLAGS );")
3827
3828typedef struct D3D12_PROTECTED_RESOURCE_SESSION_DESC
3829{
3830 UINT NodeMask;
3831 D3D12_PROTECTED_RESOURCE_SESSION_FLAGS Flags;
3832} D3D12_PROTECTED_RESOURCE_SESSION_DESC;
3833
3834[uuid(6CD696F4-F289-40CC-8091-5A6C0A099C3D), object, local, pointer_default(unique)]
3835interface ID3D12ProtectedResourceSession
3836 : ID3D12ProtectedSession
3837{
3838 D3D12_PROTECTED_RESOURCE_SESSION_DESC GetDesc();
3839}
3840
3841[uuid(e865df17-a9ee-46f9-a463-3098315aa2e5), object, local, pointer_default(unique)]
3842interface ID3D12Device4
3843 : ID3D12Device3
3844{
3845 HRESULT CreateCommandList1(
3846 [annotation("_In_")] UINT nodeMask,
3847 [annotation("_In_")] D3D12_COMMAND_LIST_TYPE type,
3848 [annotation("_In_")] D3D12_COMMAND_LIST_FLAGS flags,
3849 [in] REFIID riid, // Expected: ID3D12CommandList
3850 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppCommandList
3851 );
3852
3853 HRESULT CreateProtectedResourceSession(
3854 [annotation("_In_")] const D3D12_PROTECTED_RESOURCE_SESSION_DESC* pDesc,
3855 [annotation("_In_")] REFIID riid, // Expected: ID3D12ProtectedResourceSession,
3856 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppSession
3857 );
3858
3859 HRESULT CreateCommittedResource1(
3860 [annotation("_In_")] const D3D12_HEAP_PROPERTIES* pHeapProperties,
3861 D3D12_HEAP_FLAGS HeapFlags,
3862 [annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
3863 D3D12_RESOURCE_STATES InitialResourceState,
3864 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
3865 [annotation("_In_opt_")] ID3D12ProtectedResourceSession *pProtectedSession,
3866 [in] REFIID riidResource, // Expected: ID3D12Resource1*
3867 [out, iid_is(riidResource), annotation("_COM_Outptr_opt_")] void** ppvResource
3868 );
3869
3870 HRESULT CreateHeap1(
3871 [annotation("_In_")] const D3D12_HEAP_DESC* pDesc,
3872 [annotation("_In_opt_")] ID3D12ProtectedResourceSession *pProtectedSession,
3873 [in] REFIID riid, // Expected: ID3D12Heap1*
3874 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvHeap
3875 );
3876
3877 HRESULT CreateReservedResource1(
3878 [annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
3879 D3D12_RESOURCE_STATES InitialState,
3880 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
3881 [annotation("_In_opt_")] ID3D12ProtectedResourceSession *pProtectedSession,
3882 [in] REFIID riid, // Expected: ID3D12Resource1*
3883 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvResource
3884 );
3885
3886 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo1(
3887 UINT visibleMask,
3888 UINT numResourceDescs,
3889 [annotation("_In_reads_(numResourceDescs)")] const D3D12_RESOURCE_DESC* pResourceDescs,
3890 [annotation("_Out_writes_opt_(numResourceDescs)")] D3D12_RESOURCE_ALLOCATION_INFO1* pResourceAllocationInfo1
3891 );
3892}
3893
3894typedef enum D3D12_LIFETIME_STATE
3895{
3896 D3D12_LIFETIME_STATE_IN_USE,
3897 D3D12_LIFETIME_STATE_NOT_IN_USE,
3898} D3D12_LIFETIME_STATE;
3899
3900interface ID3D12LifetimeTracker;
3901
3902[uuid(e667af9f-cd56-4f46-83ce-032e595d70a8), object, local, pointer_default(unique)]
3903interface ID3D12LifetimeOwner : IUnknown
3904{
3905 void LifetimeStateUpdated(D3D12_LIFETIME_STATE NewState);
3906}
3907
3908[uuid(f1df64b6-57fd-49cd-8807-c0eb88b45c8f), object, local, pointer_default(unique)]
3909interface ID3D12SwapChainAssistant
3910 : IUnknown
3911{
3912 LUID GetLUID();
3913 HRESULT GetSwapChainObject(REFIID riid, [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppv);
3914 HRESULT GetCurrentResourceAndCommandQueue(REFIID riidResource, [out, iid_is(riidResource), annotation("_COM_Outptr_")] void** ppvResource,
3915 REFIID riidQueue, [out, iid_is(riidQueue), annotation("_COM_Outptr_")] void** ppvQueue);
3916 HRESULT InsertImplicitSync();
3917}
3918
3919[uuid(3fd03d36-4eb1-424a-a582-494ecb8ba813), object, local, pointer_default(unique)]
3920interface ID3D12LifetimeTracker
3921 : ID3D12DeviceChild
3922{
3923 HRESULT DestroyOwnedObject([annotation("_In_")] ID3D12DeviceChild* pObject);
3924}
3925
3926typedef enum D3D12_META_COMMAND_PARAMETER_TYPE
3927{
3928 D3D12_META_COMMAND_PARAMETER_TYPE_FLOAT = 0,
3929 D3D12_META_COMMAND_PARAMETER_TYPE_UINT64 = 1,
3930 D3D12_META_COMMAND_PARAMETER_TYPE_GPU_VIRTUAL_ADDRESS = 2,
3931 D3D12_META_COMMAND_PARAMETER_TYPE_CPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 3,
3932 D3D12_META_COMMAND_PARAMETER_TYPE_GPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 4,
3933} D3D12_META_COMMAND_PARAMETER_TYPE;
3934
3935typedef enum D3D12_META_COMMAND_PARAMETER_FLAGS
3936{
3937 D3D12_META_COMMAND_PARAMETER_FLAG_INPUT = 0x00000001,
3938 D3D12_META_COMMAND_PARAMETER_FLAG_OUTPUT = 0x00000002
3939} D3D12_META_COMMAND_PARAMETER_FLAGS;
3940cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_META_COMMAND_PARAMETER_FLAGS );")
3941
3942typedef enum D3D12_META_COMMAND_PARAMETER_STAGE
3943{
3944 D3D12_META_COMMAND_PARAMETER_STAGE_CREATION = 0,
3945 D3D12_META_COMMAND_PARAMETER_STAGE_INITIALIZATION = 1,
3946 D3D12_META_COMMAND_PARAMETER_STAGE_EXECUTION = 2,
3947} D3D12_META_COMMAND_PARAMETER_STAGE;
3948
3949typedef struct D3D12_META_COMMAND_PARAMETER_DESC
3950{
3951 LPCWSTR Name;
3952 D3D12_META_COMMAND_PARAMETER_TYPE Type;
3953 D3D12_META_COMMAND_PARAMETER_FLAGS Flags;
3954 D3D12_RESOURCE_STATES RequiredResourceState;
3955 UINT StructureOffset;
3956} D3D12_META_COMMAND_PARAMETER_DESC;
3957
3958typedef enum D3D12_GRAPHICS_STATES
3959{
3960 D3D12_GRAPHICS_STATE_NONE = 0,
3961 D3D12_GRAPHICS_STATE_IA_VERTEX_BUFFERS = (1 << 0),
3962 D3D12_GRAPHICS_STATE_IA_INDEX_BUFFER = (1 << 1),
3963 D3D12_GRAPHICS_STATE_IA_PRIMITIVE_TOPOLOGY = (1 << 2),
3964 D3D12_GRAPHICS_STATE_DESCRIPTOR_HEAP = (1 << 3),
3965 D3D12_GRAPHICS_STATE_GRAPHICS_ROOT_SIGNATURE = (1 << 4),
3966 D3D12_GRAPHICS_STATE_COMPUTE_ROOT_SIGNATURE = (1 << 5),
3967 D3D12_GRAPHICS_STATE_RS_VIEWPORTS = (1 << 6),
3968 D3D12_GRAPHICS_STATE_RS_SCISSOR_RECTS = (1 << 7),
3969 D3D12_GRAPHICS_STATE_PREDICATION = (1 << 8),
3970 D3D12_GRAPHICS_STATE_OM_RENDER_TARGETS = (1 << 9),
3971 D3D12_GRAPHICS_STATE_OM_STENCIL_REF = (1 << 10),
3972 D3D12_GRAPHICS_STATE_OM_BLEND_FACTOR = (1 << 11),
3973 D3D12_GRAPHICS_STATE_PIPELINE_STATE = (1 << 12),
3974 D3D12_GRAPHICS_STATE_SO_TARGETS = (1 << 13),
3975 D3D12_GRAPHICS_STATE_OM_DEPTH_BOUNDS = (1 << 14),
3976 D3D12_GRAPHICS_STATE_SAMPLE_POSITIONS = (1 << 15),
3977 D3D12_GRAPHICS_STATE_VIEW_INSTANCE_MASK = (1 << 16),
3978
3979} D3D12_GRAPHICS_STATES;
3980cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_GRAPHICS_STATES );")
3981
3982typedef struct D3D12_META_COMMAND_DESC
3983{
3984 GUID Id;
3985 LPCWSTR Name;
3986 D3D12_GRAPHICS_STATES InitializationDirtyState;
3987 D3D12_GRAPHICS_STATES ExecutionDirtyState;
3988} D3D12_META_COMMAND_DESC;
3989
3990[uuid(47016943-fca8-4594-93ea-af258b55346d), object, local, pointer_default(unique)]
3991interface ID3D12StateObject
3992 : ID3D12Pageable
3993{
3994}
3995
3996[uuid(de5fa827-9bf9-4f26-89ff-d7f56fde3860), object, local, pointer_default(unique)]
3997interface ID3D12StateObjectProperties
3998 : IUnknown
3999{
4000 void* GetShaderIdentifier([annotation("_In_")] LPCWSTR pExportName);
4001 UINT64 GetShaderStackSize([annotation("_In_")] LPCWSTR pExportName);
4002 UINT64 GetPipelineStackSize();
4003 void SetPipelineStackSize(UINT64 PipelineStackSizeInBytes);
4004}
4005
4006typedef enum D3D12_STATE_SUBOBJECT_TYPE
4007{
4008 D3D12_STATE_SUBOBJECT_TYPE_STATE_OBJECT_CONFIG = 0, // D3D12_STATE_OBJECT_CONFIG
4009 D3D12_STATE_SUBOBJECT_TYPE_GLOBAL_ROOT_SIGNATURE = 1, // D3D12_GLOBAL_ROOT_SIGNATURE
4010 D3D12_STATE_SUBOBJECT_TYPE_LOCAL_ROOT_SIGNATURE = 2, // D3D12_LOCAL_ROOT_SIGNATURE
4011 D3D12_STATE_SUBOBJECT_TYPE_NODE_MASK = 3, // D3D12_NODE_MASK
4012 // 4 unused
4013 D3D12_STATE_SUBOBJECT_TYPE_DXIL_LIBRARY = 5, // D3D12_DXIL_LIBRARY_DESC
4014 D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION = 6, // D3D12_EXISTING_COLLECTION_DESC
4015 D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 7, // D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION
4016 D3D12_STATE_SUBOBJECT_TYPE_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 8, // D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION
4017 D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_SHADER_CONFIG = 9, // D3D12_RAYTRACING_SHADER_CONFIG
4018 D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG = 10, // D3D12_RAYTRACING_PIPELINE_CONFIG
4019 D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP = 11, // D3D12_HIT_GROUP_DESC
4020 D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG1 = 12, // D3D12_RAYTRACING_PIPELINE_CONFIG1
4021 D3D12_STATE_SUBOBJECT_TYPE_MAX_VALID,
4022} D3D12_STATE_SUBOBJECT_TYPE;
4023
4024typedef struct D3D12_STATE_SUBOBJECT
4025{
4026 D3D12_STATE_SUBOBJECT_TYPE Type;
4027 const void* pDesc;
4028} D3D12_STATE_SUBOBJECT;
4029
4030typedef enum D3D12_STATE_OBJECT_FLAGS
4031{
4032 D3D12_STATE_OBJECT_FLAG_NONE = 0x0,
4033 D3D12_STATE_OBJECT_FLAG_ALLOW_LOCAL_DEPENDENCIES_ON_EXTERNAL_DEFINITIONS = 0x1,
4034 D3D12_STATE_OBJECT_FLAG_ALLOW_EXTERNAL_DEPENDENCIES_ON_LOCAL_DEFINITIONS = 0x2,
4035 D3D12_STATE_OBJECT_FLAG_ALLOW_STATE_OBJECT_ADDITIONS = 0x4,
4036} D3D12_STATE_OBJECT_FLAGS;
4037cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_STATE_OBJECT_FLAGS );")
4038
4039typedef struct D3D12_STATE_OBJECT_CONFIG
4040{
4041 D3D12_STATE_OBJECT_FLAGS Flags;
4042} D3D12_STATE_OBJECT_CONFIG;
4043
4044typedef struct D3D12_GLOBAL_ROOT_SIGNATURE
4045{
4046 ID3D12RootSignature* pGlobalRootSignature;
4047} D3D12_GLOBAL_ROOT_SIGNATURE;
4048
4049typedef struct D3D12_LOCAL_ROOT_SIGNATURE
4050{
4051 ID3D12RootSignature* pLocalRootSignature;
4052} D3D12_LOCAL_ROOT_SIGNATURE;
4053
4054typedef struct D3D12_NODE_MASK
4055{
4056 UINT NodeMask;
4057} D3D12_NODE_MASK;
4058
4059typedef enum D3D12_EXPORT_FLAGS
4060{
4061 D3D12_EXPORT_FLAG_NONE = 0x0,
4062} D3D12_EXPORT_FLAGS;
4063cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_EXPORT_FLAGS );")
4064
4065typedef struct D3D12_EXPORT_DESC
4066{
4067 LPCWSTR Name;
4068 [annotation("_In_opt_")] LPCWSTR ExportToRename;
4069 D3D12_EXPORT_FLAGS Flags;
4070} D3D12_EXPORT_DESC;
4071
4072typedef struct D3D12_DXIL_LIBRARY_DESC
4073{
4074 D3D12_SHADER_BYTECODE DXILLibrary;
4075 UINT NumExports; // Optional, if 0 all exports in the library/collection will be surfaced
4076 [annotation("_In_reads_(NumExports)")] D3D12_EXPORT_DESC* pExports;
4077} D3D12_DXIL_LIBRARY_DESC;
4078
4079typedef struct D3D12_EXISTING_COLLECTION_DESC
4080{
4081 ID3D12StateObject* pExistingCollection;
4082 UINT NumExports; // Optional, if 0 all exports in the library/collection will be surfaced
4083 [annotation("_In_reads_(NumExports)")] D3D12_EXPORT_DESC* pExports;
4084} D3D12_EXISTING_COLLECTION_DESC;
4085
4086typedef struct D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION
4087{
4088 const D3D12_STATE_SUBOBJECT* pSubobjectToAssociate;
4089 UINT NumExports;
4090 [annotation("_In_reads_(NumExports)")] LPCWSTR* pExports;
4091} D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
4092
4093typedef struct D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION
4094{
4095 LPCWSTR SubobjectToAssociate;
4096 UINT NumExports;
4097 [annotation("_In_reads_(NumExports)")] LPCWSTR* pExports;
4098} D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
4099
4100typedef enum D3D12_HIT_GROUP_TYPE
4101{
4102 D3D12_HIT_GROUP_TYPE_TRIANGLES = 0x0,
4103 D3D12_HIT_GROUP_TYPE_PROCEDURAL_PRIMITIVE = 0x1,
4104} D3D12_HIT_GROUP_TYPE;
4105
4106typedef struct D3D12_HIT_GROUP_DESC
4107{
4108 LPCWSTR HitGroupExport;
4109 D3D12_HIT_GROUP_TYPE Type;
4110 [annotation("_In_opt_")] LPCWSTR AnyHitShaderImport;
4111 [annotation("_In_opt_")] LPCWSTR ClosestHitShaderImport;
4112 [annotation("_In_opt_")] LPCWSTR IntersectionShaderImport;
4113} D3D12_HIT_GROUP_DESC;
4114
4115typedef struct D3D12_RAYTRACING_SHADER_CONFIG
4116{
4117 UINT MaxPayloadSizeInBytes;
4118 UINT MaxAttributeSizeInBytes;
4119} D3D12_RAYTRACING_SHADER_CONFIG;
4120
4121typedef struct D3D12_RAYTRACING_PIPELINE_CONFIG
4122{
4123 UINT MaxTraceRecursionDepth;
4124} D3D12_RAYTRACING_PIPELINE_CONFIG;
4125
4126typedef enum D3D12_RAYTRACING_PIPELINE_FLAGS
4127{
4128 D3D12_RAYTRACING_PIPELINE_FLAG_NONE = 0x0,
4129 D3D12_RAYTRACING_PIPELINE_FLAG_SKIP_TRIANGLES = 0x100,
4130 D3D12_RAYTRACING_PIPELINE_FLAG_SKIP_PROCEDURAL_PRIMITIVES = 0x200,
4131} D3D12_RAYTRACING_PIPELINE_FLAGS;
4132cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_PIPELINE_FLAGS );")
4133
4134typedef struct D3D12_RAYTRACING_PIPELINE_CONFIG1
4135{
4136 UINT MaxTraceRecursionDepth;
4137 D3D12_RAYTRACING_PIPELINE_FLAGS Flags;
4138} D3D12_RAYTRACING_PIPELINE_CONFIG1;
4139
4140typedef enum D3D12_STATE_OBJECT_TYPE
4141{
4142 D3D12_STATE_OBJECT_TYPE_COLLECTION = 0,
4143 // D3D12_STATE_OBJECT_TYPE_COMPUTE_PIPELINE = 1,
4144 // D3D12_STATE_OBJECT_TYPE_GRAPHICS_PIPELINE = 2,
4145 D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE = 3,
4146} D3D12_STATE_OBJECT_TYPE;
4147
4148typedef struct D3D12_STATE_OBJECT_DESC
4149{
4150 D3D12_STATE_OBJECT_TYPE Type;
4151 UINT NumSubobjects;
4152 [annotation("_In_reads_(NumSubobjects)")] const D3D12_STATE_SUBOBJECT* pSubobjects;
4153} D3D12_STATE_OBJECT_DESC;
4154
4155typedef enum D3D12_RAYTRACING_GEOMETRY_FLAGS
4156{
4157 D3D12_RAYTRACING_GEOMETRY_FLAG_NONE = 0x0,
4158 D3D12_RAYTRACING_GEOMETRY_FLAG_OPAQUE = 0x1,
4159 D3D12_RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = 0x2,
4160} D3D12_RAYTRACING_GEOMETRY_FLAGS;
4161cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_GEOMETRY_FLAGS );")
4162
4163typedef enum D3D12_RAYTRACING_GEOMETRY_TYPE
4164{
4165 D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES,
4166 D3D12_RAYTRACING_GEOMETRY_TYPE_PROCEDURAL_PRIMITIVE_AABBS,
4167} D3D12_RAYTRACING_GEOMETRY_TYPE;
4168
4169typedef enum D3D12_RAYTRACING_INSTANCE_FLAGS
4170{
4171 D3D12_RAYTRACING_INSTANCE_FLAG_NONE = 0x0,
4172 D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_CULL_DISABLE = 0x1,
4173 D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x2,
4174 D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_OPAQUE = 0x4,
4175 D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_NON_OPAQUE = 0x8
4176} D3D12_RAYTRACING_INSTANCE_FLAGS;
4177cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_INSTANCE_FLAGS );")
4178
4179typedef struct D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE
4180{
4181 D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
4182 UINT64 StrideInBytes;
4183} D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE;
4184
4185typedef struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE
4186{
4187 D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
4188 UINT64 SizeInBytes;
4189} D3D12_GPU_VIRTUAL_ADDRESS_RANGE;
4190
4191typedef struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE
4192{
4193 D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
4194 UINT64 SizeInBytes;
4195 UINT64 StrideInBytes;
4196} D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE;
4197
4198typedef struct D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC
4199{
4200 D3D12_GPU_VIRTUAL_ADDRESS Transform3x4;
4201 DXGI_FORMAT IndexFormat;
4202 DXGI_FORMAT VertexFormat;
4203 UINT IndexCount;
4204 UINT VertexCount;
4205 D3D12_GPU_VIRTUAL_ADDRESS IndexBuffer;
4206 D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE VertexBuffer;
4207} D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC;
4208
4209typedef struct D3D12_RAYTRACING_AABB
4210{
4211 FLOAT MinX;
4212 FLOAT MinY;
4213 FLOAT MinZ;
4214 FLOAT MaxX;
4215 FLOAT MaxY;
4216 FLOAT MaxZ;
4217} D3D12_RAYTRACING_AABB;
4218
4219typedef struct D3D12_RAYTRACING_GEOMETRY_AABBS_DESC
4220{
4221 UINT64 AABBCount;
4222 D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE AABBs;
4223} D3D12_RAYTRACING_GEOMETRY_AABBS_DESC;
4224
4225typedef enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS
4226{
4227 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_NONE = 0x00,
4228 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE = 0x01,
4229 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_COMPACTION = 0x02,
4230 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_TRACE = 0x04,
4231 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_BUILD = 0x08,
4232 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_MINIMIZE_MEMORY = 0x10,
4233 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE = 0x20,
4234} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS;
4235cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS );")
4236
4237typedef enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE
4238{
4239 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_CLONE = 0x0,
4240 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT = 0x1,
4241 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_VISUALIZATION_DECODE_FOR_TOOLS = 0x2,
4242 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_SERIALIZE = 0x3,
4243 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_DESERIALIZE = 0x4,
4244} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE;
4245
4246typedef enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE
4247{
4248 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL = 0x0,
4249 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL = 0x1
4250} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE;
4251
4252typedef enum D3D12_ELEMENTS_LAYOUT
4253{
4254 D3D12_ELEMENTS_LAYOUT_ARRAY = 0x0,
4255 D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS = 0x1
4256} D3D12_ELEMENTS_LAYOUT;
4257
4258typedef enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE
4259{
4260 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE = 0x0,
4261 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION = 0x1,
4262 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION = 0x2,
4263 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE = 0x3,
4264} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE;
4265
4266typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC
4267{
4268 D3D12_GPU_VIRTUAL_ADDRESS DestBuffer;
4269 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE InfoType;
4270} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC;
4271
4272typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC
4273{
4274 UINT64 CompactedSizeInBytes;
4275} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC;
4276
4277typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC
4278{
4279 UINT64 DecodedSizeInBytes;
4280} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC;
4281
4282typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER
4283{
4284 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
4285 UINT NumDescs;
4286} D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER;
4287cpp_quote("// Regarding D3D12_BUILD_RAY_TRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER above,")
4288cpp_quote("// depending on Type field, NumDescs above is followed by either:")
4289cpp_quote("// D3D12_RAY_TRACING_INSTANCE_DESC InstanceDescs[NumDescs]")
4290cpp_quote("// or D3D12_RAY_TRACING_GEOMETRY_DESC GeometryDescs[NumDescs].")
4291cpp_quote("// There is 4 bytes of padding between GeometryDesc structs in the array so alignment is natural when viewed by CPU.")
4292cpp_quote("")
4293
4294typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC
4295{
4296 UINT64 SerializedSizeInBytes;
4297 UINT64 NumBottomLevelAccelerationStructurePointers;
4298} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC;
4299
4300typedef struct D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER
4301{
4302 GUID DriverOpaqueGUID;
4303 BYTE DriverOpaqueVersioningData[16];
4304} D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER;
4305
4306typedef enum D3D12_SERIALIZED_DATA_TYPE
4307{
4308 D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE = 0x0,
4309} D3D12_SERIALIZED_DATA_TYPE;
4310
4311typedef enum D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS
4312{
4313 D3D12_DRIVER_MATCHING_IDENTIFIER_COMPATIBLE_WITH_DEVICE = 0x0,
4314 D3D12_DRIVER_MATCHING_IDENTIFIER_UNSUPPORTED_TYPE = 0x1,
4315 D3D12_DRIVER_MATCHING_IDENTIFIER_UNRECOGNIZED = 0x2,
4316 D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_VERSION = 0x3,
4317 D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_TYPE = 0x4,
4318} D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS;
4319
4320typedef struct D3D12_SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER
4321{
4322 D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER DriverMatchingIdentifier;
4323 UINT64 SerializedSizeInBytesIncludingHeader;
4324 UINT64 DeserializedSizeInBytes;
4325 UINT64 NumBottomLevelAccelerationStructurePointersAfterHeader;
4326} D3D12_SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER;
4327
4328typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC
4329{
4330 UINT64 CurrentSizeInBytes;
4331} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC;
4332
4333typedef struct D3D12_RAYTRACING_INSTANCE_DESC
4334{
4335 FLOAT Transform[3][4];
4336 UINT InstanceID : 24;
4337 UINT InstanceMask : 8;
4338 UINT InstanceContributionToHitGroupIndex : 24;
4339 UINT Flags : 8;
4340 D3D12_GPU_VIRTUAL_ADDRESS AccelerationStructure;
4341} D3D12_RAYTRACING_INSTANCE_DESC;
4342
4343typedef struct D3D12_RAYTRACING_GEOMETRY_DESC
4344{
4345 D3D12_RAYTRACING_GEOMETRY_TYPE Type;
4346 D3D12_RAYTRACING_GEOMETRY_FLAGS Flags;
4347 union
4348 {
4349 D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC Triangles;
4350 D3D12_RAYTRACING_GEOMETRY_AABBS_DESC AABBs;
4351 };
4352} D3D12_RAYTRACING_GEOMETRY_DESC;
4353
4354typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS
4355{
4356 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
4357 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS Flags;
4358 UINT NumDescs;
4359 D3D12_ELEMENTS_LAYOUT DescsLayout;
4360 union
4361 {
4362 D3D12_GPU_VIRTUAL_ADDRESS InstanceDescs;
4363 const D3D12_RAYTRACING_GEOMETRY_DESC* pGeometryDescs;
4364 const D3D12_RAYTRACING_GEOMETRY_DESC*const* ppGeometryDescs;
4365 };
4366} D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS;
4367
4368typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC
4369{
4370 D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData;
4371 D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS Inputs;
4372 [annotation("_In_opt_")] D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData;
4373 D3D12_GPU_VIRTUAL_ADDRESS ScratchAccelerationStructureData;
4374} D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC;
4375
4376typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO
4377{
4378 UINT64 ResultDataMaxSizeInBytes;
4379 UINT64 ScratchDataSizeInBytes;
4380 UINT64 UpdateScratchDataSizeInBytes;
4381} D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO;
4382
4383typedef enum D3D12_RAY_FLAGS
4384{
4385 D3D12_RAY_FLAG_NONE = 0x00,
4386 D3D12_RAY_FLAG_FORCE_OPAQUE = 0x01,
4387 D3D12_RAY_FLAG_FORCE_NON_OPAQUE = 0x02,
4388 D3D12_RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH = 0x04,
4389 D3D12_RAY_FLAG_SKIP_CLOSEST_HIT_SHADER = 0x08,
4390 D3D12_RAY_FLAG_CULL_BACK_FACING_TRIANGLES = 0x10,
4391 D3D12_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES = 0x20,
4392 D3D12_RAY_FLAG_CULL_OPAQUE = 0x40,
4393 D3D12_RAY_FLAG_CULL_NON_OPAQUE = 0x80,
4394 D3D12_RAY_FLAG_SKIP_TRIANGLES = 0x100,
4395 D3D12_RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES = 0x200,
4396} D3D12_RAY_FLAGS;
4397cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAY_FLAGS );" )
4398
4399typedef enum D3D12_HIT_KIND
4400{
4401 D3D12_HIT_KIND_TRIANGLE_FRONT_FACE = 0xfe,
4402 D3D12_HIT_KIND_TRIANGLE_BACK_FACE = 0xff,
4403} D3D12_HIT_KIND;
4404
4405[uuid(8b4f173b-2fea-4b80-8f58-4307191ab95d), object, local, pointer_default(unique)]
4406interface ID3D12Device5
4407 : ID3D12Device4
4408{
4409 HRESULT CreateLifetimeTracker(
4410 [annotation("_In_")] ID3D12LifetimeOwner* pOwner,
4411 [in] REFIID riid, // Expected: ID3D12LifetimeTracker*
4412 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvTracker
4413 );
4414
4415 void RemoveDevice();
4416
4417 HRESULT EnumerateMetaCommands(
4418 [annotation("_Inout_")] UINT* pNumMetaCommands,
4419 [annotation("_Out_writes_opt_(*pNumMetaCommands)")] D3D12_META_COMMAND_DESC* pDescs
4420 );
4421
4422 HRESULT EnumerateMetaCommandParameters(
4423 [annotation("_In_")] REFGUID CommandId,
4424 [annotation("_In_")] D3D12_META_COMMAND_PARAMETER_STAGE Stage,
4425 [annotation("_Out_opt_")] UINT* pTotalStructureSizeInBytes,
4426 [annotation("_Inout_")] UINT* pParameterCount,
4427 [annotation("_Out_writes_opt_(*pParameterCount)")] D3D12_META_COMMAND_PARAMETER_DESC* pParameterDescs
4428 );
4429
4430 HRESULT CreateMetaCommand(
4431 [annotation("_In_")] REFGUID CommandId,
4432 [annotation("_In_")] UINT NodeMask,
4433 [annotation("_In_reads_bytes_opt_(CreationParametersDataSizeInBytes)")] const void * pCreationParametersData,
4434 [annotation("_In_")] SIZE_T CreationParametersDataSizeInBytes,
4435 [in] REFIID riid,
4436 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppMetaCommand
4437 );
4438
4439 HRESULT CreateStateObject(
4440 [in] const D3D12_STATE_OBJECT_DESC* pDesc,
4441 [in] REFIID riid, // ID3D12StateObject
4442 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppStateObject
4443 );
4444
4445 void GetRaytracingAccelerationStructurePrebuildInfo(
4446 [annotation("_In_")] const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS* pDesc,
4447 [annotation("_Out_")] D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *pInfo
4448 );
4449
4450 D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS CheckDriverMatchingIdentifier(
4451 [annotation("_In_")] D3D12_SERIALIZED_DATA_TYPE SerializedDataType,
4452 [annotation("_In_")] const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER* pIdentifierToCheck);
4453}
4454
4455
4456typedef enum D3D12_AUTO_BREADCRUMB_OP
4457{
4458 D3D12_AUTO_BREADCRUMB_OP_SETMARKER = 0,
4459 D3D12_AUTO_BREADCRUMB_OP_BEGINEVENT = 1,
4460 D3D12_AUTO_BREADCRUMB_OP_ENDEVENT = 2,
4461 D3D12_AUTO_BREADCRUMB_OP_DRAWINSTANCED = 3,
4462 D3D12_AUTO_BREADCRUMB_OP_DRAWINDEXEDINSTANCED = 4,
4463 D3D12_AUTO_BREADCRUMB_OP_EXECUTEINDIRECT = 5,
4464 D3D12_AUTO_BREADCRUMB_OP_DISPATCH = 6,
4465 D3D12_AUTO_BREADCRUMB_OP_COPYBUFFERREGION = 7,
4466 D3D12_AUTO_BREADCRUMB_OP_COPYTEXTUREREGION = 8,
4467 D3D12_AUTO_BREADCRUMB_OP_COPYRESOURCE = 9,
4468 D3D12_AUTO_BREADCRUMB_OP_COPYTILES = 10,
4469 D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCE = 11,
4470 D3D12_AUTO_BREADCRUMB_OP_CLEARRENDERTARGETVIEW = 12,
4471 D3D12_AUTO_BREADCRUMB_OP_CLEARUNORDEREDACCESSVIEW = 13,
4472 D3D12_AUTO_BREADCRUMB_OP_CLEARDEPTHSTENCILVIEW = 14,
4473 D3D12_AUTO_BREADCRUMB_OP_RESOURCEBARRIER = 15,
4474 D3D12_AUTO_BREADCRUMB_OP_EXECUTEBUNDLE = 16,
4475 D3D12_AUTO_BREADCRUMB_OP_PRESENT = 17,
4476 D3D12_AUTO_BREADCRUMB_OP_RESOLVEQUERYDATA = 18,
4477 D3D12_AUTO_BREADCRUMB_OP_BEGINSUBMISSION = 19,
4478 D3D12_AUTO_BREADCRUMB_OP_ENDSUBMISSION = 20,
4479 D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME = 21,
4480 D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES = 22,
4481 D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT = 23,
4482 D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT64 = 24,
4483 D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCEREGION = 25,
4484 D3D12_AUTO_BREADCRUMB_OP_WRITEBUFFERIMMEDIATE = 26,
4485 D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME1 = 27,
4486 D3D12_AUTO_BREADCRUMB_OP_SETPROTECTEDRESOURCESESSION = 28,
4487 D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME2 = 29,
4488 D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES1 = 30,
4489 D3D12_AUTO_BREADCRUMB_OP_BUILDRAYTRACINGACCELERATIONSTRUCTURE = 31,
4490 D3D12_AUTO_BREADCRUMB_OP_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = 32,
4491 D3D12_AUTO_BREADCRUMB_OP_COPYRAYTRACINGACCELERATIONSTRUCTURE = 33,
4492 D3D12_AUTO_BREADCRUMB_OP_DISPATCHRAYS = 34,
4493 D3D12_AUTO_BREADCRUMB_OP_INITIALIZEMETACOMMAND = 35,
4494 D3D12_AUTO_BREADCRUMB_OP_EXECUTEMETACOMMAND = 36,
4495 D3D12_AUTO_BREADCRUMB_OP_ESTIMATEMOTION = 37,
4496 D3D12_AUTO_BREADCRUMB_OP_RESOLVEMOTIONVECTORHEAP = 38,
4497 D3D12_AUTO_BREADCRUMB_OP_SETPIPELINESTATE1 = 39,
4498 D3D12_AUTO_BREADCRUMB_OP_INITIALIZEEXTENSIONCOMMAND = 40,
4499 D3D12_AUTO_BREADCRUMB_OP_EXECUTEEXTENSIONCOMMAND = 41,
4500 D3D12_AUTO_BREADCRUMB_OP_DISPATCHMESH = 42,
4501 D3D12_AUTO_BREADCRUMB_OP_ENCODEFRAME = 43,
4502 D3D12_AUTO_BREADCRUMB_OP_RESOLVEENCODEROUTPUTMETADATA = 44,
4503} D3D12_AUTO_BREADCRUMB_OP;
4504
4505typedef struct D3D12_AUTO_BREADCRUMB_NODE
4506{
4507 const char *pCommandListDebugNameA;
4508 const wchar_t *pCommandListDebugNameW;
4509 const char *pCommandQueueDebugNameA;
4510 const wchar_t *pCommandQueueDebugNameW;
4511 ID3D12GraphicsCommandList *pCommandList;
4512 ID3D12CommandQueue *pCommandQueue;
4513 UINT32 BreadcrumbCount;
4514 const UINT32 *pLastBreadcrumbValue;
4515 const D3D12_AUTO_BREADCRUMB_OP *pCommandHistory;
4516 const struct D3D12_AUTO_BREADCRUMB_NODE *pNext; // pointer to next node
4517} D3D12_AUTO_BREADCRUMB_NODE;
4518
4519typedef struct D3D12_DRED_BREADCRUMB_CONTEXT
4520{
4521 UINT BreadcrumbIndex;
4522 const wchar_t *pContextString;
4523} D3D12_DRED_BREADCRUMB_CONTEXT;
4524
4525// !!! Must be castable to D3D12_AUTO_BREADCRUMB_NODE
4526typedef struct D3D12_AUTO_BREADCRUMB_NODE1
4527{
4528 const char *pCommandListDebugNameA;
4529 const wchar_t *pCommandListDebugNameW;
4530 const char *pCommandQueueDebugNameA;
4531 const wchar_t *pCommandQueueDebugNameW;
4532 ID3D12GraphicsCommandList *pCommandList;
4533 ID3D12CommandQueue *pCommandQueue;
4534 UINT BreadcrumbCount;
4535 const UINT *pLastBreadcrumbValue;
4536 const D3D12_AUTO_BREADCRUMB_OP *pCommandHistory;
4537 const struct D3D12_AUTO_BREADCRUMB_NODE1 *pNext; // pointer to next node
4538 UINT BreadcrumbContextsCount;
4539 D3D12_DRED_BREADCRUMB_CONTEXT *pBreadcrumbContexts;
4540} D3D12_AUTO_BREADCRUMB_NODE1;
4541
4542// D3D12_DRED_VERSION
4543typedef enum D3D12_DRED_VERSION
4544{
4545 D3D12_DRED_VERSION_1_0 = 0x1,
4546 D3D12_DRED_VERSION_1_1 = 0x2,
4547 D3D12_DRED_VERSION_1_2 = 0x3,
4548 D3D12_DRED_VERSION_1_3 = 0x4,
4549} D3D12_DRED_VERSION;
4550
4551typedef enum D3D12_DRED_FLAGS
4552{
4553 D3D12_DRED_FLAG_NONE = 0,
4554 D3D12_DRED_FLAG_FORCE_ENABLE = 1,
4555 D3D12_DRED_FLAG_DISABLE_AUTOBREADCRUMBS = 2,
4556} D3D12_DRED_FLAGS;
4557cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_DRED_FLAGS );")
4558
4559typedef enum D3D12_DRED_ENABLEMENT
4560{
4561 D3D12_DRED_ENABLEMENT_SYSTEM_CONTROLLED = 0,
4562 D3D12_DRED_ENABLEMENT_FORCED_OFF = 1,
4563 D3D12_DRED_ENABLEMENT_FORCED_ON = 2,
4564} D3D12_DRED_ENABLEMENT;
4565
4566typedef struct D3D12_DEVICE_REMOVED_EXTENDED_DATA
4567{
4568 [annotation("_In_")] D3D12_DRED_FLAGS Flags; // Dred flags
4569 [annotation("_Out_")] D3D12_AUTO_BREADCRUMB_NODE *pHeadAutoBreadcrumbNode; // Pointer to head of a linked list of auto-breadcrumb data
4570} D3D12_DEVICE_REMOVED_EXTENDED_DATA;
4571
4572typedef enum D3D12_DRED_ALLOCATION_TYPE
4573{
4574 // Enum starts at 19 and skips 26 to maintain compatibility with older D3D12 drivers
4575 D3D12_DRED_ALLOCATION_TYPE_COMMAND_QUEUE = 19,
4576 D3D12_DRED_ALLOCATION_TYPE_COMMAND_ALLOCATOR = 20,
4577 D3D12_DRED_ALLOCATION_TYPE_PIPELINE_STATE = 21,
4578 D3D12_DRED_ALLOCATION_TYPE_COMMAND_LIST = 22,
4579 D3D12_DRED_ALLOCATION_TYPE_FENCE = 23,
4580 D3D12_DRED_ALLOCATION_TYPE_DESCRIPTOR_HEAP = 24,
4581 D3D12_DRED_ALLOCATION_TYPE_HEAP = 25,
4582 D3D12_DRED_ALLOCATION_TYPE_QUERY_HEAP = 27,
4583 D3D12_DRED_ALLOCATION_TYPE_COMMAND_SIGNATURE = 28,
4584 D3D12_DRED_ALLOCATION_TYPE_PIPELINE_LIBRARY = 29,
4585 D3D12_DRED_ALLOCATION_TYPE_VIDEO_DECODER = 30,
4586 D3D12_DRED_ALLOCATION_TYPE_VIDEO_PROCESSOR = 32,
4587 D3D12_DRED_ALLOCATION_TYPE_RESOURCE = 34,
4588 D3D12_DRED_ALLOCATION_TYPE_PASS = 35,
4589 D3D12_DRED_ALLOCATION_TYPE_CRYPTOSESSION = 36,
4590 D3D12_DRED_ALLOCATION_TYPE_CRYPTOSESSIONPOLICY = 37,
4591 D3D12_DRED_ALLOCATION_TYPE_PROTECTEDRESOURCESESSION = 38,
4592 D3D12_DRED_ALLOCATION_TYPE_VIDEO_DECODER_HEAP = 39,
4593 D3D12_DRED_ALLOCATION_TYPE_COMMAND_POOL = 40,
4594 D3D12_DRED_ALLOCATION_TYPE_COMMAND_RECORDER = 41,
4595 D3D12_DRED_ALLOCATION_TYPE_STATE_OBJECT = 42,
4596 D3D12_DRED_ALLOCATION_TYPE_METACOMMAND = 43,
4597 D3D12_DRED_ALLOCATION_TYPE_SCHEDULINGGROUP = 44,
4598 D3D12_DRED_ALLOCATION_TYPE_VIDEO_MOTION_ESTIMATOR = 45,
4599 D3D12_DRED_ALLOCATION_TYPE_VIDEO_MOTION_VECTOR_HEAP = 46,
4600 D3D12_DRED_ALLOCATION_TYPE_VIDEO_EXTENSION_COMMAND = 47,
4601 D3D12_DRED_ALLOCATION_TYPE_VIDEO_ENCODER = 48,
4602 D3D12_DRED_ALLOCATION_TYPE_VIDEO_ENCODER_HEAP = 49,
4603
4604
4605 D3D12_DRED_ALLOCATION_TYPE_INVALID = 0xFFFFFFFF
4606} D3D12_DRED_ALLOCATION_TYPE;
4607
4608typedef struct D3D12_DRED_ALLOCATION_NODE
4609{
4610 const char *ObjectNameA;
4611 const wchar_t *ObjectNameW;
4612 D3D12_DRED_ALLOCATION_TYPE AllocationType;
4613 const struct D3D12_DRED_ALLOCATION_NODE *pNext;
4614} D3D12_DRED_ALLOCATION_NODE;
4615
4616typedef struct D3D12_DRED_ALLOCATION_NODE1
4617{
4618 const char *ObjectNameA;
4619 const wchar_t *ObjectNameW;
4620 D3D12_DRED_ALLOCATION_TYPE AllocationType;
4621 const struct D3D12_DRED_ALLOCATION_NODE1 *pNext;
4622 const IUnknown *pObject;
4623} D3D12_DRED_ALLOCATION_NODE1;
4624
4625typedef struct D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT
4626{
4627 [annotation("_Out_")] const D3D12_AUTO_BREADCRUMB_NODE *pHeadAutoBreadcrumbNode; // Pointer to head of a null-terminated linked list of auto-breadcrumb data
4628} D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT;
4629
4630typedef struct D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1
4631{
4632 [annotation("_Out_")] const D3D12_AUTO_BREADCRUMB_NODE1 *pHeadAutoBreadcrumbNode; // Pointer to head of a null-terminated linked list of auto-breadcrumb data
4633} D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1;
4634
4635typedef struct D3D12_DRED_PAGE_FAULT_OUTPUT
4636{
4637 D3D12_GPU_VIRTUAL_ADDRESS PageFaultVA; //If the device removal was due to GPU Fault, this contains the VA of the faulting op
4638 [annotation("_Out_")] const D3D12_DRED_ALLOCATION_NODE *pHeadExistingAllocationNode;
4639 [annotation("_Out_")] const D3D12_DRED_ALLOCATION_NODE *pHeadRecentFreedAllocationNode;
4640} D3D12_DRED_PAGE_FAULT_OUTPUT;
4641
4642typedef struct D3D12_DRED_PAGE_FAULT_OUTPUT1
4643{
4644 D3D12_GPU_VIRTUAL_ADDRESS PageFaultVA; //If the device removal was due to GPU Fault, this contains the VA of the faulting op
4645 [annotation("_Out_")] const D3D12_DRED_ALLOCATION_NODE1 *pHeadExistingAllocationNode;
4646 [annotation("_Out_")] const D3D12_DRED_ALLOCATION_NODE1 *pHeadRecentFreedAllocationNode;
4647} D3D12_DRED_PAGE_FAULT_OUTPUT1;
4648
4649typedef enum D3D12_DRED_PAGE_FAULT_FLAGS
4650{
4651 D3D12_DRED_PAGE_FAULT_FLAGS_NONE = 0,
4652} D3D12_DRED_PAGE_FAULT_FLAGS;
4653cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_DRED_PAGE_FAULT_FLAGS );")
4654
4655typedef enum D3D12_DRED_DEVICE_STATE
4656{
4657 D3D12_DRED_DEVICE_STATE_UNKNOWN = 0, // Only known if DRED event occurred
4658 D3D12_DRED_DEVICE_STATE_HUNG = 3,
4659 D3D12_DRED_DEVICE_STATE_FAULT = 6,
4660 D3D12_DRED_DEVICE_STATE_PAGEFAULT = 7,
4661} D3D12_DRED_DEVICE_STATE;
4662
4663typedef struct D3D12_DRED_PAGE_FAULT_OUTPUT2
4664{
4665 D3D12_GPU_VIRTUAL_ADDRESS PageFaultVA; //If the device removal was due to GPU Fault, this contains the VA of the faulting op
4666 [annotation("_Out_")] const D3D12_DRED_ALLOCATION_NODE1 *pHeadExistingAllocationNode;
4667 [annotation("_Out_")] const D3D12_DRED_ALLOCATION_NODE1 *pHeadRecentFreedAllocationNode;
4668 D3D12_DRED_PAGE_FAULT_FLAGS PageFaultFlags;
4669
4670} D3D12_DRED_PAGE_FAULT_OUTPUT2;
4671
4672typedef struct D3D12_DEVICE_REMOVED_EXTENDED_DATA1
4673{
4674 HRESULT DeviceRemovedReason;
4675 D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT AutoBreadcrumbsOutput;
4676 D3D12_DRED_PAGE_FAULT_OUTPUT PageFaultOutput;
4677} D3D12_DEVICE_REMOVED_EXTENDED_DATA1;
4678
4679typedef struct D3D12_DEVICE_REMOVED_EXTENDED_DATA2
4680{
4681 HRESULT DeviceRemovedReason;
4682 D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1 AutoBreadcrumbsOutput;
4683 D3D12_DRED_PAGE_FAULT_OUTPUT1 PageFaultOutput;
4684} D3D12_DEVICE_REMOVED_EXTENDED_DATA2;
4685
4686typedef struct D3D12_DEVICE_REMOVED_EXTENDED_DATA3
4687{
4688 HRESULT DeviceRemovedReason;
4689 D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1 AutoBreadcrumbsOutput;
4690 D3D12_DRED_PAGE_FAULT_OUTPUT2 PageFaultOutput;
4691 D3D12_DRED_DEVICE_STATE DeviceState;
4692} D3D12_DEVICE_REMOVED_EXTENDED_DATA3;
4693
4694typedef struct D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA
4695{
4696 D3D12_DRED_VERSION Version; // Version of the DRED data
4697 union
4698 {
4699 D3D12_DEVICE_REMOVED_EXTENDED_DATA Dred_1_0;
4700 D3D12_DEVICE_REMOVED_EXTENDED_DATA1 Dred_1_1;
4701 D3D12_DEVICE_REMOVED_EXTENDED_DATA2 Dred_1_2;
4702 D3D12_DEVICE_REMOVED_EXTENDED_DATA3 Dred_1_3;
4703 };
4704} D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA;
4705
4706[uuid(82BC481C-6B9B-4030-AEDB-7EE3D1DF1E63), object, local, pointer_default(unique)]
4707interface ID3D12DeviceRemovedExtendedDataSettings
4708 : IUnknown
4709{
4710 void SetAutoBreadcrumbsEnablement(D3D12_DRED_ENABLEMENT Enablement);
4711 void SetPageFaultEnablement(D3D12_DRED_ENABLEMENT Enablement);
4712 void SetWatsonDumpEnablement(D3D12_DRED_ENABLEMENT Enablement);
4713};
4714
4715[uuid(DBD5AE51-3317-4F0A-ADF9-1D7CEDCAAE0B), object, local, pointer_default(unique)]
4716interface ID3D12DeviceRemovedExtendedDataSettings1
4717 : ID3D12DeviceRemovedExtendedDataSettings
4718{
4719 void SetBreadcrumbContextEnablement(D3D12_DRED_ENABLEMENT Enablement);
4720};
4721
4722
4723[uuid(98931D33-5AE8-4791-AA3C-1A73A2934E71), object, local, pointer_default(unique)]
4724interface ID3D12DeviceRemovedExtendedData
4725 : IUnknown
4726{
4727 HRESULT GetAutoBreadcrumbsOutput([annotation("_Out_")] D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT *pOutput);
4728 HRESULT GetPageFaultAllocationOutput([annotation("_Out_")] D3D12_DRED_PAGE_FAULT_OUTPUT *pOutput);
4729};
4730
4731[uuid(9727A022-CF1D-4DDA-9EBA-EFFA653FC506), object, local, pointer_default(unique)]
4732interface ID3D12DeviceRemovedExtendedData1
4733 : ID3D12DeviceRemovedExtendedData
4734{
4735 HRESULT GetAutoBreadcrumbsOutput1([annotation("_Out_")] D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1 *pOutput);
4736 HRESULT GetPageFaultAllocationOutput1([annotation("_Out_")] D3D12_DRED_PAGE_FAULT_OUTPUT1 *pOutput);
4737};
4738
4739[uuid(67FC5816-E4CA-4915-BF18-42541272DA54), object, local, pointer_default(unique)]
4740interface ID3D12DeviceRemovedExtendedData2
4741 : ID3D12DeviceRemovedExtendedData1
4742{
4743 HRESULT GetPageFaultAllocationOutput2([annotation("_Out_")] D3D12_DRED_PAGE_FAULT_OUTPUT2 *pOutput);
4744 D3D12_DRED_DEVICE_STATE GetDeviceState();
4745};
4746
4747typedef enum D3D12_BACKGROUND_PROCESSING_MODE
4748{
4749 D3D12_BACKGROUND_PROCESSING_MODE_ALLOWED,
4750 D3D12_BACKGROUND_PROCESSING_MODE_ALLOW_INTRUSIVE_MEASUREMENTS,
4751 D3D12_BACKGROUND_PROCESSING_MODE_DISABLE_BACKGROUND_WORK,
4752 D3D12_BACKGROUND_PROCESSING_MODE_DISABLE_PROFILING_BY_SYSTEM,
4753} D3D12_BACKGROUND_PROCESSING_MODE;
4754
4755typedef enum D3D12_MEASUREMENTS_ACTION
4756{
4757 D3D12_MEASUREMENTS_ACTION_KEEP_ALL,
4758 D3D12_MEASUREMENTS_ACTION_COMMIT_RESULTS,
4759 D3D12_MEASUREMENTS_ACTION_COMMIT_RESULTS_HIGH_PRIORITY,
4760 D3D12_MEASUREMENTS_ACTION_DISCARD_PREVIOUS,
4761} D3D12_MEASUREMENTS_ACTION;
4762
4763[uuid(c70b221b-40e4-4a17-89af-025a0727a6dc), object, local, pointer_default(unique)]
4764interface ID3D12Device6 : ID3D12Device5
4765{
4766 HRESULT SetBackgroundProcessingMode(
4767 D3D12_BACKGROUND_PROCESSING_MODE Mode,
4768 D3D12_MEASUREMENTS_ACTION MeasurementsAction,
4769 [annotation("_In_opt_")] HANDLE hEventToSignalUponCompletion,
4770 [annotation("_Out_opt_")] BOOL* pbFurtherMeasurementsDesired);
4771};
4772
4773cpp_quote("DEFINE_GUID(D3D12_PROTECTED_RESOURCES_SESSION_HARDWARE_PROTECTED, 0x62B0084E, 0xC70E, 0x4DAA, 0xA1, 0x09, 0x30, 0xFF, 0x8D, 0x5A, 0x04, 0x82); ")
4774
4775// D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT
4776typedef struct D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPE_COUNT
4777{
4778 UINT NodeIndex; // input
4779 UINT Count; // output
4780} D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPE_COUNT;
4781
4782// D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES
4783typedef struct D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPES
4784{
4785 UINT NodeIndex; // input
4786 UINT Count; // input
4787 GUID* pTypes; // output
4788} D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPES;
4789
4790typedef struct D3D12_PROTECTED_RESOURCE_SESSION_DESC1
4791{
4792 UINT NodeMask;
4793 D3D12_PROTECTED_RESOURCE_SESSION_FLAGS Flags;
4794 GUID ProtectionType;
4795} D3D12_PROTECTED_RESOURCE_SESSION_DESC1;
4796
4797[uuid(D6F12DD6-76FB-406E-8961-4296EEFC0409), object, local, pointer_default(unique)]
4798interface ID3D12ProtectedResourceSession1
4799 : ID3D12ProtectedResourceSession
4800{
4801 D3D12_PROTECTED_RESOURCE_SESSION_DESC1 GetDesc1();
4802};
4803
4804[uuid(5c014b53-68a1-4b9b-8bd1-dd6046b9358b), object, local, pointer_default(unique)]
4805interface ID3D12Device7 : ID3D12Device6
4806{
4807 HRESULT AddToStateObject(
4808 [in] const D3D12_STATE_OBJECT_DESC* pAddition,
4809 [in] ID3D12StateObject* pStateObjectToGrowFrom,
4810 [in] REFIID riid, // ID3D12StateObject
4811 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppNewStateObject
4812 );
4813
4814 HRESULT CreateProtectedResourceSession1(
4815 [annotation("_In_")] const D3D12_PROTECTED_RESOURCE_SESSION_DESC1* pDesc,
4816 [annotation("_In_")] REFIID riid, // Expected: ID3D12ProtectedResourceSession1,
4817 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppSession
4818 );
4819};
4820
4821[uuid(9218E6BB-F944-4F7E-A75C-B1B2C7B701F3), object, local, pointer_default(unique)]
4822interface ID3D12Device8 : ID3D12Device7
4823{
4824 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo2(
4825 UINT visibleMask,
4826 UINT numResourceDescs,
4827 [annotation("_In_reads_(numResourceDescs)")] const D3D12_RESOURCE_DESC1* pResourceDescs,
4828 [annotation("_Out_writes_opt_(numResourceDescs)")] D3D12_RESOURCE_ALLOCATION_INFO1* pResourceAllocationInfo1);
4829
4830 HRESULT CreateCommittedResource2(
4831 [annotation("_In_")] const D3D12_HEAP_PROPERTIES* pHeapProperties,
4832 D3D12_HEAP_FLAGS HeapFlags,
4833 [annotation("_In_")] const D3D12_RESOURCE_DESC1* pDesc,
4834 D3D12_RESOURCE_STATES InitialResourceState,
4835 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
4836 [annotation("_In_opt_")] ID3D12ProtectedResourceSession* pProtectedSession,
4837 [in] REFIID riidResource, // Expected: ID3D12Resource1*
4838 [out, iid_is(riidResource), annotation("_COM_Outptr_opt_")] void** ppvResource);
4839
4840 HRESULT CreatePlacedResource1(
4841 [annotation("_In_")] ID3D12Heap* pHeap,
4842 UINT64 HeapOffset,
4843 [annotation("_In_")] const D3D12_RESOURCE_DESC1* pDesc,
4844 D3D12_RESOURCE_STATES InitialState,
4845 [annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
4846 [in] REFIID riid, // Expected: ID3D12Resource*
4847 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppvResource);
4848
4849 void CreateSamplerFeedbackUnorderedAccessView(
4850 [annotation("_In_opt_")] ID3D12Resource* pTargetedResource,
4851 [annotation("_In_opt_")] ID3D12Resource* pFeedbackResource,
4852 [annotation("_In_")] D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor);
4853
4854 void GetCopyableFootprints1(
4855 [annotation("_In_")] const D3D12_RESOURCE_DESC1* pResourceDesc,
4856 [annotation("_In_range_(0,D3D12_REQ_SUBRESOURCES)")] UINT FirstSubresource,
4857 [annotation("_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource)")] UINT NumSubresources,
4858 UINT64 BaseOffset,
4859 [annotation("_Out_writes_opt_(NumSubresources)")] D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
4860 [annotation("_Out_writes_opt_(NumSubresources)")] UINT* pNumRows,
4861 [annotation("_Out_writes_opt_(NumSubresources)")] UINT64* pRowSizeInBytes,
4862 [annotation("_Out_opt_")] UINT64* pTotalBytes);
4863};
4864
4865
4866
4867[uuid(9D5E227A-4430-4161-88B3-3ECA6BB16E19), object, local, pointer_default(unique)]
4868interface ID3D12Resource1
4869 : ID3D12Resource
4870{
4871 HRESULT GetProtectedResourceSession(
4872 [in] REFIID riid, // Expected: ID3D12ProtectedResourceSession
4873 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppProtectedSession);
4874}
4875
4876[uuid(BE36EC3B-EA85-4AEB-A45A-E9D76404A495), object, local, pointer_default(unique)]
4877interface ID3D12Resource2
4878 : ID3D12Resource1
4879{
4880 D3D12_RESOURCE_DESC1 GetDesc1();
4881}
4882
4883
4884[uuid(572F7389-2168-49E3-9693-D6DF5871BF6D), object, local, pointer_default(unique)]
4885interface ID3D12Heap1
4886 : ID3D12Heap
4887{
4888 HRESULT GetProtectedResourceSession(
4889 [in] REFIID riid, // Expected: ID3D12ProtectedResourceSession
4890 [out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppProtectedSession);
4891}
4892
4893
4894[uuid(6FDA83A7-B84C-4E38-9AC8-C7BD22016B3D), object, local, pointer_default(unique)]
4895interface ID3D12GraphicsCommandList3 : ID3D12GraphicsCommandList2
4896{
4897 void SetProtectedResourceSession(
4898 [annotation("_In_opt_")]ID3D12ProtectedResourceSession *pProtectedResourceSession
4899 );
4900}
4901
4902// Beginning Access
4903typedef enum D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE
4904{
4905 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD,
4906 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE,
4907 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR,
4908 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS
4909} D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE;
4910
4911typedef struct D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS
4912{
4913 D3D12_CLEAR_VALUE ClearValue;
4914} D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS;
4915
4916typedef struct D3D12_RENDER_PASS_BEGINNING_ACCESS
4917{
4918 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE Type;
4919
4920 union
4921 {
4922 D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS Clear;
4923 };
4924} D3D12_RENDER_PASS_BEGINNING_ACCESS;
4925
4926// Ending Access
4927typedef enum D3D12_RENDER_PASS_ENDING_ACCESS_TYPE
4928{
4929 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD,
4930 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE,
4931 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE,
4932 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS
4933} D3D12_RENDER_PASS_ENDING_ACCESS_TYPE;
4934
4935typedef struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS
4936{
4937 UINT SrcSubresource;
4938 UINT DstSubresource;
4939
4940 UINT DstX;
4941 UINT DstY;
4942 D3D12_RECT SrcRect; // (0, 0, 0, 0) == resolve entire resource.
4943
4944} D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS;
4945
4946typedef struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS
4947{
4948 ID3D12Resource* pSrcResource;
4949 ID3D12Resource* pDstResource;
4950
4951 // Can be a subset of RT's array slices, but can't target subresources that were't part of RTV/DSV.
4952 UINT SubresourceCount;
4953 [annotation("_Field_size_full_(SubresourceCount)")] const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS *pSubresourceParameters;
4954
4955 DXGI_FORMAT Format;
4956 D3D12_RESOLVE_MODE ResolveMode;
4957
4958 BOOL PreserveResolveSource;
4959
4960} D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS;
4961
4962typedef struct D3D12_RENDER_PASS_ENDING_ACCESS
4963{
4964 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE Type;
4965
4966 union
4967 {
4968 D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS Resolve;
4969 };
4970} D3D12_RENDER_PASS_ENDING_ACCESS;
4971
4972// Render Target Desc
4973typedef struct D3D12_RENDER_PASS_RENDER_TARGET_DESC
4974{
4975 D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor;
4976
4977 D3D12_RENDER_PASS_BEGINNING_ACCESS BeginningAccess;
4978 D3D12_RENDER_PASS_ENDING_ACCESS EndingAccess;
4979
4980} D3D12_RENDER_PASS_RENDER_TARGET_DESC;
4981
4982// Depth-Stencil Desc
4983typedef struct D3D12_RENDER_PASS_DEPTH_STENCIL_DESC
4984{
4985 D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor;
4986
4987 D3D12_RENDER_PASS_BEGINNING_ACCESS DepthBeginningAccess;
4988 D3D12_RENDER_PASS_BEGINNING_ACCESS StencilBeginningAccess;
4989
4990 D3D12_RENDER_PASS_ENDING_ACCESS DepthEndingAccess;
4991 D3D12_RENDER_PASS_ENDING_ACCESS StencilEndingAccess;
4992
4993} D3D12_RENDER_PASS_DEPTH_STENCIL_DESC;
4994
4995// UAV Access Mode
4996typedef enum D3D12_RENDER_PASS_FLAGS
4997{
4998 D3D12_RENDER_PASS_FLAG_NONE = 0x0,
4999 D3D12_RENDER_PASS_FLAG_ALLOW_UAV_WRITES = 0x1,
5000 D3D12_RENDER_PASS_FLAG_SUSPENDING_PASS = 0x2,
5001 D3D12_RENDER_PASS_FLAG_RESUMING_PASS = 0x4
5002} D3D12_RENDER_PASS_FLAGS;
5003cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_RENDER_PASS_FLAGS );")
5004
5005[uuid(DBB84C27-36CE-4FC9-B801-F048C46AC570), object, local, pointer_default(unique)]
5006interface ID3D12MetaCommand : ID3D12Pageable
5007{
5008 UINT64 GetRequiredParameterResourceSize([annotation("_In_")] D3D12_META_COMMAND_PARAMETER_STAGE Stage, [annotation("_In_")] UINT ParameterIndex);
5009}
5010
5011typedef struct D3D12_DISPATCH_RAYS_DESC
5012{
5013 D3D12_GPU_VIRTUAL_ADDRESS_RANGE RayGenerationShaderRecord;
5014 D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE MissShaderTable;
5015 D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE HitGroupTable;
5016 D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE CallableShaderTable;
5017 UINT Width;
5018 UINT Height;
5019 UINT Depth;
5020} D3D12_DISPATCH_RAYS_DESC;
5021
5022[uuid(8754318e-d3a9-4541-98cf-645b50dc4874), object, local, pointer_default(unique)]
5023interface ID3D12GraphicsCommandList4 : ID3D12GraphicsCommandList3
5024{
5025 void BeginRenderPass(
5026 [annotation("_In_")] UINT NumRenderTargets,
5027 [annotation("_In_reads_opt_(NumRenderTargets)")] const D3D12_RENDER_PASS_RENDER_TARGET_DESC* pRenderTargets,
5028 [annotation("_In_opt_")] const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC* pDepthStencil,
5029 D3D12_RENDER_PASS_FLAGS Flags
5030 );
5031
5032 void EndRenderPass();
5033
5034 void InitializeMetaCommand(
5035 [annotation("_In_")] ID3D12MetaCommand * pMetaCommand,
5036 [annotation("_In_reads_bytes_opt_(InitializationParametersDataSizeInBytes)")] const void * pInitializationParametersData,
5037 [annotation("_In_")] SIZE_T InitializationParametersDataSizeInBytes
5038 );
5039
5040 void ExecuteMetaCommand(
5041 [annotation("_In_")] ID3D12MetaCommand * pMetaCommand,
5042 [annotation("_In_reads_bytes_opt_(ExecutionParametersDataSizeInBytes)")] const void * pExecutionParametersData,
5043 [annotation("_In_")] SIZE_T ExecutionParametersDataSizeInBytes
5044 );
5045
5046 void BuildRaytracingAccelerationStructure(
5047 [annotation("_In_")] const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC* pDesc,
5048 [annotation("_In_")] UINT NumPostbuildInfoDescs,
5049 [annotation("_In_reads_opt_(NumPostbuildInfoDescs)")] const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC* pPostbuildInfoDescs
5050 );
5051
5052 void EmitRaytracingAccelerationStructurePostbuildInfo(
5053 [annotation("_In_")] const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC* pDesc,
5054 [annotation("_In_")] UINT NumSourceAccelerationStructures,
5055 [annotation("_In_reads_( NumSourceAccelerationStructures )")] const D3D12_GPU_VIRTUAL_ADDRESS* pSourceAccelerationStructureData);
5056
5057 void CopyRaytracingAccelerationStructure(
5058 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData,
5059 [annotation("_In_")] D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData,
5060 [annotation("_In_")] D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode);
5061
5062 void SetPipelineState1(
5063 [annotation("_In_")] ID3D12StateObject* pStateObject);
5064
5065 void DispatchRays(
5066 [annotation("_In_")] const D3D12_DISPATCH_RAYS_DESC* pDesc);
5067}
5068
5069typedef enum D3D12_SHADER_CACHE_MODE
5070{
5071 D3D12_SHADER_CACHE_MODE_MEMORY,
5072 D3D12_SHADER_CACHE_MODE_DISK,
5073} D3D12_SHADER_CACHE_MODE;
5074
5075typedef enum D3D12_SHADER_CACHE_FLAGS
5076{
5077 D3D12_SHADER_CACHE_FLAG_NONE = 0x0,
5078 D3D12_SHADER_CACHE_FLAG_DRIVER_VERSIONED = 0x1,
5079 D3D12_SHADER_CACHE_FLAG_USE_WORKING_DIR = 0x2,
5080} D3D12_SHADER_CACHE_FLAGS;
5081cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_CACHE_FLAGS );")
5082
5083typedef struct D3D12_SHADER_CACHE_SESSION_DESC
5084{
5085 GUID Identifier;
5086 D3D12_SHADER_CACHE_MODE Mode;
5087 D3D12_SHADER_CACHE_FLAGS Flags;
5088
5089 UINT MaximumInMemoryCacheSizeBytes;
5090 UINT MaximumInMemoryCacheEntries;
5091
5092 UINT MaximumValueFileSizeBytes;
5093
5094 UINT64 Version;
5095} D3D12_SHADER_CACHE_SESSION_DESC;
5096
5097[uuid(28e2495d-0f64-4ae4-a6ec-129255dc49a8), object, local, pointer_default(unique)]
5098interface ID3D12ShaderCacheSession
5099 : ID3D12DeviceChild
5100{
5101 HRESULT FindValue(
5102 [in, annotation("_In_reads_bytes_(KeySize)")] const void* pKey,
5103 UINT KeySize,
5104 [out, annotation("_Out_writes_bytes_(*pValueSize)")] void* pValue,
5105 [annotation("_Inout_")] UINT* pValueSize);
5106 HRESULT StoreValue(
5107 [in, annotation("_In_reads_bytes_(KeySize)")] const void* pKey,
5108 UINT KeySize,
5109 [in, annotation("_In_reads_bytes_(ValueSize)")] const void* pValue,
5110 UINT ValueSize);
5111
5112 void SetDeleteOnDestroy();
5113 D3D12_SHADER_CACHE_SESSION_DESC GetDesc();
5114};
5115
5116typedef enum D3D12_SHADER_CACHE_KIND_FLAGS
5117{
5118 D3D12_SHADER_CACHE_KIND_FLAG_IMPLICIT_D3D_CACHE_FOR_DRIVER = 0x1,
5119 D3D12_SHADER_CACHE_KIND_FLAG_IMPLICIT_D3D_CONVERSIONS = 0x2,
5120 D3D12_SHADER_CACHE_KIND_FLAG_IMPLICIT_DRIVER_MANAGED = 0x4,
5121 D3D12_SHADER_CACHE_KIND_FLAG_APPLICATION_MANAGED = 0x8,
5122} D3D12_SHADER_CACHE_KIND_FLAGS;
5123cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_CACHE_KIND_FLAGS );")
5124
5125typedef enum D3D12_SHADER_CACHE_CONTROL_FLAGS
5126{
5127 D3D12_SHADER_CACHE_CONTROL_FLAG_DISABLE = 0x1,
5128 D3D12_SHADER_CACHE_CONTROL_FLAG_ENABLE = 0x2,
5129 D3D12_SHADER_CACHE_CONTROL_FLAG_CLEAR = 0x4,
5130} D3D12_SHADER_CACHE_CONTROL_FLAGS;
5131cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_SHADER_CACHE_CONTROL_FLAGS );")
5132
5133[uuid(4c80e962-f032-4f60-bc9e-ebc2cfa1d83c), object, local, pointer_default(unique)]
5134interface ID3D12Device9
5135 : ID3D12Device8
5136{
5137 HRESULT CreateShaderCacheSession(
5138 [annotation("_In_")] const D3D12_SHADER_CACHE_SESSION_DESC* pDesc,
5139 REFIID riid,
5140 [annotation("_COM_Outptr_opt_")] void** ppvSession);
5141
5142 HRESULT ShaderCacheControl(
5143 D3D12_SHADER_CACHE_KIND_FLAGS Kinds,
5144 D3D12_SHADER_CACHE_CONTROL_FLAGS Control);
5145
5146 HRESULT CreateCommandQueue1(
5147 [annotation("_In_")] const D3D12_COMMAND_QUEUE_DESC* pDesc,
5148 REFIID CreatorID,
5149 [in] REFIID riid, // Expected: ID3D12CommandQueue
5150 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppCommandQueue
5151 );
5152};
5153
5154
5155[uuid(7071e1f0-e84b-4b33-974f-12fa49de65c5), object, local, pointer_default(unique)]
5156interface ID3D12Tools
5157 : IUnknown
5158{
5159 void EnableShaderInstrumentation(BOOL bEnable);
5160 BOOL ShaderInstrumentationEnabled();
5161}
5162
5163typedef struct D3D12_SUBRESOURCE_DATA
5164{
5165 const void* pData;
5166 LONG_PTR RowPitch;
5167 LONG_PTR SlicePitch;
5168} D3D12_SUBRESOURCE_DATA;
5169
5170typedef struct D3D12_MEMCPY_DEST
5171{
5172 void* pData;
5173 SIZE_T RowPitch;
5174 SIZE_T SlicePitch;
5175} D3D12_MEMCPY_DEST;
5176
5177
5178
5179cpp_quote( "#if !defined( D3D12_IGNORE_SDK_LAYERS ) ")
5180cpp_quote( "#include \"d3d12sdklayers.h\" ")
5181cpp_quote( "#endif ")
5182
5183
5184cpp_quote("")
5185cpp_quote("///////////////////////////////////////////////////////////////////////////")
5186cpp_quote("// D3D12CreateDevice")
5187cpp_quote("// ------------------")
5188cpp_quote("//")
5189cpp_quote("// pAdapter")
5190cpp_quote("// If NULL, D3D12CreateDevice will choose the primary adapter.")
5191cpp_quote("// If non-NULL, D3D12CreateDevice will use the provided adapter.")
5192cpp_quote("// MinimumFeatureLevel")
5193cpp_quote("// The minimum feature level required for successful device creation.")
5194cpp_quote("// riid")
5195cpp_quote("// The interface IID of the device to be returned. Expected: ID3D12Device.")
5196cpp_quote("// ppDevice")
5197cpp_quote("// Pointer to returned interface. May be NULL.")
5198cpp_quote("//")
5199cpp_quote("// Return Values")
5200cpp_quote("// Any of those documented for ")
5201cpp_quote("// CreateDXGIFactory1")
5202cpp_quote("// IDXGIFactory::EnumAdapters")
5203cpp_quote("// D3D12CreateDevice")
5204cpp_quote("//")
5205cpp_quote("///////////////////////////////////////////////////////////////////////////")
5206cpp_quote("typedef HRESULT (WINAPI* PFN_D3D12_CREATE_DEVICE)( _In_opt_ IUnknown*, ")
5207cpp_quote(" D3D_FEATURE_LEVEL, ")
5208cpp_quote(" _In_ REFIID, _COM_Outptr_opt_ void** );")
5209cpp_quote("")
5210cpp_quote("HRESULT WINAPI D3D12CreateDevice(")
5211cpp_quote(" _In_opt_ IUnknown* pAdapter,")
5212cpp_quote(" D3D_FEATURE_LEVEL MinimumFeatureLevel,")
5213cpp_quote(" _In_ REFIID riid, // Expected: ID3D12Device")
5214cpp_quote(" _COM_Outptr_opt_ void** ppDevice );")
5215cpp_quote("")
5216
5217cpp_quote("")
5218cpp_quote("typedef HRESULT (WINAPI* PFN_D3D12_GET_DEBUG_INTERFACE)( _In_ REFIID, _COM_Outptr_opt_ void** );")
5219cpp_quote("")
5220cpp_quote("HRESULT WINAPI D3D12GetDebugInterface( _In_ REFIID riid, _COM_Outptr_opt_ void** ppvDebug );")
5221cpp_quote("")
5222
5223cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5224cpp_quote("// D3D12EnableExperimentalFeatures")
5225cpp_quote("//")
5226cpp_quote("// Pass in a list of feature GUIDs to be enabled together.")
5227cpp_quote("// ")
5228cpp_quote("// If a particular feature requires some configuration information on enablement, it will have")
5229cpp_quote("// a configuration struct that can be passed alongside the GUID.")
5230cpp_quote("// ")
5231cpp_quote("// Some features might use an interface IID as the GUID. For these, once the feature is enabled via")
5232cpp_quote("// D3D12EnableExperimentalFeatures, D3D12GetDebugInterface can then be called with the IID to retrieve the interface")
5233cpp_quote("// for manipulating the feature. This allows for control that might not cleanly be expressed by just ")
5234cpp_quote("// the configuration struct that D3D12EnableExperimentalFeatures provides.")
5235cpp_quote("//")
5236cpp_quote("// If this method is called and a change to existing feature enablement is made, ")
5237cpp_quote("// all current D3D12 devices are set to DEVICE_REMOVED state, since under the covers there is really only one")
5238cpp_quote("// singleton device for a process. Removing the devices when configuration changes prevents")
5239cpp_quote("// mismatched expectations of how a device is supposed to work after it has been created from the app's point of view.")
5240cpp_quote("//")
5241cpp_quote("// The call returns E_NOINTERFACE if an unrecognized feature is passed in or Windows Developer mode is not on.")
5242cpp_quote("// The call returns E_INVALIDARG if the configuration of a feature is incorrect, the set of features passed")
5243cpp_quote("// in are known to be incompatible with each other, or other errors.")
5244cpp_quote("// Returns S_OK otherwise.")
5245cpp_quote("//")
5246cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5247cpp_quote("HRESULT WINAPI D3D12EnableExperimentalFeatures(")
5248cpp_quote(" UINT NumFeatures,")
5249cpp_quote(" _In_count_(NumFeatures) const IID* pIIDs,")
5250cpp_quote(" _In_opt_count_(NumFeatures) void* pConfigurationStructs,")
5251cpp_quote(" _In_opt_count_(NumFeatures) UINT* pConfigurationStructSizes);")
5252cpp_quote("")
5253cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5254cpp_quote("// Experimental Feature: D3D12ExperimentalShaderModels")
5255cpp_quote("//")
5256cpp_quote("// Use with D3D12EnableExperimentalFeatures to enable experimental shader model support,")
5257cpp_quote("// meaning shader models that haven't been finalized for use in retail.")
5258cpp_quote("//")
5259cpp_quote("// Enabling D3D12ExperimentalShaderModels needs no configuration struct, pass NULL in the pConfigurationStructs array.")
5260cpp_quote("//")
5261cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5262cpp_quote("static const UUID D3D12ExperimentalShaderModels = { /* 76f5573e-f13a-40f5-b297-81ce9e18933f */")
5263cpp_quote(" 0x76f5573e,")
5264cpp_quote(" 0xf13a,")
5265cpp_quote(" 0x40f5,")
5266cpp_quote(" { 0xb2, 0x97, 0x81, 0xce, 0x9e, 0x18, 0x93, 0x3f }")
5267cpp_quote("};")
5268cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5269cpp_quote("// Experimental Feature: D3D12TiledResourceTier4")
5270cpp_quote("//")
5271cpp_quote("// Use with D3D12EnableExperimentalFeatures to enable tiled resource tier 4 support,")
5272cpp_quote("// meaning texture tile data-inheritance is allowed.")
5273cpp_quote("//")
5274cpp_quote("// Enabling D3D12TiledResourceTier4 needs no configuration struct, pass NULL in the pConfigurationStructs array.")
5275cpp_quote("//")
5276cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5277cpp_quote("static const UUID D3D12TiledResourceTier4 = { /* c9c4725f-a81a-4f56-8c5b-c51039d694fb */")
5278cpp_quote(" 0xc9c4725f,")
5279cpp_quote(" 0xa81a,")
5280cpp_quote(" 0x4f56,")
5281cpp_quote(" { 0x8c, 0x5b, 0xc5, 0x10, 0x39, 0xd6, 0x94, 0xfb }")
5282cpp_quote("};")
5283cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5284cpp_quote("// Experimental Feature: D3D12MetaCommand")
5285cpp_quote("//")
5286cpp_quote("// Use with D3D12EnableExperimentalFeatures to enable the D3D12 Meta Command.")
5287cpp_quote("//")
5288cpp_quote("// Enabling D3D12MetaCommand needs no configuration struct, pass NULL in the pConfigurationStructs array.")
5289cpp_quote("//")
5290cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5291cpp_quote("static const UUID D3D12MetaCommand = { /* C734C97E-8077-48C8-9FDC-D9D1DD31DD77 */")
5292cpp_quote(" 0xc734c97e,")
5293cpp_quote(" 0x8077,")
5294cpp_quote(" 0x48c8,")
5295cpp_quote(" { 0x9f, 0xdc, 0xd9, 0xd1, 0xdd, 0x31, 0xdd, 0x77 }")
5296cpp_quote("};")
5297
5298cpp_quote("// --------------------------------------------------------------------------------------------------------------------------------")
5299cpp_quote("// D3D12GetInterface")
5300cpp_quote("//")
5301cpp_quote("// Retrieve Global D3D12 Interface.")
5302cpp_quote("//")
5303cpp_quote("")
5304cpp_quote("DEFINE_GUID(CLSID_D3D12Debug, 0xf2352aeb, 0xdd84, 0x49fe, 0xb9, 0x7b, 0xa9, 0xdc, 0xfd, 0xcc, 0x1b, 0x4f);")
5305cpp_quote("DEFINE_GUID(CLSID_D3D12Tools, 0xe38216b1, 0x3c8c, 0x4833, 0xaa, 0x09, 0x0a, 0x06, 0xb6, 0x5d, 0x96, 0xc8);")
5306cpp_quote("DEFINE_GUID(CLSID_D3D12DeviceRemovedExtendedData, 0x4a75bbc4, 0x9ff4, 0x4ad8, 0x9f, 0x18, 0xab, 0xae, 0x84, 0xdc, 0x5f, 0xf2);")
5307cpp_quote("DEFINE_GUID(CLSID_D3D12SDKConfiguration, 0x7cda6aca, 0xa03e, 0x49c8, 0x94, 0x58, 0x03, 0x34, 0xd2, 0x0e, 0x07, 0xce);")
5308cpp_quote("")
5309cpp_quote("typedef HRESULT (WINAPI* PFN_D3D12_GET_INTERFACE)( _In_ REFCLSID, _In_ REFIID, _COM_Outptr_opt_ void** );")
5310cpp_quote("")
5311cpp_quote("HRESULT WINAPI D3D12GetInterface( _In_ REFCLSID rclsid, _In_ REFIID riid, _COM_Outptr_opt_ void** ppvDebug );")
5312cpp_quote("")
5313
5314//==================================================================================================================================
5315//
5316// SDK Configuration
5317//
5318//==================================================================================================================================
5319
5320[uuid(e9eb5314-33aa-42b2-a718-d77f58b1f1c7), object, local, pointer_default(unique)]
5321interface ID3D12SDKConfiguration
5322 : IUnknown
5323{
5324 HRESULT SetSDKVersion(
5325 UINT SDKVersion,
5326 [annotation("_In_z_")] LPCSTR SDKPath
5327 );
5328}
5329
5330
5331typedef enum D3D12_AXIS_SHADING_RATE
5332{
5333 D3D12_AXIS_SHADING_RATE_1X = 0x0,
5334 D3D12_AXIS_SHADING_RATE_2X = 0x1,
5335 D3D12_AXIS_SHADING_RATE_4X = 0x2
5336} D3D12_AXIS_SHADING_RATE;
5337
5338
5339cpp_quote("#define D3D12_SHADING_RATE_X_AXIS_SHIFT 2")
5340cpp_quote("#define D3D12_SHADING_RATE_VALID_MASK 3")
5341
5342cpp_quote("#define D3D12_MAKE_COARSE_SHADING_RATE(x,y) ((x) << D3D12_SHADING_RATE_X_AXIS_SHIFT | (y))")
5343
5344cpp_quote("#define D3D12_GET_COARSE_SHADING_RATE_X_AXIS(x) (((x) >> D3D12_SHADING_RATE_X_AXIS_SHIFT) & D3D12_SHADING_RATE_VALID_MASK)")
5345cpp_quote("#define D3D12_GET_COARSE_SHADING_RATE_Y_AXIS(y) ((y) & D3D12_SHADING_RATE_VALID_MASK)")
5346
5347typedef enum D3D12_SHADING_RATE
5348{
5349 D3D12_SHADING_RATE_1X1 = 0x0,
5350 D3D12_SHADING_RATE_1X2 = 0x1,
5351 D3D12_SHADING_RATE_2X1 = 0x4,
5352 D3D12_SHADING_RATE_2X2 = 0x5,
5353 D3D12_SHADING_RATE_2X4 = 0x6,
5354 D3D12_SHADING_RATE_4X2 = 0x9,
5355 D3D12_SHADING_RATE_4X4 = 0xA
5356} D3D12_SHADING_RATE;
5357
5358typedef enum D3D12_SHADING_RATE_COMBINER
5359{
5360 D3D12_SHADING_RATE_COMBINER_PASSTHROUGH = 0,
5361 D3D12_SHADING_RATE_COMBINER_OVERRIDE = 1,
5362 D3D12_SHADING_RATE_COMBINER_MIN = 2,
5363 D3D12_SHADING_RATE_COMBINER_MAX = 3,
5364 D3D12_SHADING_RATE_COMBINER_SUM = 4,
5365} D3D12_SHADING_RATE_COMBINER;
5366
5367[uuid(55050859-4024-474c-87f5-6472eaee44ea), object, local, pointer_default(unique)]
5368interface ID3D12GraphicsCommandList5 : ID3D12GraphicsCommandList4
5369{
5370 void RSSetShadingRate(
5371 [annotation("_In_")] D3D12_SHADING_RATE baseShadingRate,
5372 [annotation("_In_reads_opt_(D3D12_RS_SET_SHADING_RATE_COMBINER_COUNT)")] const D3D12_SHADING_RATE_COMBINER* combiners);
5373
5374 void RSSetShadingRateImage(
5375 [annotation("_In_opt_")] ID3D12Resource* shadingRateImage);
5376}
5377
5378typedef struct D3D12_DISPATCH_MESH_ARGUMENTS
5379{
5380 UINT ThreadGroupCountX;
5381 UINT ThreadGroupCountY;
5382 UINT ThreadGroupCountZ;
5383} D3D12_DISPATCH_MESH_ARGUMENTS;
5384
5385[uuid(c3827890-e548-4cfa-96cf-5689a9370f80), object, local, pointer_default(unique)]
5386interface ID3D12GraphicsCommandList6 : ID3D12GraphicsCommandList5
5387{
5388 void DispatchMesh(
5389 [annotation("_In_")] UINT ThreadGroupCountX,
5390 [annotation("_In_")] UINT ThreadGroupCountY,
5391 [annotation("_In_")] UINT ThreadGroupCountZ
5392 );
5393}
5394
5395
5396//----------------------------------------------------------------------------------------------------------
5397// Old types which are still supported by the runtime for app-compat
5398
5399cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */")
5400#pragma endregion
5401
5402cpp_quote( "DEFINE_GUID(IID_ID3D12Object,0xc4fec28f,0x7966,0x4e95,0x9f,0x94,0xf4,0x31,0xcb,0x56,0xc3,0xb8);" )
5403cpp_quote( "DEFINE_GUID(IID_ID3D12DeviceChild,0x905db94b,0xa00c,0x4140,0x9d,0xf5,0x2b,0x64,0xca,0x9e,0xa3,0x57);" )
5404cpp_quote( "DEFINE_GUID(IID_ID3D12RootSignature,0xc54a6b66,0x72df,0x4ee8,0x8b,0xe5,0xa9,0x46,0xa1,0x42,0x92,0x14);" )
5405cpp_quote( "DEFINE_GUID(IID_ID3D12RootSignatureDeserializer,0x34AB647B,0x3CC8,0x46AC,0x84,0x1B,0xC0,0x96,0x56,0x45,0xC0,0x46);" )
5406cpp_quote( "DEFINE_GUID(IID_ID3D12VersionedRootSignatureDeserializer,0x7F91CE67,0x090C,0x4BB7,0xB7,0x8E,0xED,0x8F,0xF2,0xE3,0x1D,0xA0);" )
5407cpp_quote( "DEFINE_GUID(IID_ID3D12Pageable,0x63ee58fb,0x1268,0x4835,0x86,0xda,0xf0,0x08,0xce,0x62,0xf0,0xd6);" )
5408cpp_quote( "DEFINE_GUID(IID_ID3D12Heap,0x6b3b2502,0x6e51,0x45b3,0x90,0xee,0x98,0x84,0x26,0x5e,0x8d,0xf3);" )
5409cpp_quote( "DEFINE_GUID(IID_ID3D12Resource,0x696442be,0xa72e,0x4059,0xbc,0x79,0x5b,0x5c,0x98,0x04,0x0f,0xad);" )
5410cpp_quote( "DEFINE_GUID(IID_ID3D12CommandAllocator,0x6102dee4,0xaf59,0x4b09,0xb9,0x99,0xb4,0x4d,0x73,0xf0,0x9b,0x24);" )
5411cpp_quote( "DEFINE_GUID(IID_ID3D12Fence,0x0a753dcf,0xc4d8,0x4b91,0xad,0xf6,0xbe,0x5a,0x60,0xd9,0x5a,0x76);" )
5412cpp_quote( "DEFINE_GUID(IID_ID3D12Fence1,0x433685fe,0xe22b,0x4ca0,0xa8,0xdb,0xb5,0xb4,0xf4,0xdd,0x0e,0x4a);" )
5413cpp_quote( "DEFINE_GUID(IID_ID3D12PipelineState,0x765a30f3,0xf624,0x4c6f,0xa8,0x28,0xac,0xe9,0x48,0x62,0x24,0x45);" )
5414cpp_quote( "DEFINE_GUID(IID_ID3D12DescriptorHeap,0x8efb471d,0x616c,0x4f49,0x90,0xf7,0x12,0x7b,0xb7,0x63,0xfa,0x51);" )
5415cpp_quote( "DEFINE_GUID(IID_ID3D12QueryHeap,0x0d9658ae,0xed45,0x469e,0xa6,0x1d,0x97,0x0e,0xc5,0x83,0xca,0xb4);" )
5416cpp_quote( "DEFINE_GUID(IID_ID3D12CommandSignature,0xc36a797c,0xec80,0x4f0a,0x89,0x85,0xa7,0xb2,0x47,0x50,0x82,0xd1);" )
5417cpp_quote( "DEFINE_GUID(IID_ID3D12CommandList,0x7116d91c,0xe7e4,0x47ce,0xb8,0xc6,0xec,0x81,0x68,0xf4,0x37,0xe5);" )
5418cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList,0x5b160d0f,0xac1b,0x4185,0x8b,0xa8,0xb3,0xae,0x42,0xa5,0xa4,0x55);" )
5419cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList1,0x553103fb,0x1fe7,0x4557,0xbb,0x38,0x94,0x6d,0x7d,0x0e,0x7c,0xa7);" )
5420cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList2,0x38C3E585,0xFF17,0x412C,0x91,0x50,0x4F,0xC6,0xF9,0xD7,0x2A,0x28);" )
5421cpp_quote( "DEFINE_GUID(IID_ID3D12CommandQueue,0x0ec870a6,0x5d7e,0x4c22,0x8c,0xfc,0x5b,0xaa,0xe0,0x76,0x16,0xed);" )
5422cpp_quote( "DEFINE_GUID(IID_ID3D12Device,0x189819f1,0x1db6,0x4b57,0xbe,0x54,0x18,0x21,0x33,0x9b,0x85,0xf7);" )
5423cpp_quote( "DEFINE_GUID(IID_ID3D12PipelineLibrary,0xc64226a8,0x9201,0x46af,0xb4,0xcc,0x53,0xfb,0x9f,0xf7,0x41,0x4f);" )
5424cpp_quote( "DEFINE_GUID(IID_ID3D12PipelineLibrary1,0x80eabf42,0x2568,0x4e5e,0xbd,0x82,0xc3,0x7f,0x86,0x96,0x1d,0xc3);" )
5425cpp_quote( "DEFINE_GUID(IID_ID3D12Device1,0x77acce80,0x638e,0x4e65,0x88,0x95,0xc1,0xf2,0x33,0x86,0x86,0x3e);" )
5426cpp_quote( "DEFINE_GUID(IID_ID3D12Device2,0x30baa41e,0xb15b,0x475c,0xa0,0xbb,0x1a,0xf5,0xc5,0xb6,0x43,0x28);" )
5427cpp_quote( "DEFINE_GUID(IID_ID3D12Device3,0x81dadc15,0x2bad,0x4392,0x93,0xc5,0x10,0x13,0x45,0xc4,0xaa,0x98);" )
5428cpp_quote( "DEFINE_GUID(IID_ID3D12ProtectedSession,0xA1533D18,0x0AC1,0x4084,0x85,0xB9,0x89,0xA9,0x61,0x16,0x80,0x6B);" )
5429cpp_quote( "DEFINE_GUID(IID_ID3D12ProtectedResourceSession,0x6CD696F4,0xF289,0x40CC,0x80,0x91,0x5A,0x6C,0x0A,0x09,0x9C,0x3D);" )
5430cpp_quote( "DEFINE_GUID(IID_ID3D12Device4,0xe865df17,0xa9ee,0x46f9,0xa4,0x63,0x30,0x98,0x31,0x5a,0xa2,0xe5);" )
5431cpp_quote( "DEFINE_GUID(IID_ID3D12LifetimeOwner,0xe667af9f,0xcd56,0x4f46,0x83,0xce,0x03,0x2e,0x59,0x5d,0x70,0xa8);" )
5432cpp_quote( "DEFINE_GUID(IID_ID3D12SwapChainAssistant,0xf1df64b6,0x57fd,0x49cd,0x88,0x07,0xc0,0xeb,0x88,0xb4,0x5c,0x8f);" )
5433cpp_quote( "DEFINE_GUID(IID_ID3D12LifetimeTracker,0x3fd03d36,0x4eb1,0x424a,0xa5,0x82,0x49,0x4e,0xcb,0x8b,0xa8,0x13);" )
5434cpp_quote( "DEFINE_GUID(IID_ID3D12StateObject,0x47016943,0xfca8,0x4594,0x93,0xea,0xaf,0x25,0x8b,0x55,0x34,0x6d);" )
5435cpp_quote( "DEFINE_GUID(IID_ID3D12StateObjectProperties,0xde5fa827,0x9bf9,0x4f26,0x89,0xff,0xd7,0xf5,0x6f,0xde,0x38,0x60);" )
5436cpp_quote( "DEFINE_GUID(IID_ID3D12Device5,0x8b4f173b,0x2fea,0x4b80,0x8f,0x58,0x43,0x07,0x19,0x1a,0xb9,0x5d);" )
5437cpp_quote( "DEFINE_GUID(IID_ID3D12DeviceRemovedExtendedDataSettings,0x82BC481C,0x6B9B,0x4030,0xAE,0xDB,0x7E,0xE3,0xD1,0xDF,0x1E,0x63);" )
5438cpp_quote( "DEFINE_GUID(IID_ID3D12DeviceRemovedExtendedDataSettings1,0xDBD5AE51,0x3317,0x4F0A,0xAD,0xF9,0x1D,0x7C,0xED,0xCA,0xAE,0x0B);" )
5439cpp_quote( "DEFINE_GUID(IID_ID3D12DeviceRemovedExtendedData,0x98931D33,0x5AE8,0x4791,0xAA,0x3C,0x1A,0x73,0xA2,0x93,0x4E,0x71);" )
5440cpp_quote( "DEFINE_GUID(IID_ID3D12DeviceRemovedExtendedData1,0x9727A022,0xCF1D,0x4DDA,0x9E,0xBA,0xEF,0xFA,0x65,0x3F,0xC5,0x06);" )
5441cpp_quote( "DEFINE_GUID(IID_ID3D12DeviceRemovedExtendedData2,0x67FC5816,0xE4CA,0x4915,0xBF,0x18,0x42,0x54,0x12,0x72,0xDA,0x54);" )
5442cpp_quote( "DEFINE_GUID(IID_ID3D12Device6,0xc70b221b,0x40e4,0x4a17,0x89,0xaf,0x02,0x5a,0x07,0x27,0xa6,0xdc);" )
5443cpp_quote( "DEFINE_GUID(IID_ID3D12ProtectedResourceSession1,0xD6F12DD6,0x76FB,0x406E,0x89,0x61,0x42,0x96,0xEE,0xFC,0x04,0x09);" )
5444cpp_quote( "DEFINE_GUID(IID_ID3D12Device7,0x5c014b53,0x68a1,0x4b9b,0x8b,0xd1,0xdd,0x60,0x46,0xb9,0x35,0x8b);" )
5445cpp_quote( "DEFINE_GUID(IID_ID3D12Device8,0x9218E6BB,0xF944,0x4F7E,0xA7,0x5C,0xB1,0xB2,0xC7,0xB7,0x01,0xF3);" )
5446cpp_quote( "DEFINE_GUID(IID_ID3D12Resource1,0x9D5E227A,0x4430,0x4161,0x88,0xB3,0x3E,0xCA,0x6B,0xB1,0x6E,0x19);" )
5447cpp_quote( "DEFINE_GUID(IID_ID3D12Resource2,0xBE36EC3B,0xEA85,0x4AEB,0xA4,0x5A,0xE9,0xD7,0x64,0x04,0xA4,0x95);" )
5448cpp_quote( "DEFINE_GUID(IID_ID3D12Heap1,0x572F7389,0x2168,0x49E3,0x96,0x93,0xD6,0xDF,0x58,0x71,0xBF,0x6D);" )
5449cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList3,0x6FDA83A7,0xB84C,0x4E38,0x9A,0xC8,0xC7,0xBD,0x22,0x01,0x6B,0x3D);" )
5450cpp_quote( "DEFINE_GUID(IID_ID3D12MetaCommand,0xDBB84C27,0x36CE,0x4FC9,0xB8,0x01,0xF0,0x48,0xC4,0x6A,0xC5,0x70);" )
5451cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList4,0x8754318e,0xd3a9,0x4541,0x98,0xcf,0x64,0x5b,0x50,0xdc,0x48,0x74);" )
5452cpp_quote( "DEFINE_GUID(IID_ID3D12ShaderCacheSession,0x28e2495d,0x0f64,0x4ae4,0xa6,0xec,0x12,0x92,0x55,0xdc,0x49,0xa8);" )
5453cpp_quote( "DEFINE_GUID(IID_ID3D12Device9,0x4c80e962,0xf032,0x4f60,0xbc,0x9e,0xeb,0xc2,0xcf,0xa1,0xd8,0x3c);" )
5454cpp_quote( "DEFINE_GUID(IID_ID3D12Tools,0x7071e1f0,0xe84b,0x4b33,0x97,0x4f,0x12,0xfa,0x49,0xde,0x65,0xc5);" )
5455cpp_quote( "DEFINE_GUID(IID_ID3D12SDKConfiguration,0xe9eb5314,0x33aa,0x42b2,0xa7,0x18,0xd7,0x7f,0x58,0xb1,0xf1,0xc7);" )
5456cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList5,0x55050859,0x4024,0x474c,0x87,0xf5,0x64,0x72,0xea,0xee,0x44,0xea);" )
5457cpp_quote( "DEFINE_GUID(IID_ID3D12GraphicsCommandList6,0xc3827890,0xe548,0x4cfa,0x96,0xcf,0x56,0x89,0xa9,0x37,0x0f,0x80);" )