1 module directx.d3d12; 2 /*------------------------------------------------------------------------------------- 3 * 4 * Copyright (c) Microsoft Corporation 5 * 6 *-------------------------------------------------------------------------------------*/ 7 8 public import directx.dxgi; 9 public import directx.d3dcommon; 10 11 enum { 12 D3D12_16BIT_INDEX_STRIP_CUT_VALUE = 0xffff, 13 D3D12_32BIT_INDEX_STRIP_CUT_VALUE = 0xffffffff, 14 D3D12_8BIT_INDEX_STRIP_CUT_VALUE = 0xff, 15 16 D3D12_APPEND_ALIGNED_ELEMENT = 0xffffffff, 17 18 D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9, 19 20 D3D12_CLIP_OR_CULL_DISTANCE_COUNT = 8, 21 D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2, 22 23 D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14, 24 D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4, 25 D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32, 26 D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15, 27 D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT = 16, 28 D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4, 29 D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15, 30 D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1, 31 D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1, 32 33 D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64, 34 35 D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4, 36 D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1, 37 D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1, 38 D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1, 39 40 D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32, 41 42 D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1, 43 D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128, 44 D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1, 45 D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1, 46 D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128, 47 48 D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1, 49 D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16, 50 D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1, 51 D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1, 52 D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT = 16, 53 54 D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32, 55 56 D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4, 57 D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32, 58 D3D12_COMMONSHADER_TEMP_REGISTER_COUNT = 4096, 59 D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3, 60 D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3, 61 62 D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10, 63 D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10, 64 65 D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8, 66 D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7, 67 68 D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256, 69 70 D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 256, 71 D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = 64, 72 D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 240, 73 D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = 68, 74 D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 224, 75 D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = 72, 76 D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 208, 77 D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = 76, 78 D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 192, 79 D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = 84, 80 D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 176, 81 D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = 92, 82 D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 160, 83 D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = 100, 84 D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 144, 85 D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = 112, 86 D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 128, 87 D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = 128, 88 D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 112, 89 D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = 144, 90 D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 96, 91 D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = 168, 92 D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 80, 93 D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = 204, 94 D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 64, 95 D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = 256, 96 D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 48, 97 D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = 340, 98 D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 32, 99 D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = 512, 100 D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 16, 101 D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = 768, 102 103 D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = 1, 104 D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = 256, 105 D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = 768, 106 D3D12_CS_4_X_THREAD_GROUP_MAX_X = 768, 107 D3D12_CS_4_X_THREAD_GROUP_MAX_Y = 768, 108 D3D12_CS_4_X_UAV_REGISTER_COUNT = 1, 109 110 D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = 65535, 111 112 D3D12_CS_TGSM_REGISTER_COUNT = 8192, 113 D3D12_CS_TGSM_REGISTER_READS_PER_INST = 1, 114 D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = 1, 115 D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = 1, 116 117 D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS = 3, 118 D3D12_CS_THREADGROUPID_REGISTER_COUNT = 1, 119 120 D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS = 1, 121 D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT = 1, 122 123 D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS = 3, 124 D3D12_CS_THREADIDINGROUP_REGISTER_COUNT = 1, 125 126 D3D12_CS_THREADID_REGISTER_COMPONENTS = 3, 127 D3D12_CS_THREADID_REGISTER_COUNT = 1, 128 129 D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = 1024, 130 D3D12_CS_THREAD_GROUP_MAX_X = 1024, 131 D3D12_CS_THREAD_GROUP_MAX_Y = 1024, 132 D3D12_CS_THREAD_GROUP_MAX_Z = 64, 133 D3D12_CS_THREAD_GROUP_MIN_X = 1, 134 D3D12_CS_THREAD_GROUP_MIN_Y = 1, 135 D3D12_CS_THREAD_GROUP_MIN_Z = 1, 136 137 D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = 16384, 138 139 D3D12_DEFAULT_BLEND_FACTOR_ALPHA = 10f, 140 D3D12_DEFAULT_BLEND_FACTOR_BLUE = 10f, 141 D3D12_DEFAULT_BLEND_FACTOR_GREEN = 10f, 142 D3D12_DEFAULT_BLEND_FACTOR_RED = 10f, 143 D3D12_DEFAULT_BORDER_COLOR_COMPONENT = 0f, 144 D3D12_DEFAULT_DEPTH_BIAS = 0, 145 146 D3D12_DEFAULT_DEPTH_BIAS_CLAMP = 0f, 147 D3D12_DEFAULT_MAX_ANISOTROPY = 16, 148 149 D3D12_DEFAULT_MIP_LOD_BIAS = 0f , 150 D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 4194304, 151 152 D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0, 153 D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 65536, 154 D3D12_DEFAULT_SAMPLE_MASK = 0xffffffff, 155 156 D3D12_DEFAULT_SCISSOR_ENDX = 0, 157 D3D12_DEFAULT_SCISSOR_ENDY = 0, 158 D3D12_DEFAULT_SCISSOR_STARTX = 0, 159 D3D12_DEFAULT_SCISSOR_STARTY = 0, 160 161 D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0f, 162 D3D12_DEFAULT_STENCIL_READ_MASK = 0xff, 163 D3D12_DEFAULT_STENCIL_REFERENCE = 0, 164 D3D12_DEFAULT_STENCIL_WRITE_MASK = 0xff, 165 166 D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0, 167 D3D12_DEFAULT_VIEWPORT_HEIGHT = 0, 168 D3D12_DEFAULT_VIEWPORT_MAX_DEPTH = 0f, 169 D3D12_DEFAULT_VIEWPORT_MIN_DEPTH = 0f, 170 D3D12_DEFAULT_VIEWPORT_TOPLEFTX = 0, 171 D3D12_DEFAULT_VIEWPORT_TOPLEFTY = 0, 172 D3D12_DEFAULT_VIEWPORT_WIDTH = 0, 173 174 D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND = 0xffffffff, 175 176 D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END = 0xfffffff7, 177 D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff0, 178 179 D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS= 3968, 180 D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = 4, 181 D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32, 182 D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = 32, 183 D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = 2, 184 D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = 1, 185 D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS= 3, 186 D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = 32, 187 D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = 1, 188 D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = 2, 189 D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS= 1, 190 D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4, 191 D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32, 192 D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = 32, 193 D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2, 194 D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1, 195 D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS= 1, 196 D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32, 197 D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1, 198 D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2, 199 D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS= 1, 200 D3D12_DS_OUTPUT_REGISTER_COMPONENTS = 4, 201 D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 202 D3D12_DS_OUTPUT_REGISTER_COUNT = 32, 203 204 D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP = 6, 205 //D3D12_FLOAT32_MAX = 3402823466e+38f, 206 D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 6f, 207 D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 24f, 208 D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 10f, 209 D3D12_FLOAT_TO_SRGB_OFFSET = 55f, 210 D3D12_FLOAT_TO_SRGB_SCALE_1 = 1292f, 211 D3D12_FLOAT_TO_SRGB_SCALE_2 = 1055f, 212 D3D12_FLOAT_TO_SRGB_THRESHOLD = 31308f, 213 D3D12_FTOI_INSTRUCTION_MAX_INPUT = 2147483647999f, 214 D3D12_FTOI_INSTRUCTION_MIN_INPUT = -2147483648999f, 215 D3D12_FTOU_INSTRUCTION_MAX_INPUT = 4294967295999f, 216 D3D12_FTOU_INSTRUCTION_MIN_INPUT = 0f, 217 218 D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST = 2, 219 D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS = 1, 220 D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = 1, 221 D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT= 32, 222 D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = 1, 223 D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1, 224 D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32, 225 D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1, 226 D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2, 227 D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1, 228 D3D12_GS_INPUT_REGISTER_COMPONENTS = 4, 229 D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 230 D3D12_GS_INPUT_REGISTER_COUNT = 32, 231 D3D12_GS_INPUT_REGISTER_READS_PER_INST = 2, 232 D3D12_GS_INPUT_REGISTER_READ_PORTS = 1, 233 D3D12_GS_INPUT_REGISTER_VERTICES = 32, 234 D3D12_GS_MAX_INSTANCE_COUNT = 32, 235 D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = 1024, 236 D3D12_GS_OUTPUT_ELEMENTS = 32, 237 D3D12_GS_OUTPUT_REGISTER_COMPONENTS = 4, 238 D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 239 D3D12_GS_OUTPUT_REGISTER_COUNT = 32, 240 D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = 32, 241 D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = 32, 242 D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS = 4, 243 D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32, 244 D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST = 2, 245 D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS = 1, 246 D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xffffffff, 247 D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = 1, 248 D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32, 249 D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = 1, 250 D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = 2, 251 D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = 1, 252 D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = 1, 253 D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32, 254 D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = 1, 255 D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = 2, 256 D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = 1, 257 D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1, 258 D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32, 259 D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1, 260 D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2, 261 D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1, 262 D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xffffffff, 263 D3D12_HS_MAXTESSFACTOR_LOWER_BOUND = 10f, 264 D3D12_HS_MAXTESSFACTOR_UPPER_BOUND = 640f, 265 D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968, 266 D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = 1, 267 D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = 32, 268 D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = 1, 269 D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = 2, 270 D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = 1, 271 D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4, 272 D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32, 273 D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = 32, 274 D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2, 275 D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1, 276 D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS = 128, 277 D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0, 278 D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0, 279 D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0, 280 D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1, 281 D3D12_IA_INSTANCE_ID_BIT_COUNT = 32, 282 D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32, 283 D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT = 32, 284 D3D12_IA_PRIMITIVE_ID_BIT_COUNT= 32, 285 D3D12_IA_VERTEX_ID_BIT_COUNT = 32, 286 D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32, 287 D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128, 288 D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32, 289 D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xffffffff, 290 D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xffffffff, 291 D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = 0xffffffff, 292 D3D12_KEEP_UNORDERED_ACCESS_VIEWS = 0xffffffff, 293 D3D12_LINEAR_GAMMA = 10f, 294 D3D12_MAJOR_VERSION = 12, 295 D3D12_MAX_BORDER_COLOR_COMPONENT = 10f, 296 D3D12_MAX_DEPTH = 10f, 297 D3D12_MAX_LIVE_STATIC_SAMPLERS = 2032, 298 D3D12_MAX_MAXANISOTROPY = 16, 299 D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT = 32, 300 //D3D12_MAX_POSITION_VALUE = 3402823466e+34f, 301 D3D12_MAX_ROOT_COST = 64, 302 D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 = 1000000, 303 D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 = 1000000, 304 D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE = 2048, 305 D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17, 306 D3D12_MINOR_VERSION = 0, 307 D3D12_MIN_BORDER_COLOR_COMPONENT = 0f, 308 D3D12_MIN_DEPTH = 0f, 309 D3D12_MIN_MAXANISOTROPY = 0, 310 D3D12_MIP_LOD_BIAS_MAX = 1599f, 311 D3D12_MIP_LOD_BIAS_MIN = -160f, 312 D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT = 8, 313 D3D12_MIP_LOD_RANGE_BIT_COUNT = 8, 314 D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 14f, 315 D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0, 316 D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff, 317 D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff8, 318 D3D12_PACKED_TILE = 0xffffffff, 319 D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15, 320 D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16, 321 D3D12_PS_CS_UAV_REGISTER_COMPONENTS = 1, 322 D3D12_PS_CS_UAV_REGISTER_COUNT = 8, 323 D3D12_PS_CS_UAV_REGISTER_READS_PER_INST = 1, 324 D3D12_PS_CS_UAV_REGISTER_READ_PORTS = 1, 325 D3D12_PS_FRONTFACING_DEFAULT_VALUE = 0xffffffff, 326 D3D12_PS_FRONTFACING_FALSE_VALUE = 0, 327 D3D12_PS_FRONTFACING_TRUE_VALUE = 0xffffffff, 328 D3D12_PS_INPUT_REGISTER_COMPONENTS = 4, 329 D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 330 D3D12_PS_INPUT_REGISTER_COUNT = 32, 331 D3D12_PS_INPUT_REGISTER_READS_PER_INST = 2, 332 D3D12_PS_INPUT_REGISTER_READ_PORTS = 1, 333 D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0f, 334 D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1, 335 D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32, 336 D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1, 337 D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1, 338 D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32, 339 D3D12_PS_OUTPUT_MASK_REGISTER_COUNT = 1, 340 D3D12_PS_OUTPUT_REGISTER_COMPONENTS = 4, 341 D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 342 D3D12_PS_OUTPUT_REGISTER_COUNT = 8, 343 D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 5f, 344 D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = 16, 345 D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = 4096, 346 D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27, 347 D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096, 348 D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = 4096, 349 D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32, 350 D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32, 351 D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 16384, 352 D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024, 353 D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096, 354 D3D12_REQ_MAXANISOTROPY = 16, 355 D3D12_REQ_MIP_LEVELS = 15, 356 D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048, 357 D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = 4096, 358 D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 16384, 359 D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = 128, 360 D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = 25f, 361 D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM = 2048, 362 D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = 20, 363 D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = 4096, 364 D3D12_REQ_SUBRESOURCES = 30720, 365 D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048, 366 D3D12_REQ_TEXTURE1D_U_DIMENSION = 16384, 367 D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048, 368 D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384, 369 D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048, 370 D3D12_REQ_TEXTURECUBE_DIMENSION = 16384, 371 D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0, 372 D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = 0xffffffff, 373 D3D12_SHADER_MAJOR_VERSION = 5, 374 D3D12_SHADER_MAX_INSTANCES = 65535, 375 D3D12_SHADER_MAX_INTERFACES = 253, 376 D3D12_SHADER_MAX_INTERFACE_CALL_SITES = 4096, 377 D3D12_SHADER_MAX_TYPES = 65535, 378 D3D12_SHADER_MINOR_VERSION = 1, 379 D3D12_SHIFT_INSTRUCTION_PAD_VALUE = 0, 380 D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5, 381 D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8, 382 D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 65536, 383 D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 4096, 384 D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048, 385 D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 512, 386 D3D12_SO_BUFFER_SLOT_COUNT = 4, 387 D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xffffffff, 388 D3D12_SO_NO_RASTERIZED_STREAM = 0xffffffff, 389 D3D12_SO_OUTPUT_COMPONENT_COUNT = 128, 390 D3D12_SO_STREAM_COUNT = 4, 391 D3D12_SPEC_DATE_DAY = 14, 392 D3D12_SPEC_DATE_MONTH = 11, 393 D3D12_SPEC_DATE_YEAR = 2014, 394 D3D12_SPEC_VERSION = 116 , 395 D3D12_SRGB_GAMMA = 22f , 396 D3D12_SRGB_TO_FLOAT_DENOMINATOR_1 = 1292f , 397 D3D12_SRGB_TO_FLOAT_DENOMINATOR_2 = 1055f , 398 D3D12_SRGB_TO_FLOAT_EXPONENT = 24f, 399 D3D12_SRGB_TO_FLOAT_OFFSET = 55f, 400 D3D12_SRGB_TO_FLOAT_THRESHOLD = 4045f, 401 D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 5f, 402 D3D12_STANDARD_COMPONENT_BIT_COUNT = 32, 403 D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64, 404 D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4, 405 D3D12_STANDARD_PIXEL_COMPONENT_COUNT = 128, 406 D3D12_STANDARD_PIXEL_ELEMENT_COUNT = 32, 407 D3D12_STANDARD_VECTOR_SIZE = 4, 408 D3D12_STANDARD_VERTEX_ELEMENT_COUNT = 32, 409 D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64, 410 D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8, 411 D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT = 8, 412 D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff, 413 D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff0, 414 D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = 64, 415 D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = 64, 416 D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = 63, 417 D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR = 64, 418 D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = 2, 419 D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = 1, 420 D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = 1, 421 D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT = 16, 422 D3D12_TEXTURE_DATA_PITCH_ALIGNMENT = 256, 423 D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT = 512, 424 D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES= 65536, 425 D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT = 4096, 426 D3D12_UAV_SLOT_COUNT = 64, 427 D3D12_UNBOUND_MEMORY_ACCESS_RESULT = 0, 428 D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15, 429 D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16, 430 D3D12_VIEWPORT_BOUNDS_MAX = 32767, 431 D3D12_VIEWPORT_BOUNDS_MIN = -32768, 432 D3D12_VS_INPUT_REGISTER_COMPONENTS = 4, 433 D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 434 D3D12_VS_INPUT_REGISTER_COUNT = 32, 435 D3D12_VS_INPUT_REGISTER_READS_PER_INST = 2, 436 D3D12_VS_INPUT_REGISTER_READ_PORTS = 1, 437 D3D12_VS_OUTPUT_REGISTER_COMPONENTS = 4, 438 D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32, 439 D3D12_VS_OUTPUT_REGISTER_COUNT = 32, 440 D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10, 441 D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25, 442 D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25 443 } 444 445 alias UINT64 D3D12_GPU_VIRTUAL_ADDRESS; 446 447 alias D3D12_COMMAND_LIST_TYPE = uint; 448 enum : D3D12_COMMAND_LIST_TYPE { 449 D3D12_COMMAND_LIST_TYPE_DIRECT = 0, 450 D3D12_COMMAND_LIST_TYPE_BUNDLE = 1, 451 D3D12_COMMAND_LIST_TYPE_COMPUTE = 2, 452 D3D12_COMMAND_LIST_TYPE_COPY = 3 453 } 454 455 alias D3D12_COMMAND_QUEUE_FLAGS = uint; 456 enum : D3D12_COMMAND_QUEUE_FLAGS { 457 D3D12_COMMAND_QUEUE_FLAG_NONE = 0, 458 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1 459 } 460 461 alias D3D12_COMMAND_QUEUE_PRIORITY = uint; 462 enum : D3D12_COMMAND_QUEUE_PRIORITY { 463 D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0, 464 D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100 465 } 466 467 struct D3D12_COMMAND_QUEUE_DESC { 468 this(this) {} 469 D3D12_COMMAND_LIST_TYPE Type; 470 INT Priority; 471 D3D12_COMMAND_QUEUE_FLAGS Flags; 472 UINT NodeMask; 473 } 474 475 alias D3D12_PRIMITIVE_TOPOLOGY_TYPE = uint; 476 enum : D3D12_PRIMITIVE_TOPOLOGY_TYPE { 477 D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0, 478 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1, 479 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2, 480 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3, 481 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4 482 } 483 484 alias D3D12_INPUT_CLASSIFICATION = uint; 485 enum : D3D12_INPUT_CLASSIFICATION { 486 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0, 487 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1 488 } 489 490 struct D3D12_INPUT_ELEMENT_DESC { 491 LPCSTR SemanticName; 492 UINT SemanticIndex; 493 DXGI_FORMAT Format; 494 UINT InputSlot; 495 UINT AlignedByteOffset; 496 D3D12_INPUT_CLASSIFICATION InputSlotClass; 497 UINT InstanceDataStepRate; 498 } 499 500 alias D3D12_FILL_MODE = uint; 501 enum : D3D12_FILL_MODE { 502 D3D12_FILL_MODE_WIREFRAME = 2, 503 D3D12_FILL_MODE_SOLID = 3 504 } 505 506 alias D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY; 507 alias D3D_PRIMITIVE D3D12_PRIMITIVE; 508 509 alias D3D12_CULL_MODE = uint; 510 enum : D3D12_CULL_MODE { 511 D3D12_CULL_MODE_NONE = 1, 512 D3D12_CULL_MODE_FRONT = 2, 513 D3D12_CULL_MODE_BACK = 3 514 } 515 516 struct D3D12_SO_DECLARATION_ENTRY { 517 UINT Stream; 518 LPCSTR SemanticName; 519 UINT SemanticIndex; 520 BYTE StartComponent; 521 BYTE ComponentCount; 522 BYTE OutputSlot; 523 } 524 525 struct D3D12_VIEWPORT { 526 FLOAT TopLeftX = 0.0f; 527 FLOAT TopLeftY = 0.0f; 528 FLOAT Width = 0.0f; 529 FLOAT Height = 0.0f; 530 FLOAT MinDepth = 0.0f; 531 FLOAT MaxDepth = 0.0f; 532 } 533 534 alias RECT D3D12_RECT; 535 536 struct D3D12_BOX { 537 UINT left; 538 UINT top; 539 UINT front; 540 UINT right; 541 UINT bottom; 542 UINT back; 543 } 544 545 alias D3D12_COMPARISON_FUNC = uint; 546 enum : D3D12_COMPARISON_FUNC { 547 D3D12_COMPARISON_FUNC_NEVER = 1, 548 D3D12_COMPARISON_FUNC_LESS = 2, 549 D3D12_COMPARISON_FUNC_EQUAL = 3, 550 D3D12_COMPARISON_FUNC_LESS_EQUAL = 4, 551 D3D12_COMPARISON_FUNC_GREATER = 5, 552 D3D12_COMPARISON_FUNC_NOT_EQUAL = 6, 553 D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7, 554 D3D12_COMPARISON_FUNC_ALWAYS = 8 555 } 556 557 alias D3D12_DEPTH_WRITE_MASK = uint; 558 enum : D3D12_DEPTH_WRITE_MASK { 559 D3D12_DEPTH_WRITE_MASK_ZERO = 0, 560 D3D12_DEPTH_WRITE_MASK_ALL = 1 561 } 562 563 alias D3D12_STENCIL_OP = uint; 564 enum : D3D12_STENCIL_OP { 565 D3D12_STENCIL_OP_KEEP = 1, 566 D3D12_STENCIL_OP_ZERO = 2, 567 D3D12_STENCIL_OP_REPLACE = 3, 568 D3D12_STENCIL_OP_INCR_SAT = 4, 569 D3D12_STENCIL_OP_DECR_SAT = 5, 570 D3D12_STENCIL_OP_INVERT = 6, 571 D3D12_STENCIL_OP_INCR = 7, 572 D3D12_STENCIL_OP_DECR = 8 573 } 574 575 struct D3D12_DEPTH_STENCILOP_DESC { 576 D3D12_STENCIL_OP StencilFailOp; 577 D3D12_STENCIL_OP StencilDepthFailOp; 578 D3D12_STENCIL_OP StencilPassOp; 579 D3D12_COMPARISON_FUNC StencilFunc; 580 } 581 582 struct D3D12_DEPTH_STENCIL_DESC { 583 BOOL DepthEnable; 584 D3D12_DEPTH_WRITE_MASK DepthWriteMask; 585 D3D12_COMPARISON_FUNC DepthFunc; 586 BOOL StencilEnable; 587 UINT8 StencilReadMask; 588 UINT8 StencilWriteMask; 589 D3D12_DEPTH_STENCILOP_DESC FrontFace; 590 D3D12_DEPTH_STENCILOP_DESC BackFace; 591 } 592 593 alias D3D12_BLEND = uint; 594 enum : D3D12_BLEND { 595 D3D12_BLEND_ZERO = 1, 596 D3D12_BLEND_ONE = 2, 597 D3D12_BLEND_SRC_COLOR = 3, 598 D3D12_BLEND_INV_SRC_COLOR = 4, 599 D3D12_BLEND_SRC_ALPHA = 5, 600 D3D12_BLEND_INV_SRC_ALPHA = 6, 601 D3D12_BLEND_DEST_ALPHA = 7, 602 D3D12_BLEND_INV_DEST_ALPHA = 8, 603 D3D12_BLEND_DEST_COLOR = 9, 604 D3D12_BLEND_INV_DEST_COLOR = 10, 605 D3D12_BLEND_SRC_ALPHA_SAT = 11, 606 D3D12_BLEND_BLEND_FACTOR = 14, 607 D3D12_BLEND_INV_BLEND_FACTOR = 15, 608 D3D12_BLEND_SRC1_COLOR = 16, 609 D3D12_BLEND_INV_SRC1_COLOR = 17, 610 D3D12_BLEND_SRC1_ALPHA = 18, 611 D3D12_BLEND_INV_SRC1_ALPHA = 19 612 } 613 614 alias D3D12_BLEND_OP = uint; 615 enum : D3D12_BLEND_OP { 616 D3D12_BLEND_OP_ADD = 1, 617 D3D12_BLEND_OP_SUBTRACT = 2, 618 D3D12_BLEND_OP_REV_SUBTRACT = 3, 619 D3D12_BLEND_OP_MIN = 4, 620 D3D12_BLEND_OP_MAX = 5 621 } 622 623 alias D3D12_COLOR_WRITE_ENABLE = uint; 624 enum : D3D12_COLOR_WRITE_ENABLE { 625 D3D12_COLOR_WRITE_ENABLE_RED = 1, 626 D3D12_COLOR_WRITE_ENABLE_GREEN = 2, 627 D3D12_COLOR_WRITE_ENABLE_BLUE = 4, 628 D3D12_COLOR_WRITE_ENABLE_ALPHA = 8, 629 D3D12_COLOR_WRITE_ENABLE_ALL = D3D12_COLOR_WRITE_ENABLE_RED | 630 D3D12_COLOR_WRITE_ENABLE_GREEN | 631 D3D12_COLOR_WRITE_ENABLE_BLUE | 632 D3D12_COLOR_WRITE_ENABLE_ALPHA 633 } 634 635 alias D3D12_LOGIC_OP = uint; 636 enum : D3D12_LOGIC_OP { 637 D3D12_LOGIC_OP_CLEAR = 0, 638 D3D12_LOGIC_OP_SET = D3D12_LOGIC_OP_CLEAR + 1, 639 D3D12_LOGIC_OP_COPY = D3D12_LOGIC_OP_SET + 1, 640 D3D12_LOGIC_OP_COPY_INVERTED = D3D12_LOGIC_OP_COPY + 1, 641 D3D12_LOGIC_OP_NOOP = D3D12_LOGIC_OP_COPY_INVERTED + 1, 642 D3D12_LOGIC_OP_INVERT = D3D12_LOGIC_OP_NOOP + 1, 643 D3D12_LOGIC_OP_AND = D3D12_LOGIC_OP_INVERT + 1, 644 D3D12_LOGIC_OP_NAND = D3D12_LOGIC_OP_AND + 1, 645 D3D12_LOGIC_OP_OR = D3D12_LOGIC_OP_NAND + 1, 646 D3D12_LOGIC_OP_NOR = D3D12_LOGIC_OP_OR + 1, 647 D3D12_LOGIC_OP_XOR = D3D12_LOGIC_OP_NOR + 1, 648 D3D12_LOGIC_OP_EQUIV = D3D12_LOGIC_OP_XOR + 1, 649 D3D12_LOGIC_OP_AND_REVERSE = D3D12_LOGIC_OP_EQUIV + 1, 650 D3D12_LOGIC_OP_AND_INVERTED = D3D12_LOGIC_OP_AND_REVERSE + 1, 651 D3D12_LOGIC_OP_OR_REVERSE = D3D12_LOGIC_OP_AND_INVERTED + 1, 652 D3D12_LOGIC_OP_OR_INVERTED = D3D12_LOGIC_OP_OR_REVERSE + 1 653 } 654 655 struct D3D12_RENDER_TARGET_BLEND_DESC { 656 BOOL BlendEnable; 657 BOOL LogicOpEnable; 658 D3D12_BLEND SrcBlend; 659 D3D12_BLEND DestBlend; 660 D3D12_BLEND_OP BlendOp; 661 D3D12_BLEND SrcBlendAlpha; 662 D3D12_BLEND DestBlendAlpha; 663 D3D12_BLEND_OP BlendOpAlpha; 664 D3D12_LOGIC_OP LogicOp; 665 UINT8 RenderTargetWriteMask; 666 } 667 668 struct D3D12_BLEND_DESC { 669 BOOL AlphaToCoverageEnable; 670 BOOL IndependentBlendEnable; 671 D3D12_RENDER_TARGET_BLEND_DESC[8] RenderTarget; 672 } 673 674 alias D3D12_CONSERVATIVE_RASTERIZATION_MODE = uint; 675 enum : D3D12_CONSERVATIVE_RASTERIZATION_MODE { 676 D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, 677 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1 678 } 679 680 // defaults from MSDN 681 struct D3D12_RASTERIZER_DESC { 682 D3D12_FILL_MODE FillMode = D3D12_FILL_MODE_SOLID; 683 D3D12_CULL_MODE CullMode = D3D12_CULL_MODE_BACK; 684 BOOL FrontCounterClockwise = FALSE; 685 INT DepthBias = 0; 686 FLOAT DepthBiasClamp = 0.0f; 687 FLOAT SlopeScaledDepthBias = 0.0f; 688 BOOL DepthClipEnable = TRUE; 689 BOOL MultisampleEnable = FALSE; 690 BOOL AntialiasedLineEnable = FALSE; 691 UINT ForcedSampleCount = 0; 692 D3D12_CONSERVATIVE_RASTERIZATION_MODE ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF; 693 } 694 695 mixin(uuid!(ID3D12Object, "c4fec28f-7966-4e95-9f94-f431cb56c3b8")); 696 extern(C++) interface ID3D12Object : IUnknown { 697 HRESULT GetPrivateData(REFGUID guid, 698 UINT* pDataSize, 699 void* pData); 700 701 HRESULT SetPrivateData(REFGUID guid, 702 UINT DataSize, 703 const(void)* pData); 704 705 HRESULT SetPrivateDataInterface(REFGUID guid, 706 const IUnknown pData); 707 708 HRESULT SetName(LPCWSTR Name); 709 } 710 711 mixin(uuid!(ID3D12DeviceChild, "905db94b-a00c-4140-9df5-2b64ca9ea357")); 712 extern(C++) interface ID3D12DeviceChild : ID3D12Object { 713 HRESULT GetDevice(REFIID riid, 714 void** ppvDevice); 715 } 716 717 mixin(uuid!(ID3D12RootSignature, "c54a6b66-72df-4ee8-8be5-a946a1429214")); 718 extern(C++) interface ID3D12RootSignature : ID3D12DeviceChild {} 719 720 struct D3D12_SHADER_BYTECODE { 721 const(void)* pShaderBytecode; 722 SIZE_T BytecodeLength; 723 } 724 725 struct D3D12_STREAM_OUTPUT_DESC { 726 const(D3D12_SO_DECLARATION_ENTRY)* pSODeclaration; 727 UINT NumEntries; 728 const(UINT)* pBufferStrides; 729 UINT NumStrides; 730 UINT RasterizedStream; 731 } 732 733 struct D3D12_INPUT_LAYOUT_DESC { 734 const(D3D12_INPUT_ELEMENT_DESC)* pInputElementDescs; 735 UINT NumElements; 736 } 737 738 alias D3D12_INDEX_BUFFER_STRIP_CUT_VALUE = uint; 739 enum : D3D12_INDEX_BUFFER_STRIP_CUT_VALUE { 740 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0, 741 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1, 742 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2 743 } 744 745 struct D3D12_CACHED_PIPELINE_STATE { 746 const(void)* pCachedBlob; 747 SIZE_T CachedBlobSizeInBytes; 748 } 749 750 alias D3D12_PIPELINE_STATE_FLAGS = uint; 751 enum : D3D12_PIPELINE_STATE_FLAGS { 752 D3D12_PIPELINE_STATE_FLAG_NONE = 0, 753 D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1 754 } 755 756 struct D3D12_GRAPHICS_PIPELINE_STATE_DESC { 757 ID3D12RootSignature pRootSignature; 758 D3D12_SHADER_BYTECODE VS; 759 D3D12_SHADER_BYTECODE PS; 760 D3D12_SHADER_BYTECODE DS; 761 D3D12_SHADER_BYTECODE HS; 762 D3D12_SHADER_BYTECODE GS; 763 D3D12_STREAM_OUTPUT_DESC StreamOutput; 764 D3D12_BLEND_DESC BlendState; 765 UINT SampleMask; 766 D3D12_RASTERIZER_DESC RasterizerState; 767 D3D12_DEPTH_STENCIL_DESC DepthStencilState; 768 D3D12_INPUT_LAYOUT_DESC InputLayout; 769 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue; 770 D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType; 771 UINT NumRenderTargets; 772 DXGI_FORMAT[8] RTVFormats; 773 DXGI_FORMAT DSVFormat; 774 DXGI_SAMPLE_DESC SampleDesc; 775 UINT NodeMask; 776 D3D12_CACHED_PIPELINE_STATE CachedPSO; 777 D3D12_PIPELINE_STATE_FLAGS Flags; 778 } 779 780 struct D3D12_COMPUTE_PIPELINE_STATE_DESC { 781 ID3D12RootSignature pRootSignature; 782 D3D12_SHADER_BYTECODE CS; 783 UINT NodeMask; 784 D3D12_CACHED_PIPELINE_STATE CachedPSO; 785 D3D12_PIPELINE_STATE_FLAGS Flags; 786 } 787 788 alias D3D12_FEATURE = uint; 789 enum : D3D12_FEATURE { 790 D3D12_FEATURE_D3D12_OPTIONS = 0, 791 D3D12_FEATURE_ARCHITECTURE = D3D12_FEATURE_D3D12_OPTIONS + 1, 792 D3D12_FEATURE_FEATURE_LEVELS = D3D12_FEATURE_ARCHITECTURE + 1, 793 D3D12_FEATURE_FORMAT_SUPPORT = D3D12_FEATURE_FEATURE_LEVELS + 1, 794 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = D3D12_FEATURE_FORMAT_SUPPORT + 1, 795 D3D12_FEATURE_FORMAT_INFO = D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS + 1, 796 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = D3D12_FEATURE_FORMAT_INFO + 1 797 } 798 799 alias D3D12_SHADER_MIN_PRECISION_SUPPORT = uint; 800 enum : D3D12_SHADER_MIN_PRECISION_SUPPORT { 801 D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0, 802 D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1, 803 D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2 804 } 805 806 alias D3D12_TILED_RESOURCES_TIER = uint; 807 enum : D3D12_TILED_RESOURCES_TIER { 808 D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0, 809 D3D12_TILED_RESOURCES_TIER_1 = 1, 810 D3D12_TILED_RESOURCES_TIER_2 = 2, 811 D3D12_TILED_RESOURCES_TIER_3 = 3 812 } 813 814 alias D3D12_RESOURCE_BINDING_TIER = uint; 815 enum : D3D12_RESOURCE_BINDING_TIER { 816 D3D12_RESOURCE_BINDING_TIER_1 = 1, 817 D3D12_RESOURCE_BINDING_TIER_2 = 2, 818 D3D12_RESOURCE_BINDING_TIER_3 = 3 819 } 820 821 alias D3D12_CONSERVATIVE_RASTERIZATION_TIER = uint; 822 enum : D3D12_CONSERVATIVE_RASTERIZATION_TIER { 823 D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0, 824 D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, 825 D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, 826 D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3 827 } 828 829 alias D3D12_FORMAT_SUPPORT1 = uint; 830 enum : D3D12_FORMAT_SUPPORT1 { 831 D3D12_FORMAT_SUPPORT1_NONE = 0, 832 D3D12_FORMAT_SUPPORT1_BUFFER = 0x1, 833 D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x2, 834 D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x4, 835 D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x8, 836 D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x10, 837 D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x20, 838 D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x40, 839 D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x80, 840 D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x100, 841 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x200, 842 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x400, 843 D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x800, 844 D3D12_FORMAT_SUPPORT1_MIP = 0x1000, 845 D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x4000, 846 D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x8000, 847 D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x10000, 848 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x40000, 849 D3D12_FORMAT_SUPPORT1_DISPLAY = 0x80000, 850 D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x100000, 851 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x200000, 852 D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x400000, 853 D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x800000, 854 D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x1000000, 855 D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, 856 D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x4000000, 857 D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x8000000, 858 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000, 859 D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000, 860 D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000 861 } 862 863 alias D3D12_FORMAT_SUPPORT2 = uint; 864 enum : D3D12_FORMAT_SUPPORT2 { 865 D3D12_FORMAT_SUPPORT2_NONE = 0, 866 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, 867 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, 868 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, 869 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, 870 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, 871 D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, 872 D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, 873 D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, 874 D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, 875 D3D12_FORMAT_SUPPORT2_TILED = 0x200, 876 D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000 877 } 878 879 alias D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS = uint; 880 enum : D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS { 881 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0, 882 D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x1 883 } 884 885 alias D3D12_CROSS_NODE_SHARING_TIER = uint; 886 enum : D3D12_CROSS_NODE_SHARING_TIER { 887 D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0, 888 D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1, 889 D3D12_CROSS_NODE_SHARING_TIER_1 = 2, 890 D3D12_CROSS_NODE_SHARING_TIER_2 = 3 891 } 892 893 alias D3D12_RESOURCE_HEAP_TIER = uint; 894 enum : D3D12_RESOURCE_HEAP_TIER { 895 D3D12_RESOURCE_HEAP_TIER_1 = 1, 896 D3D12_RESOURCE_HEAP_TIER_2 = 2 897 } 898 899 struct D3D12_FEATURE_DATA_D3D12_OPTIONS { 900 BOOL DoublePrecisionFloatShaderOps; 901 BOOL OutputMergerLogicOp; 902 D3D12_SHADER_MIN_PRECISION_SUPPORT MinPrecisionSupport; 903 D3D12_TILED_RESOURCES_TIER TiledResourcesTier; 904 D3D12_RESOURCE_BINDING_TIER ResourceBindingTier; 905 BOOL PSSpecifiedStencilRefSupported; 906 BOOL TypedUAVLoadAdditionalFormats; 907 BOOL ROVsSupported; 908 D3D12_CONSERVATIVE_RASTERIZATION_TIER ConservativeRasterizationTier; 909 UINT MaxGPUVirtualAddressBitsPerResource; 910 BOOL StandardSwizzle64KBSupported; 911 D3D12_CROSS_NODE_SHARING_TIER CrossNodeSharingTier; 912 BOOL CrossAdapterRowMajorTextureSupported; 913 BOOL VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation; 914 D3D12_RESOURCE_HEAP_TIER ResourceHeapTier; 915 } 916 917 struct D3D12_FEATURE_DATA_ARCHITECTURE { 918 UINT NodeIndex; 919 BOOL TileBasedRenderer; 920 BOOL UMA; 921 BOOL CacheCoherentUMA; 922 } 923 924 struct D3D12_FEATURE_DATA_FEATURE_LEVELS { 925 UINT NumFeatureLevels; 926 const(D3D_FEATURE_LEVEL)* pFeatureLevelsRequested; 927 D3D_FEATURE_LEVEL MaxSupportedFeatureLevel; 928 } 929 930 struct D3D12_FEATURE_DATA_FORMAT_SUPPORT { 931 DXGI_FORMAT Format; 932 D3D12_FORMAT_SUPPORT1 Support1; 933 D3D12_FORMAT_SUPPORT2 Support2; 934 } 935 936 struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS { 937 DXGI_FORMAT Format; 938 UINT SampleCount; 939 D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS Flags; 940 UINT NumQualityLevels; 941 } 942 943 struct D3D12_FEATURE_DATA_FORMAT_INFO { 944 DXGI_FORMAT Format; 945 UINT8 PlaneCount; 946 } 947 948 struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT { 949 UINT MaxGPUVirtualAddressBitsPerResource; 950 UINT MaxGPUVirtualAddressBitsPerProcess; 951 } 952 953 struct D3D12_RESOURCE_ALLOCATION_INFO { 954 this(this) {} 955 UINT64 SizeInBytes; 956 UINT64 Alignment; 957 } 958 959 alias D3D12_HEAP_TYPE = uint; 960 enum : D3D12_HEAP_TYPE { 961 D3D12_HEAP_TYPE_DEFAULT = 1, 962 D3D12_HEAP_TYPE_UPLOAD = 2, 963 D3D12_HEAP_TYPE_READBACK = 3, 964 D3D12_HEAP_TYPE_CUSTOM = 4 965 } 966 967 alias D3D12_CPU_PAGE_PROPERTY = uint; 968 enum : D3D12_CPU_PAGE_PROPERTY { 969 D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0, 970 D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1, 971 D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2, 972 D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3 973 } 974 975 alias D3D12_MEMORY_POOL = uint; 976 enum : D3D12_MEMORY_POOL { 977 D3D12_MEMORY_POOL_UNKNOWN = 0, 978 D3D12_MEMORY_POOL_L0 = 1, 979 D3D12_MEMORY_POOL_L1 = 2 980 } 981 982 struct D3D12_HEAP_PROPERTIES { 983 this(this) {} 984 D3D12_HEAP_TYPE Type; 985 D3D12_CPU_PAGE_PROPERTY CPUPageProperty; 986 D3D12_MEMORY_POOL MemoryPoolPreference; 987 UINT CreationNodeMask; 988 UINT VisibleNodeMask; 989 } 990 991 alias D3D12_HEAP_FLAGS = uint; 992 enum : D3D12_HEAP_FLAGS { 993 D3D12_HEAP_FLAG_NONE = 0, 994 D3D12_HEAP_FLAG_SHARED = 0x1, 995 D3D12_HEAP_FLAG_DENY_BUFFERS = 0x4, 996 D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x8, 997 D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20, 998 D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40, 999 D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80, 1000 D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0, 1001 D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xc0, 1002 D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44, 1003 D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84 1004 } 1005 1006 struct D3D12_HEAP_DESC { 1007 this(this) {} 1008 UINT64 SizeInBytes; 1009 D3D12_HEAP_PROPERTIES Properties; 1010 UINT64 Alignment; 1011 D3D12_HEAP_FLAGS Flags; 1012 } 1013 1014 alias D3D12_RESOURCE_DIMENSION = uint; 1015 enum : D3D12_RESOURCE_DIMENSION { 1016 D3D12_RESOURCE_DIMENSION_UNKNOWN = 0, 1017 D3D12_RESOURCE_DIMENSION_BUFFER = 1, 1018 D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2, 1019 D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3, 1020 D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4 1021 } 1022 1023 alias D3D12_TEXTURE_LAYOUT = uint; 1024 enum : D3D12_TEXTURE_LAYOUT { 1025 D3D12_TEXTURE_LAYOUT_UNKNOWN = 0, 1026 D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1, 1027 D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2, 1028 D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3 1029 } 1030 1031 alias D3D12_RESOURCE_FLAGS = uint; 1032 enum : D3D12_RESOURCE_FLAGS { 1033 D3D12_RESOURCE_FLAG_NONE = 0, 1034 D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1, 1035 D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2, 1036 D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4, 1037 D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8, 1038 D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10, 1039 D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20 1040 } 1041 1042 struct D3D12_RESOURCE_DESC { 1043 this(this) {} 1044 D3D12_RESOURCE_DIMENSION Dimension; 1045 UINT64 Alignment; 1046 UINT64 Width; 1047 UINT Height; 1048 UINT16 DepthOrArraySize; 1049 UINT16 MipLevels; 1050 DXGI_FORMAT Format; 1051 DXGI_SAMPLE_DESC SampleDesc; 1052 D3D12_TEXTURE_LAYOUT Layout; 1053 D3D12_RESOURCE_FLAGS Flags; 1054 } 1055 1056 struct D3D12_DEPTH_STENCIL_VALUE { 1057 FLOAT Depth = 0.0f; 1058 UINT8 Stencil; 1059 } 1060 1061 struct D3D12_CLEAR_VALUE { 1062 DXGI_FORMAT Format; 1063 union { 1064 FLOAT[4] Color; 1065 D3D12_DEPTH_STENCIL_VALUE DepthStencil; 1066 } 1067 } 1068 1069 struct D3D12_RANGE { 1070 SIZE_T Begin; 1071 SIZE_T End; 1072 } 1073 1074 struct D3D12_SUBRESOURCE_INFO { 1075 UINT64 Offset; 1076 UINT RowPitch; 1077 UINT DepthPitch; 1078 } 1079 1080 struct D3D12_TILED_RESOURCE_COORDINATE { 1081 UINT X; 1082 UINT Y; 1083 UINT Z; 1084 UINT Subresource; 1085 } 1086 1087 struct D3D12_TILE_REGION_SIZE { 1088 UINT NumTiles; 1089 BOOL UseBox; 1090 UINT Width; 1091 UINT16 Height; 1092 UINT16 Depth; 1093 } 1094 1095 alias D3D12_TILE_RANGE_FLAGS = uint; 1096 enum : D3D12_TILE_RANGE_FLAGS { 1097 D3D12_TILE_RANGE_FLAG_NONE = 0, 1098 D3D12_TILE_RANGE_FLAG_NULL = 1, 1099 D3D12_TILE_RANGE_FLAG_SKIP = 2, 1100 D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 4 1101 } 1102 1103 struct D3D12_SUBRESOURCE_TILING { 1104 UINT WidthInTiles; 1105 UINT16 HeightInTiles; 1106 UINT16 DepthInTiles; 1107 UINT StartTileIndexInOverallResource; 1108 } 1109 1110 struct D3D12_TILE_SHAPE { 1111 UINT WidthInTexels; 1112 UINT HeightInTexels; 1113 UINT DepthInTexels; 1114 } 1115 1116 struct D3D12_PACKED_MIP_INFO { 1117 UINT8 NumStandardMips; 1118 UINT8 NumPackedMips; 1119 UINT NumTilesForPackedMips; 1120 UINT StartTileIndexInOverallResource; 1121 } 1122 1123 alias D3D12_TILE_MAPPING_FLAGS = uint; 1124 enum : D3D12_TILE_MAPPING_FLAGS { 1125 D3D12_TILE_MAPPING_FLAG_NONE = 0, 1126 D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1 1127 } 1128 1129 alias D3D12_TILE_COPY_FLAGS = uint; 1130 enum : D3D12_TILE_COPY_FLAGS { 1131 D3D12_TILE_COPY_FLAG_NONE = 0, 1132 D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1, 1133 D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, 1134 D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4 1135 } 1136 1137 alias D3D12_RESOURCE_STATES = uint; 1138 enum : D3D12_RESOURCE_STATES { 1139 D3D12_RESOURCE_STATE_COMMON = 0, 1140 D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1, 1141 D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2, 1142 D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4, 1143 D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8, 1144 D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10, 1145 D3D12_RESOURCE_STATE_DEPTH_READ = 0x20, 1146 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40, 1147 D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80, 1148 D3D12_RESOURCE_STATE_STREAM_OUT = 0x100, 1149 D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200, 1150 D3D12_RESOURCE_STATE_COPY_DEST = 0x400, 1151 D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800, 1152 D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000, 1153 D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000, 1154 D3D12_RESOURCE_STATE_GENERIC_READ = 0x1 | 0x2 | 0x40 | 0x80 | 0x200 | 0x800, 1155 D3D12_RESOURCE_STATE_PRESENT = 0, 1156 D3D12_RESOURCE_STATE_PREDICATION = 0x200 1157 } 1158 1159 alias D3D12_RESOURCE_BARRIER_TYPE = uint; 1160 enum : D3D12_RESOURCE_BARRIER_TYPE { 1161 D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0, 1162 D3D12_RESOURCE_BARRIER_TYPE_ALIASING = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION + 1, 1163 D3D12_RESOURCE_BARRIER_TYPE_UAV = D3D12_RESOURCE_BARRIER_TYPE_ALIASING + 1 1164 } 1165 1166 1167 struct D3D12_RESOURCE_TRANSITION_BARRIER { 1168 ID3D12Resource pResource; 1169 UINT Subresource; 1170 D3D12_RESOURCE_STATES StateBefore; 1171 D3D12_RESOURCE_STATES StateAfter; 1172 } 1173 1174 struct D3D12_RESOURCE_ALIASING_BARRIER { 1175 ID3D12Resource pResourceBefore; 1176 ID3D12Resource pResourceAfter; 1177 } 1178 1179 struct D3D12_RESOURCE_UAV_BARRIER { 1180 ID3D12Resource pResource; 1181 } 1182 1183 alias D3D12_RESOURCE_BARRIER_FLAGS = uint; 1184 enum : D3D12_RESOURCE_BARRIER_FLAGS { 1185 D3D12_RESOURCE_BARRIER_FLAG_NONE = 0, 1186 D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1, 1187 D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2 1188 } 1189 1190 struct D3D12_RESOURCE_BARRIER { 1191 D3D12_RESOURCE_BARRIER_TYPE Type; 1192 D3D12_RESOURCE_BARRIER_FLAGS Flags; 1193 union { 1194 D3D12_RESOURCE_TRANSITION_BARRIER Transition; 1195 D3D12_RESOURCE_ALIASING_BARRIER Aliasing; 1196 D3D12_RESOURCE_UAV_BARRIER UAV; 1197 } 1198 } 1199 1200 struct D3D12_SUBRESOURCE_FOOTPRINT { 1201 DXGI_FORMAT Format; 1202 UINT Width; 1203 UINT Height; 1204 UINT Depth; 1205 UINT RowPitch; 1206 } 1207 1208 struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT { 1209 UINT64 Offset; 1210 D3D12_SUBRESOURCE_FOOTPRINT Footprint; 1211 } 1212 1213 alias D3D12_TEXTURE_COPY_TYPE = uint; 1214 enum : D3D12_TEXTURE_COPY_TYPE { 1215 D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0, 1216 D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1 1217 } 1218 1219 struct D3D12_TEXTURE_COPY_LOCATION { 1220 ID3D12Resource pResource; 1221 D3D12_TEXTURE_COPY_TYPE Type; 1222 union { 1223 D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint; 1224 UINT SubresourceIndex; 1225 } 1226 } 1227 1228 alias D3D12_SHADER_COMPONENT_MAPPING = uint; 1229 enum : D3D12_SHADER_COMPONENT_MAPPING { 1230 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0, 1231 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1, 1232 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2, 1233 D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3, 1234 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4, 1235 D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5 1236 } 1237 1238 enum { 1239 D3D12_SHADER_COMPONENT_MAPPING_MASK = 0x7, 1240 D3D12_SHADER_COMPONENT_MAPPING_SHIFT = 3, 1241 D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES = 1242 1 << (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 4), 1243 D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING = 1244 D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 1, 2, 3) 1245 } 1246 1247 pure nothrow @nogc @safe { 1248 uint D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(uint Src0, uint Src1, 1249 uint Src2, uint Src3) 1250 { 1251 return ( (Src0 & D3D12_SHADER_COMPONENT_MAPPING_MASK) | 1252 ((Src1 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << 1253 D3D12_SHADER_COMPONENT_MAPPING_SHIFT) | 1254 ((Src2 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << 1255 (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 2)) | 1256 ((Src3 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << 1257 (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * 3)) | 1258 D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES); 1259 } 1260 1261 uint D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(uint ComponentToExtract, 1262 uint Mapping) 1263 { 1264 return cast(D3D12_SHADER_COMPONENT_MAPPING) 1265 (Mapping >> 1266 (D3D12_SHADER_COMPONENT_MAPPING_SHIFT * ComponentToExtract) & 1267 D3D12_SHADER_COMPONENT_MAPPING_MASK); 1268 } 1269 } 1270 1271 alias D3D12_BUFFER_SRV_FLAGS = uint; 1272 enum : D3D12_BUFFER_SRV_FLAGS { 1273 D3D12_BUFFER_SRV_FLAG_NONE = 0, 1274 D3D12_BUFFER_SRV_FLAG_RAW = 0x1 1275 } 1276 1277 struct D3D12_BUFFER_SRV { 1278 UINT64 FirstElement; 1279 UINT NumElements; 1280 UINT StructureByteStride; 1281 D3D12_BUFFER_SRV_FLAGS Flags; 1282 } 1283 1284 struct D3D12_TEX1D_SRV { 1285 UINT MostDetailedMip; 1286 UINT MipLevels; 1287 FLOAT ResourceMinLODClamp = 0.0f; 1288 } 1289 1290 struct D3D12_TEX1D_ARRAY_SRV { 1291 UINT MostDetailedMip; 1292 UINT MipLevels; 1293 UINT FirstArraySlice; 1294 UINT ArraySize; 1295 FLOAT ResourceMinLODClamp = 0.0f; 1296 } 1297 1298 struct D3D12_TEX2D_SRV { 1299 UINT MostDetailedMip; 1300 UINT MipLevels; 1301 UINT PlaneSlice; 1302 FLOAT ResourceMinLODClamp = 0.0f; 1303 } 1304 1305 struct D3D12_TEX2D_ARRAY_SRV { 1306 UINT MostDetailedMip; 1307 UINT MipLevels; 1308 UINT FirstArraySlice; 1309 UINT ArraySize; 1310 UINT PlaneSlice; 1311 FLOAT ResourceMinLODClamp = 0.0f; 1312 } 1313 1314 struct D3D12_TEX3D_SRV { 1315 UINT MostDetailedMip; 1316 UINT MipLevels; 1317 FLOAT ResourceMinLODClamp = 0.0f; 1318 } 1319 1320 struct D3D12_TEXCUBE_SRV { 1321 UINT MostDetailedMip; 1322 UINT MipLevels; 1323 FLOAT ResourceMinLODClamp = 0.0f; 1324 } 1325 1326 struct D3D12_TEXCUBE_ARRAY_SRV { 1327 UINT MostDetailedMip; 1328 UINT MipLevels; 1329 UINT First2DArrayFace; 1330 UINT NumCubes; 1331 FLOAT ResourceMinLODClamp = 0.0f; 1332 } 1333 1334 struct D3D12_TEX2DMS_SRV { 1335 UINT UnusedField_NothingToDefine; 1336 } 1337 1338 struct D3D12_TEX2DMS_ARRAY_SRV { 1339 UINT FirstArraySlice; 1340 UINT ArraySize; 1341 } 1342 1343 alias D3D12_SRV_DIMENSION = uint; 1344 enum : D3D12_SRV_DIMENSION { 1345 D3D12_SRV_DIMENSION_UNKNOWN = 0, 1346 D3D12_SRV_DIMENSION_BUFFER = 1, 1347 D3D12_SRV_DIMENSION_TEXTURE1D = 2, 1348 D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3, 1349 D3D12_SRV_DIMENSION_TEXTURE2D = 4, 1350 D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5, 1351 D3D12_SRV_DIMENSION_TEXTURE2DMS = 6, 1352 D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, 1353 D3D12_SRV_DIMENSION_TEXTURE3D = 8, 1354 D3D12_SRV_DIMENSION_TEXTURECUBE = 9, 1355 D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10 1356 } 1357 1358 struct D3D12_SHADER_RESOURCE_VIEW_DESC { 1359 DXGI_FORMAT Format; 1360 D3D12_SRV_DIMENSION ViewDimension; 1361 UINT Shader4ComponentMapping; 1362 union 1363 { 1364 D3D12_BUFFER_SRV Buffer; 1365 D3D12_TEX1D_SRV Texture1D; 1366 D3D12_TEX1D_ARRAY_SRV Texture1DArray; 1367 D3D12_TEX2D_SRV Texture2D; 1368 D3D12_TEX2D_ARRAY_SRV Texture2DArray; 1369 D3D12_TEX2DMS_SRV Texture2DMS; 1370 D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray; 1371 D3D12_TEX3D_SRV Texture3D; 1372 D3D12_TEXCUBE_SRV TextureCube; 1373 D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray; 1374 } 1375 } 1376 1377 struct D3D12_CONSTANT_BUFFER_VIEW_DESC { 1378 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 1379 UINT SizeInBytes; 1380 } 1381 1382 alias D3D12_FILTER = uint; 1383 enum : D3D12_FILTER { 1384 D3D12_FILTER_MIN_MAG_MIP_POINT = 0, 1385 D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1, 1386 D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, 1387 D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5, 1388 D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, 1389 D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, 1390 D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, 1391 D3D12_FILTER_MIN_MAG_MIP_LINEAR = 0x15, 1392 D3D12_FILTER_ANISOTROPIC = 0x55, 1393 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, 1394 D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, 1395 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, 1396 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, 1397 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, 1398 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, 1399 D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, 1400 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, 1401 D3D12_FILTER_COMPARISON_ANISOTROPIC = 0xd5, 1402 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100, 1403 D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101, 1404 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104, 1405 D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105, 1406 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110, 1407 D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111, 1408 D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114, 1409 D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115, 1410 D3D12_FILTER_MINIMUM_ANISOTROPIC = 0x155, 1411 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180, 1412 D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181, 1413 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184, 1414 D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185, 1415 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190, 1416 D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191, 1417 D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194, 1418 D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195, 1419 D3D12_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5 1420 } 1421 1422 alias D3D12_FILTER_TYPE = uint; 1423 enum : D3D12_FILTER_TYPE { 1424 D3D12_FILTER_TYPE_POINT = 0, 1425 D3D12_FILTER_TYPE_LINEAR = 1 1426 } 1427 1428 alias D3D12_FILTER_REDUCTION_TYPE = uint; 1429 enum : D3D12_FILTER_REDUCTION_TYPE { 1430 D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0, 1431 D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1, 1432 D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2, 1433 D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3 1434 } 1435 1436 enum { 1437 D3D12_FILTER_REDUCTION_TYPE_MASK = 0x3, 1438 D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7, 1439 D3D12_FILTER_TYPE_MASK = 0x3, 1440 D3D12_MIN_FILTER_SHIFT = 4, 1441 D3D12_MAG_FILTER_SHIFT = 2, 1442 D3D12_MIP_FILTER_SHIFT = 0, 1443 D3D12_ANISOTROPIC_FILTERING_BIT = 0x40 1444 } 1445 1446 pure nothrow @safe @nogc { 1447 D3D12_FILTER D3D12_ENCODE_BASIC_FILTER(D3D12_FILTER_TYPE min, 1448 D3D12_FILTER_TYPE mag, 1449 D3D12_FILTER_TYPE mip, 1450 D3D12_FILTER_REDUCTION_TYPE reduction) 1451 { 1452 return cast(D3D12_FILTER) 1453 (((min & D3D12_FILTER_TYPE_MASK) << D3D12_MIN_FILTER_SHIFT ) | 1454 ((mag & D3D12_FILTER_TYPE_MASK) << D3D12_MAG_FILTER_SHIFT ) | 1455 ((mip & D3D12_FILTER_TYPE_MASK) << D3D12_MIP_FILTER_SHIFT ) | 1456 ((reduction & D3D12_FILTER_REDUCTION_TYPE_MASK) << 1457 D3D12_FILTER_REDUCTION_TYPE_SHIFT)); 1458 } 1459 1460 D3D12_FILTER D3D12_ENCODE_ANISOTROPIC_FILTER(D3D12_FILTER_REDUCTION_TYPE reduction) { 1461 return cast(D3D12_FILTER) 1462 (D3D12_ANISOTROPIC_FILTERING_BIT | 1463 D3D12_ENCODE_BASIC_FILTER(D3D12_FILTER_TYPE_LINEAR, 1464 D3D12_FILTER_TYPE_LINEAR, 1465 D3D12_FILTER_TYPE_LINEAR, 1466 reduction)); 1467 } 1468 1469 D3D12_FILTER_TYPE D3D12_DECODE_MIN_FILTER(D3D12_FILTER D3D12Filter) { 1470 return cast(D3D12_FILTER_TYPE) 1471 ((D3D12Filter >> D3D12_MIN_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK); 1472 } 1473 1474 D3D12_FILTER_TYPE D3D12_DECODE_MAG_FILTER(D3D12_FILTER D3D12Filter) { 1475 return cast(D3D12_FILTER_TYPE) 1476 ((D3D12Filter >> D3D12_MAG_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK); 1477 } 1478 1479 D3D12_FILTER_TYPE D3D12_DECODE_MIP_FILTER(D3D12_FILTER D3D12Filter) { 1480 return cast( D3D12_FILTER_TYPE ) 1481 ((D3D12Filter >> D3D12_MIP_FILTER_SHIFT) & D3D12_FILTER_TYPE_MASK); 1482 } 1483 1484 D3D12_FILTER_REDUCTION_TYPE D3D12_DECODE_FILTER_REDUCTION(D3D12_FILTER D3D12Filter) { 1485 return cast(D3D12_FILTER_REDUCTION_TYPE) 1486 ((D3D12Filter >> D3D12_FILTER_REDUCTION_TYPE_SHIFT) & 1487 D3D12_FILTER_REDUCTION_TYPE_MASK); 1488 } 1489 1490 bool D3D12_DECODE_IS_COMPARISON_FILTER(D3D12_FILTER D3D12Filter) { 1491 return D3D12_DECODE_FILTER_REDUCTION(D3D12Filter) == 1492 D3D12_FILTER_REDUCTION_TYPE_COMPARISON; 1493 } 1494 1495 bool D3D12_DECODE_IS_ANISOTROPIC_FILTER(D3D12_FILTER D3D12Filter) { 1496 return ((D3D12Filter & D3D12_ANISOTROPIC_FILTERING_BIT) && 1497 (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIN_FILTER(D3D12Filter)) && 1498 (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MAG_FILTER(D3D12Filter)) && 1499 (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIP_FILTER(D3D12Filter))); 1500 } 1501 } 1502 1503 alias D3D12_TEXTURE_ADDRESS_MODE = uint; 1504 enum : D3D12_TEXTURE_ADDRESS_MODE { 1505 D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1, 1506 D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2, 1507 D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3, 1508 D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4, 1509 D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5 1510 } 1511 1512 struct D3D12_SAMPLER_DESC { 1513 D3D12_FILTER Filter; 1514 D3D12_TEXTURE_ADDRESS_MODE AddressU; 1515 D3D12_TEXTURE_ADDRESS_MODE AddressV; 1516 D3D12_TEXTURE_ADDRESS_MODE AddressW; 1517 FLOAT MipLODBias = 0.0f; 1518 UINT MaxAnisotropy; 1519 D3D12_COMPARISON_FUNC ComparisonFunc; 1520 FLOAT[4] BorderColor = [ 0.0f, 0.0f, 0.0f, 1.0f ]; 1521 FLOAT MinLOD = 0.0f; 1522 FLOAT MaxLOD = 0.0f; 1523 } 1524 1525 alias D3D12_BUFFER_UAV_FLAGS = uint; 1526 enum : D3D12_BUFFER_UAV_FLAGS { 1527 D3D12_BUFFER_UAV_FLAG_NONE = 0, 1528 D3D12_BUFFER_UAV_FLAG_RAW = 0x1 1529 } 1530 1531 struct D3D12_BUFFER_UAV { 1532 UINT64 FirstElement; 1533 UINT NumElements; 1534 UINT StructureByteStride; 1535 UINT64 CounterOffsetInBytes; 1536 D3D12_BUFFER_UAV_FLAGS Flags; 1537 } 1538 1539 struct D3D12_TEX1D_UAV { 1540 UINT MipSlice; 1541 } 1542 1543 struct D3D12_TEX1D_ARRAY_UAV { 1544 UINT MipSlice; 1545 UINT FirstArraySlice; 1546 UINT ArraySize; 1547 } 1548 1549 struct D3D12_TEX2D_UAV { 1550 UINT MipSlice; 1551 UINT PlaneSlice; 1552 } 1553 1554 struct D3D12_TEX2D_ARRAY_UAV { 1555 UINT MipSlice; 1556 UINT FirstArraySlice; 1557 UINT ArraySize; 1558 UINT PlaneSlice; 1559 } 1560 1561 struct D3D12_TEX3D_UAV { 1562 UINT MipSlice; 1563 UINT FirstWSlice; 1564 UINT WSize; 1565 } 1566 1567 alias D3D12_UAV_DIMENSION = uint; 1568 enum : D3D12_UAV_DIMENSION { 1569 D3D12_UAV_DIMENSION_UNKNOWN = 0, 1570 D3D12_UAV_DIMENSION_BUFFER = 1, 1571 D3D12_UAV_DIMENSION_TEXTURE1D = 2, 1572 D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3, 1573 D3D12_UAV_DIMENSION_TEXTURE2D = 4, 1574 D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5, 1575 D3D12_UAV_DIMENSION_TEXTURE3D = 8 1576 } 1577 1578 struct D3D12_UNORDERED_ACCESS_VIEW_DESC { 1579 DXGI_FORMAT Format; 1580 D3D12_UAV_DIMENSION ViewDimension; 1581 union { 1582 D3D12_BUFFER_UAV Buffer; 1583 D3D12_TEX1D_UAV Texture1D; 1584 D3D12_TEX1D_ARRAY_UAV Texture1DArray; 1585 D3D12_TEX2D_UAV Texture2D; 1586 D3D12_TEX2D_ARRAY_UAV Texture2DArray; 1587 D3D12_TEX3D_UAV Texture3D; 1588 } 1589 } 1590 1591 struct D3D12_BUFFER_RTV { 1592 UINT64 FirstElement; 1593 UINT NumElements; 1594 } 1595 1596 struct D3D12_TEX1D_RTV { 1597 UINT MipSlice; 1598 } 1599 1600 struct D3D12_TEX1D_ARRAY_RTV { 1601 UINT MipSlice; 1602 UINT FirstArraySlice; 1603 UINT ArraySize; 1604 } 1605 1606 struct D3D12_TEX2D_RTV { 1607 UINT MipSlice; 1608 UINT PlaneSlice; 1609 } 1610 1611 struct D3D12_TEX2DMS_RTV { 1612 UINT UnusedField_NothingToDefine; 1613 } 1614 1615 struct D3D12_TEX2D_ARRAY_RTV { 1616 UINT MipSlice; 1617 UINT FirstArraySlice; 1618 UINT ArraySize; 1619 UINT PlaneSlice; 1620 } 1621 1622 struct D3D12_TEX2DMS_ARRAY_RTV { 1623 UINT FirstArraySlice; 1624 UINT ArraySize; 1625 } 1626 1627 struct D3D12_TEX3D_RTV { 1628 UINT MipSlice; 1629 UINT FirstWSlice; 1630 UINT WSize; 1631 } 1632 1633 alias D3D12_RTV_DIMENSION = uint; 1634 enum : D3D12_RTV_DIMENSION { 1635 D3D12_RTV_DIMENSION_UNKNOWN = 0, 1636 D3D12_RTV_DIMENSION_BUFFER = 1, 1637 D3D12_RTV_DIMENSION_TEXTURE1D = 2, 1638 D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3, 1639 D3D12_RTV_DIMENSION_TEXTURE2D = 4, 1640 D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5, 1641 D3D12_RTV_DIMENSION_TEXTURE2DMS = 6, 1642 D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, 1643 D3D12_RTV_DIMENSION_TEXTURE3D = 8 1644 } 1645 1646 struct D3D12_RENDER_TARGET_VIEW_DESC { 1647 DXGI_FORMAT Format; 1648 D3D12_RTV_DIMENSION ViewDimension; 1649 union 1650 { 1651 D3D12_BUFFER_RTV Buffer; 1652 D3D12_TEX1D_RTV Texture1D; 1653 D3D12_TEX1D_ARRAY_RTV Texture1DArray; 1654 D3D12_TEX2D_RTV Texture2D; 1655 D3D12_TEX2D_ARRAY_RTV Texture2DArray; 1656 D3D12_TEX2DMS_RTV Texture2DMS; 1657 D3D12_TEX2DMS_ARRAY_RTV Texture2DMSArray; 1658 D3D12_TEX3D_RTV Texture3D; 1659 } 1660 } 1661 1662 struct D3D12_TEX1D_DSV { 1663 UINT MipSlice; 1664 } 1665 1666 struct D3D12_TEX1D_ARRAY_DSV { 1667 UINT MipSlice; 1668 UINT FirstArraySlice; 1669 UINT ArraySize; 1670 } 1671 1672 struct D3D12_TEX2D_DSV { 1673 UINT MipSlice; 1674 } 1675 1676 struct D3D12_TEX2D_ARRAY_DSV { 1677 UINT MipSlice; 1678 UINT FirstArraySlice; 1679 UINT ArraySize; 1680 } 1681 1682 struct D3D12_TEX2DMS_DSV { 1683 UINT UnusedField_NothingToDefine; 1684 } 1685 1686 struct D3D12_TEX2DMS_ARRAY_DSV { 1687 UINT FirstArraySlice; 1688 UINT ArraySize; 1689 } 1690 1691 alias D3D12_DSV_FLAGS = uint; 1692 enum : D3D12_DSV_FLAGS { 1693 D3D12_DSV_FLAG_NONE = 0, 1694 D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1, 1695 D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2 1696 } 1697 1698 alias D3D12_DSV_DIMENSION = uint; 1699 enum : D3D12_DSV_DIMENSION { 1700 D3D12_DSV_DIMENSION_UNKNOWN = 0, 1701 D3D12_DSV_DIMENSION_TEXTURE1D = 1, 1702 D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2, 1703 D3D12_DSV_DIMENSION_TEXTURE2D = 3, 1704 D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4, 1705 D3D12_DSV_DIMENSION_TEXTURE2DMS = 5, 1706 D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6 1707 } 1708 1709 struct D3D12_DEPTH_STENCIL_VIEW_DESC { 1710 DXGI_FORMAT Format; 1711 D3D12_DSV_DIMENSION ViewDimension; 1712 D3D12_DSV_FLAGS Flags; 1713 union 1714 { 1715 D3D12_TEX1D_DSV Texture1D; 1716 D3D12_TEX1D_ARRAY_DSV Texture1DArray; 1717 D3D12_TEX2D_DSV Texture2D; 1718 D3D12_TEX2D_ARRAY_DSV Texture2DArray; 1719 D3D12_TEX2DMS_DSV Texture2DMS; 1720 D3D12_TEX2DMS_ARRAY_DSV Texture2DMSArray; 1721 } 1722 } 1723 1724 alias D3D12_CLEAR_FLAGS = uint; 1725 enum : D3D12_CLEAR_FLAGS { 1726 D3D12_CLEAR_FLAG_DEPTH = 0x1, 1727 D3D12_CLEAR_FLAG_STENCIL = 0x2 1728 } 1729 1730 alias D3D12_FENCE_FLAGS = uint; 1731 enum : D3D12_FENCE_FLAGS { 1732 D3D12_FENCE_FLAG_NONE = 0, 1733 D3D12_FENCE_FLAG_SHARED = 0x1, 1734 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2 1735 } 1736 1737 alias D3D12_DESCRIPTOR_HEAP_TYPE = uint; 1738 enum : D3D12_DESCRIPTOR_HEAP_TYPE { 1739 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV = 0, 1740 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV + 1, 1741 D3D12_DESCRIPTOR_HEAP_TYPE_RTV = D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER + 1, 1742 D3D12_DESCRIPTOR_HEAP_TYPE_DSV = D3D12_DESCRIPTOR_HEAP_TYPE_RTV + 1, 1743 D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES = D3D12_DESCRIPTOR_HEAP_TYPE_DSV + 1 1744 } 1745 1746 alias D3D12_DESCRIPTOR_HEAP_FLAGS = uint; 1747 enum : D3D12_DESCRIPTOR_HEAP_FLAGS { 1748 D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0, 1749 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1 1750 } 1751 1752 struct D3D12_DESCRIPTOR_HEAP_DESC { 1753 this(this) {} 1754 D3D12_DESCRIPTOR_HEAP_TYPE Type; 1755 UINT NumDescriptors; 1756 D3D12_DESCRIPTOR_HEAP_FLAGS Flags; 1757 UINT NodeMask; 1758 } 1759 1760 alias D3D12_DESCRIPTOR_RANGE_TYPE = uint; 1761 enum : D3D12_DESCRIPTOR_RANGE_TYPE { 1762 D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0, 1763 D3D12_DESCRIPTOR_RANGE_TYPE_UAV = D3D12_DESCRIPTOR_RANGE_TYPE_SRV + 1, 1764 D3D12_DESCRIPTOR_RANGE_TYPE_CBV = D3D12_DESCRIPTOR_RANGE_TYPE_UAV + 1, 1765 D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = D3D12_DESCRIPTOR_RANGE_TYPE_CBV + 1 1766 } 1767 1768 struct D3D12_DESCRIPTOR_RANGE { 1769 D3D12_DESCRIPTOR_RANGE_TYPE RangeType; 1770 UINT NumDescriptors; 1771 UINT BaseShaderRegister; 1772 UINT RegisterSpace; 1773 UINT OffsetInDescriptorsFromTableStart; 1774 } 1775 1776 struct D3D12_ROOT_DESCRIPTOR_TABLE { 1777 UINT NumDescriptorRanges; 1778 const(D3D12_DESCRIPTOR_RANGE)* pDescriptorRanges; 1779 } 1780 1781 struct D3D12_ROOT_CONSTANTS { 1782 UINT ShaderRegister; 1783 UINT RegisterSpace; 1784 UINT Num32BitValues; 1785 } 1786 1787 struct D3D12_ROOT_DESCRIPTOR { 1788 UINT ShaderRegister; 1789 UINT RegisterSpace; 1790 } 1791 1792 alias D3D12_SHADER_VISIBILITY = uint; 1793 enum : D3D12_SHADER_VISIBILITY { 1794 D3D12_SHADER_VISIBILITY_ALL = 0, 1795 D3D12_SHADER_VISIBILITY_VERTEX = 1, 1796 D3D12_SHADER_VISIBILITY_HULL = 2, 1797 D3D12_SHADER_VISIBILITY_DOMAIN = 3, 1798 D3D12_SHADER_VISIBILITY_GEOMETRY = 4, 1799 D3D12_SHADER_VISIBILITY_PIXEL = 5 1800 } 1801 1802 alias D3D12_ROOT_PARAMETER_TYPE = uint; 1803 enum : D3D12_ROOT_PARAMETER_TYPE { 1804 D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0, 1805 D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE + 1, 1806 D3D12_ROOT_PARAMETER_TYPE_CBV = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS + 1, 1807 D3D12_ROOT_PARAMETER_TYPE_SRV = D3D12_ROOT_PARAMETER_TYPE_CBV + 1, 1808 D3D12_ROOT_PARAMETER_TYPE_UAV = D3D12_ROOT_PARAMETER_TYPE_SRV + 1 1809 } 1810 1811 struct D3D12_ROOT_PARAMETER { 1812 D3D12_ROOT_PARAMETER_TYPE ParameterType; 1813 union { 1814 D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable; 1815 D3D12_ROOT_CONSTANTS Constants; 1816 D3D12_ROOT_DESCRIPTOR Descriptor; 1817 } 1818 D3D12_SHADER_VISIBILITY ShaderVisibility; 1819 } 1820 1821 alias D3D12_ROOT_SIGNATURE_FLAGS = uint; 1822 enum : D3D12_ROOT_SIGNATURE_FLAGS { 1823 D3D12_ROOT_SIGNATURE_FLAG_NONE = 0, 1824 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1, 1825 D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2, 1826 D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x4, 1827 D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8, 1828 D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10, 1829 D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20, 1830 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40 1831 } 1832 1833 alias D3D12_STATIC_BORDER_COLOR = uint; 1834 enum : D3D12_STATIC_BORDER_COLOR { 1835 D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0, 1836 D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK + 1, 1837 D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK + 1 1838 } 1839 1840 struct D3D12_STATIC_SAMPLER_DESC { 1841 D3D12_FILTER Filter; 1842 D3D12_TEXTURE_ADDRESS_MODE AddressU; 1843 D3D12_TEXTURE_ADDRESS_MODE AddressV; 1844 D3D12_TEXTURE_ADDRESS_MODE AddressW; 1845 FLOAT MipLODBias = 0.0f; 1846 UINT MaxAnisotropy; 1847 D3D12_COMPARISON_FUNC ComparisonFunc; 1848 D3D12_STATIC_BORDER_COLOR BorderColor; 1849 FLOAT MinLOD = 0.0f; 1850 FLOAT MaxLOD = 0.0f; 1851 UINT ShaderRegister; 1852 UINT RegisterSpace; 1853 D3D12_SHADER_VISIBILITY ShaderVisibility; 1854 } 1855 1856 struct D3D12_ROOT_SIGNATURE_DESC { 1857 UINT NumParameters; 1858 const(D3D12_ROOT_PARAMETER)* pParameters; 1859 UINT NumStaticSamplers; 1860 const(D3D12_STATIC_SAMPLER_DESC)* pStaticSamplers; 1861 D3D12_ROOT_SIGNATURE_FLAGS Flags; 1862 } 1863 1864 alias D3D_ROOT_SIGNATURE_VERSION = uint; 1865 enum : D3D_ROOT_SIGNATURE_VERSION { 1866 D3D_ROOT_SIGNATURE_VERSION_1 = 0x1 1867 } 1868 1869 mixin(uuid!(ID3D12RootSignatureDeserializer, "34AB647B-3CC8-46AC-841B-C0965645C046")); 1870 extern(C++) interface ID3D12RootSignatureDeserializer : IUnknown { 1871 const(D3D12_ROOT_SIGNATURE_DESC)* GetRootSignatureDesc(); 1872 } 1873 1874 1875 1876 extern(Windows) nothrow 1877 HRESULT D3D12SerializeRootSignature(const(D3D12_ROOT_SIGNATURE_DESC)* pRootSignature, 1878 D3D_ROOT_SIGNATURE_VERSION Version, 1879 ID3DBlob* ppBlob, 1880 ID3DBlob* ppErrorBlob); 1881 1882 alias PFN_D3D12_SERIALIZE_ROOT_SIGNATURE = extern(Windows) nothrow HRESULT function( 1883 const(D3D12_ROOT_SIGNATURE_DESC)* pRootSignature, 1884 D3D_ROOT_SIGNATURE_VERSION Version, 1885 ID3DBlob* ppBlob, 1886 ID3DBlob* ppErrorBlob); 1887 1888 1889 1890 extern(Windows) nothrow 1891 HRESULT D3D12CreateRootSignatureDeserializer(LPCVOID pSrcData, 1892 SIZE_T SrcDataSizeInBytes, 1893 REFIID pRootSignatureDeserializerInterface, 1894 void** ppRootSignatureDeserializer); 1895 1896 alias PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER = extern(Windows) nothrow HRESULT function( 1897 LPCVOID pSrcData, 1898 SIZE_T SrcDataSizeInBytes, 1899 REFIID pRootSignatureDeserializerInterface, 1900 void** ppRootSignatureDeserializer); 1901 1902 1903 struct D3D12_CPU_DESCRIPTOR_HANDLE { 1904 this(this) {} 1905 SIZE_T ptr; 1906 } 1907 1908 struct D3D12_GPU_DESCRIPTOR_HANDLE { 1909 this(this) {} 1910 UINT64 ptr; 1911 } 1912 1913 // If rects are supplied in D3D12_DISCARD_REGION, below, the resource 1914 // must have 2D subresources with all specified subresources the same dimension. 1915 struct D3D12_DISCARD_REGION { 1916 UINT NumRects; 1917 const(D3D12_RECT)* pRects; 1918 UINT FirstSubresource; 1919 UINT NumSubresources; 1920 } 1921 1922 alias D3D12_QUERY_HEAP_TYPE = uint; 1923 enum : D3D12_QUERY_HEAP_TYPE { 1924 D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0, 1925 D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1, 1926 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2, 1927 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3 1928 } 1929 1930 struct D3D12_QUERY_HEAP_DESC { 1931 D3D12_QUERY_HEAP_TYPE Type; 1932 UINT Count; 1933 UINT NodeMask; 1934 } 1935 1936 alias D3D12_QUERY_TYPE = uint; 1937 enum : D3D12_QUERY_TYPE { 1938 D3D12_QUERY_TYPE_OCCLUSION = 0, 1939 D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1, 1940 D3D12_QUERY_TYPE_TIMESTAMP = 2, 1941 D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3, 1942 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4, 1943 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5, 1944 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6, 1945 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7 1946 } 1947 1948 alias D3D12_PREDICATION_OP = uint; 1949 enum : D3D12_PREDICATION_OP { 1950 D3D12_PREDICATION_OP_EQUAL_ZERO = 0, 1951 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1 1952 } 1953 1954 struct D3D12_QUERY_DATA_PIPELINE_STATISTICS { 1955 UINT64 IAVertices; 1956 UINT64 IAPrimitives; 1957 UINT64 VSInvocations; 1958 UINT64 GSInvocations; 1959 UINT64 GSPrimitives; 1960 UINT64 CInvocations; 1961 UINT64 CPrimitives; 1962 UINT64 PSInvocations; 1963 UINT64 HSInvocations; 1964 UINT64 DSInvocations; 1965 UINT64 CSInvocations; 1966 } 1967 1968 struct D3D12_QUERY_DATA_SO_STATISTICS { 1969 UINT64 NumPrimitivesWritten; 1970 UINT64 PrimitivesStorageNeeded; 1971 } 1972 1973 struct D3D12_STREAM_OUTPUT_BUFFER_VIEW { 1974 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 1975 UINT64 SizeInBytes; 1976 D3D12_GPU_VIRTUAL_ADDRESS BufferFilledSizeLocation; 1977 } 1978 1979 struct D3D12_DRAW_ARGUMENTS { 1980 UINT VertexCountPerInstance; 1981 UINT InstanceCount; 1982 UINT StartVertexLocation; 1983 UINT StartInstanceLocation; 1984 } 1985 1986 struct D3D12_DRAW_INDEXED_ARGUMENTS { 1987 UINT IndexCountPerInstance; 1988 UINT InstanceCount; 1989 UINT StartIndexLocation; 1990 INT BaseVertexLocation; 1991 UINT StartInstanceLocation; 1992 } 1993 1994 struct D3D12_DISPATCH_ARGUMENTS { 1995 UINT ThreadGroupCountX; 1996 UINT ThreadGroupCountY; 1997 UINT ThreadGroupCountZ; 1998 } 1999 2000 struct D3D12_VERTEX_BUFFER_VIEW { 2001 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 2002 UINT SizeInBytes; 2003 UINT StrideInBytes; 2004 } 2005 2006 struct D3D12_INDEX_BUFFER_VIEW { 2007 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; 2008 UINT SizeInBytes; 2009 DXGI_FORMAT Format; 2010 } 2011 2012 alias D3D12_INDIRECT_ARGUMENT_TYPE = uint; 2013 enum : D3D12_INDIRECT_ARGUMENT_TYPE { 2014 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW = 0, 2015 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW + 1, 2016 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED + 1, 2017 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW = D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH + 1, 2018 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW = D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW + 1, 2019 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT = D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW + 1, 2020 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW = D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT + 1, 2021 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW = D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW + 1, 2022 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW = D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW + 1 2023 } 2024 2025 struct D3D12_INDIRECT_ARGUMENT_DESC { 2026 D3D12_INDIRECT_ARGUMENT_TYPE Type; 2027 union { 2028 struct { 2029 UINT Slot; 2030 } 2031 static struct _Constant { 2032 UINT RootParameterIndex; 2033 UINT DestOffsetIn32BitValues; 2034 UINT Num32BitValuesToSet; 2035 } 2036 static struct _ConstantBufferView { 2037 UINT RootParameterIndex; 2038 } 2039 static struct _ShaderResourceView { 2040 UINT RootParameterIndex; 2041 } 2042 static struct _UnorderedAccessView { 2043 UINT RootParameterIndex; 2044 } 2045 2046 _Constant Constant; 2047 _ConstantBufferView ConstantBufferView; 2048 _ShaderResourceView ShaderResourceView; 2049 _UnorderedAccessView UnorderedAccessView; 2050 } 2051 } 2052 2053 struct D3D12_COMMAND_SIGNATURE_DESC { 2054 UINT ByteStride; 2055 UINT NumArgumentDescs; 2056 const(D3D12_INDIRECT_ARGUMENT_DESC)* pArgumentDescs; 2057 UINT NodeMask; 2058 } 2059 2060 mixin(uuid!(ID3D12Pageable, "63ee58fb-1268-4835-86da-f008ce62f0d6")); 2061 extern(C++) interface ID3D12Pageable : ID3D12DeviceChild {} 2062 2063 mixin(uuid!(ID3D12Heap, "6b3b2502-6e51-45b3-90ee-9884265e8df3")); 2064 extern(C++) interface ID3D12Heap : ID3D12Pageable { 2065 2066 version(CORRECT_ABI) 2067 { 2068 D3D12_HEAP_DESC GetDesc(); 2069 } 2070 else 2071 { 2072 void GetDesc(D3D12_HEAP_DESC* outDesc); 2073 } 2074 2075 version(CORRECT_ABI){} 2076 else 2077 { 2078 final D3D12_HEAP_DESC GetDesc() 2079 { 2080 D3D12_HEAP_DESC temp; 2081 GetDesc(&temp); 2082 return temp; 2083 } 2084 } 2085 2086 2087 } 2088 2089 mixin(uuid!(ID3D12Resource, "696442be-a72e-4059-bc79-5b5c98040fad")); 2090 extern(C++) interface ID3D12Resource : ID3D12Pageable { 2091 HRESULT Map(UINT Subresource, 2092 const(D3D12_RANGE)*pReadRange, 2093 void** ppData); 2094 2095 void Unmap(UINT Subresource, 2096 const(D3D12_RANGE)* pWrittenRange); 2097 2098 version(CORRECT_ABI) 2099 { 2100 D3D12_RESOURCE_DESC GetDesc(); 2101 } 2102 else 2103 { 2104 void GetDesc(D3D12_RESOURCE_DESC* outDesc); 2105 } 2106 2107 D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress(); 2108 2109 HRESULT WriteToSubresource(UINT DstSubresource, 2110 const(D3D12_BOX)* pDstBox, 2111 const(void)* pSrcData, 2112 UINT SrcRowPitch, 2113 UINT SrcDepthPitch); 2114 2115 HRESULT ReadFromSubresource(void* pDstData, 2116 UINT DstRowPitch, 2117 UINT DstDepthPitch, 2118 UINT SrcSubresource, 2119 const(D3D12_BOX)* pSrcBox); 2120 2121 HRESULT GetHeapProperties(D3D12_HEAP_PROPERTIES* pHeapProperties, 2122 D3D12_HEAP_FLAGS* pHeapFlags); 2123 2124 2125 2126 version(CORRECT_ABI){} 2127 else 2128 { 2129 final D3D12_RESOURCE_DESC GetDesc() 2130 { 2131 D3D12_RESOURCE_DESC temp; 2132 GetDesc(&temp); 2133 return temp; 2134 } 2135 } 2136 } 2137 2138 mixin(uuid!(ID3D12CommandAllocator, "6102dee4-af59-4b09-b999-b44d73f09b24")); 2139 extern(C++) interface ID3D12CommandAllocator : ID3D12Pageable { 2140 HRESULT Reset(); 2141 } 2142 2143 mixin(uuid!(ID3D12Fence, "0a753dcf-c4d8-4b91-adf6-be5a60d95a76")); 2144 extern(C++) interface ID3D12Fence : ID3D12Pageable { 2145 UINT64 GetCompletedValue(); 2146 2147 HRESULT SetEventOnCompletion(UINT64 Value, HANDLE hEvent); 2148 2149 HRESULT Signal(UINT64 Value); 2150 } 2151 2152 mixin(uuid!(ID3D12PipelineState, "765a30f3-f624-4c6f-a828-ace948622445")); 2153 extern(C++) interface ID3D12PipelineState : ID3D12Pageable { 2154 HRESULT GetCachedBlob(ID3DBlob*ppBlob); 2155 } 2156 2157 mixin(uuid!(ID3D12DescriptorHeap, "8efb471d-616c-4f49-90f7-127bb763fa51")); 2158 extern(C++) interface ID3D12DescriptorHeap : ID3D12Pageable { 2159 2160 version(CORRECT_ABI) 2161 { 2162 D3D12_DESCRIPTOR_HEAP_DESC GetDesc(); 2163 2164 D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart(); 2165 2166 D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart(); 2167 } 2168 else 2169 { 2170 void GetDesc(D3D12_DESCRIPTOR_HEAP_DESC* outDesc); 2171 2172 void GetCPUDescriptorHandleForHeapStart(D3D12_CPU_DESCRIPTOR_HANDLE* outHandle); 2173 2174 void GetGPUDescriptorHandleForHeapStart(D3D12_GPU_DESCRIPTOR_HANDLE* outHandle); 2175 } 2176 2177 // ============================================================================== 2178 // Helpers for incorrect ABI below 2179 2180 version(CORRECT_ABI){} 2181 else 2182 { 2183 final D3D12_DESCRIPTOR_HEAP_DESC GetDesc() 2184 { 2185 D3D12_DESCRIPTOR_HEAP_DESC temp; 2186 GetDesc(&temp); 2187 return temp; 2188 } 2189 2190 final D3D12_CPU_DESCRIPTOR_HANDLE GetCPUDescriptorHandleForHeapStart() 2191 { 2192 D3D12_CPU_DESCRIPTOR_HANDLE temp; 2193 GetCPUDescriptorHandleForHeapStart(&temp); 2194 return temp; 2195 } 2196 2197 final D3D12_GPU_DESCRIPTOR_HANDLE GetGPUDescriptorHandleForHeapStart() 2198 { 2199 D3D12_GPU_DESCRIPTOR_HANDLE temp; 2200 GetGPUDescriptorHandleForHeapStart(&temp); 2201 return temp; 2202 } 2203 } // version(CORRECT_ABI) else 2204 } 2205 2206 mixin(uuid!(ID3D12QueryHeap, "0d9658ae-ed45-469e-a61d-970ec583cab4")); 2207 extern(C++) interface ID3D12QueryHeap : ID3D12Pageable {} 2208 2209 mixin(uuid!(ID3D12CommandSignature, "c36a797c-ec80-4f0a-8985-a7b2475082d1")); 2210 extern(C++) interface ID3D12CommandSignature : ID3D12Pageable {} 2211 2212 mixin(uuid!(ID3D12CommandList, "7116d91c-e7e4-47ce-b8c6-ec8168f437e5")); 2213 extern(C++) interface ID3D12CommandList : ID3D12DeviceChild { 2214 2215 D3D12_COMMAND_LIST_TYPE GetType(); 2216 } 2217 2218 mixin(uuid!(ID3D12GraphicsCommandList, "5b160d0f-ac1b-4185-8ba8-b3ae42a5a455")); 2219 extern(C++) interface ID3D12GraphicsCommandList : ID3D12CommandList { 2220 HRESULT Close(); 2221 2222 HRESULT Reset(ID3D12CommandAllocator pAllocator, 2223 ID3D12PipelineState pInitialState); 2224 2225 void ClearState(ID3D12PipelineState pPipelineState); 2226 2227 void DrawInstanced( 2228 UINT VertexCountPerInstance, 2229 UINT InstanceCount, 2230 UINT StartVertexLocation, 2231 UINT StartInstanceLocation); 2232 2233 void DrawIndexedInstanced( 2234 UINT IndexCountPerInstance, 2235 UINT InstanceCount, 2236 UINT StartIndexLocation, 2237 INT BaseVertexLocation, 2238 UINT StartInstanceLocation); 2239 2240 void Dispatch( 2241 UINT ThreadGroupCountX, 2242 UINT ThreadGroupCountY, 2243 UINT ThreadGroupCountZ); 2244 2245 void CopyBufferRegion( 2246 ID3D12Resource pDstBuffer, 2247 UINT64 DstOffset, 2248 ID3D12Resource pSrcBuffer, 2249 UINT64 SrcOffset, 2250 UINT64 NumBytes); 2251 2252 void CopyTextureRegion( 2253 const(D3D12_TEXTURE_COPY_LOCATION)* pDst, 2254 UINT DstX, 2255 UINT DstY, 2256 UINT DstZ, 2257 const(D3D12_TEXTURE_COPY_LOCATION)* pSrc, 2258 const(D3D12_BOX)* pSrcBox); 2259 2260 void CopyResource( 2261 ID3D12Resource pDstResource, 2262 ID3D12Resource pSrcResource); 2263 2264 void CopyTiles( 2265 ID3D12Resource pTiledResource, 2266 const(D3D12_TILED_RESOURCE_COORDINATE)* pTileRegionStartCoordinate, 2267 const(D3D12_TILE_REGION_SIZE)* pTileRegionSize, 2268 ID3D12Resource pBuffer, 2269 UINT64 BufferStartOffsetInBytes, 2270 D3D12_TILE_COPY_FLAGS Flags); 2271 2272 void ResolveSubresource( 2273 ID3D12Resource pDstResource, 2274 UINT DstSubresource, 2275 ID3D12Resource pSrcResource, 2276 UINT SrcSubresource, 2277 DXGI_FORMAT Format); 2278 2279 void IASetPrimitiveTopology( 2280 D3D12_PRIMITIVE_TOPOLOGY PrimitiveTopology); 2281 2282 void RSSetViewports( 2283 UINT NumViewports, 2284 const(D3D12_VIEWPORT) *pViewports); 2285 2286 void RSSetScissorRects( 2287 UINT NumRects, 2288 const(D3D12_RECT)* pRects); 2289 2290 void OMSetBlendFactor( 2291 const(FLOAT)[4] BlendFactor); 2292 2293 void OMSetStencilRef( 2294 UINT StencilRef); 2295 2296 void SetPipelineState( 2297 ID3D12PipelineState pPipelineState); 2298 2299 void ResourceBarrier( 2300 UINT NumBarriers, 2301 const(D3D12_RESOURCE_BARRIER)* pBarriers); 2302 2303 void ExecuteBundle( 2304 ID3D12GraphicsCommandList pCommandList); 2305 2306 void SetDescriptorHeaps( 2307 UINT NumDescriptorHeaps, 2308 ID3D12DescriptorHeap *ppDescriptorHeaps); 2309 2310 void SetComputeRootSignature( 2311 ID3D12RootSignature pRootSignature); 2312 2313 void SetGraphicsRootSignature( 2314 ID3D12RootSignature pRootSignature); 2315 2316 void SetComputeRootDescriptorTable( 2317 UINT RootParameterIndex, 2318 D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); 2319 2320 void SetGraphicsRootDescriptorTable( 2321 UINT RootParameterIndex, 2322 D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor); 2323 2324 void SetComputeRoot32BitConstant( 2325 UINT RootParameterIndex, 2326 UINT SrcData, 2327 UINT DestOffsetIn32BitValues); 2328 2329 void SetGraphicsRoot32BitConstant( 2330 UINT RootParameterIndex, 2331 UINT SrcData, 2332 UINT DestOffsetIn32BitValues); 2333 2334 void SetComputeRoot32BitConstants( 2335 UINT RootParameterIndex, 2336 UINT Num32BitValuesToSet, 2337 const(void)* pSrcData, 2338 UINT DestOffsetIn32BitValues); 2339 2340 void SetGraphicsRoot32BitConstants( 2341 UINT RootParameterIndex, 2342 UINT Num32BitValuesToSet, 2343 const(void) *pSrcData, 2344 UINT DestOffsetIn32BitValues); 2345 2346 void SetComputeRootConstantBufferView( 2347 UINT RootParameterIndex, 2348 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2349 2350 void SetGraphicsRootConstantBufferView( 2351 UINT RootParameterIndex, 2352 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2353 2354 void SetComputeRootShaderResourceView( 2355 UINT RootParameterIndex, 2356 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2357 2358 void SetGraphicsRootShaderResourceView( 2359 UINT RootParameterIndex, 2360 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2361 2362 void SetComputeRootUnorderedAccessView( 2363 UINT RootParameterIndex, 2364 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2365 2366 void SetGraphicsRootUnorderedAccessView( 2367 UINT RootParameterIndex, 2368 D3D12_GPU_VIRTUAL_ADDRESS BufferLocation); 2369 2370 void IASetIndexBuffer( 2371 const(D3D12_INDEX_BUFFER_VIEW)* pView); 2372 2373 void IASetVertexBuffers( 2374 UINT StartSlot, 2375 UINT NumViews, 2376 const(D3D12_VERTEX_BUFFER_VIEW)* pViews); 2377 2378 void SOSetTargets( 2379 UINT StartSlot, 2380 UINT NumViews, 2381 const(D3D12_STREAM_OUTPUT_BUFFER_VIEW)* pViews); 2382 2383 void OMSetRenderTargets( 2384 UINT NumRenderTargetDescriptors, 2385 const(D3D12_CPU_DESCRIPTOR_HANDLE)* pRenderTargetDescriptors, 2386 BOOL RTsSingleHandleToDescriptorRange, 2387 const(D3D12_CPU_DESCRIPTOR_HANDLE)* pDepthStencilDescriptor); 2388 2389 void ClearDepthStencilView( 2390 D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView, 2391 D3D12_CLEAR_FLAGS ClearFlags, 2392 FLOAT Depth, 2393 UINT8 Stencil, 2394 UINT NumRects, 2395 const(D3D12_RECT)* pRects); 2396 2397 void ClearRenderTargetView( 2398 D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView, 2399 const(FLOAT)* ColorRGBA, 2400 UINT NumRects, 2401 const(D3D12_RECT)* pRects); 2402 2403 void ClearUnorderedAccessViewUint( 2404 D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, 2405 D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, 2406 ID3D12Resource pResource, 2407 const(UINT)* Values, 2408 UINT NumRects, 2409 const(D3D12_RECT)* pRects); 2410 2411 void ClearUnorderedAccessViewFloat( 2412 D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap, 2413 D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle, 2414 ID3D12Resource pResource, 2415 const(FLOAT)* Values, 2416 UINT NumRects, 2417 const(D3D12_RECT)* pRects); 2418 2419 void DiscardResource( 2420 ID3D12Resource pResource, 2421 const(D3D12_DISCARD_REGION)* pRegion); 2422 2423 void BeginQuery( 2424 ID3D12QueryHeap pQueryHeap, 2425 D3D12_QUERY_TYPE Type, 2426 UINT Index); 2427 2428 void EndQuery( 2429 ID3D12QueryHeap pQueryHeap, 2430 D3D12_QUERY_TYPE Type, 2431 UINT Index); 2432 2433 void ResolveQueryData( 2434 ID3D12QueryHeap pQueryHeap, 2435 D3D12_QUERY_TYPE Type, 2436 UINT StartIndex, 2437 UINT NumQueries, 2438 ID3D12Resource pDestinationBuffer, 2439 UINT64 AlignedDestinationBufferOffset); 2440 2441 void SetPredication( 2442 ID3D12Resource pBuffer, 2443 UINT64 AlignedBufferOffset, 2444 D3D12_PREDICATION_OP Operation); 2445 2446 void SetMarker( 2447 UINT Metadata, 2448 const(void)* pData, 2449 UINT Size); 2450 2451 void BeginEvent( 2452 UINT Metadata, 2453 const(void)* pData, 2454 UINT Size); 2455 2456 void EndEvent(); 2457 2458 void ExecuteIndirect( 2459 ID3D12CommandSignature pCommandSignature, 2460 UINT MaxCommandCount, 2461 ID3D12Resource pArgumentBuffer, 2462 UINT64 ArgumentBufferOffset, 2463 ID3D12Resource pCountBuffer, 2464 UINT64 CountBufferOffset); 2465 } 2466 2467 mixin(uuid!(ID3D12CommandQueue, "0ec870a6-5d7e-4c22-8cfc-5baae07616ed")); 2468 extern(C++) interface ID3D12CommandQueue : ID3D12Pageable { 2469 void UpdateTileMappings( 2470 ID3D12Resource pResource, 2471 UINT NumResourceRegions, 2472 const(D3D12_TILED_RESOURCE_COORDINATE)* pResourceRegionStartCoordinates, 2473 const(D3D12_TILE_REGION_SIZE)* pResourceRegionSizes, 2474 ID3D12Heap pHeap, 2475 UINT NumRanges, 2476 const(D3D12_TILE_RANGE_FLAGS)* pRangeFlags, 2477 const(UINT)* pHeapRangeStartOffsets, 2478 const(UINT)* pRangeTileCounts, 2479 D3D12_TILE_MAPPING_FLAGS Flags); 2480 2481 void CopyTileMappings( 2482 ID3D12Resource pDstResource, 2483 const(D3D12_TILED_RESOURCE_COORDINATE)* pDstRegionStartCoordinate, 2484 ID3D12Resource pSrcResource, 2485 const(D3D12_TILED_RESOURCE_COORDINATE)* pSrcRegionStartCoordinate, 2486 const(D3D12_TILE_REGION_SIZE)* pRegionSize, 2487 D3D12_TILE_MAPPING_FLAGS Flags); 2488 2489 void ExecuteCommandLists( 2490 UINT NumCommandLists, 2491 const(ID3D12CommandList)* ppCommandLists); 2492 2493 void SetMarker( 2494 UINT Metadata, 2495 const(void)* pData, 2496 UINT Size); 2497 2498 void BeginEvent( 2499 UINT Metadata, 2500 const(void)* pData, 2501 UINT Size); 2502 2503 void EndEvent(); 2504 2505 HRESULT Signal( 2506 ID3D12Fence pFence, 2507 UINT64 Value); 2508 2509 HRESULT Wait( 2510 ID3D12Fence pFence, 2511 UINT64 Value); 2512 2513 HRESULT GetTimestampFrequency( 2514 UINT64* pFrequency); 2515 2516 HRESULT GetClockCalibration( 2517 UINT64* pGpuTimestamp, 2518 UINT64* pCpuTimestamp); 2519 2520 version(CORRECT_ABI) 2521 { 2522 D3D12_COMMAND_QUEUE_DESC GetDesc(); 2523 } 2524 else 2525 { 2526 void GetDesc(D3D12_COMMAND_QUEUE_DESC* outDesc); 2527 } 2528 2529 version(CORRECT_ABI){} 2530 else 2531 { 2532 final D3D12_COMMAND_QUEUE_DESC GetDesc() 2533 { 2534 D3D12_COMMAND_QUEUE_DESC temp; 2535 GetDesc(&temp); 2536 return temp; 2537 } 2538 } 2539 2540 } 2541 2542 mixin(uuid!(ID3D12Device, "189819f1-1db6-4b57-be54-1821339b85f7")); 2543 extern(C++) interface ID3D12Device : ID3D12Object { 2544 UINT GetNodeCount(); 2545 2546 HRESULT CreateCommandQueue( 2547 const(D3D12_COMMAND_QUEUE_DESC)* pDesc, 2548 REFIID riid, 2549 ID3D12CommandQueue* ppCommandQueue); 2550 2551 HRESULT CreateCommandAllocator( 2552 D3D12_COMMAND_LIST_TYPE type, 2553 REFIID riid, 2554 ID3D12CommandAllocator* ppCommandAllocator); 2555 2556 HRESULT CreateGraphicsPipelineState( 2557 const(D3D12_GRAPHICS_PIPELINE_STATE_DESC)* pDesc, 2558 REFIID riid, 2559 ID3D12PipelineState* ppPipelineState); 2560 2561 HRESULT CreateComputePipelineState( 2562 const(D3D12_COMPUTE_PIPELINE_STATE_DESC)* pDesc, 2563 REFIID riid, 2564 ID3D12PipelineState* ppPipelineState); 2565 2566 HRESULT CreateCommandList( 2567 UINT nodeMask, 2568 D3D12_COMMAND_LIST_TYPE type, 2569 ID3D12CommandAllocator pCommandAllocator, 2570 ID3D12PipelineState pInitialState, 2571 REFIID riid, 2572 ID3D12CommandList* ppCommandList); 2573 2574 HRESULT CheckFeatureSupport( 2575 D3D12_FEATURE Feature, 2576 void* pFeatureSupportData, 2577 UINT FeatureSupportDataSize); 2578 2579 HRESULT CreateDescriptorHeap( 2580 const(D3D12_DESCRIPTOR_HEAP_DESC)* pDescriptorHeapDesc, 2581 REFIID riid, 2582 ID3D12DescriptorHeap* ppvHeap); 2583 2584 UINT GetDescriptorHandleIncrementSize( 2585 D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType); 2586 2587 HRESULT CreateRootSignature( 2588 UINT nodeMask, 2589 const(void)* pBlobWithRootSignature, 2590 SIZE_T blobLengthInBytes, 2591 REFIID riid, 2592 ID3D12RootSignature* ppvRootSignature); 2593 2594 void CreateConstantBufferView( 2595 const(D3D12_CONSTANT_BUFFER_VIEW_DESC)* pDesc, 2596 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2597 2598 void CreateShaderResourceView( 2599 ID3D12Resource pResource, 2600 const(D3D12_SHADER_RESOURCE_VIEW_DESC)* pDesc, 2601 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2602 2603 void CreateUnorderedAccessView( 2604 ID3D12Resource pResource, 2605 ID3D12Resource pCounterResource, 2606 const(D3D12_UNORDERED_ACCESS_VIEW_DESC)* pDesc, 2607 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2608 2609 void CreateRenderTargetView( 2610 ID3D12Resource pResource, 2611 const(D3D12_RENDER_TARGET_VIEW_DESC)* pDesc, 2612 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2613 2614 void CreateDepthStencilView( 2615 ID3D12Resource pResource, 2616 const(D3D12_DEPTH_STENCIL_VIEW_DESC)* pDesc, 2617 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2618 2619 void CreateSampler( 2620 const(D3D12_SAMPLER_DESC)* pDesc, 2621 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor); 2622 2623 void CopyDescriptors( 2624 UINT NumDestDescriptorRanges, 2625 const(D3D12_CPU_DESCRIPTOR_HANDLE)* pDestDescriptorRangeStarts, 2626 const(UINT)* pDestDescriptorRangeSizes, 2627 UINT NumSrcDescriptorRanges, 2628 const(D3D12_CPU_DESCRIPTOR_HANDLE)* pSrcDescriptorRangeStarts, 2629 const(UINT)* pSrcDescriptorRangeSizes, 2630 D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); 2631 2632 void CopyDescriptorsSimple( 2633 UINT NumDescriptors, 2634 D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart, 2635 D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, 2636 D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); 2637 2638 version(CORRECT_ABI) 2639 { 2640 D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo( 2641 UINT visibleMask, 2642 UINT numResourceDescs, 2643 const(D3D12_RESOURCE_DESC)* pResourceDescs); 2644 2645 D3D12_HEAP_PROPERTIES GetCustomHeapProperties( 2646 UINT nodeMask, 2647 D3D12_HEAP_TYPE heapType); 2648 } 2649 else 2650 { 2651 void GetResourceAllocationInfo(D3D12_RESOURCE_ALLOCATION_INFO* outDesc, 2652 UINT visibleMask, 2653 UINT numResourceDescs, 2654 const(D3D12_RESOURCE_DESC)* pResourceDescs); 2655 2656 void GetCustomHeapProperties(D3D12_HEAP_PROPERTIES* outDesc, 2657 UINT nodeMask, 2658 D3D12_HEAP_TYPE heapType); 2659 } 2660 2661 2662 HRESULT CreateCommittedResource( 2663 const(D3D12_HEAP_PROPERTIES)* pHeapProperties, 2664 D3D12_HEAP_FLAGS HeapFlags, 2665 const(D3D12_RESOURCE_DESC)* pResourceDesc, 2666 D3D12_RESOURCE_STATES InitialResourceState, 2667 const(D3D12_CLEAR_VALUE)* pOptimizedClearValue, 2668 REFIID riidResource, 2669 ID3D12Resource* ppvResource); 2670 2671 HRESULT CreateHeap( 2672 const(D3D12_HEAP_DESC)* pDesc, 2673 REFIID riid, 2674 ID3D12Heap* ppvHeap); 2675 2676 HRESULT CreatePlacedResource( 2677 ID3D12Heap pHeap, 2678 UINT64 HeapOffset, 2679 const(D3D12_RESOURCE_DESC)* pDesc, 2680 D3D12_RESOURCE_STATES InitialState, 2681 const(D3D12_CLEAR_VALUE)* pOptimizedClearValue, 2682 REFIID riid, 2683 ID3D12Resource* ppvResource); 2684 2685 HRESULT CreateReservedResource( 2686 const(D3D12_RESOURCE_DESC)* pDesc, 2687 D3D12_RESOURCE_STATES InitialState, 2688 const(D3D12_CLEAR_VALUE)* pOptimizedClearValue, 2689 REFIID riid, 2690 ID3D12Resource* ppvResource); 2691 2692 HRESULT CreateSharedHandle( 2693 ID3D12DeviceChild pObject, 2694 const(SECURITY_ATTRIBUTES)* pAttributes, 2695 DWORD Access, 2696 LPCWSTR Name, 2697 HANDLE* pHandle); 2698 2699 HRESULT OpenSharedHandle( 2700 HANDLE NTHandle, 2701 REFIID riid, 2702 void** ppvObj); 2703 2704 HRESULT OpenSharedHandleByName( 2705 LPCWSTR Name, 2706 DWORD Access, 2707 HANDLE* pNTHandle); 2708 2709 HRESULT MakeResident( 2710 UINT NumObjects, 2711 const(ID3D12Pageable)* ppObjects); 2712 2713 HRESULT Evict( 2714 UINT NumObjects, 2715 const(ID3D12Pageable)* ppObjects); 2716 2717 HRESULT CreateFence( 2718 UINT64 InitialValue, 2719 D3D12_FENCE_FLAGS Flags, 2720 REFIID riid, 2721 ID3D12Fence* ppFence); 2722 2723 HRESULT GetDeviceRemovedReason(); 2724 2725 void GetCopyableFootprints( 2726 const(D3D12_RESOURCE_DESC)* pResourceDesc, 2727 UINT FirstSubresource, 2728 UINT NumSubresources, 2729 UINT64 BaseOffset, 2730 D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts, 2731 UINT* pNumRows, 2732 UINT64* pRowSizeInBytes, 2733 UINT64* pTotalBytes); 2734 2735 HRESULT CreateQueryHeap( 2736 const(D3D12_QUERY_HEAP_DESC)* pDesc, 2737 REFIID riid, 2738 ID3D12QueryHeap* ppvHeap); 2739 2740 HRESULT SetStablePowerState( 2741 BOOL Enable); 2742 2743 HRESULT CreateCommandSignature( 2744 const(D3D12_COMMAND_SIGNATURE_DESC)* pDesc, 2745 ID3D12RootSignature pRootSignature, 2746 REFIID riid, 2747 ID3D12CommandSignature* ppvCommandSignature); 2748 2749 void GetResourceTiling( 2750 ID3D12Resource pTiledResource, 2751 UINT* pNumTilesForEntireResource, 2752 D3D12_PACKED_MIP_INFO* pPackedMipDesc, 2753 D3D12_TILE_SHAPE* pStandardTileShapeForNonPackedMips, 2754 UINT* pNumSubresourceTilings, 2755 UINT FirstSubresourceTilingToGet, 2756 D3D12_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips); 2757 2758 LUID GetAdapterLuid(); 2759 2760 2761 version(CORRECT_ABI){} 2762 else 2763 { 2764 final D3D12_RESOURCE_ALLOCATION_INFO GetResourceAllocationInfo( 2765 UINT visibleMask, 2766 UINT numResourceDescs, 2767 const(D3D12_RESOURCE_DESC)* pResourceDescs) 2768 { 2769 D3D12_RESOURCE_ALLOCATION_INFO temp; 2770 GetResourceAllocationInfo(&temp, visibleMask, numResourceDescs, pResourceDescs); 2771 return temp; 2772 } 2773 2774 final D3D12_HEAP_PROPERTIES GetCustomHeapProperties( 2775 UINT nodeMask, 2776 D3D12_HEAP_TYPE heapType) 2777 { 2778 D3D12_HEAP_PROPERTIES temp; 2779 GetCustomHeapProperties(nodeMask, heapType); 2780 return temp; 2781 } 2782 } 2783 } 2784 2785 struct D3D12_SUBRESOURCE_DATA { 2786 const(void)* pData; 2787 LONG_PTR RowPitch; 2788 LONG_PTR SlicePitch; 2789 } 2790 2791 struct D3D12_MEMCPY_DEST { 2792 void* pData; 2793 SIZE_T RowPitch; 2794 SIZE_T SlicePitch; 2795 } 2796 2797 /////////////////////////////////////////////////////////////////////////// 2798 // D3D12CreateDevice 2799 // ------------------ 2800 // 2801 // pAdapter 2802 // If NULL, D3D12CreateDevice will choose the primary adapter. 2803 // If non-NULL, D3D12CreateDevice will use the provided adapter. 2804 // MinimumFeatureLevel 2805 // The minimum feature level required for successful device creation. 2806 // riid 2807 // The interface IID of the device to be returned. Expected: ID3D12Device. 2808 // ppDevice 2809 // Pointer to returned interface. May be NULL. 2810 // 2811 // Return Values 2812 // Any of those documented for 2813 // CreateDXGIFactory1 2814 // IDXGIFactory::EnumAdapters 2815 // D3D12CreateDevice 2816 // 2817 /////////////////////////////////////////////////////////////////////////// 2818 2819 2820 extern(Windows) nothrow HRESULT D3D12CreateDevice( 2821 IUnknown pAdapter, 2822 D3D_FEATURE_LEVEL MinimumFeatureLevel, 2823 REFIID riid, // Expected: ID3D12Device 2824 ID3D12Device *ppDevice); 2825 2826 extern(Windows) nothrow HRESULT D3D12GetDebugInterface( 2827 REFIID riid, 2828 void** ppvDebug); 2829 2830 2831 alias PFN_D3D12_CREATE_DEVICE = extern(Windows) nothrow HRESULT function( 2832 IUnknown pAdapter, 2833 D3D_FEATURE_LEVEL MinimumFeatureLevel, 2834 REFIID riid, // Expected: ID3D12Device 2835 ID3D12Device *ppDevice); 2836 2837 alias PFN_D3D12_GET_DEBUG_INTERFACE = extern(Windows) nothrow HRESULT function( 2838 REFIID riid, 2839 void** ppvDebug); 2840