mshtml: Implement deleting props for Storage.
[wine.git] / include / d3d11shader.h
bloba7441508146441d8b124fdfe022f0601ffc910f7
1 /*
2 * Copyright 2010 Matteo Bruni 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 #ifndef __D3D11SHADER_H__
20 #define __D3D11SHADER_H__
22 #include "d3dcommon.h"
24 /* If not defined set d3dcompiler_47 by default. */
25 #ifndef D3D_COMPILER_VERSION
26 #define D3D_COMPILER_VERSION 47
27 #endif
29 /* These are defined as version-neutral in d3dcommon.h */
30 typedef D3D_CBUFFER_TYPE D3D11_CBUFFER_TYPE;
32 typedef D3D_RESOURCE_RETURN_TYPE D3D11_RESOURCE_RETURN_TYPE;
34 typedef D3D_TESSELLATOR_DOMAIN D3D11_TESSELLATOR_DOMAIN;
36 typedef D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING;
38 typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE;
40 typedef struct _D3D11_SHADER_DESC
42 UINT Version;
43 const char *Creator;
44 UINT Flags;
45 UINT ConstantBuffers;
46 UINT BoundResources;
47 UINT InputParameters;
48 UINT OutputParameters;
49 UINT InstructionCount;
50 UINT TempRegisterCount;
51 UINT TempArrayCount;
52 UINT DefCount;
53 UINT DclCount;
54 UINT TextureNormalInstructions;
55 UINT TextureLoadInstructions;
56 UINT TextureCompInstructions;
57 UINT TextureBiasInstructions;
58 UINT TextureGradientInstructions;
59 UINT FloatInstructionCount;
60 UINT IntInstructionCount;
61 UINT UintInstructionCount;
62 UINT StaticFlowControlCount;
63 UINT DynamicFlowControlCount;
64 UINT MacroInstructionCount;
65 UINT ArrayInstructionCount;
66 UINT CutInstructionCount;
67 UINT EmitInstructionCount;
68 D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
69 UINT GSMaxOutputVertexCount;
70 D3D_PRIMITIVE InputPrimitive;
71 UINT PatchConstantParameters;
72 UINT cGSInstanceCount;
73 UINT cControlPoints;
74 D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive;
75 D3D_TESSELLATOR_PARTITIONING HSPartitioning;
76 D3D_TESSELLATOR_DOMAIN TessellatorDomain;
77 UINT cBarrierInstructions;
78 UINT cInterlockedInstructions;
79 UINT cTextureStoreInstructions;
80 } D3D11_SHADER_DESC;
82 typedef struct _D3D11_SHADER_VARIABLE_DESC
84 const char *Name;
85 UINT StartOffset;
86 UINT Size;
87 UINT uFlags;
88 void *DefaultValue;
89 UINT StartTexture;
90 UINT TextureSize;
91 UINT StartSampler;
92 UINT SamplerSize;
93 } D3D11_SHADER_VARIABLE_DESC;
95 typedef struct _D3D11_SHADER_TYPE_DESC
97 D3D_SHADER_VARIABLE_CLASS Class;
98 D3D_SHADER_VARIABLE_TYPE Type;
99 UINT Rows;
100 UINT Columns;
101 UINT Elements;
102 UINT Members;
103 UINT Offset;
104 const char *Name;
105 } D3D11_SHADER_TYPE_DESC;
107 typedef struct _D3D11_SHADER_BUFFER_DESC
109 const char *Name;
110 D3D_CBUFFER_TYPE Type;
111 UINT Variables;
112 UINT Size;
113 UINT uFlags;
114 } D3D11_SHADER_BUFFER_DESC;
116 typedef struct _D3D11_SHADER_INPUT_BIND_DESC
118 const char *Name;
119 D3D_SHADER_INPUT_TYPE Type;
120 UINT BindPoint;
121 UINT BindCount;
122 UINT uFlags;
123 D3D_RESOURCE_RETURN_TYPE ReturnType;
124 D3D_SRV_DIMENSION Dimension;
125 UINT NumSamples;
126 } D3D11_SHADER_INPUT_BIND_DESC;
128 typedef struct _D3D11_SIGNATURE_PARAMETER_DESC
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 #if D3D_COMPILER_VERSION >= 46
139 D3D_MIN_PRECISION MinPrecision;
140 #endif
141 } D3D11_SIGNATURE_PARAMETER_DESC;
143 DEFINE_GUID(IID_ID3D11ShaderReflectionType, 0x6e6ffa6a, 0x9bae, 0x4613, 0xa5, 0x1e, 0x91, 0x65, 0x2d, 0x50, 0x8c, 0x21);
145 #define INTERFACE ID3D11ShaderReflectionType
146 DECLARE_INTERFACE(ID3D11ShaderReflectionType)
148 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_TYPE_DESC *desc) PURE;
149 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
150 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE;
151 STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE;
152 STDMETHOD(IsEqual)(THIS_ struct ID3D11ShaderReflectionType *type) PURE;
153 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetSubType)(THIS) PURE;
154 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetBaseClass)(THIS) PURE;
155 STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
156 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetInterfaceByIndex)(THIS_ UINT index) PURE;
157 STDMETHOD(IsOfType)(THIS_ struct ID3D11ShaderReflectionType *type) PURE;
158 STDMETHOD(ImplementsInterface)(THIS_ ID3D11ShaderReflectionType *base) PURE;
160 #undef INTERFACE
162 DEFINE_GUID(IID_ID3D11ShaderReflectionVariable, 0x51f23923, 0xf3e5, 0x4bd1, 0x91, 0xcb, 0x60, 0x61, 0x77, 0xd8, 0xdb, 0x4c);
164 #define INTERFACE ID3D11ShaderReflectionVariable
165 DECLARE_INTERFACE(ID3D11ShaderReflectionVariable)
167 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_VARIABLE_DESC *desc) PURE;
168 STDMETHOD_(struct ID3D11ShaderReflectionType *, GetType)(THIS) PURE;
169 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetBuffer)(THIS) PURE;
170 STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ UINT index) PURE;
172 #undef INTERFACE
174 DEFINE_GUID(IID_ID3D11ShaderReflectionConstantBuffer, 0xeb62d63d, 0x93dd, 0x4318, 0x8a, 0xe8, 0xc6, 0xf8, 0x3a, 0xd3, 0x71, 0xb8);
176 #define INTERFACE ID3D11ShaderReflectionConstantBuffer
177 DECLARE_INTERFACE(ID3D11ShaderReflectionConstantBuffer)
179 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_BUFFER_DESC *desc) PURE;
180 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
181 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
183 #undef INTERFACE
185 #if D3D_COMPILER_VERSION <= 42
186 DEFINE_GUID(IID_ID3D11ShaderReflection, 0x17f27486, 0xa342, 0x4d10, 0x88, 0x42, 0xab, 0x08, 0x74, 0xe7, 0xf6, 0x70);
187 #elif D3D_COMPILER_VERSION == 43
188 DEFINE_GUID(IID_ID3D11ShaderReflection, 0x0a233719, 0x3960, 0x4578, 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1);
189 #else
190 DEFINE_GUID(IID_ID3D11ShaderReflection, 0x8d536ca1, 0x0cca, 0x4956, 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84);
191 #endif
193 #define INTERFACE ID3D11ShaderReflection
194 DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown)
196 /* IUnknown methods */
197 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
198 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
199 STDMETHOD_(ULONG, Release)(THIS) PURE;
200 /* ID3D11ShaderReflection methods */
201 STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_DESC *desc) PURE;
202 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
203 STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE;
204 STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE;
205 STDMETHOD(GetInputParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
206 STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
207 STDMETHOD(GetPatchConstantParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE;
208 STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE;
209 STDMETHOD(GetResourceBindingDescByName)(THIS_ const char *name, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE;
210 STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
211 STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
212 STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
213 STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
214 STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
215 STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE;
216 STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
217 STDMETHOD(GetMinFeatureLevel)(THIS_ enum D3D_FEATURE_LEVEL *level) PURE;
218 STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ UINT *sizex, UINT *sizey, UINT *sizez) PURE;
219 STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
221 #undef INTERFACE
223 DEFINE_GUID(IID_ID3D11ModuleInstance, 0x469e07f7, 0x45a, 0x48d5, 0xaa, 0x12, 0x68, 0xa4, 0x78, 0xcd, 0xf7, 0x5d);
225 #define INTERFACE ID3D11ModuleInstance
226 DECLARE_INTERFACE_(ID3D11ModuleInstance, IUnknown)
228 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
229 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
230 STDMETHOD_(ULONG, Release)(THIS) PURE;
232 /* ID3D11ModuleInstance methods */
233 STDMETHOD(BindConstantBuffer)(THIS_ UINT srcslot, UINT dstslot, UINT dstoffset) PURE;
234 STDMETHOD(BindConstantBufferByName)(THIS_ const char *name, UINT dstslot, UINT dstoffset) PURE;
236 STDMETHOD(BindResource)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
237 STDMETHOD(BindResourceByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
239 STDMETHOD(BindSampler)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
240 STDMETHOD(BindSamplerByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
242 STDMETHOD(BindUnorderedAccessView)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
243 STDMETHOD(BindUnorderedAccessViewByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
245 STDMETHOD(BindResourceAsUnorderedAccessView)(THIS_ UINT srcslot, UINT dstslot, UINT count) PURE;
246 STDMETHOD(BindResourceAsUnorderedAccessViewByName)(THIS_ const char *name, UINT dstslot, UINT count) PURE;
248 #undef INTERFACE
250 DEFINE_GUID(IID_ID3D11Module, 0xcac701ee, 0x80fc, 0x4122, 0x82, 0x42, 0x10, 0xb3, 0x9c, 0x8c, 0xec, 0x34);
252 #define INTERFACE ID3D11Module
253 DECLARE_INTERFACE_(ID3D11Module, IUnknown)
255 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
256 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
257 STDMETHOD_(ULONG, Release)(THIS) PURE;
259 /* ID3D11Module methods */
260 STDMETHOD(CreateInstance)(THIS_ const char *instnamespace, ID3D11ModuleInstance **moduleinstance) PURE;
262 #undef INTERFACE
264 #endif