Debian Codegraph @

mingw-w64-headers/include/d3d12shader.idl

raw
1 /*
2 * Copyright 2020 Paul Gofman for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19 import "oaidl.idl";
20 import "ocidl.idl";
21 import "d3dcommon.idl";
22
23 typedef enum D3D12_SHADER_VERSION_TYPE
24 {
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;
33
34 cpp_quote("#define D3D12_SHVER_GET_TYPE(v) (((v) >> 16) & 0xffff)")
35 cpp_quote("#define D3D12_SHVER_GET_MAJOR(v) (((v) >> 4) & 0xf)")
36 cpp_quote("#define D3D12_SHVER_GET_MINOR(v) (((v) >> 0) & 0xf)")
37
38 typedef struct _D3D12_SHADER_DESC
39 {
40 UINT Version;
41 const char *Creator;
42 UINT Flags;
43 UINT ConstantBuffers;
44 UINT BoundResources;
45 UINT InputParameters;
46 UINT OutputParameters;
47 UINT InstructionCount;
48 UINT TempRegisterCount;
49 UINT TempArrayCount;
50 UINT DefCount;
51 UINT DclCount;
52 UINT TextureNormalInstructions;
53 UINT TextureLoadInstructions;
54 UINT TextureCompInstructions;
55 UINT TextureBiasInstructions;
56 UINT TextureGradientInstructions;
57 UINT FloatInstructionCount;
58 UINT IntInstructionCount;
59 UINT UintInstructionCount;
60 UINT StaticFlowControlCount;
61 UINT DynamicFlowControlCount;
62 UINT MacroInstructionCount;
63 UINT ArrayInstructionCount;
64 UINT CutInstructionCount;
65 UINT EmitInstructionCount;
66 D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
67 UINT GSMaxOutputVertexCount;
68 D3D_PRIMITIVE InputPrimitive;
69 UINT PatchConstantParameters;
70 UINT cGSInstanceCount;
71 UINT cControlPoints;
72 D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive;
73 D3D_TESSELLATOR_PARTITIONING HSPartitioning;
74 D3D_TESSELLATOR_DOMAIN TessellatorDomain;
75 UINT cBarrierInstructions;
76 UINT cInterlockedInstructions;
77 UINT cTextureStoreInstructions;
78 } D3D12_SHADER_DESC;
79
80 typedef struct _D3D12_SHADER_VARIABLE_DESC
81 {
82 const char *Name;
83 UINT StartOffset;
84 UINT Size;
85 UINT uFlags;
86 void *DefaultValue;
87 UINT StartTexture;
88 UINT TextureSize;
89 UINT StartSampler;
90 UINT SamplerSize;
91 } D3D12_SHADER_VARIABLE_DESC;
92
93 typedef struct _D3D12_SHADER_TYPE_DESC
94 {
95 D3D_SHADER_VARIABLE_CLASS Class;
96 D3D_SHADER_VARIABLE_TYPE Type;
97 UINT Rows;
98 UINT Columns;
99 UINT Elements;
100 UINT Members;
101 UINT Offset;
102 const char *Name;
103 } D3D12_SHADER_TYPE_DESC;
104
105 typedef struct _D3D12_SHADER_BUFFER_DESC
106 {
107 const char *Name;
108 D3D_CBUFFER_TYPE Type;
109 UINT Variables;
110 UINT Size;
111 UINT uFlags;
112 } D3D12_SHADER_BUFFER_DESC;
113
114 typedef struct _D3D12_SHADER_INPUT_BIND_DESC
115 {
116 const char *Name;
117 D3D_SHADER_INPUT_TYPE Type;
118 UINT BindPoint;
119 UINT BindCount;
120 UINT uFlags;
121 D3D_RESOURCE_RETURN_TYPE ReturnType;
122 D3D_SRV_DIMENSION Dimension;
123 UINT NumSamples;
124 UINT Space;
125 UINT uID;
126 } D3D12_SHADER_INPUT_BIND_DESC;
127
128 typedef struct _D3D12_SIGNATURE_PARAMETER_DESC
129 {
130 const char *SemanticName;
131 UINT SemanticIndex;
132 UINT Register;
133 D3D_NAME SystemValueType;
134 D3D_REGISTER_COMPONENT_TYPE ComponentType;
135 BYTE Mask;
136 BYTE ReadWriteMask;
137 UINT Stream;
138 D3D_MIN_PRECISION MinPrecision;
139 } D3D12_SIGNATURE_PARAMETER_DESC;
140
141 typedef struct _D3D12_PARAMETER_DESC
142 {
143 const char *Name;
144 const char *SemanticName;
145 D3D_SHADER_VARIABLE_TYPE Type;
146 D3D_SHADER_VARIABLE_CLASS Class;
147 UINT Rows;
148 UINT Columns;
149 D3D_INTERPOLATION_MODE InterpolationMode;
150 D3D_PARAMETER_FLAGS Flags;
151 UINT FirstInRegister;
152 UINT FirstInComponent;
153 UINT FirstOutRegister;
154 UINT FirstOutComponent;
155 } D3D12_PARAMETER_DESC;
156
157 typedef struct _D3D12_FUNCTION_DESC
158 {
159 UINT Version;
160 const char *Creator;
161 UINT Flags;
162 UINT ConstantBuffers;
163 UINT BoundResources;
164 UINT InstructionCount;
165 UINT TempRegisterCount;
166 UINT TempArrayCount;
167 UINT DefCount;
168 UINT DclCount;
169 UINT TextureNormalInstructions;
170 UINT TextureLoadInstructions;
171 UINT TextureCompInstructions;
172 UINT TextureBiasInstructions;
173 UINT TextureGradientInstructions;
174 UINT FloatInstructionCount;
175 UINT IntInstructionCount;
176 UINT UintInstructionCount;
177 UINT StaticFlowControlCount;
178 UINT DynamicFlowControlCount;
179 UINT MacroInstructionCount;
180 UINT ArrayInstructionCount;
181 UINT MovInstructionCount;
182 UINT MovcInstructionCount;
183 UINT ConversionInstructionCount;
184 UINT BitwiseInstructionCount;
185 D3D_FEATURE_LEVEL MinFeatureLevel;
186 UINT64 RequiredFeatureFlags;
187 const char *Name;
188 INT FunctionParameterCount;
189 BOOL HasReturn;
190 BOOL Has10Level9VertexShader;
191 BOOL Has10Level9PixelShader;
192 } D3D12_FUNCTION_DESC;
193
194 typedef struct _D3D12_LIBRARY_DESC
195 {
196 const char *Creator;
197 UINT Flags;
198 UINT FunctionCount;
199 } D3D12_LIBRARY_DESC;
200
201 interface ID3D12ShaderReflectionConstantBuffer;
202
203 [
204 uuid(e913c351-783d-48ca-a1d1-4f306284ad56),
205 object,
206 local,
207 ]
208 interface ID3D12ShaderReflectionType
209 {
210 HRESULT GetDesc(D3D12_SHADER_TYPE_DESC *desc);
211 ID3D12ShaderReflectionType *GetMemberTypeByIndex(UINT index);
212 ID3D12ShaderReflectionType *GetMemberTypeByName(const char *name);
213 const char *GetMemberTypeName(UINT index);
214 HRESULT IsEqual(ID3D12ShaderReflectionType *type);
215 ID3D12ShaderReflectionType *GetSubType();
216 ID3D12ShaderReflectionType *GetBaseClass();
217 UINT GetNumInterfaces();
218 ID3D12ShaderReflectionType *GetInterfaceByIndex(UINT index);
219 HRESULT IsOfType(ID3D12ShaderReflectionType *type);
220 HRESULT ImplementsInterface(ID3D12ShaderReflectionType *base);
221 }
222
223 [
224 uuid(8337a8a6-a216-444a-b2f4-314733a73aea),
225 object,
226 local,
227 ]
228 interface ID3D12ShaderReflectionVariable
229 {
230 HRESULT GetDesc(D3D12_SHADER_VARIABLE_DESC *desc);
231 ID3D12ShaderReflectionType *GetType();
232 ID3D12ShaderReflectionConstantBuffer *GetBuffer();
233 UINT GetInterfaceSlot(UINT index);
234 }
235
236 [
237 uuid(c59598b4-48b3-4869-b9b1-b1618b14a8b7),
238 object,
239 local,
240 ]
241 interface ID3D12ShaderReflectionConstantBuffer
242 {
243 HRESULT GetDesc(D3D12_SHADER_BUFFER_DESC *desc);
244 ID3D12ShaderReflectionVariable *GetVariableByIndex(UINT index);
245 ID3D12ShaderReflectionVariable *GetVariableByName(const char *name);
246 }
247
248 [
249 uuid(5a58797d-a72c-478d-8ba2-efc6b0efe88e),
250 object,
251 local,
252 ]
253 interface ID3D12ShaderReflection : IUnknown
254 {
255 HRESULT GetDesc(D3D12_SHADER_DESC *desc);
256 ID3D12ShaderReflectionConstantBuffer *GetConstantBufferByIndex(UINT index);
257 ID3D12ShaderReflectionConstantBuffer *GetConstantBufferByName(const char *name);
258 HRESULT GetResourceBindingDesc(UINT index, D3D12_SHADER_INPUT_BIND_DESC *desc);
259 HRESULT GetInputParameterDesc(UINT index, D3D12_SIGNATURE_PARAMETER_DESC *desc);
260 HRESULT GetOutputParameterDesc(UINT index, D3D12_SIGNATURE_PARAMETER_DESC *desc);
261 HRESULT GetPatchConstantParameterDesc(UINT index, D3D12_SIGNATURE_PARAMETER_DESC *desc);
262 ID3D12ShaderReflectionVariable *GetVariableByName(const char *name);
263 HRESULT GetResourceBindingDescByName(const char *name, D3D12_SHADER_INPUT_BIND_DESC *desc);
264 UINT GetMovInstructionCount();
265 UINT GetMovcInstructionCount();
266 UINT GetConversionInstructionCount();
267 UINT GetBitwiseInstructionCount();
268 D3D_PRIMITIVE GetGSInputPrimitive();
269 BOOL IsSampleFrequencyShader();
270 UINT GetNumInterfaceSlots();
271 HRESULT GetMinFeatureLevel(D3D_FEATURE_LEVEL *level);
272 UINT GetThreadGroupSize(UINT *sizex, UINT *sizey, UINT *sizez);
273 UINT64 GetRequiresFlags();
274 }
275
276 [
277 uuid(ec25f42d-7006-4f2b-b33e-02cc3375733f),
278 object,
279 local,
280 ]
281 interface ID3D12FunctionParameterReflection
282 {
283 HRESULT GetDesc(D3D12_PARAMETER_DESC *desc);
284 }
285
286 [
287 uuid(1108795c-2772-4ba9-b2a8-d464dc7e2799),
288 object,
289 local,
290 ]
291 interface ID3D12FunctionReflection
292 {
293 HRESULT GetDesc(D3D12_FUNCTION_DESC *desc);
294 ID3D12ShaderReflectionConstantBuffer *GetConstantBufferByIndex(UINT index);
295 ID3D12ShaderReflectionConstantBuffer *GetConstantBufferByName(const char *name);
296 HRESULT GetResourceBindingDesc(UINT index, D3D12_SHADER_INPUT_BIND_DESC *desc);
297 ID3D12ShaderReflectionVariable *GetVariableByName(const char *name);
298 HRESULT GetResourceBindingDescByName(const char *name, D3D12_SHADER_INPUT_BIND_DESC *desc);
299 ID3D12FunctionParameterReflection *GetFunctionParameter(INT index);
300 }
301
302 [
303 uuid(8e349d19-54db-4a56-9dc9-119d87bdb804),
304 object,
305 local,
306 ]
307 interface ID3D12LibraryReflection : IUnknown
308 {
309 HRESULT GetDesc(D3D12_LIBRARY_DESC *desc);
310 ID3D12FunctionReflection *GetFunctionByIndex(INT index);
311 }