// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0 > or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT >, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
use shared::basetsd::UINT64;
use shared::minwindef::{BOOL, BYTE, INT, LPVOID, UINT};
use um::d3dcommon::{
D3D_CBUFFER_TYPE, D3D_FEATURE_LEVEL, D3D_INTERPOLATION_MODE, D3D_MIN_PRECISION, D3D_
NAME,
D3D_PARAMETER_FLAGS, D3D_PRIMITIVE, D3D_PRIMITIVE_TOPOLOGY, D3D_REGISTER_COMPONENT_TYPE,
D3D_RESOURCE_RETURN_TYPE, D3D_SHADER_INPUT_TYPE, D3D_SHADER_VARIABLE_CLASS,
D3D_SHADER_VARIABLE_TYPE, D3D_SRV_DIMENSION, D3D_TESSELLATOR_DOMAIN,
D3D_TESSELLATOR_OUTPUT_PRIMITIVE, D3D_TESSELLATOR_PARTITIONING,
};
use um::unknwnbase::{IUnknown, IUnknownVtbl};
use um::winnt::{HRESULT, LPCSTR};
ENUM !{enum D3D12_SHADER_VERSION_TYPE {
D3D12_SHVER_PIXEL_SHADER = 0 x0,
D3D12_SHVER_VERTEX_SHADER = 0 x1,
D3D12_SHVER_GEOMETRY_SHADER = 0 x2,
D3D12_SHVER_HULL_SHADER = 0 x3,
D3D12_SHVER_DOMAIN_SHADER = 0 x4,
D3D12_SHVER_COMPUTE_SHADER = 0 x5,
D3D12_SHVER_RESERVED0 = 0 xFFF0,
}}
STRUCT !{struct D3D12_FUNCTION_DESC {
Version: UINT,
Creator: LPCSTR,
Flags: UINT,
ConstantBuffers: UINT,
BoundResources: UINT,
InstructionCount: UINT,
TempRegisterCount: UINT,
TempArrayCount: UINT,
DefCount: UINT,
DclCount: UINT,
TextureNormalInstructions: UINT,
TextureLoadInstructions: UINT,
TextureCompInstructions: UINT,
TextureBiasInstructions: UINT,
TextureGradientInstructions: UINT,
FloatInstructionCount: UINT,
IntInstructionCount: UINT,
UintInstructionCount: UINT,
StaticFlowControlCount: UINT,
DynamicFlowControlCount: UINT,
MacroInstructionCount: UINT,
ArrayInstructionCount: UINT,
MovInstructionCount: UINT,
MovcInstructionCount: UINT,
ConversionInstructionCount: UINT,
BitwiseInstructionCount: UINT,
MinFeatureLevel: D3D_FEATURE_LEVEL,
RequiredFeatureFlags: UINT64,
Name: LPCSTR,
FunctionParameterCount: INT,
HasReturn: BOOL,
Has10Level9VertexShader: BOOL,
Has10Level9PixelShader: BOOL,
}}
STRUCT !{struct D3D12_LIBRARY_DESC {
Creator: LPCSTR,
Flags: UINT,
FunctionCount: UINT,
}}
STRUCT !{struct D3D12_PARAMETER_DESC {
Name: LPCSTR,
SemanticName: LPCSTR,
Type : D3D_SHADER_VARIABLE_TYPE,
Class: D3D_SHADER_VARIABLE_CLASS,
Rows: UINT,
Columns: UINT,
InterpolationMode: D3D_INTERPOLATION_MODE,
Flags: D3D_PARAMETER_FLAGS,
FirstInRegister: UINT,
FirstInComponent: UINT,
FirstOutRegister: UINT,
FirstOutComponent: UINT,
}}
STRUCT !{struct D3D12_SHADER_BUFFER_DESC {
Name: LPCSTR,
Type : D3D_CBUFFER_TYPE,
Variables: UINT,
Size: UINT,
uFlags: UINT,
}}
STRUCT !{struct D3D12_SHADER_DESC {
Version: UINT,
Creator: LPCSTR,
Flags: UINT,
ConstantBuffers: UINT,
BoundResources: UINT,
InputParameters: UINT,
OutputParameters: UINT,
InstructionCount: UINT,
TempRegisterCount: UINT,
TempArrayCount: UINT,
DefCount: UINT,
DclCount: UINT,
TextureNormalInstructions: UINT,
TextureLoadInstructions: UINT,
TextureCompInstructions: UINT,
TextureBiasInstructions: UINT,
TextureGradientInstructions: UINT,
FloatInstructionCount: UINT,
IntInstructionCount: UINT,
UintInstructionCount: UINT,
StaticFlowControlCount: UINT,
DynamicFlowControlCount: UINT,
MacroInstructionCount: UINT,
ArrayInstructionCount: UINT,
CutInstructionCount: UINT,
EmitInstructionCount: UINT,
GSOutputTopology: D3D_PRIMITIVE_TOPOLOGY,
GSMaxOutputVertexCount: UINT,
InputPrimitive: D3D_PRIMITIVE,
PatchConstantParameters: UINT,
cGSInstanceCount: UINT,
cControlPoints: UINT,
HSOutputPrimitive: D3D_TESSELLATOR_OUTPUT_PRIMITIVE,
HSPartitioning: D3D_TESSELLATOR_PARTITIONING,
TessellatorDomain: D3D_TESSELLATOR_DOMAIN,
cBarrierInstructions: UINT,
cInterlockedInstructions: UINT,
cTextureStoreInstructions: UINT,
}}
STRUCT !{struct D3D12_SHADER_INPUT_BIND_DESC {
Name: LPCSTR,
Type : D3D_SHADER_INPUT_TYPE,
BindPoint: UINT,
BindCount: UINT,
uFlags: UINT,
ReturnType: D3D_RESOURCE_RETURN_TYPE,
Dimension: D3D_SRV_DIMENSION,
NumSamples: UINT,
Space: UINT,
uID: UINT,
}}
STRUCT !{struct D3D12_SHADER_TYPE_DESC {
Class: D3D_SHADER_VARIABLE_CLASS,
Type : D3D_SHADER_VARIABLE_TYPE,
Rows: UINT,
Columns: UINT,
Elements: UINT,
Members: UINT,
Offset: UINT,
Name: LPCSTR,
}}
STRUCT !{struct D3D12_SHADER_VARIABLE_DESC {
Name: LPCSTR,
StartOffset: UINT,
Size: UINT,
uFlags: UINT,
DefaultValue: LPVOID,
StartTexture: UINT,
TextureSize: UINT,
StartSampler: UINT,
SamplerSize: UINT,
}}
STRUCT !{struct D3D12_SIGNATURE_PARAMETER_DESC {
SemanticName: LPCSTR,
SemanticIndex: UINT,
Register: UINT,
SystemValueType: D3D_NAME,
ComponentType: D3D_REGISTER_COMPONENT_TYPE,
Mask: BYTE,
ReadWriteMask: BYTE,
Stream: UINT,
MinPrecision: D3D_MIN_PRECISION,
}}
RIDL!{#[ uuid(0 xec25f42d, 0 x7006, 0 x4f2b, 0 xb3, 0 x3e, 0 x02, 0 xcc, 0 x33, 0 x75, 0 x73, 0 x3f)]
interface ID3D12FunctionParameterReflection(ID3D12FunctionParameterReflectionVtbl) {
fn GetDesc(
pDesc: *mut D3D12_PARAMETER_DESC,
) -> HRESULT,
}}
RIDL!{#[ uuid(0 x1108795c, 0 x2772, 0 x4ba9, 0 xb2, 0 xa8, 0 xd4, 0 x64, 0 xdc, 0 x7e, 0 x27, 0 x99)]
interface ID3D12FunctionReflection(ID3D12FunctionReflectionVtbl) {
fn GetDesc(
pDesc: *mut D3D12_FUNCTION_DESC,
) -> HRESULT,
fn GetConstantBufferByIndex(
BufferIndex: UINT,
) -> *mut ID3D12ShaderReflectionConstantBuffer,
fn GetConstantBufferByName(
Name: LPCSTR,
) -> *mut ID3D12ShaderReflectionConstantBuffer,
fn GetResourceBindingDesc(
ResourceIndex: UINT,
pDesc: *mut D3D12_SHADER_INPUT_BIND_DESC,
) -> HRESULT,
fn GetVariableByName(
Name: LPCSTR,
) -> *mut ID3D12ShaderReflectionVariable,
fn GetResourceBindingDescByName(
Name: LPCSTR,
pDesc: *mut D3D12_SHADER_INPUT_BIND_DESC,
) -> HRESULT,
fn GetFunctionParameter(
ParameterIndex: INT,
) -> *mut ID3D12FunctionParameterReflection,
}}
RIDL!{#[ uuid(0 x8e349d19, 0 x54db, 0 x4a56, 0 x9d, 0 xc9, 0 x11, 0 x9d, 0 x87, 0 xbd, 0 xb8, 0 x4)]
interface ID3D12LibraryReflection(ID3D12LibraryReflectionVtbl): IUnknown(IUnknownVtbl) {
fn GetDesc(
pDesc: *mut D3D12_LIBRARY_DESC,
) -> HRESULT,
fn GetFunctionByIndex(
FunctionIndex: INT,
) -> *mut ID3D12FunctionReflection,
}}
DEFINE_GUID!{IID_ID3D12ShaderReflectionConstantBuffer,
0 xc59598b4, 0 x48b3, 0 x4869, 0 xb9, 0 xb1, 0 xb1, 0 x61, 0 x8b, 0 x14, 0 xa8, 0 xb7}
RIDL!{#[ uuid(0 xc59598b4, 0 x48b3, 0 x4869, 0 xb9, 0 xb1, 0 xb1, 0 x61, 0 x8b, 0 x14, 0 xa8, 0 xb7)]
interface ID3D12ShaderReflectionConstantBuffer(ID3D12ShaderReflectionConstantBufferVtbl) {
fn GetDesc(
pDesc: *mut D3D12_SHADER_BUFFER_DESC,
) -> HRESULT,
fn GetVariableByIndex(
Index: UINT,
) -> *mut ID3D12ShaderReflectionVariable,
fn GetVariableByName(
Name: LPCSTR,
) -> *mut ID3D12ShaderReflectionVariable,
}}
DEFINE_GUID!{IID_ID3D12ShaderReflectionType,
0 xe913c351, 0 x783d, 0 x48ca, 0 xa1, 0 xd1, 0 x4f, 0 x30, 0 x62, 0 x84, 0 xad, 0 x56}
RIDL!{#[ uuid(0 xe913c351, 0 x783d, 0 x48ca, 0 xa1, 0 xd1, 0 x4f, 0 x30, 0 x62, 0 x84, 0 xad, 0 x56)]
interface ID3D12ShaderReflectionType(ID3D12ShaderReflectionTypeVtbl) {
fn GetDesc(
pDesc: *mut D3D12_SHADER_TYPE_DESC,
) -> HRESULT,
fn GetMemberTypeByIndex(
Index: UINT,
) -> *mut ID3D12ShaderReflectionType,
fn GetMemberTypeByName(
Name: LPCSTR,
) -> *mut ID3D12ShaderReflectionType,
fn GetMemberTypeName(
Index: UINT,
) -> LPCSTR,
fn IsEqual(
pType: *mut ID3D12ShaderReflectionType,
) -> HRESULT,
fn GetSubType() -> *mut ID3D12ShaderReflectionType,
fn GetBaseClass() -> *mut ID3D12ShaderReflectionType,
fn GetNumInterfaces() -> UINT,
fn GetInterfaceByIndex(
uIndex: UINT,
) -> *mut ID3D12ShaderReflectionType,
fn IsOfType(
pType: *mut ID3D12ShaderReflectionType,
) -> HRESULT,
fn ImplementsInterface(
pBase: *mut ID3D12ShaderReflectionType,
) -> HRESULT,
}}
DEFINE_GUID!{IID_ID3D12ShaderReflectionVariable,
0 x8337a8a6, 0 xa216, 0 x444a, 0 xb2, 0 xf4, 0 x31, 0 x47, 0 x33, 0 xa7, 0 x3a, 0 xea}
RIDL!{#[ uuid(0 x8337a8a6, 0 xa216, 0 x444a, 0 xb2, 0 xf4, 0 x31, 0 x47, 0 x33, 0 xa7, 0 x3a, 0 xea)]
interface ID3D12ShaderReflectionVariable(ID3D12ShaderReflectionVariableVtbl) {
fn GetDesc(
pDesc: *mut D3D12_SHADER_VARIABLE_DESC,
) -> HRESULT,
fn GetType() -> *mut ID3D12ShaderReflectionType,
fn GetBuffer() -> *mut ID3D12ShaderReflectionConstantBuffer,
fn GetInterfaceSlot(
uArrayIndex: UINT,
) -> UINT,
}}
DEFINE_GUID!{IID_ID3D12ShaderReflection,
0 x5a58797d, 0 xa72c, 0 x478d, 0 x8b, 0 xa2, 0 xef, 0 xc6, 0 xb0, 0 xef, 0 xe8, 0 x8e}
RIDL!{#[ uuid(0 x5a58797d, 0 xa72c, 0 x478d, 0 x8b, 0 xa2, 0 xef, 0 xc6, 0 xb0, 0 xef, 0 xe8, 0 x8e)]
interface ID3D12ShaderReflection(ID3D12ShaderReflectionVtbl): IUnknown(IUnknownVtbl) {
fn GetDesc(
pDesc: *mut D3D12_SHADER_DESC,
) -> HRESULT,
fn GetConstantBufferByIndex(
Index: UINT,
) -> *mut ID3D12ShaderReflectionConstantBuffer,
fn GetConstantBufferByName(
Name: LPCSTR,
) -> *mut ID3D12ShaderReflectionConstantBuffer,
fn GetResourceBindingDesc(
ResourceIndex: UINT,
pDesc: *mut D3D12_SHADER_INPUT_BIND_DESC,
) -> HRESULT,
fn GetInputParameterDesc(
ParameterIndex: UINT,
pDesc: *mut D3D12_SIGNATURE_PARAMETER_DESC,
) -> HRESULT,
fn GetOutputParameterDesc(
ParameterIndex: UINT,
pDesc: *mut D3D12_SIGNATURE_PARAMETER_DESC,
) -> HRESULT,
fn GetPatchConstantParameterDesc(
ParameterIndex: UINT,
pDesc: *mut D3D12_SIGNATURE_PARAMETER_DESC,
) -> HRESULT,
fn GetVariableByName(
Name: LPCSTR,
) -> *mut ID3D12ShaderReflectionVariable,
fn GetResourceBindingDescByName(
Name: LPCSTR,
pDesc: *mut D3D12_SHADER_INPUT_BIND_DESC,
) -> HRESULT,
fn GetMovInstructionCount() -> UINT,
fn GetMovcInstructionCount() -> UINT,
fn GetConversionInstructionCount() -> UINT,
fn GetBitwiseInstructionCount() -> UINT,
fn GetGSInputPrimitive() -> D3D_PRIMITIVE,
fn IsSampleFrequencyShader() -> BOOL,
fn GetNumInterfaceSlots() -> UINT,
fn GetMinFeatureLevel(
pLevel: *mut D3D_FEATURE_LEVEL,
) -> HRESULT,
fn GetThreadGroupSize(
pSizeX: *mut UINT,
pSizeY: *mut UINT,
pSizeZ: *mut UINT,
) -> UINT,
fn GetRequiresFlags() -> UINT64,
}}
DEFINE_GUID!{IID_ID3D12LibraryReflection,
0 x8e349d19, 0 x54db, 0 x4a56, 0 x9d, 0 xc9, 0 x11, 0 x9d, 0 x87, 0 xbd, 0 xb8, 0 x04}
DEFINE_GUID!{IID_ID3D12FunctionReflection,
0 x1108795c, 0 x2772, 0 x4ba9, 0 xb2, 0 xa8, 0 xd4, 0 x64, 0 xdc, 0 x7e, 0 x27, 0 x99}
DEFINE_GUID!{IID_ID3D12FunctionParameterReflection,
0 xec25f42d, 0 x7006, 0 x4f2b, 0 xb3, 0 x3e, 0 x02, 0 xcc, 0 x33, 0 x75, 0 x73, 0 x3f}
pub type D3D12_CBUFFER_TYPE = D3D_CBUFFER_TYPE;
pub type D3D12_RESOURCE_RETURN_TYPE = D3D_RESOURCE_RETURN_TYPE;
pub type D3D12_TESSELLATOR_DOMAIN = D3D_TESSELLATOR_DOMAIN;
pub type D3D12_TESSELLATOR_OUTPUT_PRIMITIVE = D3D_TESSELLATOR_OUTPUT_PRIMITIVE;
pub type D3D12_TESSELLATOR_PARTITIONING = D3D_TESSELLATOR_PARTITIONING;
pub type LPD3D12FUNCTIONPARAMETERREFLECTION = *mut ID3D12FunctionParameterReflection;
pub type LPD3D12FUNCTIONREFLECTION = *mut ID3D12FunctionReflection;
pub type LPD3D12LIBRARYREFLECTION = *mut ID3D12LibraryReflection;
pub type LPD3D12SHADERREFLECTION = *mut ID3D12ShaderReflection;
pub type LPD3D12SHADERREFLECTIONCONSTANTBUFFER = *mut ID3D12ShaderReflectionConstantBuffer;
pub type LPD3D12SHADERREFLECTIONTYPE = *mut ID3D12ShaderReflectionType;
pub type LPD3D12SHADERREFLECTIONVARIABLE = *mut ID3D12ShaderReflectionVariable;
pub const D3D_SHADER_REQUIRES_INNER_COVERAGE: UINT64 = 0 x00000400;
pub const D3D_SHADER_REQUIRES_ROVS: UINT64 = 0 x00001000;
pub const D3D_SHADER_REQUIRES_STENCIL_REF: UINT64 = 0 x00000200;
pub const D3D_SHADER_REQUIRES_TYPED_UAV_LOAD_ADDITIONAL_FORMATS: UINT64 = 0 x00000800;
pub const D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER:
UINT64 = 0 x00002000;
Messung V0.5 in Prozent C=99 H=100 G=99
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-22)
¤
*© Formatika GbR, Deutschland