1 module aurora.directx.d3d12.d3d12; 2 3 version(Windows): 4 5 public import aurora.directx.com; 6 public import aurora.directx.dxgi.dxgiformat; 7 public import aurora.directx.dxgi.dxgicommon; 8 public import aurora.directx.d3d.d3dcommon; 9 10 public: 11 12 /// 13 /// Constants 14 /// 15 16 enum int D3D12_16BIT_INDEX_STRIP_CUT_VALUE = 0xffff; 17 enum int D3D12_32BIT_INDEX_STRIP_CUT_VALUE = 0xffffffff; 18 enum int D3D12_8BIT_INDEX_STRIP_CUT_VALUE = 0xff; 19 enum int D3D12_APPEND_ALIGNED_ELEMENT = 0xffffffff; 20 enum int D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9; 21 enum int D3D12_CLIP_OR_CULL_DISTANCE_COUNT = 8; 22 enum int D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2; 23 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14; 24 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4; 25 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32; 26 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15; 27 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT = 16; 28 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4; 29 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15; 30 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1; 31 enum int D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1; 32 enum int D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64; 33 enum int D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4; 34 enum int D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1; 35 enum int D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1; 36 enum int D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1; 37 enum int D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32; 38 enum int D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1; 39 enum int D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128; 40 enum int D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1; 41 enum int D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1; 42 enum int D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128; 43 enum int D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1; 44 enum int D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16; 45 enum int D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1; 46 enum int D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1; 47 enum int D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT = 16; 48 enum int D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32; 49 enum int D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4; 50 enum int D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32; 51 enum int D3D12_COMMONSHADER_TEMP_REGISTER_COUNT = 4096; 52 enum int D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3; 53 enum int D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3; 54 enum int D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10; 55 enum int D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10; 56 enum int D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8; 57 enum int D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7; 58 enum int D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256; 59 enum int D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 256; 60 enum int D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = 64; 61 enum int D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 240; 62 enum int D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = 68; 63 enum int D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 224; 64 enum int D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = 72; 65 enum int D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 208; 66 enum int D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = 76; 67 enum int D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 192; 68 enum int D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = 84; 69 enum int D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 176; 70 enum int D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = 92; 71 enum int D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 160; 72 enum int D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = 100; 73 enum int D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 144; 74 enum int D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = 112; 75 enum int D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 128; 76 enum int D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = 128; 77 enum int D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 112; 78 enum int D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = 144; 79 enum int D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 96; 80 enum int D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = 168; 81 enum int D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 80; 82 enum int D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = 204; 83 enum int D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 64; 84 enum int D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = 256; 85 enum int D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 48; 86 enum int D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = 340; 87 enum int D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 32; 88 enum int D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = 512; 89 enum int D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 16; 90 enum int D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = 768; 91 enum int D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = 1; 92 enum int D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = 256; 93 enum int D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = 768; 94 enum int D3D12_CS_4_X_THREAD_GROUP_MAX_X = 768; 95 enum int D3D12_CS_4_X_THREAD_GROUP_MAX_Y = 768; 96 enum int D3D12_CS_4_X_UAV_REGISTER_COUNT = 1; 97 enum int D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = 65535; 98 enum int D3D12_CS_TGSM_REGISTER_COUNT = 8192; 99 enum int D3D12_CS_TGSM_REGISTER_READS_PER_INST = 1; 100 enum int D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = 1; 101 enum int D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = 1; 102 enum int D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS = 3; 103 enum int D3D12_CS_THREADGROUPID_REGISTER_COUNT = 1; 104 enum int D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS = 1; 105 enum int D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT = 1; 106 enum int D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS = 3; 107 enum int D3D12_CS_THREADIDINGROUP_REGISTER_COUNT = 1; 108 enum int D3D12_CS_THREADID_REGISTER_COMPONENTS = 3; 109 enum int D3D12_CS_THREADID_REGISTER_COUNT = 1; 110 enum int D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = 1024; 111 enum int D3D12_CS_THREAD_GROUP_MAX_X = 1024; 112 enum int D3D12_CS_THREAD_GROUP_MAX_Y = 1024; 113 enum int D3D12_CS_THREAD_GROUP_MAX_Z = 64; 114 enum int D3D12_CS_THREAD_GROUP_MIN_X = 1; 115 enum int D3D12_CS_THREAD_GROUP_MIN_Y = 1; 116 enum int D3D12_CS_THREAD_GROUP_MIN_Z = 1; 117 enum int D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = 16384; 118 enum float D3D12_DEFAULT_BLEND_FACTOR_ALPHA = 1.0f; 119 enum float D3D12_DEFAULT_BLEND_FACTOR_BLUE = 1.0f; 120 enum float D3D12_DEFAULT_BLEND_FACTOR_GREEN = 1.0f; 121 enum float D3D12_DEFAULT_BLEND_FACTOR_RED = 1.0f; 122 enum float D3D12_DEFAULT_BORDER_COLOR_COMPONENT = 0.0f; 123 enum int D3D12_DEFAULT_DEPTH_BIAS = 0; 124 enum float D3D12_DEFAULT_DEPTH_BIAS_CLAMP = 0.0f; 125 enum int D3D12_DEFAULT_MAX_ANISOTROPY = 16; 126 enum float D3D12_DEFAULT_MIP_LOD_BIAS = 0.0f; 127 enum int D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 4194304; 128 enum int D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0; 129 enum int D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 65536; 130 enum int D3D12_DEFAULT_SAMPLE_MASK = 0xffffffff; 131 enum int D3D12_DEFAULT_SCISSOR_ENDX = 0; 132 enum int D3D12_DEFAULT_SCISSOR_ENDY = 0; 133 enum int D3D12_DEFAULT_SCISSOR_STARTX = 0; 134 enum int D3D12_DEFAULT_SCISSOR_STARTY = 0; 135 enum float D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0f; 136 enum int D3D12_DEFAULT_STENCIL_READ_MASK = 0xff; 137 enum int D3D12_DEFAULT_STENCIL_REFERENCE = 0; 138 enum int D3D12_DEFAULT_STENCIL_WRITE_MASK = 0xff; 139 enum int D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0; 140 enum int D3D12_DEFAULT_VIEWPORT_HEIGHT = 0; 141 enum float D3D12_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0f; 142 enum float D3D12_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0f; 143 enum int D3D12_DEFAULT_VIEWPORT_TOPLEFTX = 0; 144 enum int D3D12_DEFAULT_VIEWPORT_TOPLEFTY = 0; 145 enum int D3D12_DEFAULT_VIEWPORT_WIDTH = 0; 146 enum int D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND = 0xffffffff; 147 enum int D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END = 0xfffffff7; 148 enum int D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff0; 149 enum int D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968; 150 enum int D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = 4; 151 enum int D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32; 152 enum int D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = 32; 153 enum int D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = 2; 154 enum int D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = 1; 155 enum int D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = 3; 156 enum int D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = 32; 157 enum int D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = 1; 158 enum int D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = 2; 159 enum int D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = 1; 160 enum int D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4; 161 enum int D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32; 162 enum int D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = 32; 163 enum int D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2; 164 enum int D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1; 165 enum int D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1; 166 enum int D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32; 167 enum int D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1; 168 enum int D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2; 169 enum int D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1; 170 enum int D3D12_DS_OUTPUT_REGISTER_COMPONENTS = 4; 171 enum int D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 172 enum int D3D12_DS_OUTPUT_REGISTER_COUNT = 32; 173 enum float D3D12_float16_FUSED_TOLERANCE_IN_ULP = 0.6; 174 enum float D3D12_float32_MAX = 3.402823466e+38f; 175 enum float D3D12_float32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6f; 176 enum float D3D12_float_TO_SRGB_EXPONENT_DENOMINATOR = 2.4f; 177 enum float D3D12_float_TO_SRGB_EXPONENT_NUMERATOR = 1.0f; 178 enum float D3D12_float_TO_SRGB_OFFSET = 0.055f; 179 enum float D3D12_float_TO_SRGB_SCALE_1 = 12.92f; 180 enum float D3D12_float_TO_SRGB_SCALE_2 = 1.055f; 181 enum float D3D12_float_TO_SRGB_THRESHOLD = 0.0031308f; 182 enum float D3D12_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999f; 183 enum float D3D12_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999f; 184 enum float D3D12_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999f; 185 enum float D3D12_FTOU_INSTRUCTION_MIN_INPUT = 0.0f; 186 enum int D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST = 2; 187 enum int D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS = 1; 188 enum int D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = 1; 189 enum int D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32; 190 enum int D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = 1; 191 enum int D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1; 192 enum int D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32; 193 enum int D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1; 194 enum int D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2; 195 enum int D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1; 196 enum int D3D12_GS_INPUT_REGISTER_COMPONENTS = 4; 197 enum int D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 198 enum int D3D12_GS_INPUT_REGISTER_COUNT = 32; 199 enum int D3D12_GS_INPUT_REGISTER_READS_PER_INST = 2; 200 enum int D3D12_GS_INPUT_REGISTER_READ_PORTS = 1; 201 enum int D3D12_GS_INPUT_REGISTER_VERTICES = 32; 202 enum int D3D12_GS_MAX_INSTANCE_COUNT = 32; 203 enum int D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = 1024; 204 enum int D3D12_GS_OUTPUT_ELEMENTS = 32; 205 enum int D3D12_GS_OUTPUT_REGISTER_COMPONENTS = 4; 206 enum int D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 207 enum int D3D12_GS_OUTPUT_REGISTER_COUNT = 32; 208 enum int D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = 32; 209 enum int D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = 32; 210 enum int D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS = 4; 211 enum int D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32; 212 enum int D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST = 2; 213 enum int D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS = 1; 214 enum int D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xffffffff; 215 enum int D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = 1; 216 enum int D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32; 217 enum int D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = 1; 218 enum int D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = 2; 219 enum int D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = 1; 220 enum int D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = 1; 221 enum int D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32; 222 enum int D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = 1; 223 enum int D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = 2; 224 enum int D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = 1; 225 enum int D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1; 226 enum int D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32; 227 enum int D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1; 228 enum int D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2; 229 enum int D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1; 230 enum int D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xffffffff; 231 enum float D3D12_HS_MAXTESSFACTOR_LOWER_BOUND = 1.0f; 232 enum float D3D12_HS_MAXTESSFACTOR_UPPER_BOUND = 64.0f; 233 enum int D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968; 234 enum int D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = 1; 235 enum int D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = 32; 236 enum int D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = 1; 237 enum int D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = 2; 238 enum int D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = 1; 239 enum int D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4; 240 enum int D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32; 241 enum int D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = 32; 242 enum int D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2; 243 enum int D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1; 244 enum int D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS = 128; 245 enum int D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0; 246 enum int D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0; 247 enum int D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0; 248 enum int D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1; 249 enum int D3D12_IA_INSTANCE_ID_BIT_COUNT = 32; 250 enum int D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32; 251 enum int D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT = 32; 252 enum int D3D12_IA_PRIMITIVE_ID_BIT_COUNT = 32; 253 enum int D3D12_IA_VERTEX_ID_BIT_COUNT = 32; 254 enum int D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32; 255 enum int D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128; 256 enum int D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32; 257 enum int D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xffffffff; 258 enum int D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xffffffff; 259 enum int D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = 0xffffffff; 260 enum int D3D12_KEEP_UNORDERED_ACCESS_VIEWS = 0xffffffff; 261 enum float D3D12_LINEAR_GAMMA = 1.0f; 262 enum int D3D12_MAJOR_VERSION = 12; 263 enum float D3D12_MAX_BORDER_COLOR_COMPONENT = 1.0f; 264 enum float D3D12_MAX_DEPTH = 1.0f; 265 enum int D3D12_MAX_LIVE_STATIC_SAMPLERS = 2032; 266 enum int D3D12_MAX_MAXANISOTROPY = 16; 267 enum int D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT = 32; 268 enum float D3D12_MAX_POSITION_VALUE = 3.402823466e+34f; 269 enum int D3D12_MAX_ROOT_COST = 64; 270 enum int D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_size_tIER_1 = 1000000; 271 enum int D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_size_tIER_2 = 1000000; 272 enum int D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE = 2048; 273 enum int D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17; 274 enum int D3D12_MAX_VIEW_INSTANCE_COUNT = 4; 275 enum int D3D12_MINOR_VERSION = 0; 276 enum float D3D12_MIN_BORDER_COLOR_COMPONENT = 0.0f; 277 enum float D3D12_MIN_DEPTH = 0.0f; 278 enum int D3D12_MIN_MAXANISOTROPY = 0; 279 enum float D3D12_MIP_LOD_BIAS_MAX = 15.99f; 280 enum float D3D12_MIP_LOD_BIAS_MIN = -16.0f; 281 enum int D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT = 8; 282 enum int D3D12_MIP_LOD_RANGE_BIT_COUNT = 8; 283 enum float D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4f; 284 enum int D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0; 285 enum int D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff; 286 enum int D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff8; 287 enum int D3D12_PACKED_TILE = 0xffffffff; 288 enum int D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15; 289 enum int D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16; 290 enum int D3D12_PS_CS_UAV_REGISTER_COMPONENTS = 1; 291 enum int D3D12_PS_CS_UAV_REGISTER_COUNT = 8; 292 enum int D3D12_PS_CS_UAV_REGISTER_READS_PER_INST = 1; 293 enum int D3D12_PS_CS_UAV_REGISTER_READ_PORTS = 1; 294 enum int D3D12_PS_FRONTFACING_DEFAULT_VALUE = 0xffffffff; 295 enum int D3D12_PS_FRONTFACING_FALSE_VALUE = 0; 296 enum int D3D12_PS_FRONTFACING_TRUE_VALUE = 0xffffffff; 297 enum int D3D12_PS_INPUT_REGISTER_COMPONENTS = 4; 298 enum int D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 299 enum int D3D12_PS_INPUT_REGISTER_COUNT = 32; 300 enum int D3D12_PS_INPUT_REGISTER_READS_PER_INST = 2; 301 enum int D3D12_PS_INPUT_REGISTER_READ_PORTS = 1; 302 enum float D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0f; 303 enum int D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1; 304 enum int D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32; 305 enum int D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1; 306 enum int D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1; 307 enum int D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32; 308 enum int D3D12_PS_OUTPUT_MASK_REGISTER_COUNT = 1; 309 enum int D3D12_PS_OUTPUT_REGISTER_COMPONENTS = 4; 310 enum int D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 311 enum int D3D12_PS_OUTPUT_REGISTER_COUNT = 8; 312 enum float D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5f; 313 enum int D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = 16; 314 enum int D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = 4096; 315 enum int D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27; 316 enum int D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096; 317 enum int D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = 4096; 318 enum int D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32; 319 enum int D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32; 320 enum int D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 16384; 321 enum int D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024; 322 enum int D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096; 323 enum int D3D12_REQ_MAXANISOTROPY = 16; 324 enum int D3D12_REQ_MIP_LEVELS = 15; 325 enum int D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048; 326 enum int D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = 4096; 327 enum int D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 16384; 328 enum int D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = 128; 329 enum float D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = 0.25f; 330 enum int D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM = 2048; 331 enum int D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = 20; 332 enum int D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = 4096; 333 enum int D3D12_REQ_SUBRESOURCES = 30720; 334 enum int D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048; 335 enum int D3D12_REQ_TEXTURE1D_U_DIMENSION = 16384; 336 enum int D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048; 337 enum int D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384; 338 enum int D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048; 339 enum int D3D12_REQ_TEXTURECUBE_DIMENSION = 16384; 340 enum int D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0; 341 enum int D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = 0xffffffff; 342 enum int D3D12_SHADER_MAJOR_VERSION = 5; 343 enum int D3D12_SHADER_MAX_INSTANCES = 65535; 344 enum int D3D12_SHADER_MAX_INTERFACES = 253; 345 enum int D3D12_SHADER_MAX_INTERFACE_CALL_SITES = 4096; 346 enum int D3D12_SHADER_MAX_TYPES = 65535; 347 enum int D3D12_SHADER_MINOR_VERSION = 1; 348 enum int D3D12_SHIFT_INSTRUCTION_PAD_VALUE = 0; 349 enum int D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5; 350 enum int D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8; 351 enum int D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 65536; 352 enum int D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 4096; 353 enum int D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048; 354 enum int D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 512; 355 enum int D3D12_SO_BUFFER_SLOT_COUNT = 4; 356 enum int D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff; 357 enum int D3D12_SO_NO_RASTERIZED_STREAM = 0xffffffff; 358 enum int D3D12_SO_OUTPUT_COMPONENT_COUNT = 128; 359 enum int D3D12_SO_STREAM_COUNT = 4; 360 enum int D3D12_SPEC_DATE_DAY = 14; 361 enum int D3D12_SPEC_DATE_MONTH = 11; 362 enum int D3D12_SPEC_DATE_YEAR = 2014; 363 enum float D3D12_SPEC_VERSION = 1.16; 364 enum float D3D12_SRGB_GAMMA = 2.2f; 365 enum float D3D12_SRGB_TO_float_DENOMINATOR_1 = 12.92f; 366 enum float D3D12_SRGB_TO_float_DENOMINATOR_2 = 1.055f; 367 enum float D3D12_SRGB_TO_float_EXPONENT = 2.4f; 368 enum float D3D12_SRGB_TO_float_OFFSET = 0.055f; 369 enum float D3D12_SRGB_TO_float_THRESHOLD = 0.04045f; 370 enum float D3D12_SRGB_TO_float_TOLERANCE_IN_ULP = 0.5f; 371 enum int D3D12_STANDARD_COMPONENT_BIT_COUNT = 32; 372 enum int D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64; 373 enum int D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4; 374 enum int D3D12_STANDARD_PIXEL_COMPONENT_COUNT = 128; 375 enum int D3D12_STANDARD_PIXEL_ELEMENT_COUNT = 32; 376 enum int D3D12_STANDARD_VECTOR_SIZE = 4; 377 enum int D3D12_STANDARD_VERTEX_ELEMENT_COUNT = 32; 378 enum int D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64; 379 enum int D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8; 380 enum int D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT = 8; 381 enum int D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff; 382 enum int D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff0; 383 enum int D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = 64; 384 enum int D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = 64; 385 enum int D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = 63; 386 enum int D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR = 64; 387 enum int D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = 2; 388 enum int D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = 1; 389 enum int D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = 1; 390 enum int D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT = 16; 391 enum int D3D12_TEXTURE_DATA_PITCH_ALIGNMENT = 256; 392 enum int D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT = 512; 393 enum int D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES = 65536; 394 enum int D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT = 4096; 395 enum int D3D12_UAV_SLOT_COUNT = 64; 396 enum int D3D12_UNBOUND_MEMORY_ACCESS_RESULT = 0; 397 enum int D3D12_VIDEO_DECODE_MAX_ARGUMENTS = 10; 398 enum int D3D12_VIDEO_DECODE_STATUS_MACROBLOCKS_AFFECTED_UNKNOWN = 0xffffffff; 399 enum int D3D12_VIDEO_PROCESS_MAX_FILTERS = 32; 400 enum int D3D12_VIDEO_PROCESS_STEREO_VIEWS = 2; 401 enum int D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15; 402 enum int D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16; 403 enum int D3D12_VIEWPORT_BOUNDS_MAX = 32767; 404 enum int D3D12_VIEWPORT_BOUNDS_MIN = -32768; 405 enum int D3D12_VS_INPUT_REGISTER_COMPONENTS = 4; 406 enum int D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 407 enum int D3D12_VS_INPUT_REGISTER_COUNT = 32; 408 enum int D3D12_VS_INPUT_REGISTER_READS_PER_INST = 2; 409 enum int D3D12_VS_INPUT_REGISTER_READ_PORTS = 1; 410 enum int D3D12_VS_OUTPUT_REGISTER_COMPONENTS = 4; 411 enum int D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32; 412 enum int D3D12_VS_OUTPUT_REGISTER_COUNT = 32; 413 enum int D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10; 414 enum int D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25; 415 enum int D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25; 416 417 enum int D3D12_SHADER_COMPONENT_MAPPING_MASK = 0x7; 418 enum int D3D12_SHADER_COMPONENT_MAPPING_SHIFT = 3; 419 enum int D3D12_FILTER_REDUCTION_TYPE_MASK = 0x3; 420 enum int D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7; 421 enum int D3D12_FILTER_TYPE_MASK = 0x3; 422 enum int D3D12_MIN_FILTER_SHIFT = 4; 423 enum int D3D12_MAG_FILTER_SHIFT = 2; 424 enum int D3D12_MIP_FILTER_SHIFT = 0; 425 enum int D3D12_ANISOTROPIC_FILTERING_BIT = 0x40; 426 427 const IID D3D12ExperimentalShaderModels = { 0x76f5573e, 0xf13a, 0x40f5, [0xb2, 0x97, 0x81, 0xce, 0x9e, 0x18, 0x93, 0x3f]}; 428 429 alias ulong D3D12_GPU_VIRTUAL_ADDRESS; 430 alias D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY; 431 alias D3D_PRIMITIVE D3D12_PRIMITIVE; 432 alias RECT D3D12_RECT; 433 434 435 /// 436 /// Mixins 437 /// 438 439 ///This macros have not yet been converted to mixins 440 /* 441 #define D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES (1<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*4)) 442 #define D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(Src0,Src1,Src2,Src3) ((((Src0)&D3D12_SHADER_COMPONENT_MAPPING_MASK)| \ 443 (((Src1)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<<D3D12_SHADER_COMPONENT_MAPPING_SHIFT)| \ 444 (((Src2)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*2))| \ 445 (((Src3)&D3D12_SHADER_COMPONENT_MAPPING_MASK)<<(D3D12_SHADER_COMPONENT_MAPPING_SHIFT*3))| \ 446 D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES)) 447 #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)) 448 #define D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0,1,2,3) 449 #define D3D12_ENCODE_BASIC_FILTER( min, mag, mip, reduction ) \ 450 ( ( D3D12_FILTER ) ( \ 451 ( ( ( min ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MIN_FILTER_SHIFT ) | \ 452 ( ( ( mag ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MAG_FILTER_SHIFT ) | \ 453 ( ( ( mip ) & D3D12_FILTER_TYPE_MASK ) << D3D12_MIP_FILTER_SHIFT ) | \ 454 ( ( ( reduction ) & D3D12_FILTER_REDUCTION_TYPE_MASK ) << D3D12_FILTER_REDUCTION_TYPE_SHIFT ) ) ) 455 #define D3D12_ENCODE_ANISOTROPIC_FILTER( reduction ) \ 456 ( ( D3D12_FILTER ) ( \ 457 D3D12_ANISOTROPIC_FILTERING_BIT | \ 458 D3D12_ENCODE_BASIC_FILTER( D3D12_FILTER_TYPE_LINEAR, \ 459 D3D12_FILTER_TYPE_LINEAR, \ 460 D3D12_FILTER_TYPE_LINEAR, \ 461 reduction ) ) ) 462 #define D3D12_DECODE_MIN_FILTER( D3D12Filter ) \ 463 ( ( D3D12_FILTER_TYPE ) \ 464 ( ( ( D3D12Filter ) >> D3D12_MIN_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) 465 #define D3D12_DECODE_MAG_FILTER( D3D12Filter ) \ 466 ( ( D3D12_FILTER_TYPE ) \ 467 ( ( ( D3D12Filter ) >> D3D12_MAG_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) 468 #define D3D12_DECODE_MIP_FILTER( D3D12Filter ) \ 469 ( ( D3D12_FILTER_TYPE ) \ 470 ( ( ( D3D12Filter ) >> D3D12_MIP_FILTER_SHIFT ) & D3D12_FILTER_TYPE_MASK ) ) 471 #define D3D12_DECODE_FILTER_REDUCTION( D3D12Filter ) \ 472 ( ( D3D12_FILTER_REDUCTION_TYPE ) \ 473 ( ( ( D3D12Filter ) >> D3D12_FILTER_REDUCTION_TYPE_SHIFT ) & D3D12_FILTER_REDUCTION_TYPE_MASK ) ) 474 #define D3D12_DECODE_IS_COMPARISON_FILTER( D3D12Filter ) \ 475 ( D3D12_DECODE_FILTER_REDUCTION( D3D12Filter ) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON ) 476 #define D3D12_DECODE_IS_ANISOTROPIC_FILTER( D3D12Filter ) \ 477 ( ( ( D3D12Filter ) & D3D12_ANISOTROPIC_FILTERING_BIT ) && \ 478 ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIN_FILTER( D3D12Filter ) ) && \ 479 ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MAG_FILTER( D3D12Filter ) ) && \ 480 ( D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIP_FILTER( D3D12Filter ) ) ) 481 */ 482 483 /// 484 /// Functions 485 /// 486 487 HRESULT D3D12CreateDevice(IUnknown pAdapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, REFIID riid, void** ppDevice ); 488 HRESULT D3D12GetDebugInterface(REFIID riid, void** ppvDebug); 489 HRESULT D3D12EnableExperimentalFeatures(uint NumFeatures, const IID* pIIDs, void* pConfigurationStructs, uint* pConfigurationStructSizes); 490 HRESULT D3D12SerializeRootSignature(const D3D12_ROOT_SIGNATURE_DESC* pRootSignature, D3D_ROOT_SIGNATURE_VERSION Version, ID3DBlob* ppBlob, ID3DBlob* ppErrorBlob); 491 HRESULT D3D12CreateRootSignatureDeserializer(const void *pSrcData, size_t SrcDataSizeInBytes, REFIID pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer); 492 HRESULT D3D12SerializeVersionedRootSignature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature, ID3DBlob* ppBlob, ID3DBlob* ppErrorBlob); 493 HRESULT D3D12CreateVersionedRootSignatureDeserializer(const void *pSrcData, size_t SrcDataSizeInBytes, REFIID pRootSignatureDeserializerInterface, void** ppRootSignatureDeserializer); 494 495 /// 496 /// Enumerations 497 /// 498 499 enum D3D12_COMMAND_LIST_TYPE 500 { 501 DIRECT= 0, 502 BUNDLE= 1, 503 COMPUTE= 2, 504 COPY= 3, 505 VIDEO_DECODE= 4, 506 VIDEO_PROCESS= 5 507 } 508 509 enum D3D12_COMMAND_QUEUE_FLAGS 510 { 511 NONE = 0, 512 DISABLE_GPU_TIMEOUT= 0x1 513 } 514 515 enum D3D12_COMMAND_QUEUE_PRIORITY 516 { 517 NORMAL= 0, 518 HIGH= 100, 519 GLOBAL_REALTIME= 10000 520 } 521 522 enum D3D12_PRIMITIVE_TOPOLOGY_TYPE 523 { 524 UNDEFINED= 0, 525 POINT= 1, 526 LINE= 2, 527 TRIANGLE= 3, 528 PATCH= 4 529 } 530 531 enum D3D12_INPUT_CLASSIFICATION 532 { 533 PER_VERTEX_DATA= 0, 534 PER_INSTANCE_DATA= 1 535 } 536 537 enum D3D12_FILL_MODE 538 { 539 D3D12_FILL_MODE_WIREFRAME= 2, 540 D3D12_FILL_MODE_SOLID= 3 541 } 542 543 enum D3D12_CULL_MODE 544 { 545 NONE= 1, 546 FRONT= 2, 547 BACK= 3 548 } 549 550 enum D3D12_COMPARISON_FUNC 551 { 552 NEVER = 1, 553 LESS = 2, 554 EQUAL = 3, 555 LESS_EQUAL = 4, 556 GREATER = 5, 557 NOT_EQUAL = 6, 558 GREATER_EQUAL = 7, 559 ALWAYS = 8 560 } 561 562 enum D3D12_DEPTH_WRITE_MASK 563 { 564 ZERO = 0, 565 ALL = 1 566 } 567 568 enum D3D12_STENCIL_OP 569 { 570 KEEP = 1, 571 ZERO = 2, 572 REPLACE = 3, 573 INCR_SAT = 4, 574 DECR_SAT = 5, 575 INVERT = 6, 576 INCR = 7, 577 DECR = 8 578 } 579 580 enum D3D12_BLEND 581 { 582 ZERO = 1, 583 ONE = 2, 584 SRC_COLOR = 3, 585 INV_SRC_COLOR = 4, 586 SRC_ALPHA = 5, 587 INV_SRC_ALPHA = 6, 588 DEST_ALPHA = 7, 589 INV_DEST_ALPHA = 8, 590 DEST_COLOR = 9, 591 INV_DEST_COLOR = 10, 592 SRC_ALPHA_SAT = 11, 593 BLEND_FACTOR = 14, 594 INV_BLEND_FACTOR = 15, 595 SRC1_COLOR = 16, 596 INV_SRC1_COLOR = 17, 597 SRC1_ALPHA = 18, 598 INV_SRC1_ALPHA = 19 599 } 600 601 enum D3D12_BLEND_OP 602 { 603 ADD = 1, 604 SUBTRACT = 2, 605 REV_SUBTRACT = 3, 606 MIN = 4, 607 MAX = 5 608 } 609 610 enum D3D12_COLOR_WRITE_ENABLE 611 { 612 RED = 1, 613 GREEN = 2, 614 BLUE = 4, 615 ALPHA = 8, 616 ALL = ( ( ( RED | GREEN ) | BLUE ) | ALPHA ) 617 } 618 619 enum D3D12_LOGIC_OP 620 { 621 CLEAR = 0, 622 SET = ( CLEAR + 1 ), 623 COPY = ( SET + 1 ), 624 COPY_INVERTED = ( COPY + 1 ), 625 NOOP = ( COPY_INVERTED + 1 ), 626 INVERT = ( NOOP + 1 ), 627 AND = ( INVERT + 1 ), 628 NAND = ( AND + 1 ), 629 OR = ( NAND + 1 ), 630 NOR = ( OR + 1 ), 631 XOR = ( NOR + 1 ), 632 EQUIV = ( XOR + 1 ), 633 AND_REVERSE = ( EQUIV + 1 ), 634 AND_INVERTED = ( AND_REVERSE + 1 ), 635 OR_REVERSE = ( AND_INVERTED + 1 ), 636 OR_INVERTED = ( OR_REVERSE + 1 ) } 637 638 enum D3D12_CONSERVATIVE_RASTERIZATION_MODE 639 { 640 OFF = 0, 641 ON = 1 642 } 643 644 enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE 645 { 646 VALUE_DISABLED = 0, 647 VALUE_0xFFFF = 1, 648 VALUE_0xFFFFFFFF = 2 649 } 650 651 enum D3D12_PIPELINE_STATE_FLAGS 652 { 653 NONE = 0, 654 TOOL_DEBUG = 0x1 655 } 656 657 enum D3D12_PIPELINE_STATE_SUBOBJECT_TYPE 658 { 659 ROOT_SIGNATURE = 0, 660 VS = ( ROOT_SIGNATURE + 1 ), 661 PS = ( VS + 1 ), 662 DS = ( PS + 1 ), 663 HS = ( DS + 1 ), 664 GS = ( HS + 1 ), 665 CS = ( GS + 1 ), 666 STREAM_OUTPUT = ( CS + 1 ), 667 BLEND = ( STREAM_OUTPUT + 1 ), 668 SAMPLE_MASK = ( BLEND + 1 ), 669 RASTERIZER = ( SAMPLE_MASK + 1 ), 670 DEPTH_STENCIL = ( RASTERIZER + 1 ), 671 INPUT_LAYOUT = ( DEPTH_STENCIL + 1 ), 672 IB_STRIP_CUT_VALUE = ( INPUT_LAYOUT + 1 ), 673 PRIMITIVE_TOPOLOGY = ( IB_STRIP_CUT_VALUE + 1 ), 674 RENDER_TARGET_FORMATS = ( PRIMITIVE_TOPOLOGY + 1 ), 675 DEPTH_STENCIL_FORMAT = ( RENDER_TARGET_FORMATS + 1 ), 676 SAMPLE_DESC = ( DEPTH_STENCIL_FORMAT + 1 ), 677 NODE_MASK = ( SAMPLE_DESC + 1 ), 678 CACHED_PSO = ( NODE_MASK + 1 ), 679 FLAGS = ( CACHED_PSO + 1 ), 680 DEPTH_STENCIL1 = ( FLAGS + 1 ), 681 VIEW_INSTANCING = ( DEPTH_STENCIL1 + 1 ), 682 MAX_VALID = ( VIEW_INSTANCING + 1 ) 683 } 684 685 enum D3D12_FEATURE 686 { 687 D3D12_OPTIONS = 0, 688 ARCHITECTURE = 1, 689 FEATURE_LEVELS = 2, 690 FORMAT_SUPPORT = 3, 691 MULTISAMPLE_QUALITY_LEVELS = 4, 692 FORMAT_INFO = 5, 693 GPU_VIRTUAL_ADDRESS_SUPPORT = 6, 694 SHADER_MODEL = 7, 695 D3D12_OPTIONS1 = 8, 696 ROOT_SIGNATURE = 12, 697 ARCHITECTURE1 = 16, 698 D3D12_OPTIONS2 = 18, 699 SHADER_CACHE = 19, 700 COMMAND_QUEUE_PRIORITY = 20, 701 D3D12_OPTIONS3 = 21, 702 EXISTING_HEAPS = 22 703 } 704 705 enum D3D12_SHADER_MIN_PRECISION_SUPPORT 706 { 707 SUPPORT_NONE = 0, 708 SUPPORT_10_BIT = 0x1, 709 SUPPORT_16_BIT = 0x2 710 } 711 712 enum D3D12_TILED_RESOURCES_TIER 713 { 714 TIER_NOT_SUPPORTED = 0, 715 TIER_1 = 1, 716 TIER_2 = 2, 717 TIER_3 = 3 718 } 719 720 enum D3D12_RESOURCE_BINDING_TIER 721 { 722 TIER_1 = 1, 723 TIER_2 = 2, 724 TIER_3 = 3 725 } 726 727 enum D3D12_CONSERVATIVE_RASTERIZATION_TIER 728 { 729 TIER_NOT_SUPPORTED = 0, 730 TIER_1 = 1, 731 TIER_2 = 2, 732 TIER_3 = 3 733 } 734 735 enum D3D12_FORMAT_SUPPORT1 736 { 737 NONE = 0, 738 BUFFER = 0x1, 739 IA_VERTEX_BUFFER = 0x2, 740 IA_INDEX_BUFFER = 0x4, 741 SO_BUFFER = 0x8, 742 TEXTURE1D = 0x10, 743 TEXTURE2D = 0x20, 744 TEXTURE3D = 0x40, 745 TEXTURECUBE = 0x80, 746 SHADER_LOAD = 0x100, 747 SHADER_SAMPLE = 0x200, 748 SHADER_SAMPLE_COMPARISON = 0x400, 749 SHADER_SAMPLE_MONO_TEXT = 0x800, 750 MIP = 0x1000, 751 RENDER_TARGET = 0x4000, 752 BLENDABLE = 0x8000, 753 DEPTH_STENCIL = 0x10000, 754 MULTISAMPLE_RESOLVE = 0x40000, 755 DISPLAY = 0x80000, 756 CAST_WITHIN_BIT_LAYOUT = 0x100000, 757 MULTISAMPLE_RENDERTARGET = 0x200000, 758 MULTISAMPLE_LOAD = 0x400000, 759 SHADER_GATHER = 0x800000, 760 BACK_BUFFER_CAST = 0x1000000, 761 TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, 762 SHADER_GATHER_COMPARISON = 0x4000000, 763 DECODER_OUTPUT = 0x8000000, 764 VIDEO_PROCESSOR_OUTPUT = 0x10000000, 765 VIDEO_PROCESSOR_INPUT = 0x20000000, 766 VIDEO_ENCODER = 0x40000000 767 } 768 769 enum D3D12_FORMAT_SUPPORT2 770 { 771 NONE = 0, 772 UAV_ATOMIC_ADD = 0x1, 773 UAV_ATOMIC_BITWISE_OPS = 0x2, 774 UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, 775 UAV_ATOMIC_EXCHANGE = 0x8, 776 UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, 777 UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, 778 UAV_TYPED_LOAD = 0x40, 779 UAV_TYPED_STORE = 0x80, 780 OUTPUT_MERGER_LOGIC_OP = 0x100, 781 TILED = 0x200, 782 MULTIPLANE_OVERLAY = 0x4000 783 } 784 785 enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS 786 { 787 NONE = 0, 788 TILED_RESOURCE = 0x1 789 } 790 791 enum D3D12_CROSS_NODE_SHARING_TIER 792 { 793 TIER_NOT_SUPPORTED = 0, 794 TIER_1_EMULATED = 1, 795 TIER_1 = 2, 796 TIER_2 = 3 797 } 798 799 enum D3D12_RESOURCE_HEAP_TIER 800 { 801 TIER_1 = 1, 802 TIER_2 = 2 803 } 804 805 enum D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER 806 { 807 TIER_NOT_SUPPORTED = 0, 808 TIER_1 = 1, 809 TIER_2 = 2 810 } 811 812 enum D3D12_VIEW_INSTANCING_TIER 813 { 814 TIER_NOT_SUPPORTED = 0, 815 TIER_1 = 1, 816 TIER_2 = 2, 817 TIER_3 = 3 818 } 819 820 enum D3D_ROOT_SIGNATURE_VERSION 821 { 822 VERSION_1 = 0x1, 823 VERSION_1_0 = 0x1, 824 VERSION_1_1 = 0x2 825 } 826 827 enum D3D_SHADER_MODEL 828 { 829 MODEL_5_1 = 0x51, 830 MODEL_6_0 = 0x60, 831 MODEL_6_1 = 0x61 832 } 833 834 enum D3D12_SHADER_CACHE_SUPPORT_FLAGS 835 { 836 NONE = 0, 837 SINGLE_PSO = 0x1, 838 LIBRARY = 0x2, 839 AUTOMATIC_INPROC_CACHE = 0x4, 840 AUTOMATIC_DISK_CACHE = 0x8 841 } 842 843 enum D3D12_COMMAND_LIST_SUPPORT_FLAGS 844 { 845 NONE = 0, 846 DIRECT = ( 1 << D3D12_COMMAND_LIST_TYPE.DIRECT ), 847 BUNDLE = ( 1 << D3D12_COMMAND_LIST_TYPE.BUNDLE ), 848 COMPUTE = ( 1 << D3D12_COMMAND_LIST_TYPE.COMPUTE ), 849 COPY = ( 1 << D3D12_COMMAND_LIST_TYPE.COPY ), 850 VIDEO_DECODE = ( 1 << D3D12_COMMAND_LIST_TYPE.VIDEO_DECODE ), 851 VIDEO_PROCESS = ( 1 << D3D12_COMMAND_LIST_TYPE.VIDEO_PROCESS ) 852 } 853 854 enum D3D12_HEAP_TYPE 855 { 856 DEFAULT = 1, 857 UPLOAD = 2, 858 READBACK = 3, 859 CUSTOM = 4 860 } 861 862 enum D3D12_CPU_PAGE_PROPERTY 863 { 864 UNKNOWN = 0, 865 NOT_AVAILABLE = 1, 866 WRITE_COMBINE = 2, 867 WRITE_BACK = 3 868 } 869 870 enum D3D12_MEMORY_POOL 871 { 872 POOL_UNKNOWN = 0, 873 POOL_L0 = 1, 874 POOL_L1 = 2 875 } 876 877 enum D3D12_HEAP_FLAGS 878 { 879 NONE = 0, 880 SHARED = 0x1, 881 DENY_BUFFERS = 0x4, 882 ALLOW_DISPLAY = 0x8, 883 SHARED_CROSS_ADAPTER = 0x20, 884 DENY_RT_DS_TEXTURES = 0x40, 885 DENY_NON_RT_DS_TEXTURES = 0x80, 886 HARDWARE_PROTECTED = 0x100, 887 ALLOW_WRITE_WATCH = 0x200, 888 ALLOW_ALL_BUFFERS_AND_TEXTURES = 0, 889 ALLOW_ONLY_BUFFERS = 0xc0, 890 ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44, 891 ALLOW_ONLY_RT_DS_TEXTURES = 0x84 892 } 893 894 enum D3D12_RESOURCE_DIMENSION 895 { 896 UNKNOWN = 0, 897 BUFFER = 1, 898 TEXTURE1D = 2, 899 TEXTURE2D = 3, 900 TEXTURE3D = 4 901 } 902 903 enum D3D12_TEXTURE_LAYOUT 904 { 905 LAYOUT_UNKNOWN = 0, 906 LAYOUT_ROW_MAJOR = 1, 907 LAYOUT_64KB_UNDEFINED_SWIZZLE = 2, 908 LAYOUT_64KB_STANDARD_SWIZZLE = 3 909 } 910 911 enum D3D12_RESOURCE_FLAGS 912 { 913 NONE = 0, 914 ALLOW_RENDER_TARGET = 0x1, 915 ALLOW_DEPTH_STENCIL = 0x2, 916 ALLOW_UNORDERED_ACCESS = 0x4, 917 DENY_SHADER_RESOURCE = 0x8, 918 ALLOW_CROSS_ADAPTER = 0x10, 919 ALLOW_SIMULTANEOUS_ACCESS = 0x20, 920 VIDEO_DECODE_REFERENCE_ONLY = 0x40 921 } 922 923 enum D3D12_TILE_RANGE_FLAGS 924 { 925 NONE = 0, 926 NULL = 1, 927 SKIP = 2, 928 REUSE_SINGLE_TILE = 4 929 } 930 931 enum D3D12_TILE_MAPPING_FLAGS 932 { 933 NONE = 0, 934 NO_HAZARD = 0x1 935 } 936 937 enum D3D12_TILE_COPY_FLAGS 938 { 939 NONE = 0, 940 NO_HAZARD = 0x1, 941 LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, 942 SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4 943 } 944 945 enum D3D12_RESOURCE_STATES 946 { 947 COMMON = 0, 948 VERTEX_AND_CONSTANT_BUFFER = 0x1, 949 INDEX_BUFFER = 0x2, 950 RENDER_TARGET = 0x4, 951 UNORDERED_ACCESS = 0x8, 952 DEPTH_WRITE = 0x10, 953 DEPTH_READ = 0x20, 954 NON_PIXEL_SHADER_RESOURCE = 0x40, 955 PIXEL_SHADER_RESOURCE = 0x80, 956 STREAM_OUT = 0x100, 957 INDIRECT_ARGUMENT = 0x200, 958 COPY_DEST = 0x400, 959 COPY_SOURCE = 0x800, 960 RESOLVE_DEST = 0x1000, 961 RESOLVE_SOURCE = 0x2000, 962 GENERIC_READ = ( ( ( ( ( 0x1 | 0x2 ) | 0x40 ) | 0x80 ) | 0x200 ) | 0x800 ) , 963 PRESENT = 0, 964 PREDICATION = 0x200, 965 VIDEO_DECODE_READ = 0x10000, 966 VIDEO_DECODE_WRITE = 0x20000, 967 VIDEO_PROCESS_READ = 0x40000, 968 VIDEO_PROCESS_WRITE = 0x80000 969 } 970 971 enum D3D12_RESOURCE_BARRIER_TYPE 972 { 973 TRANSITION = 0, 974 ALIASING = ( TRANSITION + 1 ) , 975 UAV = ( ALIASING + 1 ) 976 } 977 978 enum D3D12_RESOURCE_BARRIER_FLAGS 979 { 980 NONE = 0, 981 BEGIN_ONLY = 0x1, 982 END_ONLY = 0x2 983 } 984 985 enum D3D12_TEXTURE_COPY_TYPE 986 { 987 SUBRESOURCE_INDEX = 0, 988 PLACED_FOOTPRINT = 1 989 } 990 991 enum D3D12_RESOLVE_MODE 992 { 993 DECOMPRESS = 0, 994 MIN = 1, 995 MAX = 2, 996 AVERAGE = 3 997 } 998 999 enum D3D12_VIEW_INSTANCING_FLAGS 1000 { 1001 NONE = 0, 1002 ENABLE_VIEW_INSTANCE_MASKING = 0x1 1003 } 1004 1005 enum D3D12_SHADER_COMPONENT_MAPPING 1006 { 1007 FROM_MEMORY_COMPONENT_0 = 0, 1008 FROM_MEMORY_COMPONENT_1 = 1, 1009 FROM_MEMORY_COMPONENT_2 = 2, 1010 FROM_MEMORY_COMPONENT_3 = 3, 1011 FORCE_VALUE_0 = 4, 1012 FORCE_VALUE_1 = 5 1013 } 1014 1015 enum D3D12_BUFFER_SRV_FLAGS 1016 { 1017 NONE = 0, 1018 RAW = 0x1 1019 } 1020 1021 enum D3D12_SRV_DIMENSION 1022 { 1023 UNKNOWN = 0, 1024 BUFFER = 1, 1025 TEXTURE1D = 2, 1026 TEXTURE1DARRAY = 3, 1027 TEXTURE2D = 4, 1028 TEXTURE2DARRAY = 5, 1029 TEXTURE2DMS = 6, 1030 TEXTURE2DMSARRAY = 7, 1031 TEXTURE3D = 8, 1032 TEXTURECUBE = 9, 1033 TEXTURECUBEARRAY = 10 1034 } 1035 1036 enum D3D12_FILTER 1037 { 1038 MIN_MAG_MIP_POINT = 0, 1039 MIN_MAG_POINT_MIP_LINEAR = 0x1, 1040 MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, 1041 MIN_POINT_MAG_MIP_LINEAR = 0x5, 1042 MIN_LINEAR_MAG_MIP_POINT = 0x10, 1043 MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, 1044 MIN_MAG_LINEAR_MIP_POINT = 0x14, 1045 MIN_MAG_MIP_LINEAR = 0x15, 1046 ANISOTROPIC = 0x55, 1047 COMPARISON_MIN_MAG_MIP_POINT = 0x80, 1048 COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, 1049 COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, 1050 COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, 1051 COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, 1052 COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, 1053 COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, 1054 COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, 1055 COMPARISON_ANISOTROPIC = 0xd5, 1056 MINIMUM_MIN_MAG_MIP_POINT = 0x100, 1057 MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101, 1058 MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104, 1059 MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105, 1060 MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110, 1061 MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111, 1062 MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114, 1063 MINIMUM_MIN_MAG_MIP_LINEAR = 0x115, 1064 MINIMUM_ANISOTROPIC = 0x155, 1065 MAXIMUM_MIN_MAG_MIP_POINT = 0x180, 1066 MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181, 1067 MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184, 1068 MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185, 1069 MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190, 1070 MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191, 1071 MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194, 1072 MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195, 1073 MAXIMUM_ANISOTROPIC = 0x1d5 1074 } 1075 1076 enum D3D12_FILTER_TYPE 1077 { 1078 POINT = 0, 1079 LINEAR = 1 1080 } 1081 1082 enum REDUCTION_TYPE 1083 { 1084 STANDARD = 0, 1085 COMPARISON = 1, 1086 MINIMUM = 2, 1087 MAXIMUM = 3 1088 } 1089 1090 enum D3D12_TEXTURE_ADDRESS_MODE 1091 { 1092 WRAP = 1, 1093 MIRROR = 2, 1094 CLAMP = 3, 1095 BORDER = 4, 1096 MIRROR_ONCE = 5 1097 } 1098 1099 enum D3D12_BUFFER_UAV_FLAGS 1100 { 1101 NONE = 0, 1102 RAW = 0x1 1103 } 1104 1105 enum D3D12_UAV_DIMENSION 1106 { 1107 UNKNOWN = 0, 1108 BUFFER = 1, 1109 TEXTURE1D = 2, 1110 TEXTURE1DARRAY = 3, 1111 TEXTURE2D = 4, 1112 TEXTURE2DARRAY = 5, 1113 TEXTURE3D = 8 1114 } 1115 1116 enum D3D12_RTV_DIMENSION 1117 { 1118 UNKNOWN = 0, 1119 BUFFER = 1, 1120 TEXTURE1D = 2, 1121 TEXTURE1DARRAY = 3, 1122 TEXTURE2D = 4, 1123 TEXTURE2DARRAY = 5, 1124 TEXTURE2DMS = 6, 1125 TEXTURE2DMSARRAY = 7, 1126 TEXTURE3D = 8 1127 } 1128 1129 enum D3D12_DSV_FLAGS 1130 { 1131 NONE = 0, 1132 READ_ONLY_DEPTH = 0x1, 1133 READ_ONLY_STENCIL = 0x2 1134 } 1135 1136 enum D3D12_DSV_DIMENSION 1137 { 1138 UNKNOWN = 0, 1139 TEXTURE1D = 1, 1140 TEXTURE1DARRAY = 2, 1141 TEXTURE2D = 3, 1142 TEXTURE2DARRAY = 4, 1143 TEXTURE2DMS = 5, 1144 TEXTURE2DMSARRAY = 6 1145 } 1146 1147 enum D3D12_CLEAR_FLAGS 1148 { 1149 DEPTH = 0x1, 1150 STENCIL = 0x2 1151 } 1152 1153 enum D3D12_FENCE_FLAGS 1154 { 1155 NONE = 0, 1156 SHARED = 0x1, 1157 SHARED_CROSS_ADAPTER = 0x2, 1158 NON_MONITORED = 0x4 1159 } 1160 1161 enum D3D12_DESCRIPTOR_HEAP_TYPE 1162 { 1163 CBV_SRV_UAV = 0, 1164 SAMPLER = ( CBV_SRV_UAV + 1 ) , 1165 RTV = ( SAMPLER + 1 ) , 1166 DSV = ( RTV + 1 ) , 1167 NUM_TYPES = ( DSV + 1 ) 1168 } 1169 1170 enum D3D12_DESCRIPTOR_HEAP_FLAGS 1171 { 1172 NONE = 0, 1173 SHADER_VISIBLE = 0x1 1174 } 1175 1176 enum D3D12_DESCRIPTOR_RANGE_TYPE 1177 { 1178 SRV = 0, 1179 UAV = ( SRV + 1 ) , 1180 CBV = ( UAV + 1 ) , 1181 SAMPLER = ( CBV + 1 ) 1182 } 1183 1184 enum D3D12_SHADER_VISIBILITY 1185 { 1186 ALL = 0, 1187 VERTEX = 1, 1188 HULL = 2, 1189 DOMAIN = 3, 1190 GEOMETRY = 4, 1191 PIXEL = 5 1192 } 1193 1194 enum D3D12_ROOT_PARAMETER_TYPE 1195 { 1196 TYPE_DESCRIPTOR_TABLE = 0, 1197 TYPE_32BIT_CONSTANTS = ( TYPE_DESCRIPTOR_TABLE + 1 ) , 1198 TYPE_CBV = ( TYPE_32BIT_CONSTANTS + 1 ) , 1199 TYPE_SRV = ( TYPE_CBV + 1 ) , 1200 TYPE_UAV = ( TYPE_SRV + 1 ) 1201 } 1202 1203 enum D3D12_ROOT_SIGNATURE_FLAGS 1204 { 1205 NONE = 0, 1206 ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1, 1207 DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2, 1208 DENY_HULL_SHADER_ROOT_ACCESS = 0x4, 1209 DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8, 1210 DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10, 1211 DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20, 1212 ALLOW_STREAM_OUTPUT = 0x40 1213 } 1214 1215 enum D3D12_STATIC_BORDER_COLOR 1216 { 1217 TRANSPARENT_BLACK = 0, 1218 OPAQUE_BLACK = ( TRANSPARENT_BLACK + 1 ) , 1219 OPAQUE_WHITE = ( OPAQUE_BLACK + 1 ) 1220 } 1221 1222 enum D3D12_DESCRIPTOR_RANGE_FLAGS 1223 { 1224 NONE = 0, 1225 DESCRIPTORS_VOLATILE = 0x1, 1226 DATA_VOLATILE = 0x2, 1227 DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4, 1228 DATA_STATIC = 0x8 1229 } 1230 1231 enum D3D12_ROOT_DESCRIPTOR_FLAGS 1232 { 1233 NONE = 0, 1234 DATA_VOLATILE = 0x2, 1235 DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4, 1236 DATA_STATIC = 0x8 1237 } 1238 1239 enum D3D12_QUERY_HEAP_TYPE 1240 { 1241 OCCLUSION = 0, 1242 TIMESTAMP = 1, 1243 PIPELINE_STATISTICS = 2, 1244 SO_STATISTICS = 3, 1245 VIDEO_DECODE_STATISTICS = 4, 1246 COPY_QUEUE_TIMESTAMP = 5 1247 } 1248 1249 enum D3D12_QUERY_TYPE 1250 { 1251 OCCLUSION = 0, 1252 BINARY_OCCLUSION = 1, 1253 TIMESTAMP = 2, 1254 PIPELINE_STATISTICS = 3, 1255 SO_STATISTICS_STREAM0 = 4, 1256 SO_STATISTICS_STREAM1 = 5, 1257 SO_STATISTICS_STREAM2 = 6, 1258 SO_STATISTICS_STREAM3 = 7, 1259 VIDEO_DECODE_STATISTICS = 8 1260 } 1261 1262 enum D3D12_PREDICATION_OP 1263 { 1264 EQUAL_ZERO = 0, 1265 NOT_EQUAL_ZERO = 1 1266 } 1267 1268 enum D3D12_INDIRECT_ARGUMENT_TYPE 1269 { 1270 DRAW = 0, 1271 DRAW_INDEXED = ( DRAW + 1 ) , 1272 DISPATCH = ( DRAW_INDEXED + 1 ) , 1273 VERTEX_BUFFER_VIEW = ( DISPATCH + 1 ) , 1274 INDEX_BUFFER_VIEW = ( VERTEX_BUFFER_VIEW + 1 ) , 1275 CONSTANT = ( INDEX_BUFFER_VIEW + 1 ) , 1276 CONSTANT_BUFFER_VIEW = ( CONSTANT + 1 ) , 1277 SHADER_RESOURCE_VIEW = ( CONSTANT_BUFFER_VIEW + 1 ) , 1278 UNORDERED_ACCESS_VIEW = ( SHADER_RESOURCE_VIEW + 1 ) 1279 } 1280 1281 enum D3D12_WRITEBUFFERIMMEDIATE_MODE 1282 { 1283 DEFAULT = 0, 1284 MARKER_IN = 0x1, 1285 MARKER_OUT = 0x2 1286 } 1287 1288 enum D3D12_MULTIPLE_FENCE_WAIT_FLAGS 1289 { 1290 NONE = 0, 1291 ANY = 0x1, 1292 ALL = 0 1293 } 1294 1295 enum D3D12_RESIDENCY_PRIORITY 1296 { 1297 MINIMUM = 0x28000000, 1298 LOW = 0x50000000, 1299 NORMAL = 0x78000000, 1300 HIGH = 0xa0010000, 1301 MAXIMUM = 0xc8000000 1302 } 1303 1304 enum D3D12_RESIDENCY_FLAGS 1305 { 1306 NONE = 0, 1307 DENY_OVERBUDGET = 0x1 1308 } 1309 1310 /// 1311 /// Structures 1312 /// 1313 1314 struct D3D12_COMMAND_QUEUE_DESC 1315 { 1316 D3D12_COMMAND_LIST_TYPE Type; 1317 int Priority; 1318 D3D12_COMMAND_QUEUE_FLAGS Flags; 1319 uint NodeMask; 1320 } 1321 1322 struct D3D12_INPUT_ELEMENT_DESC 1323 { 1324 LPCSTR SemanticName; 1325 uint SemanticIndex; 1326 DXGI_FORMAT Format; 1327 uint InputSlot; 1328 uint AlignedByteOffset; 1329 D3D12_INPUT_CLASSIFICATION InputSlotClass; 1330 uint InstanceDataStepRate; 1331 } 1332 1333 struct D3D12_SO_DECLARATION_ENTRY 1334 { 1335 uint Stream; 1336 LPCSTR SemanticName; 1337 uint SemanticIndex; 1338 BYTE StartComponent; 1339 BYTE ComponentCount; 1340 BYTE OutputSlot; 1341 } 1342 1343 struct D3D12_VIEWPORT 1344 { 1345 float TopLeftX; 1346 float TopLeftY; 1347 float Width; 1348 float Height; 1349 float MinDepth; 1350 float MaxDepth; 1351 } 1352 1353 1354 struct D3D12_BOX 1355 { 1356 uint left; 1357 uint top; 1358 uint front; 1359 uint right; 1360 uint bottom; 1361 uint back; 1362 } 1363 1364 struct D3D12_DEPTH_STENCILOP_DESC 1365 { 1366 D3D12_STENCIL_OP StencilFailOp; 1367 D3D12_STENCIL_OP StencilDepthFailOp; 1368 D3D12_STENCIL_OP StencilPassOp; 1369 D3D12_COMPARISON_FUNC StencilFunc; 1370 } 1371 1372 struct D3D12_DEPTH_STENCIL_DESC 1373 { 1374 bool DepthEnable; 1375 D3D12_DEPTH_WRITE_MASK DepthWriteMask; 1376 D3D12_COMPARISON_FUNC DepthFunc; 1377 bool StencilEnable; 1378 ubyte StencilReadMask; 1379 ubyte StencilWriteMask; 1380 D3D12_DEPTH_STENCILOP_DESC FrontFace; 1381 D3D12_DEPTH_STENCILOP_DESC BackFace; 1382 } 1383 1384 struct D3D12_DEPTH_STENCIL_DESC1 1385 { 1386 bool DepthEnable; 1387 D3D12_DEPTH_WRITE_MASK DepthWriteMask; 1388 D3D12_COMPARISON_FUNC DepthFunc; 1389 bool StencilEnable; 1390 ubyte StencilReadMask; 1391 ubyte StencilWriteMask; 1392 D3D12_DEPTH_STENCILOP_DESC FrontFace; 1393 D3D12_DEPTH_STENCILOP_DESC BackFace; 1394 bool DepthBoundsTestEnable; 1395 } 1396 1397 struct D3D12_RENDER_TARGET_BLEND_DESC 1398 { 1399 bool BlendEnable; 1400 bool LogicOpEnable; 1401 D3D12_BLEND SrcBlend; 1402 D3D12_BLEND DestBlend; 1403 D3D12_BLEND_OP BlendOp; 1404 D3D12_BLEND SrcBlendAlpha; 1405 D3D12_BLEND DestBlendAlpha; 1406 D3D12_BLEND_OP BlendOpAlpha; 1407 D3D12_LOGIC_OP LogicOp; 1408 ubyte RenderTargetWriteMask; 1409 } 1410 1411 struct D3D12_BLEND_DESC 1412 { 1413 bool AlphaToCoverageEnable; 1414 bool IndependentBlendEnable; 1415 D3D12_RENDER_TARGET_BLEND_DESC[8] RenderTarget; 1416 } 1417 1418 struct D3D12_RASTERIZER_DESC 1419 { 1420 D3D12_FILL_MODE FillMode; 1421 D3D12_CULL_MODE CullMode; 1422 bool FrontCounterClockwise; 1423 int DepthBias; 1424 float DepthBiasClamp; 1425 float SlopeScaledDepthBias; 1426 bool DepthClipEnable; 1427 bool MultisampleEnable; 1428 bool AntialiasedLineEnable; 1429 uint ForcedSampleCount; 1430 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster; 1431 } 1432 1433 struct D3D12_SHADER_BYTECODE 1434 { 1435 const void *pShaderBytecode; 1436 size_t BytecodeLength; 1437 } 1438 1439 struct D3D12_STREAM_OUTPUT_DESC 1440 { 1441 const D3D12_SO_DECLARATION_ENTRY *pSODeclaration; 1442 uint NumEntries; 1443 const uint *pBufferStrides; 1444 uint NumStrides; 1445 uint RasterizedStream; 1446 } 1447 1448 struct D3D12_INPUT_LAYOUT_DESC 1449 { 1450 const D3D12_INPUT_ELEMENT_DESC *pInputElementDescs; 1451 uint NumElements; 1452 } 1453 1454 struct D3D12_CACHED_PIPELINE_STATE 1455 { 1456 const void *pCachedBlob; 1457 size_t CachedBlobSizeInBytes; 1458 } 1459 1460 struct D3D12_GRAPHICS_PIPELINE_STATE_DESC 1461 { 1462 ID3D12RootSignature pRootSignature; 1463 D3D12_SHADER_BYTECODE VS; 1464 D3D12_SHADER_BYTECODE PS; 1465 D3D12_SHADER_BYTECODE DS; 1466 D3D12_SHADER_BYTECODE HS; 1467 D3D12_SHADER_BYTECODE GS; 1468 D3D12_STREAM_OUTPUT_DESC StreamOutput; 1469 D3D12_BLEND_DESC BlendState; 1470 uint SampleMask; 1471 D3D12_RASTERIZER_DESC RasterizerState; 1472 D3D12_DEPTH_STENCIL_DESC DepthStencilState; 1473 D3D12_INPUT_LAYOUT_DESC InputLayout; 1474 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue; 1475 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType; 1476 uint NumRenderTargets; 1477 DXGI_FORMAT[8] RTVFormats; 1478 DXGI_FORMAT DSVFormat; 1479 DXGI_SAMPLE_DESC SampleDesc; 1480 uint NodeMask; 1481 D3D12_CACHED_PIPELINE_STATE CachedPSO; 1482 D3D12_PIPELINE_STATE_FLAGS Flags; 1483 } 1484 1485 struct D3D12_COMPUTE_PIPELINE_STATE_DESC 1486 { 1487 ID3D12RootSignature pRootSignature; 1488 D3D12_SHADER_BYTECODE CS; 1489 uint NodeMask; 1490 D3D12_CACHED_PIPELINE_STATE CachedPSO; 1491 D3D12_PIPELINE_STATE_FLAGS Flags; 1492 } 1493 1494 struct D3D12_RT_FORMAT_ARRAY 1495 { 1496 DXGI_FORMAT[8] RTFormats; 1497 uint NumRenderTargets; 1498 } 1499 1500 struct D3D12_PIPELINE_STATE_STREAM_DESC 1501 { 1502 size_t SizeInBytes; 1503 void *pPipelineStateSubobjectStream; 1504 } 1505 1506 struct D3D12_FEATURE_DATA_D3D12_OPTIONS 1507 { 1508 bool DoublePrecisionFloatShaderOps; 1509 bool OutputMergerLogicOp; 1510 D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport; 1511 D3D12_TILED_RESOURCES_TIER TiledResourcesTier; 1512 D3D12_RESOURCE_BINDING_TIER ResourceBindingTier; 1513 bool PSSpecifiedStencilRefSupported; 1514 bool TypedUAVLoadAdditionalFormats; 1515 bool ROVsSupported; 1516 D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier; 1517 uint MaxGPUVirtualAddressBitsPerResource; 1518 bool StandardSwizzle64KBSupported; 1519 D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier; 1520 bool CrossAdapterRowMajorTextureSupported; 1521 bool VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation; 1522 D3D12_RESOURCE_HEAP_TIER ResourceHeapTier; 1523 } 1524 1525 struct D3D12_FEATURE_DATA_D3D12_OPTIONS1 1526 { 1527 bool WaveOps; 1528 uint WaveLaneCountMin; 1529 uint WaveLaneCountMax; 1530 uint TotalLaneCount; 1531 bool ExpandedComputeResourceStates; 1532 bool Int64ShaderOps; 1533 } 1534 1535 struct D3D12_FEATURE_DATA_D3D12_OPTIONS2 1536 { 1537 bool DepthBoundsTestSupported; 1538 D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER ProgrammableSamplePositionsTier; 1539 } 1540 1541 struct D3D12_FEATURE_DATA_ROOT_SIGNATURE 1542 { 1543 D3D_ROOT_SIGNATURE_VERSION HighestVersion; 1544 } 1545 1546 struct D3D12_FEATURE_DATA_ARCHITECTURE 1547 { 1548 uint NodeIndex; 1549 bool TileBasedRenderer; 1550 bool UMA; 1551 bool CacheCoherentUMA; 1552 } 1553 1554 struct D3D12_FEATURE_DATA_ARCHITECTURE1 1555 { 1556 uint NodeIndex; 1557 bool TileBasedRenderer; 1558 bool UMA; 1559 bool CacheCoherentUMA; 1560 bool IsolatedMMU; 1561 } 1562 1563 struct D3D12_FEATURE_DATA_FEATURE_LEVELS 1564 { 1565 uint NumFeatureLevels; 1566 const D3D_FEATURE_LEVEL *pFeatureLevelsRequested; 1567 D3D_FEATURE_LEVEL MaxSupportedFeatureLevel; 1568 } 1569 1570 struct D3D12_FEATURE_DATA_SHADER_MODEL 1571 { 1572 D3D_SHADER_MODEL HighestShaderModel; 1573 } 1574 1575 struct D3D12_FEATURE_DATA_FORMAT_SUPPORT 1576 { 1577 DXGI_FORMAT Format; 1578 D3D12_FORMAT_SUPPORT1 Support1; 1579 D3D12_FORMAT_SUPPORT2 Support2; 1580 } 1581 1582 struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS 1583 { 1584 DXGI_FORMAT Format; 1585 uint SampleCount; 1586 D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags; 1587 uint NumQualityLevels; 1588 } 1589 1590 struct D3D12_FEATURE_DATA_FORMAT_INFO 1591 { 1592 DXGI_FORMAT Format; 1593 ubyte PlaneCount; 1594 } 1595 1596 struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT 1597 { 1598 uint MaxGPUVirtualAddressBitsPerResource; 1599 uint MaxGPUVirtualAddressBitsPerProcess; 1600 } 1601 1602 struct D3D12_FEATURE_DATA_SHADER_CACHE 1603 { 1604 D3D12_SHADER_CACHE_SUPPORT_FLAGS SupportFlags; 1605 } 1606 1607 struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY 1608 { 1609 D3D12_COMMAND_LIST_TYPE CommandListType; 1610 uint Priority; 1611 bool PriorityForTypeIsSupported; 1612 } 1613 1614 struct D3D12_FEATURE_DATA_D3D12_OPTIONS3 1615 { 1616 bool CopyQueueTimestampQueriesSupported; 1617 bool CastingFullyTypedFormatSupported; 1618 D3D12_COMMAND_LIST_SUPPORT_FLAGS WriteBufferImmediateSupportFlags; 1619 D3D12_VIEW_INSTANCING_TIER ViewInstancingTier; 1620 bool BarycentricsSupported; 1621 } 1622 1623 struct D3D12_FEATURE_DATA_EXISTING_HEAPS 1624 { 1625 bool Supported; 1626 } 1627 1628 struct D3D12_RESOURCE_ALLOCATION_INFO 1629 { 1630 ulong SizeInBytes; 1631 ulong Alignment; 1632 } 1633 1634 struct D3D12_HEAP_PROPERTIES 1635 { 1636 D3D12_HEAP_TYPE Type; 1637 D3D12_CPU_PAGE_PROPERTY CPUPageProperty; 1638 D3D12_MEMORY_POOL MemoryPoolPreference; 1639 uint CreationNodeMask; 1640 uint VisibleNodeMask; 1641 } 1642 1643 struct D3D12_HEAP_DESC 1644 { 1645 ulong SizeInBytes; 1646 D3D12_HEAP_PROPERTIES Properties; 1647 ulong Alignment; 1648 D3D12_HEAP_FLAGS Flags; 1649 } 1650 1651 struct D3D12_RESOURCE_DESC 1652 { 1653 D3D12_RESOURCE_DIMENSION Dimension; 1654 ulong Alignment; 1655 ulong Width; 1656 uint Height; 1657 ushort DepthOrArraySize; 1658 ushort MipLevels; 1659 DXGI_FORMAT Format; 1660 DXGI_SAMPLE_DESC SampleDesc; 1661 D3D12_TEXTURE_LAYOUT Layout; 1662 D3D12_RESOURCE_FLAGS Flags; 1663 } 1664 1665 struct D3D12_DEPTH_STENCIL_VALUE 1666 { 1667 float Depth; 1668 ubyte Stencil; 1669 } 1670 1671 struct D3D12_CLEAR_VALUE 1672 { 1673 DXGI_FORMAT Format; 1674 union 1675 { 1676 float[4] Color; 1677 D3D12_DEPTH_STENCIL_VALUE DepthStencil; 1678 } 1679 } 1680 1681 struct D3D12_RANGE 1682 { 1683 size_t Begin; 1684 size_t End; 1685 } 1686 1687 struct D3D12_RANGE_UINT64 1688 { 1689 ulong Begin; 1690 ulong End; 1691 } 1692 1693 struct D3D12_SUBRESOURCE_RANGE_UINT64 1694 { 1695 uint Subresource; 1696 D3D12_RANGE_UINT64 Range; 1697 } 1698 1699 struct D3D12_SUBRESOURCE_INFO 1700 { 1701 ulong Offset; 1702 uint RowPitch; 1703 uint DepthPitch; 1704 } 1705 1706 struct D3D12_TILED_RESOURCE_COORDINATE 1707 { 1708 uint X; 1709 uint Y; 1710 uint Z; 1711 uint Subresource; 1712 } 1713 1714 struct D3D12_TILE_REGION_SIZE 1715 { 1716 uint NumTiles; 1717 bool UseBox; 1718 uint Width; 1719 ushort Height; 1720 ushort Depth; 1721 } 1722 1723 struct D3D12_SUBRESOURCE_TILING 1724 { 1725 uint WidthInTiles; 1726 ushort HeightInTiles; 1727 ushort DepthInTiles; 1728 uint StartTileIndexInOverallResource; 1729 } 1730 1731 struct D3D12_TILE_SHAPE 1732 { 1733 uint WidthInTexels; 1734 uint HeightInTexels; 1735 uint DepthInTexels; 1736 } 1737 1738 struct D3D12_PACKED_MIP_INFO 1739 { 1740 ubyte NumStandardMips; 1741 ubyte NumPackedMips; 1742 uint NumTilesForPackedMips; 1743 uint StartTileIndexInOverallResource; 1744 } 1745 1746 struct D3D12_RESOURCE_TRANSITION_BARRIER 1747 { 1748 ID3D12Resource pResource; 1749 uint Subresource; 1750 D3D12_RESOURCE_STATES StateBefore; 1751 D3D12_RESOURCE_STATES StateAfter; 1752 } 1753 1754 struct D3D12_RESOURCE_ALIASING_BARRIER 1755 { 1756 ID3D12Resource pResourceBefore; 1757 ID3D12Resource pResourceAfter; 1758 } 1759 1760 struct D3D12_RESOURCE_UAV_BARRIER 1761 { 1762 ID3D12Resource pResource; 1763 } 1764 1765 struct D3D12_RESOURCE_BARRIER 1766 { 1767 D3D12_RESOURCE_BARRIER_TYPE Type; 1768 D3D12_RESOURCE_BARRIER_FLAGS Flags; 1769 union 1770 { 1771 D3D12_RESOURCE_TRANSITION_BARRIER Transition; 1772 D3D12_RESOURCE_ALIASING_BARRIER Aliasing; 1773 D3D12_RESOURCE_UAV_BARRIER UAV; 1774 } 1775 } 1776 1777 struct D3D12_SUBRESOURCE_FOOTPRINT 1778 { 1779 DXGI_FORMAT Format; 1780 uint Width; 1781 uint Height; 1782 uint Depth; 1783 uint RowPitch; 1784 } 1785 1786 struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT 1787 { 1788 ulong Offset; 1789 D3D12_SUBRESOURCE_FOOTPRINT Footprint; 1790 } 1791 1792 struct D3D12_TEXTURE_COPY_LOCATION 1793 { 1794 ID3D12Resource pResource; 1795 D3D12_TEXTURE_COPY_TYPE Type; 1796 union 1797 { 1798 D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint; 1799 uint SubresourceIndex; 1800 } 1801 } 1802 1803 struct D3D12_SAMPLE_POSITION 1804 { 1805 byte X; 1806 byte Y; 1807 } 1808 1809 struct D3D12_VIEW_INSTANCE_LOCATION 1810 { 1811 uint ViewportArrayIndex; 1812 uint RenderTargetArrayIndex; 1813 } 1814 1815 struct D3D12_VIEW_INSTANCING_DESC 1816 { 1817 uint ViewInstanceCount; 1818 const D3D12_VIEW_INSTANCE_LOCATION *pViewInstanceLocations; 1819 D3D12_VIEW_INSTANCING_FLAGS Flags; 1820 } 1821 1822 struct D3D12_BUFFER_SRV 1823 { 1824 ulong FirstElement; 1825 uint NumElements; 1826 uint StructureByteStride; 1827 D3D12_BUFFER_SRV_FLAGS Flags; 1828 } 1829 1830 struct D3D12_TEX1D_SRV 1831 { 1832 uint MostDetailedMip; 1833 uint MipLevels; 1834 float ResourceMinLODClamp; 1835 } 1836 1837 struct D3D12_TEX1D_ARRAY_SRV 1838 { 1839 uint MostDetailedMip; 1840 uint MipLevels; 1841 uint FirstArraySlice; 1842 uint ArraySize; 1843 float ResourceMinLODClamp; 1844 } 1845 1846 struct D3D12_TEX2D_SRV 1847 { 1848 uint MostDetailedMip; 1849 uint MipLevels; 1850 uint PlaneSlice; 1851 float ResourceMinLODClamp; 1852 } 1853 1854 struct D3D12_TEX2D_ARRAY_SRV 1855 { 1856 uint MostDetailedMip; 1857 uint MipLevels; 1858 uint FirstArraySlice; 1859 uint ArraySize; 1860 uint PlaneSlice; 1861 float ResourceMinLODClamp; 1862 } 1863 1864 struct D3D12_TEX3D_SRV 1865 { 1866 uint MostDetailedMip; 1867 uint MipLevels; 1868 float ResourceMinLODClamp; 1869 } 1870 1871 struct D3D12_TEXCUBE_SRV 1872 { 1873 uint MostDetailedMip; 1874 uint MipLevels; 1875 float ResourceMinLODClamp; 1876 } 1877 1878 struct D3D12_TEXCUBE_ARRAY_SRV 1879 { 1880 uint MostDetailedMip; 1881 uint MipLevels; 1882 uint First2DArrayFace; 1883 uint NumCubes; 1884 float ResourceMinLODClamp; 1885 } 1886 1887 struct D3D12_TEX2DMS_SRV 1888 { 1889 uint UnusedField_NothingToDefine; 1890 } 1891 1892 struct D3D12_TEX2DMS_ARRAY_SRV 1893 { 1894 uint FirstArraySlice; 1895 uint ArraySize; 1896 } 1897 1898 struct D3D12_SHADER_RESOURCE_VIEW_DESC 1899 { 1900 DXGI_FORMAT Format; 1901 D3D12_SRV_DIMENSION ViewDimension; 1902 uint Shader4ComponentMapping; 1903 union 1904 { 1905 D3D12_BUFFER_SRV Buffer; 1906 D3D12_TEX1D_SRV Texture1D; 1907 D3D12_TEX1D_ARRAY_SRV Texture1DArray; 1908 D3D12_TEX2D_SRV Texture2D; 1909 D3D12_TEX2D_ARRAY_SRV Texture2DArray; 1910 D3D12_TEX2DMS_SRV Texture2DMS; 1911 D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray; 1912 D3D12_TEX3D_SRV Texture3D; 1913 D3D12_TEXCUBE_SRV TextureCube; 1914 D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray; 1915 } 1916 } 1917 1918 struct D3D12_CONSTANT_BUFFER_VIEW_DESC 1919 { 1920 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 1921 uint SizeInBytes; 1922 } 1923 1924 struct D3D12_SAMPLER_DESC 1925 { 1926 D3D12_FILTER Filter; 1927 D3D12_TEXTURE_ADDRESS_MODE AddressU; 1928 D3D12_TEXTURE_ADDRESS_MODE AddressV; 1929 D3D12_TEXTURE_ADDRESS_MODE AddressW; 1930 float MipLODBias; 1931 uint MaxAnisotropy; 1932 D3D12_COMPARISON_FUNC ComparisonFunc; 1933 float[4] BorderColor; 1934 float MinLOD; 1935 float MaxLOD; 1936 } 1937 1938 struct D3D12_BUFFER_UAV 1939 { 1940 ulong FirstElement; 1941 uint NumElements; 1942 uint StructureByteStride; 1943 ulong CounterOffsetInBytes; 1944 D3D12_BUFFER_UAV_FLAGS Flags; 1945 } 1946 1947 struct D3D12_TEX1D_UAV 1948 { 1949 uint MipSlice; 1950 } 1951 1952 struct D3D12_TEX1D_ARRAY_UAV 1953 { 1954 uint MipSlice; 1955 uint FirstArraySlice; 1956 uint ArraySize; 1957 } 1958 1959 struct D3D12_TEX2D_UAV 1960 { 1961 uint MipSlice; 1962 uint PlaneSlice; 1963 } 1964 1965 struct D3D12_TEX2D_ARRAY_UAV 1966 { 1967 uint MipSlice; 1968 uint FirstArraySlice; 1969 uint ArraySize; 1970 uint PlaneSlice; 1971 } 1972 1973 struct D3D12_TEX3D_UAV 1974 { 1975 uint MipSlice; 1976 uint FirstWSlice; 1977 uint WSize; 1978 } 1979 1980 struct D3D12_UNORDERED_ACCESS_VIEW_DESC 1981 { 1982 DXGI_FORMAT Format; 1983 D3D12_UAV_DIMENSION ViewDimension; 1984 union 1985 { 1986 D3D12_BUFFER_UAV Buffer; 1987 D3D12_TEX1D_UAV Texture1D; 1988 D3D12_TEX1D_ARRAY_UAV Texture1DArray; 1989 D3D12_TEX2D_UAV Texture2D; 1990 D3D12_TEX2D_ARRAY_UAV Texture2DArray; 1991 D3D12_TEX3D_UAV Texture3D; 1992 } 1993 } 1994 1995 struct D3D12_BUFFER_RTV 1996 { 1997 ulong FirstElement; 1998 uint NumElements; 1999 } 2000 2001 struct D3D12_TEX1D_RTV 2002 { 2003 uint MipSlice; 2004 } 2005 2006 struct D3D12_TEX1D_ARRAY_RTV 2007 { 2008 uint MipSlice; 2009 uint FirstArraySlice; 2010 uint ArraySize; 2011 } 2012 2013 struct D3D12_TEX2D_RTV 2014 { 2015 uint MipSlice; 2016 uint PlaneSlice; 2017 } 2018 2019 struct D3D12_TEX2DMS_RTV 2020 { 2021 uint UnusedField_NothingToDefine; 2022 } 2023 2024 struct D3D12_TEX2D_ARRAY_RTV 2025 { 2026 uint MipSlice; 2027 uint FirstArraySlice; 2028 uint ArraySize; 2029 uint PlaneSlice; 2030 } 2031 2032 struct D3D12_TEX2DMS_ARRAY_RTV 2033 { 2034 uint FirstArraySlice; 2035 uint ArraySize; 2036 } 2037 2038 struct D3D12_TEX3D_RTV 2039 { 2040 uint MipSlice; 2041 uint FirstWSlice; 2042 uint WSize; 2043 } 2044 2045 struct D3D12_RENDER_TARGET_VIEW_DESC 2046 { 2047 DXGI_FORMAT Format; 2048 D3D12_RTV_DIMENSION ViewDimension; 2049 union 2050 { 2051 D3D12_BUFFER_RTV Buffer; 2052 D3D12_TEX1D_RTV Texture1D; 2053 D3D12_TEX1D_ARRAY_RTV Texture1DArray; 2054 D3D12_TEX2D_RTV Texture2D; 2055 D3D12_TEX2D_ARRAY_RTV Texture2DArray; 2056 D3D12_TEX2DMS_RTV Texture2DMS; 2057 D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray; 2058 D3D12_TEX3D_RTV Texture3D; 2059 } 2060 } 2061 2062 struct D3D12_TEX1D_DSV 2063 { 2064 uint MipSlice; 2065 } 2066 2067 struct D3D12_TEX1D_ARRAY_DSV 2068 { 2069 uint MipSlice; 2070 uint FirstArraySlice; 2071 uint ArraySize; 2072 } 2073 2074 struct D3D12_TEX2D_DSV 2075 { 2076 uint MipSlice; 2077 } 2078 2079 struct D3D12_TEX2D_ARRAY_DSV 2080 { 2081 uint MipSlice; 2082 uint FirstArraySlice; 2083 uint ArraySize; 2084 } 2085 2086 struct D3D12_TEX2DMS_DSV 2087 { 2088 uint UnusedField_NothingToDefine; 2089 } 2090 2091 struct D3D12_TEX2DMS_ARRAY_DSV 2092 { 2093 uint FirstArraySlice; 2094 uint ArraySize; 2095 } 2096 2097 struct D3D12_DEPTH_STENCIL_VIEW_DESC 2098 { 2099 DXGI_FORMAT Format; 2100 D3D12_DSV_DIMENSION ViewDimension; 2101 D3D12_DSV_FLAGS Flags; 2102 union 2103 { 2104 D3D12_TEX1D_DSV Texture1D; 2105 D3D12_TEX1D_ARRAY_DSV Texture1DArray; 2106 D3D12_TEX2D_DSV Texture2D; 2107 D3D12_TEX2D_ARRAY_DSV Texture2DArray; 2108 D3D12_TEX2DMS_DSV Texture2DMS; 2109 D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray; 2110 } 2111 } 2112 2113 struct D3D12_DESCRIPTOR_HEAP_DESC 2114 { 2115 D3D12_DESCRIPTOR_HEAP_TYPE Type; 2116 uint NumDescriptors; 2117 D3D12_DESCRIPTOR_HEAP_FLAGS Flags; 2118 uint NodeMask; 2119 } 2120 2121 struct D3D12_DESCRIPTOR_RANGE 2122 { 2123 D3D12_DESCRIPTOR_RANGE_TYPE RangeType; 2124 uint NumDescriptors; 2125 uint BaseShaderRegister; 2126 uint RegisterSpace; 2127 uint OffsetInDescriptorsFromTableStart; 2128 } 2129 2130 struct D3D12_ROOT_DESCRIPTOR_TABLE 2131 { 2132 uint NumDescriptorRanges; 2133 const D3D12_DESCRIPTOR_RANGE *pDescriptorRanges; 2134 } 2135 2136 struct D3D12_ROOT_CONSTANTS 2137 { 2138 uint ShaderRegister; 2139 uint RegisterSpace; 2140 uint Num32BitValues; 2141 } 2142 2143 struct D3D12_ROOT_DESCRIPTOR 2144 { 2145 uint ShaderRegister; 2146 uint RegisterSpace; 2147 } 2148 2149 struct D3D12_ROOT_PARAMETER 2150 { 2151 D3D12_ROOT_PARAMETER_TYPE ParameterType; 2152 union 2153 { 2154 D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable; 2155 D3D12_ROOT_CONSTANTS Constants; 2156 D3D12_ROOT_DESCRIPTOR Descriptor; 2157 } 2158 D3D12_SHADER_VISIBILITY ShaderVisibility; 2159 } 2160 2161 struct D3D12_STATIC_SAMPLER_DESC 2162 { 2163 D3D12_FILTER Filter; 2164 D3D12_TEXTURE_ADDRESS_MODE AddressU; 2165 D3D12_TEXTURE_ADDRESS_MODE AddressV; 2166 D3D12_TEXTURE_ADDRESS_MODE AddressW; 2167 float MipLODBias; 2168 uint MaxAnisotropy; 2169 D3D12_COMPARISON_FUNC ComparisonFunc; 2170 D3D12_STATIC_BORDER_COLOR BorderColor; 2171 float MinLOD; 2172 float MaxLOD; 2173 uint ShaderRegister; 2174 uint RegisterSpace; 2175 D3D12_SHADER_VISIBILITY ShaderVisibility; 2176 } 2177 2178 struct D3D12_ROOT_SIGNATURE_DESC 2179 { 2180 uint NumParameters; 2181 const D3D12_ROOT_PARAMETER *pParameters; 2182 uint NumStaticSamplers; 2183 const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers; 2184 D3D12_ROOT_SIGNATURE_FLAGS Flags; 2185 } 2186 2187 struct D3D12_DESCRIPTOR_RANGE1 2188 { 2189 D3D12_DESCRIPTOR_RANGE_TYPE RangeType; 2190 uint NumDescriptors; 2191 uint BaseShaderRegister; 2192 uint RegisterSpace; 2193 D3D12_DESCRIPTOR_RANGE_FLAGS Flags; 2194 uint OffsetInDescriptorsFromTableStart; 2195 } 2196 2197 struct D3D12_ROOT_DESCRIPTOR_TABLE1 2198 { 2199 uint NumDescriptorRanges; 2200 const D3D12_DESCRIPTOR_RANGE1 *pDescriptorRanges; 2201 } 2202 2203 struct D3D12_ROOT_DESCRIPTOR1 2204 { 2205 uint ShaderRegister; 2206 uint RegisterSpace; 2207 D3D12_ROOT_DESCRIPTOR_FLAGS Flags; 2208 } 2209 2210 struct D3D12_ROOT_PARAMETER1 2211 { 2212 D3D12_ROOT_PARAMETER_TYPE ParameterType; 2213 union 2214 { 2215 D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable; 2216 D3D12_ROOT_CONSTANTS Constants; 2217 D3D12_ROOT_DESCRIPTOR1 Descriptor; 2218 } 2219 D3D12_SHADER_VISIBILITY ShaderVisibility; 2220 } 2221 2222 struct D3D12_ROOT_SIGNATURE_DESC1 2223 { 2224 uint NumParameters; 2225 const D3D12_ROOT_PARAMETER1 *pParameters; 2226 uint NumStaticSamplers; 2227 const D3D12_STATIC_SAMPLER_DESC *pStaticSamplers; 2228 D3D12_ROOT_SIGNATURE_FLAGS Flags; 2229 } 2230 2231 struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC 2232 { 2233 D3D_ROOT_SIGNATURE_VERSION Version; 2234 union 2235 { 2236 D3D12_ROOT_SIGNATURE_DESC Desc_1_0; 2237 D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1; 2238 } 2239 } 2240 2241 struct D3D12_CPU_DESCRIPTOR_HANDLE 2242 { 2243 size_t ptr; 2244 } 2245 2246 struct D3D12_GPU_DESCRIPTOR_HANDLE 2247 { 2248 ulong ptr; 2249 } 2250 2251 struct D3D12_DISCARD_REGION 2252 { 2253 uint NumRects; 2254 const D3D12_RECT *pRects; 2255 uint FirstSubresource; 2256 uint NumSubresources; 2257 } 2258 2259 struct D3D12_QUERY_HEAP_DESC 2260 { 2261 D3D12_QUERY_HEAP_TYPE Type; 2262 uint Count; 2263 uint NodeMask; 2264 } 2265 2266 struct D3D12_QUERY_DATA_PIPELINE_STATISTICS 2267 { 2268 ulong IAVertices; 2269 ulong IAPrimitives; 2270 ulong VSInvocations; 2271 ulong GSInvocations; 2272 ulong GSPrimitives; 2273 ulong CInvocations; 2274 ulong CPrimitives; 2275 ulong PSInvocations; 2276 ulong HSInvocations; 2277 ulong DSInvocations; 2278 ulong CSInvocations; 2279 } 2280 2281 struct D3D12_QUERY_DATA_SO_STATISTICS 2282 { 2283 ulong NumPrimitivesWritten; 2284 ulong PrimitivesStorageNeeded; 2285 } 2286 2287 struct D3D12_STREAM_OUTPUT_BUFFER_VIEW 2288 { 2289 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 2290 ulong SizeInBytes; 2291 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation; 2292 } 2293 2294 struct D3D12_DRAW_ARGUMENTS 2295 { 2296 uint VertexCountPerInstance; 2297 uint InstanceCount; 2298 uint StartVertexLocation; 2299 uint StartInstanceLocation; 2300 } 2301 2302 struct D3D12_DRAW_INDEXED_ARGUMENTS 2303 { 2304 uint IndexCountPerInstance; 2305 uint InstanceCount; 2306 uint StartIndexLocation; 2307 int BaseVertexLocation; 2308 uint StartInstanceLocation; 2309 } 2310 2311 struct D3D12_DISPATCH_ARGUMENTS 2312 { 2313 uint ThreadGroupCountX; 2314 uint ThreadGroupCountY; 2315 uint ThreadGroupCountZ; 2316 } 2317 2318 struct D3D12_VERTEX_BUFFER_VIEW 2319 { 2320 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 2321 uint SizeInBytes; 2322 uint StrideInBytes; 2323 } 2324 2325 struct D3D12_INDEX_BUFFER_VIEW 2326 { 2327 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 2328 uint SizeInBytes; 2329 DXGI_FORMAT Format; 2330 } 2331 2332 struct D3D12_INDIRECT_ARGUMENT_DESC 2333 { 2334 D3D12_INDIRECT_ARGUMENT_TYPE Type; 2335 union 2336 { 2337 struct VertexBuffer 2338 { 2339 uint Slot; 2340 }; 2341 struct Constant 2342 { 2343 uint RootParameterIndex; 2344 uint DestOffsetIn32BitValues; 2345 uint Num32BitValuesToSet; 2346 }; 2347 struct ConstantBufferView 2348 { 2349 uint RootParameterIndex; 2350 }; 2351 struct ShaderResourceView 2352 { 2353 uint RootParameterIndex; 2354 }; 2355 struct UnorderedAccessView 2356 { 2357 uint RootParameterIndex; 2358 }; 2359 }; 2360 } 2361 2362 struct D3D12_COMMAND_SIGNATURE_DESC 2363 { 2364 uint ByteStride; 2365 uint NumArgumentDescs; 2366 const D3D12_INDIRECT_ARGUMENT_DESC *pArgumentDescs; 2367 uint NodeMask; 2368 } 2369 2370 struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER 2371 { 2372 D3D12_GPU_VIRTUAL_ADDRESS Dest; 2373 uint Value; 2374 } 2375 struct D3D12_SUBRESOURCE_DATA 2376 { 2377 const void *pData; 2378 LONG_PTR RowPitch; 2379 LONG_PTR SlicePitch; 2380 } 2381 2382 struct D3D12_MEMCPY_DEST 2383 { 2384 void *pData; 2385 size_t RowPitch; 2386 size_t SlicePitch; 2387 } 2388 2389 struct D3D12_RESOURCE_ALLOCATION_INFO1 2390 { 2391 ulong Offset; 2392 ulong Alignment; 2393 ulong SizeInBytes; 2394 } 2395 2396 /// 2397 /// Interfaces 2398 /// 2399 2400 mixin(uuid!(ID3D12Object, "c4fec28f-7966-4e95-9f94-f431cb56c3b8")); 2401 public interface ID3D12Object : IUnknown 2402 { 2403 extern(Windows): 2404 HRESULT GetPrivateData(REFGUID guid, uint *pDataSize, void *pData); 2405 HRESULT SetName(const wchar *Name); 2406 HRESULT SetPrivateData(REFGUID guid, uint DataSize, const void *pData); 2407 HRESULT SetPrivateDataInterface(REFGUID guid, const IUnknown *pData); 2408 } 2409 2410 mixin(uuid!(ID3D12DeviceChild, "905db94b-a00c-4140-9df5-2b64ca9ea357")); 2411 public interface ID3D12DeviceChild : ID3D12Object 2412 { 2413 extern(Windows): 2414 HRESULT GetDevice(REFIID riid, void **ppvDevice); 2415 } 2416 2417 mixin(uuid!(ID3D12RootSignature, "c54a6b66-72df-4ee8-8be5-a946a1429214")); 2418 public interface ID3D12RootSignature : ID3D12DeviceChild 2419 { 2420 extern(Windows): 2421 } 2422 2423 mixin(uuid!(ID3D12RootSignatureDeserializer, "34AB647B-3CC8-46AC-841B-C0965645C046")); 2424 public interface ID3D12RootSignatureDeserializer : IUnknown 2425 { 2426 extern(Windows): 2427 D3D12_ROOT_SIGNATURE_DESC* GetRootSignatureDesc(); 2428 } 2429 2430 mixin(uuid!(ID3D12VersionedRootSignatureDeserializer, "7F91CE67-090C-4BB7-B78E-ED8FF2E31DA0")); 2431 public interface ID3D12VersionedRootSignatureDeserializer : IUnknown 2432 { 2433 extern(Windows): 2434 HRESULT GetRootSignatureDescAtVersion(D3D_ROOT_SIGNATURE_VERSION convertToVersion, const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **ppDesc); 2435 const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* GetUnconvertedRootSignatureDesc(); 2436 } 2437 2438 mixin(uuid!(ID3D12Pageable, "63ee58fb-1268-4835-86da-f008ce62f0d6")); 2439 public interface ID3D12Pageable : ID3D12DeviceChild 2440 { 2441 extern(Windows): 2442 } 2443 2444 mixin(uuid!(ID3D12Heap, "6b3b2502-6e51-45b3-90ee-9884265e8df3")); 2445 public interface ID3D12Heap : ID3D12Pageable 2446 { 2447 extern(Windows): 2448 D3D12_HEAP_DESC GetDesc(); 2449 } 2450 2451 mixin(uuid!(ID3D12Resource, "696442be-a72e-4059-bc79-5b5c98040fad")); 2452 public interface ID3D12Resource : ID3D12Pageable 2453 { 2454 extern(Windows): 2455 HRESULT Map(uint Subresource, const D3D12_RANGE *pReadRange, void **ppData); 2456 void Unmap(uint Subresource, const D3D12_RANGE *pWrittenRange); 2457 D3D12_RESOURCE_DESC GetDesc(); 2458 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress(); 2459 HRESULT WriteToSubresource(uint DstSubresource, const D3D12_BOX *pDstBox, const void *pSrcData, uint SrcRowPitch, uint SrcDepthPitch); 2460 HRESULT ReadFromSubresource(void *pDstData, uint DstRowPitch, uint DstDepthPitch, uint SrcSubresource, const D3D12_BOX *pSrcBox); 2461 HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES *pHeapProperties, D3D12_HEAP_FLAGS *pHeapFlags); 2462 } 2463 2464 mixin(uuid!(ID3D12CommandAllocator, "6102dee4-af59-4b09-b999-b44d73f09b24")); 2465 public interface ID3D12CommandAllocator : ID3D12Pageable 2466 { 2467 extern(Windows): 2468 HRESULT Reset(); 2469 } 2470 2471 mixin(uuid!(ID3D12Fence, "0a753dcf-c4d8-4b91-adf6-be5a60d95a76")); 2472 public interface ID3D12Fence : ID3D12Pageable 2473 { 2474 extern(Windows): 2475 ulong GetCompletedValue(); 2476 HRESULT SetEventOnCompletion(ulong Value, HANDLE hEvent); 2477 HRESULT Signal(ulong Value); 2478 } 2479 2480 mixin(uuid!(ID3D12Fence1, "433685fe-e22b-4ca0-a8db-b5b4f4dd0e4a")); 2481 public interface ID3D12Fence1 : ID3D12Fence 2482 { 2483 extern(Windows): 2484 D3D12_FENCE_FLAGS GetCreationFlags(); 2485 } 2486 2487 mixin(uuid!(ID3D12PipelineState, "765a30f3-f624-4c6f-a828-ace948622445")); 2488 public interface ID3D12PipelineState : ID3D12Pageable 2489 { 2490 extern(Windows): 2491 HRESULT GetCachedBlob(ID3DBlob *ppBlob); 2492 } 2493 2494 mixin(uuid!(ID3D12DescriptorHeap, "8efb471d-616c-4f49-90f7-127bb763fa51")); 2495 public interface ID3D12DescriptorHeap : ID3D12Pageable 2496 { 2497 extern(Windows): 2498 D3D12_DESCRIPTOR_HEAP_DESC GetDesc(); 2499 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart(); 2500 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart(); 2501 } 2502 2503 mixin(uuid!(ID3D12QueryHeap, "0d9658ae-ed45-469e-a61d-970ec583cab4")); 2504 public interface ID3D12QueryHeap : ID3D12Pageable 2505 { 2506 extern(Windows): 2507 } 2508 2509 mixin(uuid!(ID3D12CommandSignature, "c36a797c-ec80-4f0a-8985-a7b2475082d1")); 2510 public interface ID3D12CommandSignature : ID3D12Pageable 2511 { 2512 extern(Windows): 2513 } 2514 2515 mixin(uuid!(ID3D12CommandList, "7116d91c-e7e4-47ce-b8c6-ec8168f437e5")); 2516 public interface ID3D12CommandList : ID3D12DeviceChild 2517 { 2518 extern(Windows): 2519 D3D12_COMMAND_LIST_TYPE GetType(); 2520 } 2521 2522 mixin(uuid!(ID3D12GraphicsCommandList, "5b160d0f-ac1b-4185-8ba8-b3ae42a5a455")); 2523 public interface ID3D12GraphicsCommandList : ID3D12CommandList 2524 { 2525 extern(Windows): 2526 HRESULT Close(); 2527 HRESULT Reset(ID3D12CommandAllocator pAllocator, ID3D12PipelineState pInitialState); 2528 void ClearState(ID3D12PipelineState pPipelineState); 2529 void DrawInstanced(uint VertexCountPerInstance, uint InstanceCount, uint StartVertexLocation, uint StartInstanceLocation); 2530 void DrawIndexedInstanced(uint IndexCountPerInstance, uint InstanceCount, uint StartIndexLocation, int BaseVertexLocation, uint StartInstanceLocation); 2531 void Dispatch(uint ThreadGroupCountX, uint ThreadGroupCountY, uint ThreadGroupCountZ); 2532 void CopyBufferRegion(ID3D12Resource pDstBuffer, ulong DstOffset, ID3D12Resource pSrcBuffer, ulong SrcOffset, ulong NumBytes); 2533 void CopyTextureRegion(const D3D12_TEXTURE_COPY_LOCATION *pDst, uint DstX, uint DstY, uint DstZ, const D3D12_TEXTURE_COPY_LOCATION *pSrc, const D3D12_BOX *pSrcBox); 2534 void CopyResource(ID3D12Resource pDstResource, ID3D12Resource pSrcResource); 2535 void CopyTiles(ID3D12Resource pTiledResource, const D3D12_TILED_RESOURCE_COORDINATE *pTileRegionStartCoordinate, const D3D12_TILE_REGION_SIZE *pTileRegionSize, ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, D3D12_TILE_COPY_FLAGS Flags); 2536 void ResolveSubresource(ID3D12Resource pDstResource, uint DstSubresource, ID3D12Resource pSrcResource, uint SrcSubresource, DXGI_FORMAT Format); 2537 void IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); 2538 void RSSetViewports(uint NumViewports, const D3D12_VIEWPORT *pViewports); 2539 void RSSetScissorRects(uint NumRects, const D3D12_RECT *pRects); 2540 void OMSetBlendFactor(const float[4] BlendFactor); 2541 void OMSetStencilRef(uint StencilRef); 2542 void SetPipelineState(ID3D12PipelineState pPipelineState); 2543 void ResourceBarrier(uint NumBarriers, const D3D12_RESOURCE_BARRIER *pBarriers); 2544 void ExecuteBundle(ID3D12GraphicsCommandList pCommandList); 2545 void SetDescriptorHeaps(uint NumDescriptorHeaps, const(ID3D12DescriptorHeap) *ppDescriptorHeaps); 2546 void SetComputeRootSignature(ID3D12RootSignature pRootSignature); 2547 void SetGraphicsRootSignature(ID3D12RootSignature pRootSignature); 2548 void SetComputeRootDescriptorTable(uint RootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); 2549 void SetGraphicsRootDescriptorTable(uint RootParameterIndex, D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); 2550 void SetComputeRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues); 2551 void SetGraphicsRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues); 2552 void SetComputeRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, const void *pSrcData, uint DestOffsetIn32BitValues); 2553 void SetGraphicsRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, const void *pSrcData, uint DestOffsetIn32BitValues); 2554 void SetComputeRootConstantBufferView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2555 void SetGraphicsRootConstantBufferView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2556 void SetComputeRootShaderResourceView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2557 void SetGraphicsRootShaderResourceView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2558 void SetComputeRootUnorderedAccessView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2559 void SetGraphicsRootUnorderedAccessView(uint RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2560 void IASetIndexBuffer(const D3D12_INDEX_BUFFER_VIEW *pView); 2561 void IASetVertexBuffers(uint StartSlot, uint NumViews, const D3D12_VERTEX_BUFFER_VIEW *pViews); 2562 void SOSetTargets(uint StartSlot, uint NumViews, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *pViews); 2563 void OMSetRenderTargets(uint NumRenderTargetDescriptors, const D3D12_CPU_DESCRIPTOR_HANDLE *pRenderTargetDescriptors, bool RTsSingleHandleToDescriptorRange, const D3D12_CPU_DESCRIPTOR_HANDLE *pDepthStencilDescriptor); 2564 void ClearDepthStencilView(D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, D3D12_CLEAR_FLAGS ClearFlags, float Depth, ubyte Stencil, uint NumRects, const D3D12_RECT *pRects); 2565 void ClearRenderTargetView(D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, const float[4] ColorRGBA, uint NumRects, const D3D12_RECT *pRects); 2566 void ClearUnorderedAccessViewUint(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource pResource, const uint[4] Values, uint NumRects, const D3D12_RECT *pRects); 2567 void ClearUnorderedAccessViewFloat(D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, ID3D12Resource pResource, const float[4] Values, uint NumRects, const D3D12_RECT *pRects); 2568 void DiscardResource(ID3D12Resource pResource, const D3D12_DISCARD_REGION *pRegion); 2569 void BeginQuery(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); 2570 void EndQuery(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint Index); 2571 void ResolveQueryData(ID3D12QueryHeap pQueryHeap, D3D12_QUERY_TYPE Type, uint StartIndex, uint NumQueries, ID3D12Resource pDestinationBuffer, ulong AlignedDestinationBufferOffset); 2572 void SetPredication(ID3D12Resource pBuffer, ulong AlignedBufferOffset, D3D12_PREDICATION_OP Operation); 2573 void SetMarker(uint Metadata, const void *pData, uint Size); 2574 void BeginEvent(uint Metadata, const void *pData, uint Size); 2575 void EndEvent(); 2576 void ExecuteIndirect(ID3D12CommandSignature pCommandSignature, uint MaxCommandCount, ID3D12Resource pArgumentBuffer, ulong ArgumentBufferOffset, ID3D12Resource pCountBuffer, ulong CountBufferOffset); 2577 } 2578 2579 mixin(uuid!(ID3D12GraphicsCommandList1, "553103fb-1fe7-4557-bb38-946d7d0e7ca7")); 2580 public interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList 2581 { 2582 extern(Windows): 2583 void AtomicCopyBufferUINT(ID3D12Resource pDstBuffer, ulong DstOffset, ID3D12Resource pSrcBuffer, ulong SrcOffset, uint Dependencies, const(ID3D12Resource) *ppDependentResources, const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); 2584 void AtomicCopyBufferUINT64(ID3D12Resource pDstBuffer, ulong DstOffset, ID3D12Resource pSrcBuffer, ulong SrcOffset, uint Dependencies, const(ID3D12Resource) *ppDependentResources, const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges); 2585 void OMSetDepthBounds(float Min, float Max); 2586 void SetSamplePositions(uint NumSamplesPerPixel, uint NumPixels, D3D12_SAMPLE_POSITION *pSamplePositions); 2587 void ResolveSubresourceRegion(ID3D12Resource pDstResource, uint DstSubresource, uint DstX, uint DstY, ID3D12Resource pSrcResource, uint SrcSubresource, D3D12_RECT *pSrcRect, DXGI_FORMAT Format, D3D12_RESOLVE_MODE ResolveMode); 2588 void SetViewInstanceMask(uint Mask); 2589 } 2590 2591 mixin(uuid!(ID3D12GraphicsCommandList2, "38C3E585-FF17-412C-9150-4FC6F9D72A28")); 2592 public interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1 2593 { 2594 extern(Windows): 2595 void WriteBufferImmediate(uint Count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams, const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes); 2596 } 2597 2598 mixin(uuid!(ID3D12CommandQueue, "0ec870a6-5d7e-4c22-8cfc-5baae07616ed")); 2599 public interface ID3D12CommandQueue : ID3D12Pageable 2600 { 2601 extern(Windows): 2602 void UpdateTileMappings(ID3D12Resource pResource, uint NumResourceRegions, const D3D12_TILED_RESOURCE_COORDINATE *pResourceRegionStartCoordinates, const D3D12_TILE_REGION_SIZE *pResourceRegionSizes, ID3D12Heap pHeap, uint NumRanges, const D3D12_TILE_RANGE_FLAGS *pRangeFlags, const uint *pHeapRangeStartOffsets, const uint *pRangeTileCounts, D3D12_TILE_MAPPING_FLAGS Flags); 2603 void CopyTileMappings(ID3D12Resource pDstResource, const D3D12_TILED_RESOURCE_COORDINATE *pDstRegionStartCoordinate, ID3D12Resource pSrcResource, const D3D12_TILED_RESOURCE_COORDINATE *pSrcRegionStartCoordinate, const D3D12_TILE_REGION_SIZE *pRegionSize, D3D12_TILE_MAPPING_FLAGS Flags); 2604 void ExecuteCommandLists(uint NumCommandLists, const(ID3D12CommandList) *ppCommandLists); 2605 void SetMarker( uint Metadata, const void *pData, uint Size); 2606 void BeginEvent(uint Metadata, const void *pData, uint Size); 2607 void EndEvent(); 2608 HRESULT Signal(ID3D12Fence pFence, ulong Value); 2609 HRESULT Wait(ID3D12Fence pFence, ulong Value); 2610 HRESULT GetTimestampFrequency(ulong *pFrequency); 2611 HRESULT GetClockCalibration(ulong *pGpuTimestamp, ulong *pCpuTimestamp); 2612 D3D12_COMMAND_QUEUE_DESC GetDesc(); 2613 } 2614 2615 mixin(uuid!(ID3D12Device, "189819f1-1db6-4b57-be54-1821339b85f7")); 2616 public interface ID3D12Device : ID3D12Object 2617 { 2618 extern(Windows): 2619 uint GetNodeCount(); 2620 HRESULT CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC *pDesc, REFIID riid, void **ppCommandQueue); 2621 HRESULT CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type, REFIID riid, void **ppCommandAllocator); 2622 HRESULT CreateGraphicsPipelineState(const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, REFIID riid, void **ppPipelineState); 2623 HRESULT CreateComputePipelineState(const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, REFIID riid, void **ppPipelineState); 2624 HRESULT CreateCommandList(uint nodeMask, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator pCommandAllocator, ID3D12PipelineState pInitialState, REFIID riid, void **ppCommandList); 2625 HRESULT CheckFeatureSupport(D3D12_FEATURE Feature, void *pFeatureSupportData, uint FeatureSupportDataSize); 2626 HRESULT CreateDescriptorHeap(const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, REFIID riid, void **ppvHeap); 2627 uint GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); 2628 HRESULT CreateRootSignature(uint nodeMask, const void *pBlobWithRootSignature, size_t blobLengthInBytes, REFIID riid, void **ppvRootSignature); 2629 void CreateConstantBufferView(const D3D12_CONSTANT_BUFFER_VIEW_DESC *pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2630 void CreateShaderResourceView(ID3D12Resource pResource, const D3D12_SHADER_RESOURCE_VIEW_DESC *pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2631 void CreateUnorderedAccessView(ID3D12Resource pResource, ID3D12Resource pCounterResource, const D3D12_UNORDERED_ACCESS_VIEW_DESC *pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2632 void CreateRenderTargetView(ID3D12Resource pResource, const D3D12_RENDER_TARGET_VIEW_DESC *pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2633 void CreateDepthStencilView(ID3D12Resource pResource, const D3D12_DEPTH_STENCIL_VIEW_DESC *pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2634 void CreateSampler(const D3D12_SAMPLER_DESC *pDesc, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2635 void CopyDescriptors(uint NumDestDescriptorRanges, const D3D12_CPU_DESCRIPTOR_HANDLE *pDestDescriptorRangeStarts, const uint *pDestDescriptorRangeSizes, uint NumSrcDescriptorRanges, const D3D12_CPU_DESCRIPTOR_HANDLE *pSr, const uint *pSrcDescriptorRangeSizes, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); 2636 void CopyDescriptorsSimple(uint NumDescriptors, D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); 2637 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo(uint visibleMask, uint numResourceDescs, const D3D12_RESOURCE_DESC *pResourceDescs); 2638 D3D12_HEAP_PROPERTIES GetCustomHeapProperties(uint nodeMask, D3D12_HEAP_TYPE heapType); 2639 HRESULT CreateCommittedResource(const D3D12_HEAP_PROPERTIES *pHeapProperties, D3D12_HEAP_FLAGS HeapFlags, const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource); 2640 HRESULT CreateHeap(const D3D12_HEAP_DESC *pDesc, REFIID riid, void **ppvHeap); 2641 HRESULT CreatePlacedResource(ID3D12Heap pHeap, ulong HeapOffset, const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riid, void **ppvResource); 2642 HRESULT CreateReservedResource(const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riid, void **ppvResource); 2643 HRESULT CreateSharedHandle(ID3D12DeviceChild pObject, const SECURITY_ATTRIBUTES *pAttributes, uint Access, const wchar *Name, HANDLE *pHandle); 2644 HRESULT OpenSharedHandle(HANDLE NTHandle, REFIID riid, void **ppvObj); 2645 HRESULT OpenSharedHandleByName(const wchar *Name, uint Access, HANDLE *pNTHandle); 2646 HRESULT MakeResident( uint NumObjects, const(ID3D12Pageable) *ppObjects); 2647 HRESULT Evict(uint NumObjects, const(ID3D12Pageable) *ppObjects); 2648 HRESULT CreateFence(ulong InitialValue, D3D12_FENCE_FLAGS Flags, REFIID riid, void **ppFence); 2649 HRESULT GetDeviceRemovedReason(); 2650 void GetCopyableFootprints(const D3D12_RESOURCE_DESC *pResourceDesc, uint FirstSubresource, uint NumSubresources, ulong BaseOffset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *pLayouts, uint *pNumRows, ulong *pRowSizeInBytes, ulong *pTotalBytes); 2651 HRESULT CreateQueryHeap(const D3D12_QUERY_HEAP_DESC *pDesc, REFIID riid, void **ppvHeap); 2652 HRESULT SetStablePowerState(bool Enable); 2653 HRESULT CreateCommandSignature(const D3D12_COMMAND_SIGNATURE_DESC *pDesc, ID3D12RootSignature pRootSignature, REFIID riid, void **ppvCommandSignature); 2654 void GetResourceTiling(ID3D12Resource pTiledResource, uint *pNumTilesForEntireResource, D3D12_PACKED_MIP_INFO *pPackedMipDesc, D3D12_TILE_SHAPE *pStandardTileShapeForNonPackedMips, uint *pNumSubresourceTilings, uint FirstSubresourceTilingToGet, D3D12_SUBRESOURCE_TILING *pSubresourceTilingsForNonPackedMips); 2655 LUID GetAdapterLuid(); 2656 } 2657 2658 mixin(uuid!(ID3D12PipelineLibrary, "c64226a8-9201-46af-b4cc-53fb9ff7414f")); 2659 public interface ID3D12PipelineLibrary : ID3D12DeviceChild 2660 { 2661 extern(Windows): 2662 HRESULT StorePipeline(const wchar *pName, ID3D12PipelineState pPipeline); 2663 HRESULT LoadGraphicsPipeline(const wchar *pName, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, REFIID riid, void **ppPipelineState); 2664 HRESULT LoadComputePipeline(const wchar *pName, const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, REFIID riid, void **ppPipelineState); 2665 size_t GetSerializedSize(); 2666 HRESULT Serialize(void *pData, size_t DataSizeInBytes); 2667 } 2668 2669 mixin(uuid!(ID3D12PipelineLibrary1, "80eabf42-2568-4e5e-bd82-c37f86961dc3")); 2670 public interface ID3D12PipelineLibrary1 : ID3D12PipelineLibrary 2671 { 2672 extern(Windows): 2673 HRESULT LoadPipeline(const wchar *Name, const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, REFIID riid, void **ppPipelineState); 2674 } 2675 2676 mixin(uuid!(ID3D12Device1, "77acce80-638e-4e65-8895-c1f23386863e")); 2677 public interface ID3D12Device1 : ID3D12Device 2678 { 2679 extern(Windows): 2680 HRESULT CreatePipelineLibrary(const void *pLibraryBlob, size_t BlobLength, REFIID riid, void **ppPipelineLibrary); 2681 HRESULT SetEventOnMultipleFenceCompletion(const(ID3D12Fence) *ppFences, const ulong *pFenceValues, uint NumFences, D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags, HANDLE hEvent); 2682 HRESULT SetResidencyPriority(uint NumObjects, const(ID3D12Pageable) *ppObjects, const D3D12_RESIDENCY_PRIORITY *pPriorities); 2683 } 2684 2685 mixin(uuid!(ID3D12Device2, "30baa41e-b15b-475c-a0bb-1af5c5b64328")); 2686 public interface ID3D12Device2 : ID3D12Device1 2687 { 2688 extern(Windows): 2689 HRESULT CreatePipelineState(const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc, REFIID riid, void **ppPipelineState); 2690 } 2691 2692 mixin(uuid!(ID3D12Device3, "81dadc15-2bad-4392-93c5-101345c4aa98")); 2693 public interface ID3D12Device3 : ID3D12Device2 2694 { 2695 extern(Windows): 2696 HRESULT OpenExistingHeapFromAddress(const void *pAddress, REFIID riid, void **ppvHeap); 2697 HRESULT OpenExistingHeapFromFileMapping(HANDLE hFileMapping, REFIID riid, void **ppvHeap); 2698 HRESULT EnqueueMakeResident(D3D12_RESIDENCY_FLAGS Flags, uint NumObjects, const(ID3D12Pageable) *ppObjects, ID3D12Fence pFenceToSignal, ulong FenceValueToSignal); 2699 } 2700 2701 mixin(uuid!(ID3D12Tools, "7071e1f0-e84b-4b33-974f-12fa49de65c5")); 2702 public interface ID3D12Tools : IUnknown 2703 { 2704 extern(Windows): 2705 void EnableShaderInstrumentation(bool bEnable); 2706 bool ShaderInstrumentationEnabled(); 2707 } 2708 2709 enum D3D12_COMMAND_LIST_FLAGS 2710 { 2711 D3D12_COMMAND_LIST_FLAG_NONE = 0 2712 } 2713 2714 enum D3D12_COMMAND_POOL_FLAGS 2715 { 2716 D3D12_COMMAND_POOL_FLAG_NONE = 0 2717 } 2718 2719 enum D3D12_COMMAND_RECORDER_FLAGS 2720 { 2721 D3D12_COMMAND_RECORDER_FLAG_NONE = 0 2722 } 2723 2724 enum D3D12_PROTECTED_SESSION_STATUS 2725 { 2726 D3D12_PROTECTED_SESSION_STATUS_OK = 0, 2727 D3D12_PROTECTED_SESSION_STATUS_INVALID = 1 2728 } 2729 2730 enum D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS 2731 { 2732 D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_NONE = 0, 2733 D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_SUPPORTED = 0x1 2734 } 2735 2736 enum D3D12_PROTECTED_RESOURCE_SESSION_FLAGS 2737 { 2738 D3D12_PROTECTED_RESOURCE_SESSION_FLAG_NONE = 0 2739 } 2740 2741 enum D3D12_LIFETIME_STATE 2742 { 2743 D3D12_LIFETIME_STATE_IN_USE = 0, 2744 D3D12_LIFETIME_STATE_NOT_IN_USE = ( D3D12_LIFETIME_STATE_IN_USE + 1 ) 2745 } 2746 2747 enum D3D12_META_COMMAND_PARAMETER_TYPE 2748 { 2749 D3D12_META_COMMAND_PARAMETER_TYPE_FLOAT = 0, 2750 D3D12_META_COMMAND_PARAMETER_TYPE_UINT64 = 1, 2751 D3D12_META_COMMAND_PARAMETER_TYPE_GPU_VIRTUAL_ADDRESS = 2, 2752 D3D12_META_COMMAND_PARAMETER_TYPE_CPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 3, 2753 D3D12_META_COMMAND_PARAMETER_TYPE_GPU_DESCRIPTOR_HANDLE_HEAP_TYPE_CBV_SRV_UAV = 4 2754 } 2755 2756 enum D3D12_META_COMMAND_PARAMETER_FLAGS 2757 { 2758 D3D12_META_COMMAND_PARAMETER_FLAG_INPUT = 0x1, 2759 D3D12_META_COMMAND_PARAMETER_FLAG_OUTPUT = 0x2 2760 } 2761 2762 enum D3D12_META_COMMAND_PARAMETER_STAGE 2763 { 2764 D3D12_META_COMMAND_PARAMETER_STAGE_CREATION = 0, 2765 D3D12_META_COMMAND_PARAMETER_STAGE_INITIALIZATION = 1, 2766 D3D12_META_COMMAND_PARAMETER_STAGE_EXECUTION = 2 2767 } 2768 2769 struct D3D12_META_COMMAND_PARAMETER_DESC 2770 { 2771 const wchar *Name; 2772 D3D12_META_COMMAND_PARAMETER_TYPE Type; 2773 D3D12_META_COMMAND_PARAMETER_FLAGS Flags; 2774 D3D12_RESOURCE_STATES RequiredResourceState; 2775 uint StructureOffset; 2776 } 2777 2778 enum D3D12_GRAPHICS_STATES 2779 { 2780 D3D12_GRAPHICS_STATE_NONE = 0, 2781 D3D12_GRAPHICS_STATE_IA_VERTEX_BUFFERS = ( 1 << 0 ) , 2782 D3D12_GRAPHICS_STATE_IA_INDEX_BUFFER = ( 1 << 1 ) , 2783 D3D12_GRAPHICS_STATE_IA_PRIMITIVE_TOPOLOGY = ( 1 << 2 ) , 2784 D3D12_GRAPHICS_STATE_DESCRIPTOR_HEAP = ( 1 << 3 ) , 2785 D3D12_GRAPHICS_STATE_GRAPHICS_ROOT_SIGNATURE = ( 1 << 4 ) , 2786 D3D12_GRAPHICS_STATE_COMPUTE_ROOT_SIGNATURE = ( 1 << 5 ) , 2787 D3D12_GRAPHICS_STATE_RS_VIEWPORTS = ( 1 << 6 ) , 2788 D3D12_GRAPHICS_STATE_RS_SCISSOR_RECTS = ( 1 << 7 ) , 2789 D3D12_GRAPHICS_STATE_PREDICATION = ( 1 << 8 ) , 2790 D3D12_GRAPHICS_STATE_OM_RENDER_TARGETS = ( 1 << 9 ) , 2791 D3D12_GRAPHICS_STATE_OM_STENCIL_REF = ( 1 << 10 ) , 2792 D3D12_GRAPHICS_STATE_OM_BLEND_FACTOR = ( 1 << 11 ) , 2793 D3D12_GRAPHICS_STATE_PIPELINE_STATE = ( 1 << 12 ) , 2794 D3D12_GRAPHICS_STATE_SO_TARGETS = ( 1 << 13 ) , 2795 D3D12_GRAPHICS_STATE_OM_DEPTH_BOUNDS = ( 1 << 14 ) , 2796 D3D12_GRAPHICS_STATE_SAMPLE_POSITIONS = ( 1 << 15 ) , 2797 D3D12_GRAPHICS_STATE_VIEW_INSTANCE_MASK = ( 1 << 16 ) 2798 } 2799 2800 struct D3D12_META_COMMAND_DESC 2801 { 2802 GUID Id; 2803 const wchar *Name; 2804 D3D12_GRAPHICS_STATES InitializationDirtyState; 2805 D3D12_GRAPHICS_STATES ExecutionDirtyState; 2806 } 2807 2808 2809 struct D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_SUPPORT 2810 { 2811 uint NodeIndex; 2812 D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAGS Support; 2813 } 2814 2815 struct D3D12_PROTECTED_RESOURCE_SESSION_DESC 2816 { 2817 uint NodeMask; 2818 D3D12_PROTECTED_RESOURCE_SESSION_FLAGS Flags; 2819 } 2820 2821 mixin(uuid!(ID3D12ProtectedSession, "A1533D18-0AC1-4084-85B9-89A96116806B")); 2822 public interface ID3D12ProtectedSession : ID3D12DeviceChild 2823 { 2824 extern(Windows): 2825 HRESULT GetStatusFence(REFIID riid, void **ppFence); 2826 D3D12_PROTECTED_SESSION_STATUS GetSessionStatus(); 2827 } 2828 2829 mixin(uuid!(ID3D12ProtectedResourceSession, "6CD696F4-F289-40CC-8091-5A6C0A099C3D")); 2830 public interface ID3D12ProtectedResourceSession : ID3D12ProtectedSession 2831 { 2832 extern(Windows): 2833 D3D12_PROTECTED_RESOURCE_SESSION_DESC GetDesc(); 2834 } 2835 2836 mixin(uuid!(ID3D12Device4, "e865df17-a9ee-46f9-a463-3098315aa2e5")); 2837 public interface ID3D12Device4 : ID3D12Device3 2838 { 2839 extern(Windows): 2840 HRESULT CreateCommandList1(uint nodeMask, D3D12_COMMAND_LIST_TYPE type, D3D12_COMMAND_LIST_FLAGS flags, REFIID riid, void **ppCommandList); 2841 HRESULT CreateProtectedResourceSession(const D3D12_PROTECTED_RESOURCE_SESSION_DESC *pDesc, REFIID riid, void **ppSession); 2842 HRESULT CreateCommittedResource1(const D3D12_HEAP_PROPERTIES *pHeapProperties, D3D12_HEAP_FLAGS HeapFlags, const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, ID3D12ProtectedResourceSession pProtectedSession, REFIID riidResource, void **ppvResource); 2843 HRESULT CreateHeap1(const D3D12_HEAP_DESC *pDesc, ID3D12ProtectedResourceSession pProtectedSession, REFIID riid, void **ppvHeap); 2844 HRESULT CreateReservedResource1(const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, ID3D12ProtectedResourceSession pProtectedSession, REFIID riid, void **ppvResource); 2845 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo1(uint visibleMask, uint numResourceDescs, const D3D12_RESOURCE_DESC *pResourceDescs, D3D12_RESOURCE_ALLOCATION_INFO1 *pResourceAllocationInfo1); 2846 } 2847 2848 mixin(uuid!(ID3D12LifetimeOwner, "e667af9f-cd56-4f46-83ce-032e595d70a8")); 2849 public interface ID3D12LifetimeOwner : IUnknown 2850 { 2851 extern(Windows): 2852 void LifetimeStateUpdated(D3D12_LIFETIME_STATE NewState); 2853 } 2854 2855 mixin(uuid!(ID3D12SwapChainAssistant, "f1df64b6-57fd-49cd-8807-c0eb88b45c8f")); 2856 public interface ID3D12SwapChainAssistant : IUnknown 2857 { 2858 extern(Windows): 2859 LUID GetLUID(); 2860 HRESULT GetSwapChainObject(REFIID riid, void **ppv); 2861 HRESULT GetCurrentResourceAndCommandQueue(REFIID riidResource, void **ppvResource, REFIID riidQueue, void **ppvQueue); 2862 HRESULT InsertImplicitSync(); 2863 } 2864 2865 mixin(uuid!(ID3D12LifetimeTracker, "3fd03d36-4eb1-424a-a582-494ecb8ba813")); 2866 public interface ID3D12LifetimeTracker : ID3D12DeviceChild 2867 { 2868 extern(Windows): 2869 HRESULT DestroyOwnedObject(ID3D12DeviceChild pObject); 2870 } 2871 2872 mixin(uuid!(ID3D12StateObject, "47016943-fca8-4594-93ea-af258b55346d")); 2873 public interface ID3D12StateObject : ID3D12Pageable 2874 { 2875 extern(Windows): 2876 } 2877 2878 mixin(uuid!(ID3D12StateObjectProperties, "de5fa827-9bf9-4f26-89ff-d7f56fde3860")); 2879 public interface ID3D12StateObjectProperties : IUnknown 2880 { 2881 extern(Windows): 2882 void *GetShaderIdentifier(const wchar *pExportName); 2883 ulong GetShaderStackSize(const wchar *pExportName); 2884 ulong GetPipelineStackSize(); 2885 void SetPipelineStackSize(ulong PipelineStackSizeInBytes); 2886 } 2887 2888 enum D3D12_STATE_SUBOBJECT_TYPE 2889 { 2890 D3D12_STATE_SUBOBJECT_TYPE_STATE_OBJECT_CONFIG = 0, 2891 D3D12_STATE_SUBOBJECT_TYPE_GLOBAL_ROOT_SIGNATURE = 1, 2892 D3D12_STATE_SUBOBJECT_TYPE_LOCAL_ROOT_SIGNATURE = 2, 2893 D3D12_STATE_SUBOBJECT_TYPE_NODE_MASK = 3, 2894 D3D12_STATE_SUBOBJECT_TYPE_DXIL_LIBRARY = 5, 2895 D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION = 6, 2896 D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 7, 2897 D3D12_STATE_SUBOBJECT_TYPE_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION = 8, 2898 D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_SHADER_CONFIG = 9, 2899 D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG = 10, 2900 D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP = 11, 2901 D3D12_STATE_SUBOBJECT_TYPE_MAX_VALID = ( D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP + 1 ) 2902 } 2903 2904 struct D3D12_STATE_SUBOBJECT 2905 { 2906 D3D12_STATE_SUBOBJECT_TYPE Type; 2907 const void *pDesc; 2908 } 2909 2910 enum D3D12_STATE_OBJECT_FLAGS 2911 { 2912 D3D12_STATE_OBJECT_FLAG_NONE = 0, 2913 D3D12_STATE_OBJECT_FLAG_ALLOW_LOCAL_DEPENDENCIES_ON_EXTERNAL_DEFINITIONS = 0x1, 2914 D3D12_STATE_OBJECT_FLAG_ALLOW_EXTERNAL_DEPENDENCIES_ON_LOCAL_DEFINITIONS = 0x2 2915 } 2916 2917 struct D3D12_STATE_OBJECT_CONFIG 2918 { 2919 D3D12_STATE_OBJECT_FLAGS Flags; 2920 } 2921 2922 struct D3D12_GLOBAL_ROOT_SIGNATURE 2923 { 2924 ID3D12RootSignature pGlobalRootSignature; 2925 } 2926 2927 struct D3D12_LOCAL_ROOT_SIGNATURE 2928 { 2929 ID3D12RootSignature pLocalRootSignature; 2930 } 2931 2932 struct D3D12_NODE_MASK 2933 { 2934 uint NodeMask; 2935 } 2936 2937 enum D3D12_EXPORT_FLAGS 2938 { 2939 D3D12_EXPORT_FLAG_NONE = 0 2940 } 2941 2942 struct D3D12_EXPORT_DESC 2943 { 2944 const wchar *Name; 2945 const wchar *ExportToRename; 2946 D3D12_EXPORT_FLAGS Flags; 2947 } 2948 2949 struct D3D12_DXIL_LIBRARY_DESC 2950 { 2951 D3D12_SHADER_BYTECODE DXILLibrary; 2952 uint NumExports; 2953 D3D12_EXPORT_DESC *pExports; 2954 } 2955 2956 struct D3D12_EXISTING_COLLECTION_DESC 2957 { 2958 ID3D12StateObject pExistingCollection; 2959 uint NumExports; 2960 D3D12_EXPORT_DESC *pExports; 2961 } 2962 2963 struct D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION 2964 { 2965 const D3D12_STATE_SUBOBJECT *pSubobjectToAssociate; 2966 uint NumExports; 2967 const wchar **pExports; 2968 } 2969 2970 struct D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION 2971 { 2972 const wchar *SubobjectToAssociate; 2973 uint NumExports; 2974 const wchar **pExports; 2975 } 2976 2977 enum D3D12_HIT_GROUP_TYPE 2978 { 2979 D3D12_HIT_GROUP_TYPE_TRIANGLES = 0, 2980 D3D12_HIT_GROUP_TYPE_PROCEDURAL_PRIMITIVE = 0x1 2981 } 2982 2983 struct D3D12_HIT_GROUP_DESC 2984 { 2985 const wchar *HitGroupExport; 2986 D3D12_HIT_GROUP_TYPE Type; 2987 const wchar *AnyHitShaderImport; 2988 const wchar *ClosestHitShaderImport; 2989 const wchar *IntersectionShaderImport; 2990 } 2991 2992 struct D3D12_RAYTRACING_SHADER_CONFIG 2993 { 2994 uint MaxPayloadSizeInBytes; 2995 uint MaxAttributeSizeInBytes; 2996 } 2997 2998 struct D3D12_RAYTRACING_PIPELINE_CONFIG 2999 { 3000 uint MaxTraceRecursionDepth; 3001 } 3002 3003 enum D3D12_STATE_OBJECT_TYPE 3004 { 3005 D3D12_STATE_OBJECT_TYPE_COLLECTION = 0, 3006 D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE = 3 3007 } 3008 3009 struct D3D12_STATE_OBJECT_DESC 3010 { 3011 D3D12_STATE_OBJECT_TYPE Type; 3012 uint NumSubobjects; 3013 const D3D12_STATE_SUBOBJECT *pSubobjects; 3014 } 3015 3016 enum D3D12_RAYTRACING_GEOMETRY_FLAGS 3017 { 3018 D3D12_RAYTRACING_GEOMETRY_FLAG_NONE = 0, 3019 D3D12_RAYTRACING_GEOMETRY_FLAG_OPAQUE = 0x1, 3020 D3D12_RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION = 0x2 3021 } 3022 3023 enum D3D12_RAYTRACING_GEOMETRY_TYPE 3024 { 3025 D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES = 0, 3026 D3D12_RAYTRACING_GEOMETRY_TYPE_PROCEDURAL_PRIMITIVE_AABBS = ( D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES + 1 ) 3027 } 3028 3029 enum D3D12_RAYTRACING_INSTANCE_FLAGS 3030 { 3031 D3D12_RAYTRACING_INSTANCE_FLAG_NONE = 0, 3032 D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_CULL_DISABLE = 0x1, 3033 D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x2, 3034 D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_OPAQUE = 0x4, 3035 D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_NON_OPAQUE = 0x8 3036 } 3037 3038 struct D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE 3039 { 3040 D3D12_GPU_VIRTUAL_ADDRESS StartAddress; 3041 ulong StrideInBytes; 3042 } 3043 3044 struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE 3045 { 3046 D3D12_GPU_VIRTUAL_ADDRESS StartAddress; 3047 ulong SizeInBytes; 3048 } 3049 3050 struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE 3051 { 3052 D3D12_GPU_VIRTUAL_ADDRESS StartAddress; 3053 ulong SizeInBytes; 3054 ulong StrideInBytes; 3055 } 3056 3057 struct D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC 3058 { 3059 D3D12_GPU_VIRTUAL_ADDRESS Transform3x4; 3060 DXGI_FORMAT IndexFormat; 3061 DXGI_FORMAT VertexFormat; 3062 uint IndexCount; 3063 uint VertexCount; 3064 D3D12_GPU_VIRTUAL_ADDRESS IndexBuffer; 3065 D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE VertexBuffer; 3066 } 3067 3068 struct D3D12_RAYTRACING_AABB 3069 { 3070 float MinX; 3071 float MinY; 3072 float MinZ; 3073 float MaxX; 3074 float MaxY; 3075 float MaxZ; 3076 } 3077 3078 struct D3D12_RAYTRACING_GEOMETRY_AABBS_DESC 3079 { 3080 ulong AABBCount; 3081 D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE AABBs; 3082 } 3083 3084 enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS 3085 { 3086 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_NONE = 0, 3087 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE = 0x1, 3088 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_COMPACTION = 0x2, 3089 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_TRACE = 0x4, 3090 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_BUILD = 0x8, 3091 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_MINIMIZE_MEMORY = 0x10, 3092 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE = 0x20 3093 } 3094 3095 enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE 3096 { 3097 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_CLONE = 0, 3098 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT = 0x1, 3099 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_VISUALIZATION_DECODE_FOR_TOOLS = 0x2, 3100 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_SERIALIZE = 0x3, 3101 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_DESERIALIZE = 0x4 3102 } 3103 3104 enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE 3105 { 3106 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL = 0, 3107 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL = 0x1 3108 } 3109 3110 enum D3D12_ELEMENTS_LAYOUT 3111 { 3112 D3D12_ELEMENTS_LAYOUT_ARRAY = 0, 3113 D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS = 0x1 3114 } 3115 3116 enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE 3117 { 3118 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE = 0, 3119 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION = 0x1, 3120 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION = 0x2, 3121 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE = 0x3 3122 } 3123 3124 struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC 3125 { 3126 D3D12_GPU_VIRTUAL_ADDRESS DestBuffer; 3127 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE InfoType; 3128 } 3129 3130 struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC 3131 { 3132 ulong CompactedSizeInBytes; 3133 } 3134 3135 struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC 3136 { 3137 ulong DecodedSizeInBytes; 3138 } 3139 3140 struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER 3141 { 3142 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type; 3143 uint NumDescs; 3144 } 3145 3146 struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC 3147 { 3148 ulong SerializedSizeInBytes; 3149 ulong NumBottomLevelAccelerationStructurePointers; 3150 } 3151 3152 struct D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER 3153 { 3154 GUID DriverOpaqueGUID; 3155 ubyte[16] DriverOpaqueVersioningData; 3156 } 3157 3158 enum D3D12_SERIALIZED_DATA_TYPE 3159 { 3160 D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE = 0 3161 } 3162 3163 enum D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS 3164 { 3165 D3D12_DRIVER_MATCHING_IDENTIFIER_COMPATIBLE_WITH_DEVICE = 0, 3166 D3D12_DRIVER_MATCHING_IDENTIFIER_UNSUPPORTED_TYPE = 0x1, 3167 D3D12_DRIVER_MATCHING_IDENTIFIER_UNRECOGNIZED = 0x2, 3168 D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_VERSION = 0x3, 3169 D3D12_DRIVER_MATCHING_IDENTIFIER_INCOMPATIBLE_TYPE = 0x4 3170 } 3171 3172 struct D3D12_SERIALIZED_RAYTRACING_ACCELERATION_STRUCTURE_HEADER 3173 { 3174 D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER DriverMatchingIdentifier; 3175 ulong SerializedSizeInBytesIncludingHeader; 3176 ulong DeserializedSizeInBytes; 3177 ulong NumBottomLevelAccelerationStructurePointersAfterHeader; 3178 } 3179 3180 struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC 3181 { 3182 ulong CurrentSizeInBytes; 3183 } 3184 3185 struct D3D12_RAYTRACING_INSTANCE_DESC 3186 { 3187 float[3][4] Transform; 3188 uint InstanceID; 3189 uint InstanceMask; 3190 uint InstanceContributionToHitGroupIndex; 3191 uint Flags; 3192 D3D12_GPU_VIRTUAL_ADDRESS AccelerationStructure; 3193 } 3194 3195 struct D3D12_RAYTRACING_GEOMETRY_DESC 3196 { 3197 D3D12_RAYTRACING_GEOMETRY_TYPE Type; 3198 D3D12_RAYTRACING_GEOMETRY_FLAGS Flags; 3199 union 3200 { 3201 D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC Triangles; 3202 D3D12_RAYTRACING_GEOMETRY_AABBS_DESC AABBs; 3203 }; 3204 } 3205 3206 struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS 3207 { 3208 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type; 3209 D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS Flags; 3210 uint NumDescs; 3211 D3D12_ELEMENTS_LAYOUT DescsLayout; 3212 union 3213 { 3214 D3D12_GPU_VIRTUAL_ADDRESS InstanceDescs; 3215 const D3D12_RAYTRACING_GEOMETRY_DESC *pGeometryDescs; 3216 const D3D12_RAYTRACING_GEOMETRY_DESC **ppGeometryDescs; 3217 }; 3218 } 3219 3220 struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC 3221 { 3222 D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData; 3223 D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS Inputs; 3224 D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData; 3225 D3D12_GPU_VIRTUAL_ADDRESS ScratchAccelerationStructureData; 3226 } 3227 3228 struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO 3229 { 3230 ulong ResultDataMaxSizeInBytes; 3231 ulong ScratchDataSizeInBytes; 3232 ulong UpdateScratchDataSizeInBytes; 3233 } 3234 3235 enum D3D12_RAY_FLAGS 3236 { 3237 D3D12_RAY_FLAG_NONE = 0, 3238 D3D12_RAY_FLAG_FORCE_OPAQUE = 0x1, 3239 D3D12_RAY_FLAG_FORCE_NON_OPAQUE = 0x2, 3240 D3D12_RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH = 0x4, 3241 D3D12_RAY_FLAG_SKIP_CLOSEST_HIT_SHADER = 0x8, 3242 D3D12_RAY_FLAG_CULL_BACK_FACING_TRIANGLES = 0x10, 3243 D3D12_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES = 0x20, 3244 D3D12_RAY_FLAG_CULL_OPAQUE = 0x40, 3245 D3D12_RAY_FLAG_CULL_NON_OPAQUE = 0x80 3246 } 3247 3248 enum D3D12_HIT_KIND 3249 { 3250 D3D12_HIT_KIND_TRIANGLE_FRONT_FACE = 0xfe, 3251 D3D12_HIT_KIND_TRIANGLE_BACK_FACE = 0xff 3252 } 3253 3254 mixin(uuid!(ID3D12Device5, "8b4f173b-2fea-4b80-8f58-4307191ab95d")); 3255 public interface ID3D12Device5 : ID3D12Device4 3256 { 3257 extern(Windows): 3258 HRESULT CreateLifetimeTracker(ID3D12LifetimeOwner pOwner, REFIID riid, void **ppvTracker); 3259 void RemoveDevice(); 3260 HRESULT EnumerateMetaCommands(uint *pNumMetaCommands, D3D12_META_COMMAND_DESC *pDescs); 3261 HRESULT EnumerateMetaCommandParameters(REFGUID CommandId, D3D12_META_COMMAND_PARAMETER_STAGE Stage, uint *pTotalStructureSizeInBytes, uint *pParameterCount, D3D12_META_COMMAND_PARAMETER_DESC *pParameterDescs); 3262 HRESULT CreateMetaCommand(REFGUID CommandId, uint NodeMask, const void *pCreationParametersData, size_t CreationParametersDataSizeInBytes, REFIID riid, void **ppMetaCommand); 3263 HRESULT CreateStateObject(const D3D12_STATE_OBJECT_DESC *pDesc, REFIID riid, void **ppStateObject); 3264 void GetRaytracingAccelerationStructurePrebuildInfo(const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS *pDesc, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *pInfo); 3265 D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS CheckDriverMatchingIdentifier(D3D12_SERIALIZED_DATA_TYPE SerializedDataType, const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER *pIdentifierToCheck); 3266 } 3267 3268 enum D3D12_AUTO_BREADCRUMB_OP 3269 { 3270 D3D12_AUTO_BREADCRUMB_OP_SETMARKER = 0, 3271 D3D12_AUTO_BREADCRUMB_OP_BEGINEVENT = 1, 3272 D3D12_AUTO_BREADCRUMB_OP_ENDEVENT = 2, 3273 D3D12_AUTO_BREADCRUMB_OP_DRAWINSTANCED = 3, 3274 D3D12_AUTO_BREADCRUMB_OP_DRAWINDEXEDINSTANCED = 4, 3275 D3D12_AUTO_BREADCRUMB_OP_EXECUTEINDIRECT = 5, 3276 D3D12_AUTO_BREADCRUMB_OP_DISPATCH = 6, 3277 D3D12_AUTO_BREADCRUMB_OP_COPYBUFFERREGION = 7, 3278 D3D12_AUTO_BREADCRUMB_OP_COPYTEXTUREREGION = 8, 3279 D3D12_AUTO_BREADCRUMB_OP_COPYRESOURCE = 9, 3280 D3D12_AUTO_BREADCRUMB_OP_COPYTILES = 10, 3281 D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCE = 11, 3282 D3D12_AUTO_BREADCRUMB_OP_CLEARRENDERTARGETVIEW = 12, 3283 D3D12_AUTO_BREADCRUMB_OP_CLEARUNORDEREDACCESSVIEW = 13, 3284 D3D12_AUTO_BREADCRUMB_OP_CLEARDEPTHSTENCILVIEW = 14, 3285 D3D12_AUTO_BREADCRUMB_OP_RESOURCEBARRIER = 15, 3286 D3D12_AUTO_BREADCRUMB_OP_EXECUTEBUNDLE = 16, 3287 D3D12_AUTO_BREADCRUMB_OP_PRESENT = 17, 3288 D3D12_AUTO_BREADCRUMB_OP_RESOLVEQUERYDATA = 18, 3289 D3D12_AUTO_BREADCRUMB_OP_BEGINSUBMISSION = 19, 3290 D3D12_AUTO_BREADCRUMB_OP_ENDSUBMISSION = 20, 3291 D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME = 21, 3292 D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES = 22, 3293 D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT = 23, 3294 D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT64 = 24, 3295 D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCEREGION = 25, 3296 D3D12_AUTO_BREADCRUMB_OP_WRITEBUFFERIMMEDIATE = 26, 3297 D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME1 = 27, 3298 D3D12_AUTO_BREADCRUMB_OP_SETPROTECTEDRESOURCESESSION = 28, 3299 D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME2 = 29, 3300 D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES1 = 30, 3301 D3D12_AUTO_BREADCRUMB_OP_BUILDRAYTRACINGACCELERATIONSTRUCTURE = 31, 3302 D3D12_AUTO_BREADCRUMB_OP_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = 32, 3303 D3D12_AUTO_BREADCRUMB_OP_COPYRAYTRACINGACCELERATIONSTRUCTURE = 33, 3304 D3D12_AUTO_BREADCRUMB_OP_DISPATCHRAYS = 34, 3305 D3D12_AUTO_BREADCRUMB_OP_INITIALIZEMETACOMMAND = 35, 3306 D3D12_AUTO_BREADCRUMB_OP_EXECUTEMETACOMMAND = 36, 3307 D3D12_AUTO_BREADCRUMB_OP_ESTIMATEMOTION = 37, 3308 D3D12_AUTO_BREADCRUMB_OP_RESOLVEMOTIONVECTORHEAP = 38, 3309 D3D12_AUTO_BREADCRUMB_OP_SETPIPELINESTATE1 = 39 3310 } 3311 3312 struct D3D12_AUTO_BREADCRUMB_NODE 3313 { 3314 const char *pCommandListDebugNameA; 3315 const wchar *pCommandListDebugNameW; 3316 const char *pCommandQueueDebugNameA; 3317 const wchar *pCommandQueueDebugNameW; 3318 ID3D12GraphicsCommandList pCommandList; 3319 ID3D12CommandQueue pCommandQueue; 3320 uint BreadcrumbCount; 3321 uint *pLastBreadcrumbValue; 3322 D3D12_AUTO_BREADCRUMB_OP *pCommandHistory; 3323 D3D12_AUTO_BREADCRUMB_NODE *pNext; 3324 } 3325 3326 enum D3D12_DRED_VERSION 3327 { 3328 D3D12_DRED_VERSION_1_0 = 0x1 3329 } 3330 3331 enum D3D12_DRED_FLAGS 3332 { 3333 D3D12_DRED_FLAG_NONE = 0, 3334 D3D12_DRED_FLAG_FORCE_ENABLE = 1, 3335 D3D12_DRED_FLAG_DISABLE_AUTOBREADCRUMBS = 2 3336 } 3337 3338 struct D3D12_DEVICE_REMOVED_EXTENDED_DATA 3339 { 3340 D3D12_DRED_FLAGS Flags; 3341 D3D12_AUTO_BREADCRUMB_NODE *pHeadAutoBreadcrumbNode; 3342 } 3343 3344 struct D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA 3345 { 3346 D3D12_DRED_VERSION Version; 3347 union 3348 { 3349 D3D12_DEVICE_REMOVED_EXTENDED_DATA Dred_1_0; 3350 }; 3351 } 3352 3353 mixin(uuid!(ID3D12Resource1, "9D5E227A-4430-4161-88B3-3ECA6BB16E19")); 3354 public interface ID3D12Resource1 : ID3D12Resource 3355 { 3356 extern(Windows): 3357 HRESULT GetProtectedResourceSession(REFIID riid, void **ppProtectedSession); 3358 } 3359 3360 mixin(uuid!(ID3D12Heap1, "572F7389-2168-49E3-9693-D6DF5871BF6D")); 3361 public interface ID3D12Heap1 : ID3D12Heap 3362 { 3363 extern(Windows): 3364 HRESULT GetProtectedResourceSession(REFIID riid, void **ppProtectedSession); 3365 } 3366 3367 mixin(uuid!(ID3D12GraphicsCommandList3, "6FDA83A7-B84C-4E38-9AC8-C7BD22016B3D")); 3368 public interface ID3D12GraphicsCommandList3 : ID3D12GraphicsCommandList2 3369 { 3370 extern(Windows): 3371 void SetProtectedResourceSession(ID3D12ProtectedResourceSession pProtectedResourceSession); 3372 } 3373 3374 enum D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE 3375 { 3376 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD = 0, 3377 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE = ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD + 1 ) , 3378 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR = ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE + 1 ) , 3379 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS = ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR + 1 ) 3380 } 3381 3382 struct D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS 3383 { 3384 D3D12_CLEAR_VALUE ClearValue; 3385 } 3386 3387 struct D3D12_RENDER_PASS_BEGINNING_ACCESS 3388 { 3389 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE Type; 3390 union 3391 { 3392 D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS Clear; 3393 }; 3394 } 3395 3396 enum D3D12_RENDER_PASS_ENDING_ACCESS_TYPE 3397 { 3398 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD = 0, 3399 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE = ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD + 1 ), 3400 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE = ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE + 1 ), 3401 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS = ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE + 1 ) 3402 } 3403 3404 struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS 3405 { 3406 uint SrcSubresource; 3407 uint DstSubresource; 3408 uint DstX; 3409 uint DstY; 3410 D3D12_RECT SrcRect; 3411 } 3412 3413 struct D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS 3414 { 3415 ID3D12Resource pSrcResource; 3416 ID3D12Resource pDstResource; 3417 uint SubresourceCount; 3418 const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_SUBRESOURCE_PARAMETERS *pSubresourceParameters; 3419 DXGI_FORMAT Format; 3420 D3D12_RESOLVE_MODE ResolveMode; 3421 bool PreserveResolveSource; 3422 } 3423 3424 struct D3D12_RENDER_PASS_ENDING_ACCESS 3425 { 3426 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE Type; 3427 union 3428 { 3429 D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS Resolve; 3430 }; 3431 } 3432 3433 struct D3D12_RENDER_PASS_RENDER_TARGET_DESC 3434 { 3435 D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor; 3436 D3D12_RENDER_PASS_BEGINNING_ACCESS BeginningAccess; 3437 D3D12_RENDER_PASS_ENDING_ACCESS EndingAccess; 3438 } 3439 3440 struct D3D12_RENDER_PASS_DEPTH_STENCIL_DESC 3441 { 3442 D3D12_CPU_DESCRIPTOR_HANDLE cpuDescriptor; 3443 D3D12_RENDER_PASS_BEGINNING_ACCESS DepthBeginningAccess; 3444 D3D12_RENDER_PASS_BEGINNING_ACCESS StencilBeginningAccess; 3445 D3D12_RENDER_PASS_ENDING_ACCESS DepthEndingAccess; 3446 D3D12_RENDER_PASS_ENDING_ACCESS StencilEndingAccess; 3447 } 3448 3449 enum D3D12_RENDER_PASS_FLAGS 3450 { 3451 D3D12_RENDER_PASS_FLAG_NONE = 0, 3452 D3D12_RENDER_PASS_FLAG_ALLOW_UAV_WRITES = 0x1, 3453 D3D12_RENDER_PASS_FLAG_SUSPENDING_PASS = 0x2, 3454 D3D12_RENDER_PASS_FLAG_RESUMING_PASS = 0x4 3455 } 3456 3457 mixin(uuid!(ID3D12MetaCommand, "DBB84C27-36CE-4FC9-B801-F048C46AC570")); 3458 public interface ID3D12MetaCommand : ID3D12Pageable 3459 { 3460 extern(Windows): 3461 ulong GetRequiredParameterResourceSize(D3D12_META_COMMAND_PARAMETER_STAGE Stage, uint ParameterIndex); 3462 } 3463 3464 struct D3D12_DISPATCH_RAYS_DESC 3465 { 3466 D3D12_GPU_VIRTUAL_ADDRESS_RANGE RayGenerationShaderRecord; 3467 D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE MissShaderTable; 3468 D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE HitGroupTable; 3469 D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE CallableShaderTable; 3470 uint Width; 3471 uint Height; 3472 uint Depth; 3473 } 3474 3475 mixin(uuid!(ID3D12GraphicsCommandList4, "8754318e-d3a9-4541-98cf-645b50dc4874")); 3476 public interface ID3D12GraphicsCommandList4 : ID3D12GraphicsCommandList3 3477 { 3478 extern(Windows): 3479 void BeginRenderPass(uint NumRenderTargets, const D3D12_RENDER_PASS_RENDER_TARGET_DESC *pRenderTargets, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC *pDepthStencil, D3D12_RENDER_PASS_FLAGS Flags); 3480 void EndRenderPass(); 3481 void InitializeMetaCommand(ID3D12MetaCommand pMetaCommand, const void *pInitializationParametersData, size_t InitializationParametersDataSizeInBytes); 3482 void ExecuteMetaCommand(ID3D12MetaCommand pMetaCommand, const void *pExecutionParametersData, size_t ExecutionParametersDataSizeInBytes); 3483 void BuildRaytracingAccelerationStructure(const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *pDesc, uint NumPostbuildInfoDescs, const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pPostbuildInfoDescs); 3484 void EmitRaytracingAccelerationStructurePostbuildInfo(const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pDesc, uint NumSourceAccelerationStructures, const D3D12_GPU_VIRTUAL_ADDRESS *pSourceAccelerationStructureData); 3485 void CopyRaytracingAccelerationStructure(D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData, D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode); 3486 void SetPipelineState1(ID3D12StateObject pStateObject); 3487 void DispatchRays(const D3D12_DISPATCH_RAYS_DESC *pDesc); 3488 } 3489