2 * Copyright 2020 Paul Gofman for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 import
"d3dcommon.idl";
23 typedef struct _D3D12_SHADER_DESC
31 UINT OutputParameters
;
32 UINT InstructionCount
;
33 UINT TempRegisterCount
;
37 UINT TextureNormalInstructions
;
38 UINT TextureLoadInstructions
;
39 UINT TextureCompInstructions
;
40 UINT TextureBiasInstructions
;
41 UINT TextureGradientInstructions
;
42 UINT FloatInstructionCount
;
43 UINT IntInstructionCount
;
44 UINT UintInstructionCount
;
45 UINT StaticFlowControlCount
;
46 UINT DynamicFlowControlCount
;
47 UINT MacroInstructionCount
;
48 UINT ArrayInstructionCount
;
49 UINT CutInstructionCount
;
50 UINT EmitInstructionCount
;
51 D3D_PRIMITIVE_TOPOLOGY GSOutputTopology
;
52 UINT GSMaxOutputVertexCount
;
53 D3D_PRIMITIVE InputPrimitive
;
54 UINT PatchConstantParameters
;
55 UINT cGSInstanceCount
;
57 D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive
;
58 D3D_TESSELLATOR_PARTITIONING HSPartitioning
;
59 D3D_TESSELLATOR_DOMAIN TessellatorDomain
;
60 UINT cBarrierInstructions
;
61 UINT cInterlockedInstructions
;
62 UINT cTextureStoreInstructions
;
65 typedef struct _D3D12_SHADER_VARIABLE_DESC
76 } D3D12_SHADER_VARIABLE_DESC
;
78 typedef struct _D3D12_SHADER_TYPE_DESC
80 D3D_SHADER_VARIABLE_CLASS Class
;
81 D3D_SHADER_VARIABLE_TYPE Type
;
88 } D3D12_SHADER_TYPE_DESC
;
90 typedef struct _D3D12_SHADER_BUFFER_DESC
93 D3D_CBUFFER_TYPE Type
;
97 } D3D12_SHADER_BUFFER_DESC
;
99 typedef struct _D3D12_SHADER_INPUT_BIND_DESC
102 D3D_SHADER_INPUT_TYPE Type
;
106 D3D_RESOURCE_RETURN_TYPE ReturnType
;
107 D3D_SRV_DIMENSION Dimension
;
111 } D3D12_SHADER_INPUT_BIND_DESC
;
113 typedef struct _D3D12_SIGNATURE_PARAMETER_DESC
115 const char *SemanticName
;
118 D3D_NAME SystemValueType
;
119 D3D_REGISTER_COMPONENT_TYPE ComponentType
;
123 D3D_MIN_PRECISION MinPrecision
;
124 } D3D12_SIGNATURE_PARAMETER_DESC
;
126 typedef struct _D3D12_PARAMETER_DESC
129 const char *SemanticName
;
130 D3D_SHADER_VARIABLE_TYPE Type
;
131 D3D_SHADER_VARIABLE_CLASS Class
;
134 D3D_INTERPOLATION_MODE InterpolationMode
;
135 D3D_PARAMETER_FLAGS Flags
;
136 UINT FirstInRegister
;
137 UINT FirstInComponent
;
138 UINT FirstOutRegister
;
139 UINT FirstOutComponent
;
140 } D3D12_PARAMETER_DESC
;
142 typedef struct _D3D12_FUNCTION_DESC
147 UINT ConstantBuffers
;
149 UINT InstructionCount
;
150 UINT TempRegisterCount
;
154 UINT TextureNormalInstructions
;
155 UINT TextureLoadInstructions
;
156 UINT TextureCompInstructions
;
157 UINT TextureBiasInstructions
;
158 UINT TextureGradientInstructions
;
159 UINT FloatInstructionCount
;
160 UINT IntInstructionCount
;
161 UINT UintInstructionCount
;
162 UINT StaticFlowControlCount
;
163 UINT DynamicFlowControlCount
;
164 UINT MacroInstructionCount
;
165 UINT ArrayInstructionCount
;
166 UINT MovInstructionCount
;
167 UINT MovcInstructionCount
;
168 UINT ConversionInstructionCount
;
169 UINT BitwiseInstructionCount
;
170 D3D_FEATURE_LEVEL MinFeatureLevel
;
171 UINT64 RequiredFeatureFlags
;
173 INT FunctionParameterCount
;
175 BOOL Has10Level9VertexShader
;
176 BOOL Has10Level9PixelShader
;
177 } D3D12_FUNCTION_DESC
;
179 typedef struct _D3D12_LIBRARY_DESC
184 } D3D12_LIBRARY_DESC
;
186 interface ID3D12ShaderReflectionConstantBuffer
;
189 uuid(e913c351
-783d
-48ca
-a1d1
-4f306284ad56
),
193 interface ID3D12ShaderReflectionType
195 HRESULT GetDesc
(D3D12_SHADER_TYPE_DESC
*desc
);
196 ID3D12ShaderReflectionType
*GetMemberTypeByIndex
(UINT index
);
197 ID3D12ShaderReflectionType
*GetMemberTypeByName
(const char *name
);
198 const char *GetMemberTypeName
(UINT index
);
199 HRESULT IsEqual
(ID3D12ShaderReflectionType
*type
);
200 ID3D12ShaderReflectionType
*GetSubType
();
201 ID3D12ShaderReflectionType
*GetBaseClass
();
202 UINT GetNumInterfaces
();
203 ID3D12ShaderReflectionType
*GetInterfaceByIndex
(UINT index
);
204 HRESULT IsOfType
(ID3D12ShaderReflectionType
*type
);
205 HRESULT ImplementsInterface
(ID3D12ShaderReflectionType
*base
);
209 uuid(8337a8a6
-a216
-444a
-b2f4
-314733a73aea
),
213 interface ID3D12ShaderReflectionVariable
215 HRESULT GetDesc
(D3D12_SHADER_VARIABLE_DESC
*desc
);
216 ID3D12ShaderReflectionType
*GetType
();
217 ID3D12ShaderReflectionConstantBuffer
*GetBuffer
();
218 UINT GetInterfaceSlot
(UINT index
);
222 uuid(c59598b4
-48b3
-4869-b9b1
-b1618b14a8b7
),
226 interface ID3D12ShaderReflectionConstantBuffer
228 HRESULT GetDesc
(D3D12_SHADER_BUFFER_DESC
*desc
);
229 ID3D12ShaderReflectionVariable
*GetVariableByIndex
(UINT index
);
230 ID3D12ShaderReflectionVariable
*GetVariableByName
(const char *name
);
234 uuid(5a58797d
-a72c
-478d
-8ba2
-efc6b0efe88e
),
238 interface ID3D12ShaderReflection
: IUnknown
240 HRESULT GetDesc
(D3D12_SHADER_DESC
*desc
);
241 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByIndex
(UINT index
);
242 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByName
(const char *name
);
243 HRESULT GetResourceBindingDesc
(UINT index
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
244 HRESULT GetInputParameterDesc
(UINT index
, D3D12_SIGNATURE_PARAMETER_DESC
*desc
);
245 HRESULT GetOutputParameterDesc
(UINT index
, D3D12_SIGNATURE_PARAMETER_DESC
*desc
);
246 HRESULT GetPatchConstantParameterDesc
(UINT index
, D3D12_SIGNATURE_PARAMETER_DESC
*desc
);
247 ID3D12ShaderReflectionVariable
*GetVariableByName
(const char *name
);
248 HRESULT GetResourceBindingDescByName
(const char *name
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
249 UINT GetMovInstructionCount
();
250 UINT GetMovcInstructionCount
();
251 UINT GetConversionInstructionCount
();
252 UINT GetBitwiseInstructionCount
();
253 D3D_PRIMITIVE GetGSInputPrimitive
();
254 BOOL IsSampleFrequencyShader
();
255 UINT GetNumInterfaceSlots
();
256 HRESULT GetMinFeatureLevel
(D3D_FEATURE_LEVEL
*level
);
257 UINT GetThreadGroupSize
(UINT
*sizex
, UINT
*sizey
, UINT
*sizez
);
258 UINT64 GetRequiresFlags
();
262 uuid(ec25f42d
-7006-4f2b
-b33e
-02cc3375733f
),
266 interface ID3D12FunctionParameterReflection
268 HRESULT GetDesc
(D3D12_PARAMETER_DESC
*desc
);
272 uuid(1108795c
-2772-4ba9
-b2a8
-d464dc7e2799
),
276 interface ID3D12FunctionReflection
278 HRESULT GetDesc
(D3D12_FUNCTION_DESC
*desc
);
279 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByIndex
(UINT index
);
280 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByName
(const char *name
);
281 HRESULT GetResourceBindingDesc
(UINT index
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
282 ID3D12ShaderReflectionVariable
*GetVariableByName
(const char *name
);
283 HRESULT GetResourceBindingDescByName
(const char *name
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
284 ID3D12FunctionParameterReflection
*GetFunctionParameter
(INT index
);
288 uuid(8e349d19
-54db
-4a56
-9dc9
-119d87bdb804
),
292 interface ID3D12LibraryReflection
: IUnknown
294 HRESULT GetDesc
(D3D12_LIBRARY_DESC
*desc
);
295 ID3D12FunctionReflection
*GetFunctionByIndex
(INT index
);