Release 5.15.
[wine.git] / include / d3d12shader.idl
blob9cf39c6cc3cd8c5d8b8d64d5b9173f7c141d9b4a
1 /*
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
19 import "oaidl.idl";
20 import "ocidl.idl";
21 import "d3dcommon.idl";
23 typedef struct _D3D12_SHADER_DESC
25 UINT Version;
26 const char *Creator;
27 UINT Flags;
28 UINT ConstantBuffers;
29 UINT BoundResources;
30 UINT InputParameters;
31 UINT OutputParameters;
32 UINT InstructionCount;
33 UINT TempRegisterCount;
34 UINT TempArrayCount;
35 UINT DefCount;
36 UINT DclCount;
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;
56 UINT cControlPoints;
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;
63 } D3D12_SHADER_DESC;
65 typedef struct _D3D12_SHADER_VARIABLE_DESC
67 const char *Name;
68 UINT StartOffset;
69 UINT Size;
70 UINT uFlags;
71 void *DefaultValue;
72 UINT StartTexture;
73 UINT TextureSize;
74 UINT StartSampler;
75 UINT SamplerSize;
76 } D3D12_SHADER_VARIABLE_DESC;
78 typedef struct _D3D12_SHADER_TYPE_DESC
80 D3D_SHADER_VARIABLE_CLASS Class;
81 D3D_SHADER_VARIABLE_TYPE Type;
82 UINT Rows;
83 UINT Columns;
84 UINT Elements;
85 UINT Members;
86 UINT Offset;
87 const char *Name;
88 } D3D12_SHADER_TYPE_DESC;
90 typedef struct _D3D12_SHADER_BUFFER_DESC
92 const char *Name;
93 D3D_CBUFFER_TYPE Type;
94 UINT Variables;
95 UINT Size;
96 UINT uFlags;
97 } D3D12_SHADER_BUFFER_DESC;
99 typedef struct _D3D12_SHADER_INPUT_BIND_DESC
101 const char *Name;
102 D3D_SHADER_INPUT_TYPE Type;
103 UINT BindPoint;
104 UINT BindCount;
105 UINT uFlags;
106 D3D_RESOURCE_RETURN_TYPE ReturnType;
107 D3D_SRV_DIMENSION Dimension;
108 UINT NumSamples;
109 UINT Space;
110 UINT uID;
111 } D3D12_SHADER_INPUT_BIND_DESC;
113 typedef struct _D3D12_SIGNATURE_PARAMETER_DESC
115 const char *SemanticName;
116 UINT SemanticIndex;
117 UINT Register;
118 D3D_NAME SystemValueType;
119 D3D_REGISTER_COMPONENT_TYPE ComponentType;
120 BYTE Mask;
121 BYTE ReadWriteMask;
122 UINT Stream;
123 D3D_MIN_PRECISION MinPrecision;
124 } D3D12_SIGNATURE_PARAMETER_DESC;
126 typedef struct _D3D12_PARAMETER_DESC
128 const char *Name;
129 const char *SemanticName;
130 D3D_SHADER_VARIABLE_TYPE Type;
131 D3D_SHADER_VARIABLE_CLASS Class;
132 UINT Rows;
133 UINT Columns;
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
144 UINT Version;
145 const char *Creator;
146 UINT Flags;
147 UINT ConstantBuffers;
148 UINT BoundResources;
149 UINT InstructionCount;
150 UINT TempRegisterCount;
151 UINT TempArrayCount;
152 UINT DefCount;
153 UINT DclCount;
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;
172 const char *Name;
173 INT FunctionParameterCount;
174 BOOL HasReturn;
175 BOOL Has10Level9VertexShader;
176 BOOL Has10Level9PixelShader;
177 } D3D12_FUNCTION_DESC;
179 typedef struct _D3D12_LIBRARY_DESC
181 const char *Creator;
182 UINT Flags;
183 UINT FunctionCount;
184 } D3D12_LIBRARY_DESC;
186 interface ID3D12ShaderReflectionConstantBuffer;
189 uuid(e913c351-783d-48ca-a1d1-4f306284ad56),
190 object,
191 local,
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),
210 object,
211 local,
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),
223 object,
224 local,
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),
235 object,
236 local,
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),
263 object,
264 local,
266 interface ID3D12FunctionParameterReflection
268 HRESULT GetDesc(D3D12_PARAMETER_DESC *desc);
272 uuid(1108795c-2772-4ba9-b2a8-d464dc7e2799),
273 object,
274 local,
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),
289 object,
290 local,
292 interface ID3D12LibraryReflection : IUnknown
294 HRESULT GetDesc(D3D12_LIBRARY_DESC *desc);
295 ID3D12FunctionReflection *GetFunctionByIndex(INT index);