2 * Copyright 2016 Józef Kucia for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 import
"d3dcommon.idl";
24 cpp_quote
("#ifndef _D3D12_CONSTANTS")
25 cpp_quote
("#define _D3D12_CONSTANTS")
27 const UINT D3D12_CS_TGSM_REGISTER_COUNT
= 8192;
28 const UINT D3D12_MAX_ROOT_COST
= 64;
29 const UINT D3D12_VIEWPORT_BOUNDS_MAX
= 32767;
30 const UINT D3D12_VIEWPORT_BOUNDS_MIN
= -32768;
32 const UINT D3D12_APPEND_ALIGNED_ELEMENT
= 0xffffffff;
33 cpp_quote
("#define D3D12_DEFAULT_BLEND_FACTOR_ALPHA (1.0f)")
34 cpp_quote
("#define D3D12_DEFAULT_BLEND_FACTOR_BLUE (1.0f)")
35 cpp_quote
("#define D3D12_DEFAULT_BLEND_FACTOR_GREEN (1.0f)")
36 cpp_quote
("#define D3D12_DEFAULT_BLEND_FACTOR_RED (1.0f)")
37 const UINT D3D12_DEFAULT_DEPTH_BIAS
= 0;
38 cpp_quote
("#define D3D12_DEFAULT_DEPTH_BIAS_CLAMP (0.0f)")
39 cpp_quote
("#define D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS (0.0f)")
40 const UINT D3D12_DEFAULT_STENCIL_READ_MASK
= 0xff;
41 const UINT D3D12_DEFAULT_STENCIL_WRITE_MASK
= 0xff;
42 const UINT D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND
= 0xffffffff;
43 cpp_quote
("#define D3D12_FLOAT32_MAX (3.402823466e+38f)")
44 const UINT D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
= 32;
45 const UINT D3D12_REQ_MIP_LEVELS
= 15;
46 const UINT D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION
= 2048;
47 const UINT D3D12_REQ_TEXTURE1D_U_DIMENSION
= 16384;
48 const UINT D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION
= 2048;
49 const UINT D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION
= 16384;
50 const UINT D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION
= 2048;
51 const UINT D3D12_REQ_TEXTURECUBE_DIMENSION
= 16384;
52 const UINT D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES
= 0xffffffff;
53 const UINT D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
= 8;
54 const UINT D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT
= 256;
55 const UINT D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT
= 65536;
56 const UINT D3D12_TEXTURE_DATA_PITCH_ALIGNMENT
= 256;
57 const UINT D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT
= 512;
58 const UINT D3D12_VS_INPUT_REGISTER_COUNT
= 32;
59 const UINT D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE
= 16;
63 const UINT D3D12_SHADER_COMPONENT_MAPPING_MASK
= 0x7;
64 const UINT D3D12_SHADER_COMPONENT_MAPPING_SHIFT
= 3;
65 const UINT D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES
66 = 1 << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT
* 4);
68 typedef enum D3D12_SHADER_MIN_PRECISION_SUPPORT
70 D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE
= 0x0,
71 D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT
= 0x1,
72 D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT
= 0x2,
73 } D3D12_SHADER_MIN_PRECISION_SUPPORT
;
75 typedef enum D3D12_TILED_RESOURCES_TIER
77 D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED
= 0,
78 D3D12_TILED_RESOURCES_TIER_1
= 1,
79 D3D12_TILED_RESOURCES_TIER_2
= 2,
80 D3D12_TILED_RESOURCES_TIER_3
= 3,
81 } D3D12_TILED_RESOURCES_TIER
;
83 typedef enum D3D12_RESOURCE_BINDING_TIER
85 D3D12_RESOURCE_BINDING_TIER_1
= 1,
86 D3D12_RESOURCE_BINDING_TIER_2
= 2,
87 D3D12_RESOURCE_BINDING_TIER_3
= 3,
88 } D3D12_RESOURCE_BINDING_TIER
;
90 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_TIER
92 D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED
= 0,
93 D3D12_CONSERVATIVE_RASTERIZATION_TIER_1
= 1,
94 D3D12_CONSERVATIVE_RASTERIZATION_TIER_2
= 2,
95 D3D12_CONSERVATIVE_RASTERIZATION_TIER_3
= 3,
96 } D3D12_CONSERVATIVE_RASTERIZATION_TIER
;
98 typedef enum D3D12_CROSS_NODE_SHARING_TIER
100 D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED
= 0,
101 D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED
= 1,
102 D3D12_CROSS_NODE_SHARING_TIER_1
= 2,
103 D3D12_CROSS_NODE_SHARING_TIER_2
= 3,
104 } D3D12_CROSS_NODE_SHARING_TIER
;
106 typedef enum D3D12_RESOURCE_HEAP_TIER
108 D3D12_RESOURCE_HEAP_TIER_1
= 1,
109 D3D12_RESOURCE_HEAP_TIER_2
= 2,
110 } D3D12_RESOURCE_HEAP_TIER
;
112 typedef enum D3D12_FORMAT_SUPPORT1
114 D3D12_FORMAT_SUPPORT1_NONE
= 0x00000000,
115 D3D12_FORMAT_SUPPORT1_BUFFER
= 0x00000001,
116 D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER
= 0x00000002,
117 D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER
= 0x00000004,
118 D3D12_FORMAT_SUPPORT1_SO_BUFFER
= 0x00000008,
119 D3D12_FORMAT_SUPPORT1_TEXTURE1D
= 0x00000010,
120 D3D12_FORMAT_SUPPORT1_TEXTURE2D
= 0x00000020,
121 D3D12_FORMAT_SUPPORT1_TEXTURE3D
= 0x00000040,
122 D3D12_FORMAT_SUPPORT1_TEXTURECUBE
= 0x00000080,
123 D3D12_FORMAT_SUPPORT1_SHADER_LOAD
= 0x00000100,
124 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE
= 0x00000200,
125 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON
= 0x00000400,
126 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT
= 0x00000800,
127 D3D12_FORMAT_SUPPORT1_MIP
= 0x00001000,
128 D3D12_FORMAT_SUPPORT1_RENDER_TARGET
= 0x00004000,
129 D3D12_FORMAT_SUPPORT1_BLENDABLE
= 0x00008000,
130 D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL
= 0x00010000,
131 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE
= 0x00040000,
132 D3D12_FORMAT_SUPPORT1_DISPLAY
= 0x00080000,
133 D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT
= 0x00100000,
134 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET
= 0x00200000,
135 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD
= 0x00400000,
136 D3D12_FORMAT_SUPPORT1_SHADER_GATHER
= 0x00800000,
137 D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST
= 0x01000000,
138 D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW
= 0x02000000,
139 D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON
= 0x04000000,
140 D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT
= 0x08000000,
141 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT
= 0x10000000,
142 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT
= 0x20000000,
143 D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER
= 0x40000000,
144 } D3D12_FORMAT_SUPPORT1
;
146 typedef enum D3D12_FORMAT_SUPPORT2
148 D3D12_FORMAT_SUPPORT2_NONE
= 0x00000000,
149 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD
= 0x00000001,
150 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS
= 0x00000002,
151 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE
= 0x00000004,
152 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE
= 0x00000008,
153 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX
= 0x00000010,
154 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX
= 0x00000020,
155 D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD
= 0x00000040,
156 D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE
= 0x00000080,
157 D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP
= 0x00000100,
158 D3D12_FORMAT_SUPPORT2_TILED
= 0x00000200,
159 D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY
= 0x00004000,
160 } D3D12_FORMAT_SUPPORT2
;
162 interface ID3D12Fence
;
163 interface ID3D12RootSignature
;
164 interface ID3D12Heap
;
165 interface ID3D12DescriptorHeap
;
166 interface ID3D12Resource
;
167 interface ID3D12CommandAllocator
;
168 interface ID3D12GraphicsCommandList
;
169 interface ID3D12CommandQueue
;
170 interface ID3D12PipelineState
;
171 interface ID3D12Device
;
173 typedef RECT D3D12_RECT
;
175 typedef struct D3D12_BOX
185 typedef struct D3D12_VIEWPORT
195 typedef struct D3D12_RANGE
201 typedef struct D3D12_RESOURCE_ALLOCATION_INFO
205 } D3D12_RESOURCE_ALLOCATION_INFO
;
207 typedef struct D3D12_DRAW_ARGUMENTS
209 UINT VertexCountPerInstance
;
211 UINT StartVertexLocation
;
212 UINT StartInstanceLocation
;
213 } D3D12_DRAW_ARGUMENTS
;
215 typedef struct D3D12_DRAW_INDEXED_ARGUMENTS
217 UINT IndexCountPerInstance
;
219 UINT StartIndexLocation
;
220 INT BaseVertexLocation
;
221 UINT StartInstanceLocation
;
222 } D3D12_DRAW_INDEXED_ARGUMENTS
;
224 typedef struct D3D12_DISPATCH_ARGUMENTS
226 UINT ThreadGroupCountX
;
227 UINT ThreadGroupCountY
;
228 UINT ThreadGroupCountZ
;
229 } D3D12_DISPATCH_ARGUMENTS
;
231 typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS
233 BOOL DoublePrecisionFloatShaderOps
;
234 BOOL OutputMergerLogicOp
;
235 D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport
;
236 D3D12_TILED_RESOURCES_TIER TiledResourcesTier
;
237 D3D12_RESOURCE_BINDING_TIER ResourceBindingTier
;
238 BOOL PSSpecifiedStencilRefSupported
;
239 BOOL TypedUAVLoadAdditionalFormats
;
241 D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier
;
242 UINT MaxGPUVirtualAddressBitsPerResource
;
243 BOOL StandardSwizzle64KBSupported
;
244 D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier
;
245 BOOL CrossAdapterRowMajorTextureSupported
;
246 BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation
;
247 D3D12_RESOURCE_HEAP_TIER ResourceHeapTier
;
248 } D3D12_FEATURE_DATA_D3D12_OPTIONS
;
250 typedef struct D3D12_FEATURE_DATA_FORMAT_SUPPORT
253 D3D12_FORMAT_SUPPORT1 Support1
;
254 D3D12_FORMAT_SUPPORT2 Support2
;
255 } D3D12_FEATURE_DATA_FORMAT_SUPPORT
;
257 typedef enum D3D12_HEAP_TYPE
259 D3D12_HEAP_TYPE_DEFAULT
= 1,
260 D3D12_HEAP_TYPE_UPLOAD
= 2,
261 D3D12_HEAP_TYPE_READBACK
= 3,
262 D3D12_HEAP_TYPE_CUSTOM
= 4,
265 typedef enum D3D12_CPU_PAGE_PROPERTY
267 D3D12_CPU_PAGE_PROPERTY_UNKNOWN
= 0,
268 D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE
= 2,
269 D3D12_CPU_PAGE_PROPERTY_WRITE_BACK
= 3,
270 } D3D12_CPU_PAGE_PROPERTY
;
272 typedef enum D3D12_MEMORY_POOL
274 D3D12_MEMORY_POOL_UNKNOWN
= 0,
275 D3D12_MEMORY_POOL_L0
= 1,
276 D3D12_MEMORY_POOL_L1
= 2,
279 typedef struct D3D12_HEAP_PROPERTIES
281 D3D12_HEAP_TYPE Type
;
282 D3D12_CPU_PAGE_PROPERTY CPUPageProperty
;
283 D3D12_MEMORY_POOL MemoryPoolPreference
;
284 UINT CreationNodeMask
;
285 UINT VisibleNodeMask
;
286 } D3D12_HEAP_PROPERTIES
;
288 typedef enum D3D12_HEAP_FLAGS
290 D3D12_HEAP_FLAG_NONE
= 0x00,
291 D3D12_HEAP_FLAG_SHARED
= 0x01,
292 D3D12_HEAP_FLAG_DENY_BUFFERS
= 0x04,
293 D3D12_HEAP_FLAG_ALLOW_DISPLAY
= 0x08,
294 D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER
= 0x20,
295 D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES
= 0x40,
296 D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES
= 0x80,
297 D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES
= 0x00,
298 D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS
= 0xc0,
299 D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES
= 0x44,
300 D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES
= 0x84,
303 typedef struct D3D12_HEAP_DESC
306 D3D12_HEAP_PROPERTIES Properties
;
308 D3D12_HEAP_FLAGS Flags
;
311 typedef struct D3D12_TILED_RESOURCE_COORDINATE
317 } D3D12_TILED_RESOURCE_COORDINATE
;
319 typedef struct D3D12_TILE_REGION_SIZE
326 } D3D12_TILE_REGION_SIZE
;
328 typedef struct D3D12_SUBRESOURCE_TILING
331 UINT16 HeightInTiles
;
333 UINT StartTileIndexInOverallResource
;
334 } D3D12_SUBRESOURCE_TILING
;
336 typedef struct D3D12_TILE_SHAPE
343 typedef struct D3D12_SHADER_BYTECODE
345 const void *pShaderBytecode
;
346 SIZE_T BytecodeLength
;
347 } D3D12_SHADER_BYTECODE
;
349 typedef struct D3D12_DEPTH_STENCIL_VALUE
353 } D3D12_DEPTH_STENCIL_VALUE
;
355 typedef struct D3D12_CLEAR_VALUE
361 D3D12_DEPTH_STENCIL_VALUE DepthStencil
;
365 typedef struct D3D12_PACKED_MIP_INFO
367 UINT8 NumStandardMips
;
369 UINT NumTilesForPackedMips
;
370 UINT StartTileIndexInOverallResource
;
371 } D3D12_PACKED_MIP_INFO
;
373 typedef enum D3D12_RESOURCE_STATES
375 D3D12_RESOURCE_STATE_COMMON
= 0,
376 D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER
= 0x1,
377 D3D12_RESOURCE_STATE_INDEX_BUFFER
= 0x2,
378 D3D12_RESOURCE_STATE_RENDER_TARGET
= 0x4,
379 D3D12_RESOURCE_STATE_UNORDERED_ACCESS
= 0x8,
380 D3D12_RESOURCE_STATE_DEPTH_WRITE
= 0x10,
381 D3D12_RESOURCE_STATE_DEPTH_READ
= 0x20,
382 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE
= 0x40,
383 D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE
= 0x80,
384 D3D12_RESOURCE_STATE_STREAM_OUT
= 0x100,
385 D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT
= 0x200,
386 D3D12_RESOURCE_STATE_COPY_DEST
= 0x400,
387 D3D12_RESOURCE_STATE_COPY_SOURCE
= 0x800,
388 D3D12_RESOURCE_STATE_RESOLVE_DEST
= 0x1000,
389 D3D12_RESOURCE_STATE_RESOLVE_SOURCE
= 0x2000,
390 D3D12_RESOURCE_STATE_GENERIC_READ
= 0x1 |
0x2 |
0x40 |
0x80 |
0x200 |
0x800,
391 D3D12_RESOURCE_STATE_PRESENT
= 0x0,
392 D3D12_RESOURCE_STATE_PREDICATION
= 0x200,
393 } D3D12_RESOURCE_STATES
;
394 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_STATES);")
396 typedef enum D3D12_RESOURCE_BARRIER_TYPE
398 D3D12_RESOURCE_BARRIER_TYPE_TRANSITION
= 0,
399 D3D12_RESOURCE_BARRIER_TYPE_ALIASING
= 1,
400 D3D12_RESOURCE_BARRIER_TYPE_UAV
= 2,
401 } D3D12_RESOURCE_BARRIER_TYPE
;
403 typedef enum D3D12_RESOURCE_BARRIER_FLAGS
405 D3D12_RESOURCE_BARRIER_FLAG_NONE
= 0x0,
406 D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY
= 0x1,
407 D3D12_RESOURCE_BARRIER_FLAG_END_ONLY
= 0x2,
408 } D3D12_RESOURCE_BARRIER_FLAGS
;
410 typedef struct D3D12_RESOURCE_TRANSITION_BARRIER
412 ID3D12Resource
*pResource
;
414 D3D12_RESOURCE_STATES StateBefore
;
415 D3D12_RESOURCE_STATES StateAfter
;
416 } D3D12_RESOURCE_TRANSITION_BARRIER
;
418 typedef struct D3D12_RESOURCE_ALIASING_BARRIER_ALIASING
420 ID3D12Resource
*pResourceBefore
;
421 ID3D12Resource
*pResourceAfter
;
422 } D3D12_RESOURCE_ALIASING_BARRIER
;
424 typedef struct D3D12_RESOURCE_UAV_BARRIER
426 ID3D12Resource
*pResource
;
427 } D3D12_RESOURCE_UAV_BARRIER
;
429 typedef struct D3D12_RESOURCE_BARRIER
431 D3D12_RESOURCE_BARRIER_TYPE Type
;
432 D3D12_RESOURCE_BARRIER_FLAGS Flags
;
435 D3D12_RESOURCE_TRANSITION_BARRIER Transition
;
436 D3D12_RESOURCE_ALIASING_BARRIER Aliasing
;
437 D3D12_RESOURCE_UAV_BARRIER UAV
;
439 } D3D12_RESOURCE_BARRIER
;
441 typedef enum D3D12_RESOURCE_DIMENSION
443 D3D12_RESOURCE_DIMENSION_UNKNOWN
= 0,
444 D3D12_RESOURCE_DIMENSION_BUFFER
= 1,
445 D3D12_RESOURCE_DIMENSION_TEXTURE1D
= 2,
446 D3D12_RESOURCE_DIMENSION_TEXTURE2D
= 3,
447 D3D12_RESOURCE_DIMENSION_TEXTURE3D
= 4,
448 } D3D12_RESOURCE_DIMENSION
;
450 typedef enum D3D12_TEXTURE_LAYOUT
452 D3D12_TEXTURE_LAYOUT_UNKNOWN
= 0,
453 D3D12_TEXTURE_LAYOUT_ROW_MAJOR
= 1,
454 D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE
= 2,
455 D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE
= 3,
456 } D3D12_TEXTURE_LAYOUT
;
458 typedef enum D3D12_RESOURCE_FLAGS
460 D3D12_RESOURCE_FLAG_NONE
= 0x0,
461 D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET
= 0x1,
462 D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL
= 0x2,
463 D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS
= 0x4,
464 D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE
= 0x8,
465 D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER
= 0x10,
466 D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS
= 0x20,
467 } D3D12_RESOURCE_FLAGS
;
468 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(D3D12_RESOURCE_FLAGS);")
470 typedef struct D3D12_RESOURCE_DESC
472 D3D12_RESOURCE_DIMENSION Dimension
;
476 UINT16 DepthOrArraySize
;
479 DXGI_SAMPLE_DESC SampleDesc
;
480 D3D12_TEXTURE_LAYOUT Layout
;
481 D3D12_RESOURCE_FLAGS Flags
;
482 } D3D12_RESOURCE_DESC
;
484 typedef enum D3D12_TEXTURE_COPY_TYPE
486 D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX
= 0,
487 D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT
= 1,
488 } D3D12_TEXTURE_COPY_TYPE
;
490 typedef struct D3D12_SUBRESOURCE_FOOTPRINT
497 } D3D12_SUBRESOURCE_FOOTPRINT
;
499 typedef struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT
502 D3D12_SUBRESOURCE_FOOTPRINT Footprint
;
503 } D3D12_PLACED_SUBRESOURCE_FOOTPRINT
;
505 typedef struct D3D12_TEXTURE_COPY_LOCATION
507 ID3D12Resource
*pResource
;
508 D3D12_TEXTURE_COPY_TYPE Type
;
511 D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint
;
512 UINT SubresourceIndex
;
514 } D3D12_TEXTURE_COPY_LOCATION
;
516 typedef enum D3D12_DESCRIPTOR_RANGE_TYPE
518 D3D12_DESCRIPTOR_RANGE_TYPE_SRV
= 0,
519 D3D12_DESCRIPTOR_RANGE_TYPE_UAV
= 1,
520 D3D12_DESCRIPTOR_RANGE_TYPE_CBV
= 2,
521 D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER
= 3,
522 } D3D12_DESCRIPTOR_RANGE_TYPE
;
524 typedef struct D3D12_DESCRIPTOR_RANGE
526 D3D12_DESCRIPTOR_RANGE_TYPE RangeType
;
528 UINT BaseShaderRegister
;
530 UINT OffsetInDescriptorsFromTableStart
;
531 } D3D12_DESCRIPTOR_RANGE
;
533 typedef enum D3D12_DESCRIPTOR_RANGE_FLAGS
535 D3D12_DESCRIPTOR_RANGE_FLAG_NONE
= 0,
536 } D3D12_DESCRIPTOR_RANGE_FLAGS
;
538 typedef struct D3D12_DESCRIPTOR_RANGE1
540 D3D12_DESCRIPTOR_RANGE_TYPE RangeType
;
542 UINT BaseShaderRegister
;
544 D3D12_DESCRIPTOR_RANGE_FLAGS Flags
;
545 UINT OffsetInDescriptorsFromTableStart
;
546 } D3D12_DESCRIPTOR_RANGE1
;
548 typedef struct D3D12_ROOT_DESCRIPTOR_TABLE
550 UINT NumDescriptorRanges
;
551 const D3D12_DESCRIPTOR_RANGE
*pDescriptorRanges
;
552 } D3D12_ROOT_DESCRIPTOR_TABLE
;
554 typedef struct D3D12_ROOT_DESCRIPTOR_TABLE1
556 UINT NumDescriptorRanges
;
557 const D3D12_DESCRIPTOR_RANGE1
*pDescriptorRanges
;
558 } D3D12_ROOT_DESCRIPTOR_TABLE1
;
560 typedef struct D3D12_ROOT_CONSTANTS
565 } D3D12_ROOT_CONSTANTS
;
567 typedef struct D3D12_ROOT_DESCRIPTOR
571 } D3D12_ROOT_DESCRIPTOR
;
573 typedef enum D3D12_ROOT_DESCRIPTOR_FLAGS
575 D3D12_ROOT_DESCRIPTOR_FLAG_NONE
= 0,
576 } D3D12_ROOT_DESCRIPTOR_FLAGS
;
578 typedef struct D3D12_ROOT_DESCRIPTOR1
582 D3D12_ROOT_DESCRIPTOR_FLAGS Flags
;
583 } D3D12_ROOT_DESCRIPTOR1
;
585 typedef enum D3D12_ROOT_PARAMETER_TYPE
587 D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE
= 0,
588 D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS
= 1,
589 D3D12_ROOT_PARAMETER_TYPE_CBV
= 2,
590 D3D12_ROOT_PARAMETER_TYPE_SRV
= 3,
591 D3D12_ROOT_PARAMETER_TYPE_UAV
= 4,
592 } D3D12_ROOT_PARAMETER_TYPE
;
594 typedef enum D3D12_SHADER_VISIBILITY
596 D3D12_SHADER_VISIBILITY_ALL
= 0,
597 D3D12_SHADER_VISIBILITY_VERTEX
= 1,
598 D3D12_SHADER_VISIBILITY_HULL
= 2,
599 D3D12_SHADER_VISIBILITY_DOMAIN
= 3,
600 D3D12_SHADER_VISIBILITY_GEOMETRY
= 4,
601 D3D12_SHADER_VISIBILITY_PIXEL
= 5,
602 } D3D12_SHADER_VISIBILITY
;
604 typedef struct D3D12_ROOT_PARAMETER
606 D3D12_ROOT_PARAMETER_TYPE ParameterType
;
609 D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable
;
610 D3D12_ROOT_CONSTANTS Constants
;
611 D3D12_ROOT_DESCRIPTOR Descriptor
;
613 D3D12_SHADER_VISIBILITY ShaderVisibility
;
614 } D3D12_ROOT_PARAMETER
;
616 typedef struct D3D12_ROOT_PARAMETER1
618 D3D12_ROOT_PARAMETER_TYPE ParameterType
;
621 D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable
;
622 D3D12_ROOT_CONSTANTS Constants
;
623 D3D12_ROOT_DESCRIPTOR1 Descriptor
;
625 D3D12_SHADER_VISIBILITY ShaderVisibility
;
626 } D3D12_ROOT_PARAMETER1
;
628 typedef enum D3D12_STATIC_BORDER_COLOR
630 D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK
= 0,
631 D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK
= 1,
632 D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE
= 2,
633 } D3D12_STATIC_BORDER_COLOR
;
635 typedef enum D3D12_FILTER
637 D3D12_FILTER_MIN_MAG_MIP_POINT
= 0x00,
638 D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR
= 0x01,
639 D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT
= 0x04,
640 D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR
= 0x05,
641 D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT
= 0x10,
642 D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR
= 0x11,
643 D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT
= 0x14,
644 D3D12_FILTER_MIN_MAG_MIP_LINEAR
= 0x15,
645 D3D12_FILTER_ANISOTROPIC
= 0x55,
646 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT
= 0x80,
647 D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR
= 0x81,
648 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT
= 0x84,
649 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR
= 0x85,
650 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT
= 0x90,
651 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR
= 0x91,
652 D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT
= 0x94,
653 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR
= 0x95,
654 D3D12_FILTER_COMPARISON_ANISOTROPIC
= 0xd5,
655 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT
= 0x100,
656 D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR
= 0x101,
657 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT
= 0x104,
658 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR
= 0x105,
659 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT
= 0x110,
660 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR
= 0x111,
661 D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT
= 0x114,
662 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR
= 0x115,
663 D3D12_FILTER_MINIMUM_ANISOTROPIC
= 0x155,
664 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT
= 0x180,
665 D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR
= 0x181,
666 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT
= 0x184,
667 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR
= 0x185,
668 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT
= 0x190,
669 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR
= 0x191,
670 D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT
= 0x194,
671 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR
= 0x195,
672 D3D12_FILTER_MAXIMUM_ANISOTROPIC
= 0x1d5,
675 typedef enum D3D12_FILTER_TYPE
677 D3D12_FILTER_TYPE_POINT
= 0,
678 D3D12_FILTER_TYPE_LINEAR
= 1,
681 const UINT D3D12_MIP_FILTER_SHIFT
= 0;
682 const UINT D3D12_MAG_FILTER_SHIFT
= 2;
683 const UINT D3D12_MIN_FILTER_SHIFT
= 4;
684 const UINT D3D12_FILTER_TYPE_MASK
= 0x3;
686 const UINT D3D12_ANISOTROPIC_FILTERING_BIT
= 0x40;
688 typedef enum D3D12_FILTER_REDUCTION_TYPE
690 D3D12_FILTER_REDUCTION_TYPE_STANDARD
= 0,
691 D3D12_FILTER_REDUCTION_TYPE_COMPARISON
= 1,
692 D3D12_FILTER_REDUCTION_TYPE_MINIMUM
= 2,
693 D3D12_FILTER_REDUCTION_TYPE_MAXIMUM
= 3,
694 } D3D12_FILTER_REDUCTION_TYPE
;
696 const UINT D3D12_FILTER_REDUCTION_TYPE_MASK
= 0x3;
697 const UINT D3D12_FILTER_REDUCTION_TYPE_SHIFT
= 7;
699 cpp_quote
("#define D3D12_DECODE_MAG_FILTER(filter) \\")
700 cpp_quote
(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MAG_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
702 cpp_quote
("#define D3D12_DECODE_MIN_FILTER(filter) \\")
703 cpp_quote
(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIN_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
705 cpp_quote
("#define D3D12_DECODE_MIP_FILTER(filter) \\")
706 cpp_quote
(" ((D3D12_FILTER_TYPE)(((filter) >> D3D12_MIP_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK))")
708 cpp_quote
("#define D3D12_DECODE_IS_ANISOTROPIC_FILTER(filter) \\")
709 cpp_quote
(" (((filter) & D3D12_ANISOTROPIC_FILTERING_BIT) \\")
710 cpp_quote
(" && (D3D12_DECODE_MIN_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
711 cpp_quote
(" && (D3D12_DECODE_MAG_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR) \\")
712 cpp_quote
(" && (D3D12_DECODE_MIP_FILTER(filter) == D3D12_FILTER_TYPE_LINEAR))")
714 cpp_quote
("#define D3D12_DECODE_FILTER_REDUCTION(filter) \\")
715 cpp_quote
(" ((D3D12_FILTER_REDUCTION_TYPE)(((filter) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT) \\")
716 cpp_quote
(" & D3D12_FILTER_REDUCTION_TYPE_MASK))")
718 cpp_quote
("#define D3D12_DECODE_IS_COMPARISON_FILTER(filter) \\")
719 cpp_quote
(" (D3D12_DECODE_FILTER_REDUCTION(filter) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON)")
721 typedef enum D3D12_TEXTURE_ADDRESS_MODE
723 D3D12_TEXTURE_ADDRESS_MODE_WRAP
= 1,
724 D3D12_TEXTURE_ADDRESS_MODE_MIRROR
= 2,
725 D3D12_TEXTURE_ADDRESS_MODE_CLAMP
= 3,
726 D3D12_TEXTURE_ADDRESS_MODE_BORDER
= 4,
727 D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE
= 5,
728 } D3D12_TEXTURE_ADDRESS_MODE
;
730 typedef enum D3D12_COMPARISON_FUNC
732 D3D12_COMPARISON_FUNC_NEVER
= 1,
733 D3D12_COMPARISON_FUNC_LESS
= 2,
734 D3D12_COMPARISON_FUNC_EQUAL
= 3,
735 D3D12_COMPARISON_FUNC_LESS_EQUAL
= 4,
736 D3D12_COMPARISON_FUNC_GREATER
= 5,
737 D3D12_COMPARISON_FUNC_NOT_EQUAL
= 6,
738 D3D12_COMPARISON_FUNC_GREATER_EQUAL
= 7,
739 D3D12_COMPARISON_FUNC_ALWAYS
= 8,
740 } D3D12_COMPARISON_FUNC
;
742 typedef struct D3D12_STATIC_SAMPLER_DESC
745 D3D12_TEXTURE_ADDRESS_MODE AddressU
;
746 D3D12_TEXTURE_ADDRESS_MODE AddressV
;
747 D3D12_TEXTURE_ADDRESS_MODE AddressW
;
750 D3D12_COMPARISON_FUNC ComparisonFunc
;
751 D3D12_STATIC_BORDER_COLOR BorderColor
;
756 D3D12_SHADER_VISIBILITY ShaderVisibility
;
757 } D3D12_STATIC_SAMPLER_DESC
;
759 typedef enum D3D12_ROOT_SIGNATURE_FLAGS
761 D3D12_ROOT_SIGNATURE_FLAG_NONE
= 0x00,
762 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT
= 0x01,
763 D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS
= 0x02,
764 D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS
= 0x04,
765 D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS
= 0x08,
766 D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS
= 0x10,
767 D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS
= 0x20,
768 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT
= 0x40,
769 } D3D12_ROOT_SIGNATURE_FLAGS
;
771 typedef struct D3D12_ROOT_SIGNATURE_DESC
774 const D3D12_ROOT_PARAMETER
*pParameters
;
775 UINT NumStaticSamplers
;
776 const D3D12_STATIC_SAMPLER_DESC
*pStaticSamplers
;
777 D3D12_ROOT_SIGNATURE_FLAGS Flags
;
778 } D3D12_ROOT_SIGNATURE_DESC
;
780 typedef struct D3D12_ROOT_SIGNATURE_DESC1
783 const D3D12_ROOT_PARAMETER1
*pParameters
;
784 UINT NumStaticSamplers
;
785 const D3D12_STATIC_SAMPLER_DESC
*pStaticSamplers
;
786 D3D12_ROOT_SIGNATURE_FLAGS Flags
;
787 } D3D12_ROOT_SIGNATURE_DESC1
;
789 typedef enum D3D_ROOT_SIGNATURE_VERSION
791 D3D_ROOT_SIGNATURE_VERSION_1
= 0x1,
792 D3D_ROOT_SIGNATURE_VERSION_1_0
= 0x1,
793 D3D_ROOT_SIGNATURE_VERSION_1_1
= 0x2,
794 } D3D_ROOT_SIGNATURE_VERSION
;
796 typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC
798 D3D_ROOT_SIGNATURE_VERSION
Version;
801 D3D12_ROOT_SIGNATURE_DESC Desc_1_0
;
802 D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1
;
804 } D3D12_VERSIONED_ROOT_SIGNATURE_DESC
;
806 typedef enum D3D12_DESCRIPTOR_HEAP_TYPE
808 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV
,
809 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER
,
810 D3D12_DESCRIPTOR_HEAP_TYPE_RTV
,
811 D3D12_DESCRIPTOR_HEAP_TYPE_DSV
,
812 D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES
,
813 } D3D12_DESCRIPTOR_HEAP_TYPE
;
815 typedef enum D3D12_DESCRIPTOR_HEAP_FLAGS
817 D3D12_DESCRIPTOR_HEAP_FLAG_NONE
= 0x0,
818 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE
= 0x1,
819 } D3D12_DESCRIPTOR_HEAP_FLAGS
;
821 typedef struct D3D12_DESCRIPTOR_HEAP_DESC
823 D3D12_DESCRIPTOR_HEAP_TYPE Type
;
825 D3D12_DESCRIPTOR_HEAP_FLAGS Flags
;
827 } D3D12_DESCRIPTOR_HEAP_DESC
;
829 typedef UINT64 D3D12_GPU_VIRTUAL_ADDRESS
;
831 typedef struct D3D12_CONSTANT_BUFFER_VIEW_DESC
833 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
;
835 } D3D12_CONSTANT_BUFFER_VIEW_DESC
;
837 typedef enum D3D12_SRV_DIMENSION
839 D3D12_SRV_DIMENSION_UNKNOWN
= 0,
840 D3D12_SRV_DIMENSION_BUFFER
= 1,
841 D3D12_SRV_DIMENSION_TEXTURE1D
= 2,
842 D3D12_SRV_DIMENSION_TEXTURE1DARRAY
= 3,
843 D3D12_SRV_DIMENSION_TEXTURE2D
= 4,
844 D3D12_SRV_DIMENSION_TEXTURE2DARRAY
= 5,
845 D3D12_SRV_DIMENSION_TEXTURE2DMS
= 6,
846 D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY
= 7,
847 D3D12_SRV_DIMENSION_TEXTURE3D
= 8,
848 D3D12_SRV_DIMENSION_TEXTURECUBE
= 9,
849 D3D12_SRV_DIMENSION_TEXTURECUBEARRAY
= 10,
850 } D3D12_SRV_DIMENSION
;
852 typedef enum D3D12_BUFFER_SRV_FLAGS
854 D3D12_BUFFER_SRV_FLAG_NONE
= 0x0,
855 D3D12_BUFFER_SRV_FLAG_RAW
= 0x1,
856 } D3D12_BUFFER_SRV_FLAGS
;
858 typedef enum D3D12_SHADER_COMPONENT_MAPPING
860 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0
= 0,
861 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1
= 1,
862 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2
= 2,
863 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3
= 3,
864 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0
= 4,
865 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1
= 5,
866 } D3D12_SHADER_COMPONENT_MAPPING
;
868 cpp_quote
("#define D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(x, y, z, w) \\")
869 cpp_quote
(" (((x) & D3D12_SHADER_COMPONENT_MAPPING_MASK) \\")
870 cpp_quote
(" | (((y) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << D3D12_SHADER_COMPONENT_MAPPING_SHIFT) \\")
871 cpp_quote
(" | (((z) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 2)) \\")
872 cpp_quote
(" | (((w) & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 3)) \\")
873 cpp_quote
(" | D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES)")
874 cpp_quote
("#define D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 1, 2, 3)")
876 typedef struct D3D12_BUFFER_SRV
880 UINT StructureByteStride
;
881 D3D12_BUFFER_SRV_FLAGS Flags
;
884 typedef struct D3D12_TEX1D_SRV
886 UINT MostDetailedMip
;
888 FLOAT ResourceMinLODClamp
;
891 typedef struct D3D12_TEX1D_ARRAY_SRV
893 UINT MostDetailedMip
;
895 UINT FirstArraySlice
;
897 FLOAT ResourceMinLODClamp
;
898 } D3D12_TEX1D_ARRAY_SRV
;
900 typedef struct D3D12_TEX2D_SRV
902 UINT MostDetailedMip
;
905 FLOAT ResourceMinLODClamp
;
908 typedef struct D3D12_TEX2D_ARRAY_SRV
910 UINT MostDetailedMip
;
912 UINT FirstArraySlice
;
915 FLOAT ResourceMinLODClamp
;
916 } D3D12_TEX2D_ARRAY_SRV
;
918 typedef struct D3D12_TEX2DMS_SRV
920 UINT UnusedField_NothingToDefine
;
923 typedef struct D3D12_TEX2DMS_ARRAY_SRV
925 UINT FirstArraySlice
;
927 } D3D12_TEX2DMS_ARRAY_SRV
;
929 typedef struct D3D12_TEX3D_SRV
931 UINT MostDetailedMip
;
933 FLOAT ResourceMinLODClamp
;
936 typedef struct D3D12_TEXCUBE_SRV
938 UINT MostDetailedMip
;
940 FLOAT ResourceMinLODClamp
;
943 typedef struct D3D12_TEXCUBE_ARRAY_SRV
945 UINT MostDetailedMip
;
947 UINT First2DArrayFace
;
949 FLOAT ResourceMinLODClamp
;
950 } D3D12_TEXCUBE_ARRAY_SRV
;
952 typedef struct D3D12_SHADER_RESOURCE_VIEW_DESC
955 D3D12_SRV_DIMENSION ViewDimension
;
956 UINT Shader4ComponentMapping
;
959 D3D12_BUFFER_SRV Buffer
;
960 D3D12_TEX1D_SRV Texture1D
;
961 D3D12_TEX1D_ARRAY_SRV Texture1DArray
;
962 D3D12_TEX2D_SRV Texture2D
;
963 D3D12_TEX2D_ARRAY_SRV Texture2DArray
;
964 D3D12_TEX2DMS_SRV Texture2DMS
;
965 D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray
;
966 D3D12_TEX3D_SRV Texture3D
;
967 D3D12_TEXCUBE_SRV TextureCube
;
968 D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray
;
970 } D3D12_SHADER_RESOURCE_VIEW_DESC
;
972 typedef enum D3D12_UAV_DIMENSION
974 D3D12_UAV_DIMENSION_UNKNOWN
= 0,
975 D3D12_UAV_DIMENSION_BUFFER
= 1,
976 D3D12_UAV_DIMENSION_TEXTURE1D
= 2,
977 D3D12_UAV_DIMENSION_TEXTURE1DARRAY
= 3,
978 D3D12_UAV_DIMENSION_TEXTURE2D
= 4,
979 D3D12_UAV_DIMENSION_TEXTURE2DARRAY
= 5,
980 D3D12_UAV_DIMENSION_TEXTURE3D
= 8,
981 } D3D12_UAV_DIMENSION
;
983 typedef enum D3D12_BUFFER_UAV_FLAGS
985 D3D12_BUFFER_UAV_FLAG_NONE
= 0x0,
986 D3D12_BUFFER_UAV_FLAG_RAW
= 0x1,
987 } D3D12_BUFFER_UAV_FLAGS
;
989 typedef struct D3D12_BUFFER_UAV
993 UINT StructureByteStride
;
994 UINT64 CounterOffsetInBytes
;
995 D3D12_BUFFER_UAV_FLAGS Flags
;
998 typedef struct D3D12_TEX1D_UAV
1003 typedef struct D3D12_TEX1D_ARRAY_UAV
1006 UINT FirstArraySlice
;
1008 } D3D12_TEX1D_ARRAY_UAV
;
1010 typedef struct D3D12_TEX2D_UAV
1016 typedef struct D3D12_TEX2D_ARRAY_UAV
1019 UINT FirstArraySlice
;
1022 } D3D12_TEX2D_ARRAY_UAV
;
1024 typedef struct D3D12_TEX3D_UAV
1031 typedef struct D3D12_UNORDERED_ACCESS_VIEW_DESC
1034 D3D12_UAV_DIMENSION ViewDimension
;
1037 D3D12_BUFFER_UAV Buffer
;
1038 D3D12_TEX1D_UAV Texture1D
;
1039 D3D12_TEX1D_ARRAY_UAV Texture1DArray
;
1040 D3D12_TEX2D_UAV Texture2D
;
1041 D3D12_TEX2D_ARRAY_UAV Texture2DArray
;
1042 D3D12_TEX3D_UAV Texture3D
;
1044 } D3D12_UNORDERED_ACCESS_VIEW_DESC
;
1046 typedef enum D3D12_RTV_DIMENSION
1048 D3D12_RTV_DIMENSION_UNKNOWN
= 0,
1049 D3D12_RTV_DIMENSION_BUFFER
= 1,
1050 D3D12_RTV_DIMENSION_TEXTURE1D
= 2,
1051 D3D12_RTV_DIMENSION_TEXTURE1DARRAY
= 3,
1052 D3D12_RTV_DIMENSION_TEXTURE2D
= 4,
1053 D3D12_RTV_DIMENSION_TEXTURE2DARRAY
= 5,
1054 D3D12_RTV_DIMENSION_TEXTURE2DMS
= 6,
1055 D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY
= 7,
1056 D3D12_RTV_DIMENSION_TEXTURE3D
= 8,
1057 } D3D12_RTV_DIMENSION
;
1059 typedef struct D3D12_BUFFER_RTV
1061 UINT64 FirstElement
;
1065 typedef struct D3D12_TEX1D_RTV
1070 typedef struct D3D12_TEX1D_ARRAY_RTV
1073 UINT FirstArraySlice
;
1075 } D3D12_TEX1D_ARRAY_RTV
;
1077 typedef struct D3D12_TEX2D_RTV
1083 typedef struct D3D12_TEX2D_ARRAY_RTV
1086 UINT FirstArraySlice
;
1089 } D3D12_TEX2D_ARRAY_RTV
;
1091 typedef struct D3D12_TEX2DMS_RTV
1093 UINT UnusedField_NothingToDefine
;
1094 } D3D12_TEX2DMS_RTV
;
1096 typedef struct D3D12_TEX2DMS_ARRAY_RTV
1098 UINT FirstArraySlice
;
1100 } D3D12_TEX2DMS_ARRAY_RTV
;
1102 typedef struct D3D12_TEX3D_RTV
1109 typedef struct D3D12_RENDER_TARGET_VIEW_DESC
1112 D3D12_RTV_DIMENSION ViewDimension
;
1115 D3D12_BUFFER_RTV Buffer
;
1116 D3D12_TEX1D_RTV Texture1D
;
1117 D3D12_TEX1D_ARRAY_RTV Texture1DArray
;
1118 D3D12_TEX2D_RTV Texture2D
;
1119 D3D12_TEX2D_ARRAY_RTV Texture2DArray
;
1120 D3D12_TEX2DMS_RTV Texture2DMS
;
1121 D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray
;
1122 D3D12_TEX3D_RTV Texture3D
;
1124 } D3D12_RENDER_TARGET_VIEW_DESC
;
1126 typedef enum D3D12_DSV_DIMENSION
1128 D3D12_DSV_DIMENSION_UNKNOWN
= 0,
1129 D3D12_DSV_DIMENSION_TEXTURE1D
= 1,
1130 D3D12_DSV_DIMENSION_TEXTURE1DARRAY
= 2,
1131 D3D12_DSV_DIMENSION_TEXTURE2D
= 3,
1132 D3D12_DSV_DIMENSION_TEXTURE2DARRAY
= 4,
1133 D3D12_DSV_DIMENSION_TEXTURE2DMS
= 5,
1134 D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY
= 6,
1135 } D3D12_DSV_DIMENSION
;
1137 typedef enum D3D12_DSV_FLAGS
1139 D3D12_DSV_FLAG_NONE
= 0x0,
1140 D3D12_DSV_FLAG_READ_ONLY_DEPTH
= 0x1,
1141 D3D12_DSV_FLAG_READ_ONLY_STENCIL
= 0x2,
1143 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(D3D12_DSV_FLAGS);")
1145 typedef struct D3D12_TEX1D_DSV
1150 typedef struct D3D12_TEX1D_ARRAY_DSV
1153 UINT FirstArraySlice
;
1155 } D3D12_TEX1D_ARRAY_DSV
;
1157 typedef struct D3D12_TEX2D_DSV
1162 typedef struct D3D12_TEX2D_ARRAY_DSV
1165 UINT FirstArraySlice
;
1167 } D3D12_TEX2D_ARRAY_DSV
;
1169 typedef struct D3D12_TEX2DMS_DSV
1171 UINT UnusedField_NothingToDefine
;
1172 } D3D12_TEX2DMS_DSV
;
1174 typedef struct D3D12_TEX2DMS_ARRAY_DSV
1176 UINT FirstArraySlice
;
1178 } D3D12_TEX2DMS_ARRAY_DSV
;
1180 typedef struct D3D12_DEPTH_STENCIL_VIEW_DESC
1183 D3D12_DSV_DIMENSION ViewDimension
;
1184 D3D12_DSV_FLAGS Flags
;
1187 D3D12_TEX1D_DSV Texture1D
;
1188 D3D12_TEX1D_ARRAY_DSV Texture1DArray
;
1189 D3D12_TEX2D_DSV Texture2D
;
1190 D3D12_TEX2D_ARRAY_DSV Texture2DArray
;
1191 D3D12_TEX2DMS_DSV Texture2DMS
;
1192 D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray
;
1194 } D3D12_DEPTH_STENCIL_VIEW_DESC
;
1196 typedef struct D3D12_SAMPLER_DESC
1198 D3D12_FILTER Filter
;
1199 D3D12_TEXTURE_ADDRESS_MODE AddressU
;
1200 D3D12_TEXTURE_ADDRESS_MODE AddressV
;
1201 D3D12_TEXTURE_ADDRESS_MODE AddressW
;
1204 D3D12_COMPARISON_FUNC ComparisonFunc
;
1205 FLOAT BorderColor
[4];
1208 } D3D12_SAMPLER_DESC
;
1210 typedef struct D3D12_CPU_DESCRIPTOR_HANDLE
1213 } D3D12_CPU_DESCRIPTOR_HANDLE
;
1215 typedef struct D3D12_GPU_DESCRIPTOR_HANDLE
1218 } D3D12_GPU_DESCRIPTOR_HANDLE
;
1220 typedef enum D3D12_STENCIL_OP
1222 D3D12_STENCIL_OP_KEEP
= 1,
1223 D3D12_STENCIL_OP_ZERO
= 2,
1224 D3D12_STENCIL_OP_REPLACE
= 3,
1225 D3D12_STENCIL_OP_INCR_SAT
= 4,
1226 D3D12_STENCIL_OP_DECR_SAT
= 5,
1227 D3D12_STENCIL_OP_INVERT
= 6,
1228 D3D12_STENCIL_OP_INCR
= 7,
1229 D3D12_STENCIL_OP_DECR
= 8,
1232 typedef struct D3D12_DEPTH_STENCILOP_DESC
1234 D3D12_STENCIL_OP StencilFailOp
;
1235 D3D12_STENCIL_OP StencilDepthFailOp
;
1236 D3D12_STENCIL_OP StencilPassOp
;
1237 D3D12_COMPARISON_FUNC StencilFunc
;
1238 } D3D12_DEPTH_STENCILOP_DESC
;
1240 typedef enum D3D12_DEPTH_WRITE_MASK
1242 D3D12_DEPTH_WRITE_MASK_ZERO
= 0,
1243 D3D12_DEPTH_WRITE_MASK_ALL
= 1,
1244 } D3D12_DEPTH_WRITE_MASK
;
1246 typedef struct D3D12_DEPTH_STENCIL_DESC
1249 D3D12_DEPTH_WRITE_MASK DepthWriteMask
;
1250 D3D12_COMPARISON_FUNC DepthFunc
;
1252 UINT8 StencilReadMask
;
1253 UINT8 StencilWriteMask
;
1254 D3D12_DEPTH_STENCILOP_DESC FrontFace
;
1255 D3D12_DEPTH_STENCILOP_DESC BackFace
;
1256 } D3D12_DEPTH_STENCIL_DESC
;
1258 typedef enum D3D12_BLEND
1260 D3D12_BLEND_ZERO
= 1,
1261 D3D12_BLEND_ONE
= 2,
1262 D3D12_BLEND_SRC_COLOR
= 3,
1263 D3D12_BLEND_INV_SRC_COLOR
= 4,
1264 D3D12_BLEND_SRC_ALPHA
= 5,
1265 D3D12_BLEND_INV_SRC_ALPHA
= 6,
1266 D3D12_BLEND_DEST_ALPHA
= 7,
1267 D3D12_BLEND_INV_DEST_ALPHA
= 8,
1268 D3D12_BLEND_DEST_COLOR
= 9,
1269 D3D12_BLEND_INV_DEST_COLOR
= 10,
1270 D3D12_BLEND_SRC_ALPHA_SAT
= 11,
1271 D3D12_BLEND_BLEND_FACTOR
= 14,
1272 D3D12_BLEND_INV_BLEND_FACTOR
= 15,
1273 D3D12_BLEND_SRC1_COLOR
= 16,
1274 D3D12_BLEND_INV_SRC1_COLOR
= 17,
1275 D3D12_BLEND_SRC1_ALPHA
= 18,
1276 D3D12_BLEND_INV_SRC1_ALPHA
= 19,
1279 typedef enum D3D12_BLEND_OP
1281 D3D12_BLEND_OP_ADD
= 1,
1282 D3D12_BLEND_OP_SUBTRACT
= 2,
1283 D3D12_BLEND_OP_REV_SUBTRACT
= 3,
1284 D3D12_BLEND_OP_MIN
= 4,
1285 D3D12_BLEND_OP_MAX
= 5,
1288 typedef enum D3D12_LOGIC_OP
1290 D3D12_LOGIC_OP_CLEAR
= 0,
1291 D3D12_LOGIC_OP_SET
= 1,
1292 D3D12_LOGIC_OP_COPY
= 2,
1293 D3D12_LOGIC_OP_COPY_INVERTED
= 3,
1294 D3D12_LOGIC_OP_NOOP
= 4,
1297 typedef enum D3D12_COLOR_WRITE_ENABLE
1299 D3D12_COLOR_WRITE_ENABLE_RED
= 0x1,
1300 D3D12_COLOR_WRITE_ENABLE_GREEN
= 0x2,
1301 D3D12_COLOR_WRITE_ENABLE_BLUE
= 0x4,
1302 D3D12_COLOR_WRITE_ENABLE_ALPHA
= 0x8,
1303 D3D12_COLOR_WRITE_ENABLE_ALL
= (D3D12_COLOR_WRITE_ENABLE_RED\
1304 | D3D12_COLOR_WRITE_ENABLE_GREEN | D3D12_COLOR_WRITE_ENABLE_BLUE\
1305 | D3D12_COLOR_WRITE_ENABLE_ALPHA
),
1306 } D3D12_COLOR_WRITE_ENABLE
;
1308 typedef struct D3D12_RENDER_TARGET_BLEND_DESC
1312 D3D12_BLEND SrcBlend
;
1313 D3D12_BLEND DestBlend
;
1314 D3D12_BLEND_OP BlendOp
;
1315 D3D12_BLEND SrcBlendAlpha
;
1316 D3D12_BLEND DestBlendAlpha
;
1317 D3D12_BLEND_OP BlendOpAlpha
;
1318 D3D12_LOGIC_OP LogicOp
;
1319 UINT8 RenderTargetWriteMask
;
1320 } D3D12_RENDER_TARGET_BLEND_DESC
;
1322 typedef struct D3D12_BLEND_DESC
1324 BOOL AlphaToCoverageEnable
;
1325 BOOL IndependentBlendEnable
;
1326 D3D12_RENDER_TARGET_BLEND_DESC RenderTarget
[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
];
1329 typedef enum D3D12_FILL_MODE
1331 D3D12_FILL_MODE_WIREFRAME
= 2,
1332 D3D12_FILL_MODE_SOLID
= 3,
1335 typedef enum D3D12_CULL_MODE
1337 D3D12_CULL_MODE_NONE
= 1,
1338 D3D12_CULL_MODE_FRONT
= 2,
1339 D3D12_CULL_MODE_BACK
= 3,
1342 typedef enum D3D12_CONSERVATIVE_RASTERIZATION_MODE
1344 D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF
= 0,
1345 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON
= 1,
1346 } D3D12_CONSERVATIVE_RASTERIZATION_MODE
;
1348 typedef struct D3D12_RASTERIZER_DESC
1350 D3D12_FILL_MODE FillMode
;
1351 D3D12_CULL_MODE CullMode
;
1352 BOOL FrontCounterClockwise
;
1354 FLOAT DepthBiasClamp
;
1355 FLOAT SlopeScaledDepthBias
;
1356 BOOL DepthClipEnable
;
1357 BOOL MultisampleEnable
;
1358 BOOL AntialiasedLineEnable
;
1359 UINT ForcedSampleCount
;
1360 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster
;
1361 } D3D12_RASTERIZER_DESC
;
1363 typedef struct D3D12_SO_DECLARATION_ENTRY
1366 const char *SemanticName
;
1368 BYTE StartComponent
;
1369 BYTE ComponentCount
;
1371 } D3D12_SO_DECLARATION_ENTRY
;
1373 typedef struct D3D12_STREAM_OUTPUT_DESC
1375 const D3D12_SO_DECLARATION_ENTRY
*pSODeclaration
;
1377 const UINT
*pBufferStrides
;
1379 UINT RasterizedStream
;
1380 } D3D12_STREAM_OUTPUT_DESC
;
1382 typedef enum D3D12_INPUT_CLASSIFICATION
1384 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA
= 0,
1385 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA
= 1,
1386 } D3D12_INPUT_CLASSIFICATION
;
1388 typedef struct D3D12_INPUT_ELEMENT_DESC
1390 const char *SemanticName
;
1394 UINT AlignedByteOffset
;
1395 D3D12_INPUT_CLASSIFICATION InputSlotClass
;
1396 UINT InstanceDataStepRate
;
1397 } D3D12_INPUT_ELEMENT_DESC
;
1399 typedef struct D3D12_INPUT_LAYOUT_DESC
1401 const D3D12_INPUT_ELEMENT_DESC
*pInputElementDescs
;
1403 } D3D12_INPUT_LAYOUT_DESC
;
1405 typedef enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
1407 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED
= 0,
1408 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF
= 1,
1409 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF
= 2,
1410 } D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
;
1412 typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY
;
1414 typedef enum D3D12_PRIMITIVE_TOPOLOGY_TYPE
1416 D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED
= 0,
1417 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT
= 1,
1418 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE
= 2,
1419 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE
= 3,
1420 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH
= 4,
1421 } D3D12_PRIMITIVE_TOPOLOGY_TYPE
;
1423 typedef struct D3D12_CACHED_PIPELINE_STATE
1425 const void *pCachedBlob
;
1426 SIZE_T CachedBlobSizeInBytes
;
1427 } D3D12_CACHED_PIPELINE_STATE
;
1429 typedef enum D3D12_PIPELINE_STATE_FLAGS
1431 D3D12_PIPELINE_STATE_FLAG_NONE
= 0x0,
1432 D3D12_PIPELINE_STATE_FLAG_DEBUG
= 0x1,
1433 } D3D12_PIPELINE_STATE_FLAGS
;
1435 typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
1437 ID3D12RootSignature
*pRootSignature
;
1438 D3D12_SHADER_BYTECODE VS
;
1439 D3D12_SHADER_BYTECODE PS
;
1440 D3D12_SHADER_BYTECODE DS
;
1441 D3D12_SHADER_BYTECODE HS
;
1442 D3D12_SHADER_BYTECODE GS
;
1443 D3D12_STREAM_OUTPUT_DESC StreamOutput
;
1444 D3D12_BLEND_DESC BlendState
;
1446 D3D12_RASTERIZER_DESC RasterizerState
;
1447 D3D12_DEPTH_STENCIL_DESC DepthStencilState
;
1448 D3D12_INPUT_LAYOUT_DESC InputLayout
;
1449 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue
;
1450 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType
;
1451 UINT NumRenderTargets
;
1452 DXGI_FORMAT RTVFormats
[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
];
1453 DXGI_FORMAT DSVFormat
;
1454 DXGI_SAMPLE_DESC SampleDesc
;
1456 D3D12_CACHED_PIPELINE_STATE CachedPSO
;
1457 D3D12_PIPELINE_STATE_FLAGS Flags
;
1458 } D3D12_GRAPHICS_PIPELINE_STATE_DESC
;
1460 typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
1462 ID3D12RootSignature
*pRootSignature
;
1463 D3D12_SHADER_BYTECODE CS
;
1465 D3D12_CACHED_PIPELINE_STATE CachedPSO
;
1466 D3D12_PIPELINE_STATE_FLAGS Flags
;
1467 } D3D12_COMPUTE_PIPELINE_STATE_DESC
;
1469 typedef enum D3D12_COMMAND_LIST_TYPE
1471 D3D12_COMMAND_LIST_TYPE_DIRECT
= 0,
1472 D3D12_COMMAND_LIST_TYPE_BUNDLE
= 1,
1473 D3D12_COMMAND_LIST_TYPE_COMPUTE
= 2,
1474 D3D12_COMMAND_LIST_TYPE_COPY
= 3,
1475 } D3D12_COMMAND_LIST_TYPE
;
1477 typedef enum D3D12_COMMAND_QUEUE_PRIORITY
1479 D3D12_COMMAND_QUEUE_PRIORITY_NORMAL
= 0,
1480 D3D12_COMMAND_QUEUE_PRIORITY_HIGH
= 100,
1481 } D3D12_COMMAND_QUEUE_PRIORITY
;
1483 typedef enum D3D12_COMMAND_QUEUE_FLAGS
1485 D3D12_COMMAND_QUEUE_FLAG_NONE
= 0x0,
1486 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT
= 0x1,
1487 } D3D12_COMMAND_QUEUE_FLAGS
;
1489 typedef struct D3D12_COMMAND_QUEUE_DESC
1491 D3D12_COMMAND_LIST_TYPE Type
;
1493 D3D12_COMMAND_QUEUE_FLAGS Flags
;
1495 } D3D12_COMMAND_QUEUE_DESC
;
1497 typedef struct D3D12_FEATURE_DATA_ARCHITECTURE
1500 BOOL TileBasedRenderer
;
1502 BOOL CacheCoherentUMA
;
1503 } D3D12_FEATURE_DATA_ARCHITECTURE
;
1505 typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
1509 } D3D12_FEATURE_DATA_FORMAT_INFO
;
1511 typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS
1513 UINT NumFeatureLevels
;
1514 const D3D_FEATURE_LEVEL
*pFeatureLevelsRequested
;
1515 D3D_FEATURE_LEVEL MaxSupportedFeatureLevel
;
1516 } D3D12_FEATURE_DATA_FEATURE_LEVELS
;
1518 typedef enum D3D12_FEATURE
1520 D3D12_FEATURE_D3D12_OPTIONS
= 0,
1521 D3D12_FEATURE_ARCHITECTURE
= 1,
1522 D3D12_FEATURE_FEATURE_LEVELS
= 2,
1523 D3D12_FEATURE_FORMAT_SUPPORT
= 3,
1524 D3D12_FEATURE_FORMAT_INFO
= 4,
1525 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT
= 5,
1528 typedef struct D3D12_MEMCPY_DEST
1533 } D3D12_MEMCPY_DEST
;
1535 typedef struct D3D12_SUBRESOURCE_DATA
1539 LONG_PTR SlicePitch
;
1540 } D3D12_SUBRESOURCE_DATA
;
1543 uuid(c4fec28f
-7966-4e95
-9f94
-f431cb56c3b8
),
1546 pointer_default(unique)
1548 interface ID3D12Object
: IUnknown
1550 HRESULT GetPrivateData
(REFGUID guid
, UINT
*data_size
, void *data
);
1551 HRESULT SetPrivateData
(REFGUID guid
, UINT data_size
, const void *data
);
1552 HRESULT SetPrivateDataInterface
(REFGUID guid
, const IUnknown
*data
);
1553 HRESULT SetName
(const WCHAR
*name
);
1557 uuid(905db94b
-a00c
-4140-9df5
-2b64ca9ea357
),
1560 pointer_default(unique)
1562 interface ID3D12DeviceChild
: ID3D12Object
1564 HRESULT GetDevice
(REFIID riid
, void **device
);
1568 uuid(63ee58fb
-1268-4835-86da
-f008ce62f0d6
),
1571 pointer_default(unique)
1573 interface ID3D12Pageable
: ID3D12DeviceChild
1578 uuid(696442be
-a72e
-4059
-bc79
-5b5c98040fad
),
1581 pointer_default(unique)
1583 interface ID3D12Resource
: ID3D12Pageable
1585 HRESULT Map
(UINT sub_resource
, const D3D12_RANGE
*read_range
, void **data
);
1586 void Unmap
(UINT sub_resource
, const D3D12_RANGE
*written_range
);
1588 D3D12_RESOURCE_DESC GetDesc
();
1590 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress
();
1592 HRESULT WriteToSubresource
(UINT dst_sub_resource
, const D3D12_BOX
*dst_box
,
1593 const void *src_data
, UINT src_row_pitch
, UINT src_slice_pitch
);
1594 HRESULT ReadFromSubresource
(void *dst_data
, UINT dst_row_pitch
, UINT dst_slice_pitch
,
1595 UINT src_sub_resource
, const D3D12_BOX
*src_box
);
1597 HRESULT GetHeapProperties
(D3D12_HEAP_PROPERTIES
*heap_properties
, D3D12_HEAP_FLAGS
*flags
);
1601 uuid(7116d91c
-e7e4
-47ce
-b8c6
-ec8168f437e5
),
1604 pointer_default(unique)
1606 interface ID3D12CommandList
: ID3D12DeviceChild
1608 D3D12_COMMAND_LIST_TYPE GetType
();
1611 typedef enum D3D12_TILE_COPY_FLAGS
1613 D3D12_TILE_COPY_FLAG_NONE
= 0x0,
1614 D3D12_TILE_COPY_FLAG_NO_HAZARD
= 0x1,
1615 D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE
= 0x2,
1616 D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER
= 0x4,
1617 } D3D12_TILE_COPY_FLAGS
;
1619 typedef struct D3D12_INDEX_BUFFER_VIEW
1621 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
;
1624 } D3D12_INDEX_BUFFER_VIEW
;
1626 typedef struct D3D12_VERTEX_BUFFER_VIEW
1628 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
;
1631 } D3D12_VERTEX_BUFFER_VIEW
;
1633 typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
1635 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
;
1637 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation
;
1638 } D3D12_STREAM_OUTPUT_BUFFER_VIEW
;
1640 typedef enum D3D12_CLEAR_FLAGS
1642 D3D12_CLEAR_FLAG_DEPTH
= 0x1,
1643 D3D12_CLEAR_FLAG_STENCIL
= 0x2,
1644 } D3D12_CLEAR_FLAGS
;
1645 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(D3D12_CLEAR_FLAGS);")
1647 typedef struct D3D12_DISCARD_REGION
1650 const D3D12_RECT
*pRects
;
1651 UINT FirstSubresource
;
1652 UINT NumSubresources
;
1653 } D3D12_DISCARD_REGION
;
1655 typedef enum D3D12_QUERY_TYPE
1657 D3D12_QUERY_TYPE_OCCLUSION
= 0,
1658 D3D12_QUERY_TYPE_BINARY_OCCLUSION
= 1,
1659 D3D12_QUERY_TYPE_TIMESTAMP
= 2,
1660 D3D12_QUERY_TYPE_PIPELINE_STATISTICS
= 3,
1661 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0
= 4,
1662 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1
= 5,
1663 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2
= 6,
1664 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3
= 7,
1667 typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
1670 UINT64 IAPrimitives
;
1671 UINT64 VSInvocations
;
1672 UINT64 GSInvocations
;
1673 UINT64 GSPrimitives
;
1674 UINT64 CInvocations
;
1676 UINT64 PSInvocations
;
1677 UINT64 HSInvocations
;
1678 UINT64 DSInvocations
;
1679 UINT64 CSInvocations
;
1680 } D3D12_QUERY_DATA_PIPELINE_STATISTICS
;
1682 typedef enum D3D12_PREDICATION_OP
1684 D3D12_PREDICATION_OP_EQUAL_ZERO
= 0,
1685 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO
= 1,
1686 } D3D12_PREDICATION_OP
;
1689 uuid(8efb471d
-616c
-4f49
-90f7
-127bb763fa51
),
1692 pointer_default(unique)
1694 interface ID3D12DescriptorHeap
: ID3D12Pageable
1696 D3D12_DESCRIPTOR_HEAP_DESC GetDesc
();
1698 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart
();
1699 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart
();
1703 uuid(0d9658ae
-ed45
-469e
-a61d
-970ec583cab4
),
1706 pointer_default(unique)
1708 interface ID3D12QueryHeap
: ID3D12Pageable
1713 uuid(c36a797c
-ec80
-4f0a
-8985-a7b2475082d1
),
1716 pointer_default(unique)
1718 interface ID3D12CommandSignature
: ID3D12Pageable
1723 uuid(5b160d0f
-ac1b
-4185-8ba8
-b3ae42a5a455
),
1726 pointer_default(unique)
1728 interface ID3D12GraphicsCommandList
: ID3D12CommandList
1732 HRESULT Reset
(ID3D12CommandAllocator
*allocator
, ID3D12PipelineState
*initial_state
);
1734 HRESULT ClearState
(ID3D12PipelineState
*pipeline_state
);
1736 void DrawInstanced
(UINT vertex_count_per_instance
, UINT instance_count
,
1737 UINT start_vertex_location
, UINT start_instance_location
);
1738 void DrawIndexedInstanced
(UINT index_count_per_instance
, UINT instance_count
,
1739 UINT start_vertex_location
, INT base_vertex_location
, UINT start_instance_location
);
1741 void Dispatch
(UINT x
, UINT u
, UINT z
);
1743 void CopyBufferRegion
(ID3D12Resource
*dst_buffer
, UINT64 dst_offset
,
1744 ID3D12Resource
*src_buffer
, UINT64 src_offset
, UINT64 byte_count
);
1745 void CopyTextureRegion
(const D3D12_TEXTURE_COPY_LOCATION
*dst
,
1746 UINT dst_x
, UINT dst_y
, UINT dst_z
,
1747 const D3D12_TEXTURE_COPY_LOCATION
*src
, const D3D12_BOX
*src_box
);
1748 void CopyResource
(ID3D12Resource
*dst_resource
, ID3D12Resource
*src_resource
);
1750 void CopyTiles
(ID3D12Resource
*tiled_resource
,
1751 const D3D12_TILED_RESOURCE_COORDINATE
*tile_region_start_coordinate
,
1752 const D3D12_TILE_REGION_SIZE
*tile_region_size
,
1753 ID3D12Resource
*buffer
,
1754 UINT64 buffer_offset
,
1755 D3D12_TILE_COPY_FLAGS flags
);
1757 void ResolveSubresource
(ID3D12Resource
*dst_resource
, UINT dst_sub_resource
,
1758 ID3D12Resource
*src_resource
, UINT src_sub_resource
,
1759 DXGI_FORMAT format
);
1761 void IASetPrimitiveTopology
(D3D12_PRIMITIVE_TOPOLOGY primitive_topology
);
1763 void RSSetViewports
(UINT viewport_count
, const D3D12_VIEWPORT
*viewports
);
1764 void RSSetScissorRects
(UINT rect_count
, const D3D12_RECT
*rects
);
1766 void OMSetBlendFactor
(const FLOAT blend_factor
[4]);
1767 void OMSetStencilRef
(UINT stencil_ref
);
1769 void SetPipelineState
(ID3D12PipelineState
*pipeline_state
);
1771 void ResourceBarrier
(UINT barrier_count
, const D3D12_RESOURCE_BARRIER
*barriers
);
1773 void ExecuteBundle
(ID3D12GraphicsCommandList
*command_list
);
1775 void SetDescriptorHeaps
(UINT heap_count
, ID3D12DescriptorHeap
* const *heaps
);
1777 void SetComputeRootSignature
(ID3D12RootSignature
*root_signature
);
1778 void SetGraphicsRootSignature
(ID3D12RootSignature
*root_signature
);
1780 void SetComputeRootDescriptorTable
(UINT root_parameter_index
, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor
);
1781 void SetGraphicsRootDescriptorTable
(UINT root_parameter_index
, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor
);
1783 void SetComputeRoot32BitConstant
(UINT root_parameter_index
, UINT data
, UINT dst_offset
);
1784 void SetGraphicsRoot32BitConstant
(UINT root_parameter_index
, UINT data
, UINT dst_offset
);
1786 void SetComputeRoot32BitConstants
(UINT root_parameter_index
, UINT constant_count
, const void *data
,
1788 void SetGraphicsRoot32BitConstants
(UINT root_parameter_index
, UINT constant_count
, const void *data
,
1791 void SetComputeRootConstantBufferView
(UINT root_parameter_index
, D3D12_GPU_VIRTUAL_ADDRESS address
);
1792 void SetGraphicsRootConstantBufferView
(UINT root_parameter_index
, D3D12_GPU_VIRTUAL_ADDRESS address
);
1794 void SetComputeRootShaderResourceView
(UINT root_parameter_index
, D3D12_GPU_VIRTUAL_ADDRESS address
);
1795 void SetGraphicsRootShaderResourceView
(UINT root_parameter_index
, D3D12_GPU_VIRTUAL_ADDRESS address
);
1797 void SetComputeRootUnorderedAccessView
(UINT root_parameter_index
, D3D12_GPU_VIRTUAL_ADDRESS address
);
1798 void SetGraphicsRootUnorderedAccessView
(UINT root_parameter_index
, D3D12_GPU_VIRTUAL_ADDRESS address
);
1800 void IASetIndexBuffer
(const D3D12_INDEX_BUFFER_VIEW
*view
);
1801 void IASetVertexBuffers
(UINT start_slot
, UINT view_count
, const D3D12_VERTEX_BUFFER_VIEW
*views
);
1803 void SOSetTargets
(UINT start_slot
, UINT view_count
, const D3D12_STREAM_OUTPUT_BUFFER_VIEW
*views
);
1805 void OMSetRenderTargets
(UINT render_target_descriptor_count
,
1806 const D3D12_CPU_DESCRIPTOR_HANDLE
*render_target_descriptors
,
1807 BOOL single_descriptor_handle
,
1808 const D3D12_CPU_DESCRIPTOR_HANDLE
*depth_stencil_descriptor
);
1810 void ClearDepthStencilView
(D3D12_CPU_DESCRIPTOR_HANDLE dsv
, D3D12_CLEAR_FLAGS flags
,
1811 FLOAT depth
, UINT8 stencil
, UINT rect_count
, const D3D12_RECT
*rects
);
1812 void ClearRenderTargetView
(D3D12_CPU_DESCRIPTOR_HANDLE rtv
, const FLOAT color
[4],
1813 UINT rect_count
, const D3D12_RECT
*rects
);
1814 void ClearUnorderedAccessViewUint
(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle
,
1815 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle
, ID3D12Resource
*resource
, const UINT values
[4],
1816 UINT rect_count
, const D3D12_RECT
*rects
);
1817 void ClearUnorderedAccessViewFloat
(D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle
,
1818 D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle
, ID3D12Resource
*resource
, const float values
[4],
1819 UINT rect_count
, const D3D12_RECT
*rects
);
1821 void DiscardResource
(ID3D12Resource
*resource
, const D3D12_DISCARD_REGION
*region
);
1823 void BeginQuery
(ID3D12QueryHeap
*heap
, D3D12_QUERY_TYPE type
, UINT index
);
1824 void EndQuery
(ID3D12QueryHeap
*heap
, D3D12_QUERY_TYPE type
, UINT index
);
1825 void ResolveQueryData
(ID3D12QueryHeap
*heap
, D3D12_QUERY_TYPE type
,
1826 UINT start_index
, UINT query_count
,
1827 ID3D12Resource
*dst_buffer
, UINT64 aligned_dst_buffer_offset
);
1829 void SetPredication
(ID3D12Resource
*buffer
, UINT64 aligned_buffer_offset
,
1830 D3D12_PREDICATION_OP operation
);
1832 void SetMarker
(UINT metadata
, const void *data
, UINT size
);
1833 void BeginEvent
(UINT metadata
, const void *data
, UINT size
);
1836 void ExecuteIndirect
(ID3D12CommandSignature
*command_signature
,
1837 UINT max_command_count
, ID3D12Resource
*arg_buffer
, UINT64 arg_buffer_offset
,
1838 ID3D12Resource
*count_buffer
, UINT64 count_buffer_offset
);
1841 typedef enum D3D12_TILE_RANGE_FLAGS
1843 D3D12_TILE_RANGE_FLAG_NONE
= 0x0,
1844 D3D12_TILE_RANGE_FLAG_NULL
= 0x1,
1845 D3D12_TILE_RANGE_FLAG_SKIP
= 0x2,
1846 D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE
= 0x4
1847 } D3D12_TILE_RANGE_FLAGS
;
1849 typedef enum D3D12_TILE_MAPPING_FLAGS
1851 D3D12_TILE_MAPPING_FLAG_NONE
= 0x0,
1852 D3D12_TILE_MAPPING_FLAG_NO_HAZARD
= 0x1,
1853 } D3D12_TILE_MAPPING_FLAGS
;
1856 uuid(0ec870a6
-5d7e
-4c22
-8cfc
-5baae07616ed
),
1859 pointer_default(unique)
1861 interface ID3D12CommandQueue
: ID3D12Pageable
1863 void UpdateTileMappings
(ID3D12Resource
*resource
, UINT region_count
,
1864 const D3D12_TILED_RESOURCE_COORDINATE
*region_start_coordinates
,
1865 const D3D12_TILE_REGION_SIZE
*region_sizes
,
1867 const D3D12_TILE_RANGE_FLAGS
*range_flags
,
1868 UINT
*heap_range_offsets
,
1869 UINT
*range_tile_counts
,
1870 D3D12_TILE_MAPPING_FLAGS flags
);
1872 void CopyTileMappings
(ID3D12Resource
*dst_resource
,
1873 const D3D12_TILED_RESOURCE_COORDINATE
*dst_region_start_coordinate
,
1874 ID3D12Resource
*src_resource
,
1875 const D3D12_TILED_RESOURCE_COORDINATE
*src_region_start_coordinate
,
1876 const D3D12_TILE_REGION_SIZE
*region_size
,
1877 D3D12_TILE_MAPPING_FLAGS flags
);
1879 void ExecuteCommandLists
(UINT command_list_count
,
1880 ID3D12CommandList
* const * command_lists
);
1882 void SetMarker
(UINT metadata
, const void *data
, UINT size
);
1883 void BeginEvent
(UINT metadata
, const void *data
, UINT size
);
1886 HRESULT Signal
(ID3D12Fence
*fence
, UINT64 value
);
1887 HRESULT Wait
(ID3D12Fence
*fence
, UINT64 value
);
1889 HRESULT GetTimestampFrequency
(UINT64
*frequency
);
1890 HRESULT GetClockCalibration
(UINT64
*gpu_timestamp
, UINT64
*cpu_timestamp
);
1892 D3D12_COMMAND_QUEUE_DESC GetDesc
();
1895 typedef enum D3D12_FENCE_FLAGS
1897 D3D12_FENCE_FLAG_NONE
= 0x0,
1898 D3D12_FENCE_FLAG_SHARED
= 0x1,
1899 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER
= 0x2,
1900 } D3D12_FENCE_FLAGS
;
1902 typedef enum D3D12_QUERY_HEAP_TYPE
1904 D3D12_QUERY_HEAP_TYPE_OCCLUSION
= 0,
1905 D3D12_QUERY_HEAP_TYPE_TIMESTAMP
= 1,
1906 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS
= 2,
1907 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS
= 3,
1908 } D3D12_QUERY_HEAP_TYPE
;
1910 typedef struct D3D12_QUERY_HEAP_DESC
1912 D3D12_QUERY_HEAP_TYPE Type
;
1915 } D3D12_QUERY_HEAP_DESC
;
1917 typedef enum D3D12_INDIRECT_ARGUMENT_TYPE
1919 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW
,
1920 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED
,
1921 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH
,
1922 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW
,
1923 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW
,
1924 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT
,
1925 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW
,
1926 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW
,
1927 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW
,
1928 } D3D12_INDIRECT_ARGUMENT_TYPE
;
1930 typedef struct D3D12_INDIRECT_ARGUMENT_DESC
1932 D3D12_INDIRECT_ARGUMENT_TYPE Type
;
1941 UINT RootParameterIndex
;
1942 UINT DestOffsetIn32BitValues
;
1943 UINT Num32BitValuesToSet
;
1947 UINT RootParameterIndex
;
1948 } ConstantBufferView
;
1951 UINT RootParameterIndex
;
1952 } ShaderResourceView
;
1955 UINT RootParameterIndex
;
1956 } UnorderedAccessView
;
1958 } D3D12_INDIRECT_ARGUMENT_DESC
;
1960 typedef struct D3D12_COMMAND_SIGNATURE_DESC
1963 UINT NumArgumentDescs
;
1964 const D3D12_INDIRECT_ARGUMENT_DESC
*pArgumentDescs
;
1966 } D3D12_COMMAND_SIGNATURE_DESC
;
1969 uuid(c54a6b66
-72df
-4ee8
-8be5
-a946a1429214
),
1972 pointer_default(unique)
1974 interface ID3D12RootSignature
: ID3D12DeviceChild
1979 uuid(765a30f3
-f624
-4c6f
-a828
-ace948622445
),
1982 pointer_default(unique)
1984 interface ID3D12PipelineState
: ID3D12Pageable
1986 HRESULT GetCachedBlob
(ID3DBlob
**blob
);
1990 uuid(0a753dcf
-c4d8
-4b91
-adf6
-be5a60d95a76
),
1993 pointer_default(unique)
1995 interface ID3D12Fence
: ID3D12Pageable
1997 UINT64 GetCompletedValue
();
1998 HRESULT SetEventOnCompletion
(UINT64 value
, HANDLE event
);
1999 HRESULT Signal
(UINT64 value
);
2003 uuid(6102dee4
-af59
-4b09
-b999
-b44d73f09b24
),
2006 pointer_default(unique)
2008 interface ID3D12CommandAllocator
: ID3D12Pageable
2014 uuid(189819f1
-1db6
-4b57
-be54
-1821339b85f7
),
2017 pointer_default(unique)
2019 interface ID3D12Device
: ID3D12Object
2021 UINT GetNodeCount
();
2023 HRESULT CreateCommandQueue
(const D3D12_COMMAND_QUEUE_DESC
*desc
,
2024 REFIID riid
, void **command_queue
);
2025 HRESULT CreateCommandAllocator
(D3D12_COMMAND_LIST_TYPE type
,
2026 REFIID riid
, void **command_allocator
);
2027 HRESULT CreateGraphicsPipelineState
(const D3D12_GRAPHICS_PIPELINE_STATE_DESC
*desc
,
2028 REFIID riid
, void **pipeline_state
);
2029 HRESULT CreateComputePipelineState
(const D3D12_COMPUTE_PIPELINE_STATE_DESC
*desc
,
2030 REFIID riid
, void **pipeline_state
);
2031 HRESULT CreateCommandList
(UINT node_mask
,
2032 D3D12_COMMAND_LIST_TYPE type
,
2033 ID3D12CommandAllocator
*command_allocator
,
2034 ID3D12PipelineState
*initial_pipeline_state
,
2035 REFIID riid
, void **command_list
);
2037 HRESULT CheckFeatureSupport
(D3D12_FEATURE feature
,
2038 void *feature_data
, UINT feature_data_size
);
2040 HRESULT CreateDescriptorHeap
(const D3D12_DESCRIPTOR_HEAP_DESC
*desc
,
2041 REFIID riid
, void **descriptor_heap
);
2042 UINT GetDescriptorHandleIncrementSize
(D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type
);
2044 HRESULT CreateRootSignature
(UINT node_mask
,
2045 const void *bytecode
, SIZE_T bytecode_length
,
2046 REFIID riid
, void **root_signature
);
2048 void CreateConstantBufferView
(const D3D12_CONSTANT_BUFFER_VIEW_DESC
*desc
,
2049 D3D12_CPU_DESCRIPTOR_HANDLE descriptor
);
2050 void CreateShaderResourceView
(ID3D12Resource
*resource
,
2051 const D3D12_SHADER_RESOURCE_VIEW_DESC
*desc
,
2052 D3D12_CPU_DESCRIPTOR_HANDLE descriptor
);
2053 void CreateUnorderedAccessView
(ID3D12Resource
*resource
, ID3D12Resource
*counter_resource
,
2054 const D3D12_UNORDERED_ACCESS_VIEW_DESC
*desc
,
2055 D3D12_CPU_DESCRIPTOR_HANDLE descriptor
);
2056 void CreateRenderTargetView
(ID3D12Resource
*resource
,
2057 const D3D12_RENDER_TARGET_VIEW_DESC
*desc
,
2058 D3D12_CPU_DESCRIPTOR_HANDLE descriptor
);
2059 void CreateDepthStencilView
(ID3D12Resource
*resource
,
2060 const D3D12_DEPTH_STENCIL_VIEW_DESC
*desc
,
2061 D3D12_CPU_DESCRIPTOR_HANDLE descriptor
);
2062 void CreateSampler
(const D3D12_SAMPLER_DESC
*desc
,
2063 D3D12_CPU_DESCRIPTOR_HANDLE descriptor
);
2065 void CopyDescriptors
(UINT dst_descriptor_range_count
,
2066 const D3D12_CPU_DESCRIPTOR_HANDLE
*dst_descriptor_range_offsets
,
2067 const UINT
*dst_descriptor_range_sizes
,
2068 UINT src_descriptor_range_count
,
2069 const D3D12_CPU_DESCRIPTOR_HANDLE
*src_descriptor_range_offsets
,
2070 const UINT
*src_descriptor_range_sizes
,
2071 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type
);
2072 void CopyDescriptorsSimple
(UINT descriptor_count
,
2073 const D3D12_CPU_DESCRIPTOR_HANDLE dst_descriptor_range_offset
,
2074 const D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_offset
,
2075 D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type
);
2077 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo
(UINT visible_mask
,
2078 UINT reource_desc_count
, const D3D12_RESOURCE_DESC
*resource_descs
);
2080 D3D12_HEAP_PROPERTIES GetCustomHeapProperties
(UINT node_mask
,
2081 D3D12_HEAP_TYPE heap_type
);
2083 HRESULT CreateCommittedResource
(const D3D12_HEAP_PROPERTIES
*heap_properties
, D3D12_HEAP_FLAGS heap_flags
,
2084 const D3D12_RESOURCE_DESC
*desc
, D3D12_RESOURCE_STATES initial_state
,
2085 const D3D12_CLEAR_VALUE
*optimized_clear_value
,
2086 REFIID riid
, void **resource
);
2088 HRESULT CreateHeap
(const D3D12_HEAP_DESC
*desc
, REFIID riid
, void **heap
);
2090 HRESULT CreatePlacedResource
(ID3D12Heap
*heap
, UINT64 heap_offset
,
2091 const D3D12_RESOURCE_DESC
*desc
, D3D12_RESOURCE_STATES initial_state
,
2092 const D3D12_CLEAR_VALUE
*optimized_clear_value
,
2093 REFIID riid
, void **resource
);
2094 HRESULT CreateReservedResource
(const D3D12_RESOURCE_DESC
*desc
, D3D12_RESOURCE_STATES initial_state
,
2095 const D3D12_CLEAR_VALUE
*optimized_clear_value
,
2096 REFIID riid
, void **resource
);
2098 HRESULT CreateSharedHandle
(ID3D12DeviceChild
*object,
2099 const SECURITY_ATTRIBUTES
*attributes
, DWORD access
,
2100 const WCHAR
*name
, HANDLE *handle);
2101 HRESULT OpenSharedHandle
(HANDLE handle,
2102 REFIID riid
, void **object);
2103 HRESULT OpenSharedHandleByName
(const WCHAR
*name
, DWORD access
, HANDLE *handle);
2105 HRESULT MakeResident
(UINT object_count
, ID3D12Pageable
* const *objects
);
2106 HRESULT Evict
(UINT object_count
, ID3D12Pageable
* const *objects
);
2108 HRESULT CreateFence
(UINT64 initial_value
, D3D12_FENCE_FLAGS flags
, REFIID riid
, void **fence
);
2110 HRESULT GetDeviceRemovedReason
();
2112 void GetCopyableFootprints
(const D3D12_RESOURCE_DESC
*desc
,
2113 UINT first_sub_resource
,
2114 UINT sub_resource_count
,
2116 D3D12_PLACED_SUBRESOURCE_FOOTPRINT
*layouts
,
2119 UINT64
*total_bytes
);
2121 HRESULT CreateQueryHeap
(const D3D12_QUERY_HEAP_DESC
*desc
,
2122 REFIID riid
, void **heap
);
2124 HRESULT SetStablePowerState
(BOOL enable
);
2126 HRESULT CreateCommandSignature
(const D3D12_COMMAND_SIGNATURE_DESC
*desc
,
2127 ID3D12RootSignature
*root_signature
,
2128 REFIID riid
, void **command_signature
);
2130 void GetResourceTiling
(ID3D12Resource
*resource
,
2131 UINT
*total_tile_count
,
2132 D3D12_PACKED_MIP_INFO
*packed_mip_info
,
2133 D3D12_TILE_SHAPE
*standard_tile_shape
,
2134 UINT
*sub_resource_tiling_count
,
2135 UINT first_sub_resource_tiling
,
2136 D3D12_SUBRESOURCE_TILING
*sub_resource_tilings
);
2138 LUID GetAdapterLuid
();
2142 uuid(344488b7
-6846-474b
-b989
-f027448245e0
),
2145 pointer_default(unique)
2147 interface ID3D12Debug
: IUnknown
2149 void EnableDebugLayer
();
2153 uuid(34ab647b
-3cc8
-46ac
-841b
-c0965645c046
),
2156 pointer_default(unique)
2158 interface ID3D12RootSignatureDeserializer
: IUnknown
2160 const D3D12_ROOT_SIGNATURE_DESC
*GetRootSignatureDesc
();
2163 [local] HRESULT __stdcall D3D12CreateRootSignatureDeserializer
(
2164 const void *data
, SIZE_T data_size
, REFIID iid
, void **deserializer
);
2166 [local] HRESULT __stdcall D3D12SerializeRootSignature
(
2167 const D3D12_ROOT_SIGNATURE_DESC
*root_signature_desc
,
2168 D3D_ROOT_SIGNATURE_VERSION
version, ID3DBlob
**blob
, ID3DBlob
**error_blob
);
2170 [local] HRESULT __stdcall D3D12SerializeVersionedRootSignature
(
2171 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC
*root_signature_desc
,
2172 ID3DBlob
**blob
, ID3DBlob
**error_blob
);
2174 typedef HRESULT (__stdcall
*PFN_D3D12_CREATE_DEVICE
)(IUnknown
*adapter
,
2175 D3D_FEATURE_LEVEL minimum_feature_level
, REFIID iid
, void **device
);
2177 [local] HRESULT __stdcall D3D12CreateDevice
(IUnknown
*adapter
,
2178 D3D_FEATURE_LEVEL minimum_feature_level
, REFIID iid
, void **device
);
2180 [local] HRESULT __stdcall D3D12GetDebugInterface
(REFIID iid
, void **debug
);