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 enum D3D12_SHADER_VERSION_TYPE
25 D3D12_SHVER_PIXEL_SHADER
= 0x0,
26 D3D12_SHVER_VERTEX_SHADER
= 0x1,
27 D3D12_SHVER_GEOMETRY_SHADER
= 0x2,
28 D3D12_SHVER_HULL_SHADER
= 0x3,
29 D3D12_SHVER_DOMAIN_SHADER
= 0x4,
30 D3D12_SHVER_COMPUTE_SHADER
= 0x5,
31 D3D12_SHVER_RESERVED0
= 0xfff0,
32 } D3D12_SHADER_VERSION_TYPE
;
34 typedef struct _D3D12_SHADER_DESC
42 UINT OutputParameters
;
43 UINT InstructionCount
;
44 UINT TempRegisterCount
;
48 UINT TextureNormalInstructions
;
49 UINT TextureLoadInstructions
;
50 UINT TextureCompInstructions
;
51 UINT TextureBiasInstructions
;
52 UINT TextureGradientInstructions
;
53 UINT FloatInstructionCount
;
54 UINT IntInstructionCount
;
55 UINT UintInstructionCount
;
56 UINT StaticFlowControlCount
;
57 UINT DynamicFlowControlCount
;
58 UINT MacroInstructionCount
;
59 UINT ArrayInstructionCount
;
60 UINT CutInstructionCount
;
61 UINT EmitInstructionCount
;
62 D3D_PRIMITIVE_TOPOLOGY GSOutputTopology
;
63 UINT GSMaxOutputVertexCount
;
64 D3D_PRIMITIVE InputPrimitive
;
65 UINT PatchConstantParameters
;
66 UINT cGSInstanceCount
;
68 D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive
;
69 D3D_TESSELLATOR_PARTITIONING HSPartitioning
;
70 D3D_TESSELLATOR_DOMAIN TessellatorDomain
;
71 UINT cBarrierInstructions
;
72 UINT cInterlockedInstructions
;
73 UINT cTextureStoreInstructions
;
76 typedef struct _D3D12_SHADER_VARIABLE_DESC
87 } D3D12_SHADER_VARIABLE_DESC
;
89 typedef struct _D3D12_SHADER_TYPE_DESC
91 D3D_SHADER_VARIABLE_CLASS Class
;
92 D3D_SHADER_VARIABLE_TYPE Type
;
99 } D3D12_SHADER_TYPE_DESC
;
101 typedef struct _D3D12_SHADER_BUFFER_DESC
104 D3D_CBUFFER_TYPE Type
;
108 } D3D12_SHADER_BUFFER_DESC
;
110 typedef struct _D3D12_SHADER_INPUT_BIND_DESC
113 D3D_SHADER_INPUT_TYPE Type
;
117 D3D_RESOURCE_RETURN_TYPE ReturnType
;
118 D3D_SRV_DIMENSION Dimension
;
122 } D3D12_SHADER_INPUT_BIND_DESC
;
124 typedef struct _D3D12_SIGNATURE_PARAMETER_DESC
126 const char *SemanticName
;
129 D3D_NAME SystemValueType
;
130 D3D_REGISTER_COMPONENT_TYPE ComponentType
;
134 D3D_MIN_PRECISION MinPrecision
;
135 } D3D12_SIGNATURE_PARAMETER_DESC
;
137 typedef struct _D3D12_PARAMETER_DESC
140 const char *SemanticName
;
141 D3D_SHADER_VARIABLE_TYPE Type
;
142 D3D_SHADER_VARIABLE_CLASS Class
;
145 D3D_INTERPOLATION_MODE InterpolationMode
;
146 D3D_PARAMETER_FLAGS Flags
;
147 UINT FirstInRegister
;
148 UINT FirstInComponent
;
149 UINT FirstOutRegister
;
150 UINT FirstOutComponent
;
151 } D3D12_PARAMETER_DESC
;
153 typedef struct _D3D12_FUNCTION_DESC
158 UINT ConstantBuffers
;
160 UINT InstructionCount
;
161 UINT TempRegisterCount
;
165 UINT TextureNormalInstructions
;
166 UINT TextureLoadInstructions
;
167 UINT TextureCompInstructions
;
168 UINT TextureBiasInstructions
;
169 UINT TextureGradientInstructions
;
170 UINT FloatInstructionCount
;
171 UINT IntInstructionCount
;
172 UINT UintInstructionCount
;
173 UINT StaticFlowControlCount
;
174 UINT DynamicFlowControlCount
;
175 UINT MacroInstructionCount
;
176 UINT ArrayInstructionCount
;
177 UINT MovInstructionCount
;
178 UINT MovcInstructionCount
;
179 UINT ConversionInstructionCount
;
180 UINT BitwiseInstructionCount
;
181 D3D_FEATURE_LEVEL MinFeatureLevel
;
182 UINT64 RequiredFeatureFlags
;
184 INT FunctionParameterCount
;
186 BOOL Has10Level9VertexShader
;
187 BOOL Has10Level9PixelShader
;
188 } D3D12_FUNCTION_DESC
;
190 typedef struct _D3D12_LIBRARY_DESC
195 } D3D12_LIBRARY_DESC
;
197 interface ID3D12ShaderReflectionConstantBuffer
;
200 uuid(e913c351
-783d
-48ca
-a1d1
-4f306284ad56
),
204 interface ID3D12ShaderReflectionType
206 HRESULT GetDesc
(D3D12_SHADER_TYPE_DESC
*desc
);
207 ID3D12ShaderReflectionType
*GetMemberTypeByIndex
(UINT index
);
208 ID3D12ShaderReflectionType
*GetMemberTypeByName
(const char *name
);
209 const char *GetMemberTypeName
(UINT index
);
210 HRESULT IsEqual
(ID3D12ShaderReflectionType
*type
);
211 ID3D12ShaderReflectionType
*GetSubType
();
212 ID3D12ShaderReflectionType
*GetBaseClass
();
213 UINT GetNumInterfaces
();
214 ID3D12ShaderReflectionType
*GetInterfaceByIndex
(UINT index
);
215 HRESULT IsOfType
(ID3D12ShaderReflectionType
*type
);
216 HRESULT ImplementsInterface
(ID3D12ShaderReflectionType
*base
);
220 uuid(8337a8a6
-a216
-444a
-b2f4
-314733a73aea
),
224 interface ID3D12ShaderReflectionVariable
226 HRESULT GetDesc
(D3D12_SHADER_VARIABLE_DESC
*desc
);
227 ID3D12ShaderReflectionType
*GetType
();
228 ID3D12ShaderReflectionConstantBuffer
*GetBuffer
();
229 UINT GetInterfaceSlot
(UINT index
);
233 uuid(c59598b4
-48b3
-4869-b9b1
-b1618b14a8b7
),
237 interface ID3D12ShaderReflectionConstantBuffer
239 HRESULT GetDesc
(D3D12_SHADER_BUFFER_DESC
*desc
);
240 ID3D12ShaderReflectionVariable
*GetVariableByIndex
(UINT index
);
241 ID3D12ShaderReflectionVariable
*GetVariableByName
(const char *name
);
245 uuid(5a58797d
-a72c
-478d
-8ba2
-efc6b0efe88e
),
249 interface ID3D12ShaderReflection
: IUnknown
251 HRESULT GetDesc
(D3D12_SHADER_DESC
*desc
);
252 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByIndex
(UINT index
);
253 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByName
(const char *name
);
254 HRESULT GetResourceBindingDesc
(UINT index
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
255 HRESULT GetInputParameterDesc
(UINT index
, D3D12_SIGNATURE_PARAMETER_DESC
*desc
);
256 HRESULT GetOutputParameterDesc
(UINT index
, D3D12_SIGNATURE_PARAMETER_DESC
*desc
);
257 HRESULT GetPatchConstantParameterDesc
(UINT index
, D3D12_SIGNATURE_PARAMETER_DESC
*desc
);
258 ID3D12ShaderReflectionVariable
*GetVariableByName
(const char *name
);
259 HRESULT GetResourceBindingDescByName
(const char *name
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
260 UINT GetMovInstructionCount
();
261 UINT GetMovcInstructionCount
();
262 UINT GetConversionInstructionCount
();
263 UINT GetBitwiseInstructionCount
();
264 D3D_PRIMITIVE GetGSInputPrimitive
();
265 BOOL IsSampleFrequencyShader
();
266 UINT GetNumInterfaceSlots
();
267 HRESULT GetMinFeatureLevel
(D3D_FEATURE_LEVEL
*level
);
268 UINT GetThreadGroupSize
(UINT
*sizex
, UINT
*sizey
, UINT
*sizez
);
269 UINT64 GetRequiresFlags
();
273 uuid(ec25f42d
-7006-4f2b
-b33e
-02cc3375733f
),
277 interface ID3D12FunctionParameterReflection
279 HRESULT GetDesc
(D3D12_PARAMETER_DESC
*desc
);
283 uuid(1108795c
-2772-4ba9
-b2a8
-d464dc7e2799
),
287 interface ID3D12FunctionReflection
289 HRESULT GetDesc
(D3D12_FUNCTION_DESC
*desc
);
290 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByIndex
(UINT index
);
291 ID3D12ShaderReflectionConstantBuffer
*GetConstantBufferByName
(const char *name
);
292 HRESULT GetResourceBindingDesc
(UINT index
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
293 ID3D12ShaderReflectionVariable
*GetVariableByName
(const char *name
);
294 HRESULT GetResourceBindingDescByName
(const char *name
, D3D12_SHADER_INPUT_BIND_DESC
*desc
);
295 ID3D12FunctionParameterReflection
*GetFunctionParameter
(INT index
);
299 uuid(8e349d19
-54db
-4a56
-9dc9
-119d87bdb804
),
303 interface ID3D12LibraryReflection
: IUnknown
305 HRESULT GetDesc
(D3D12_LIBRARY_DESC
*desc
);
306 ID3D12FunctionReflection
*GetFunctionByIndex
(INT index
);