blob: 4f64c5f3307378ada172e2ffa0560aeaee7732bd [file] [log] [blame]
Kael Choiac9f6be2016-02-23 02:02:571// Copyright © 2016, Peter Atashian
2// Licensed under the MIT License <LICENSE.md>
3use super::*;
4pub type D3D10_RESOURCE_RETURN_TYPE = D3D_RESOURCE_RETURN_TYPE;
5pub type D3D10_CBUFFER_TYPE = D3D_CBUFFER_TYPE;
6STRUCT!{struct D3D10_SHADER_DESC {
7 Version: UINT,
8 Creator: LPCSTR,
9 Flags: UINT,
10 ConstantBuffers: UINT,
11 BoundResources: UINT,
12 InputParameters: UINT,
13 OutputParameters: UINT,
14 InstructionCount: UINT,
15 TempRegisterCount: UINT,
16 TempArrayCount: UINT,
17 DefCount: UINT,
18 DclCount: UINT,
19 TextureNormalInstructions: UINT,
20 TextureLoadInstructions: UINT,
21 TextureCompInstructions: UINT,
22 TextureBiasInstructions: UINT,
23 TextureGradientInstructions: UINT,
24 FloatInstructionCount: UINT,
25 IntInstructionCount: UINT,
26 UintInstructionCount: UINT,
27 StaticFlowControlCount: UINT,
28 DynamicFlowControlCount: UINT,
29 MacroInstructionCount: UINT,
30 ArrayInstructionCount: UINT,
31 CutInstructionCount: UINT,
32 EmitInstructionCount: UINT,
33 GSOutputTopology: D3D_PRIMITIVE_TOPOLOGY,
34 GSMaxOutputVertexCount: UINT,
35}}
36STRUCT!{struct D3D10_SHADER_BUFFER_DESC {
37 Name: LPCSTR,
38 Type: D3D10_CBUFFER_TYPE,
39 Variables: UINT,
40 Size: UINT,
41 uFlags: UINT,
42}}
43STRUCT!{struct D3D10_SHADER_VARIABLE_DESC {
44 Name: LPCSTR,
45 StartOffset: UINT,
46 Size: UINT,
47 uFlags: UINT,
48 DefaultValue: LPVOID,
49}}
50STRUCT!{struct D3D10_SHADER_TYPE_DESC {
51 Class: D3D_SHADER_VARIABLE_CLASS,
52 Type: D3D_SHADER_VARIABLE_TYPE,
53 Rows: UINT,
54 Columns: UINT,
55 Elements: UINT,
56 Members: UINT,
57 Offset: UINT,
58}}
59STRUCT!{struct D3D10_SHADER_INPUT_BIND_DESC {
60 Name: LPCSTR,
61 Type: D3D_SHADER_INPUT_TYPE,
62 BindPoint: UINT,
63 BindCount: UINT,
64 uFlags: UINT,
65 ReturnType: D3D_RESOURCE_RETURN_TYPE,
66 Dimension: D3D_SRV_DIMENSION,
67 NumSamples: UINT,
68}}
69STRUCT!{struct D3D10_SIGNATURE_PARAMETER_DESC {
70 SemanticName: LPCSTR,
71 SemanticIndex: UINT,
72 Register: UINT,
73 SystemValueType: D3D_NAME,
74 ComponentType: D3D_REGISTER_COMPONENT_TYPE,
75 Mask: BYTE,
76 ReadWriteMask: BYTE,
77}}
78RIDL!{interface ID3D10ShaderReflectionType(ID3D10ShaderReflectionTypeVtbl) {
79 fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_TYPE_DESC) -> HRESULT,
80 fn GetMemberTypeByIndex(&mut self, Index: UINT) -> *mut ID3D10ShaderReflectionType,
81 fn GetMemberTypeByName(&mut self, Name: LPCSTR) -> *mut ID3D10ShaderReflectionType,
82 fn GetMemberTypeName(&mut self, Index: UINT) -> LPCSTR
83}}
84RIDL!{interface ID3D10ShaderReflectionVariable(ID3D10ShaderReflectionVariableVtbl) {
85 fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_VARIABLE_DESC) -> HRESULT,
86 fn GetType(&mut self) -> *mut ID3D10ShaderReflectionType
87}}
88RIDL!{interface ID3D10ShaderReflectionConstantBuffer(ID3D10ShaderReflectionConstantBufferVtbl) {
89 fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_BUFFER_DESC) -> HRESULT,
90 fn GetVariableByIndex(&mut self, Index: UINT) -> *mut ID3D10ShaderReflectionVariable,
91 fn GetVariableByName(&mut self, Name: LPCSTR) -> *mut ID3D10ShaderReflectionVariable
92}}
93RIDL!{interface ID3D10ShaderReflection(ID3D10ShaderReflectionVtbl): IUnknown(IUnknownVtbl) {
94 fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_DESC) -> HRESULT,
95 fn GetConstantBufferByIndex(
96 &mut self, Index: UINT
97 ) -> *mut ID3D10ShaderReflectionConstantBuffer,
98 fn GetConstantBufferByName(
99 &mut self, Name: LPCSTR
100 ) -> *mut ID3D10ShaderReflectionConstantBuffer,
101 fn GetResourceBindingDesc(
102 &mut self, ResourceIndex: UINT, pDesc: *mut D3D10_SHADER_INPUT_BIND_DESC
103 ) -> HRESULT,
104 fn GetInputParameterDesc(
105 &mut self, ParameterIndex: UINT, pDesc: *mut D3D10_SIGNATURE_PARAMETER_DESC
106 ) -> HRESULT,
107 fn GetOutputParameterDesc(
108 &mut self, ParameterIndex: UINT, pDesc: *mut D3D10_SIGNATURE_PARAMETER_DESC
109 ) -> HRESULT
110}}