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