winealsa.drv: Remove a few unneeded initialisations and unused variables.
[wine/hacks.git] / include / d3d10effect.h
blob37d4bd1932aacff4919698b9fe2134e90f9e697b
1 /*
2 * Copyright 2009 Henri Verbeet 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
20 #ifndef __WINE_D3D10EFFECT_H
21 #define __WINE_D3D10EFFECT_H
23 #include "d3d10.h"
25 #define D3D10_EFFECT_VARIABLE_POOLED 0x1
26 #define D3D10_EFFECT_VARIABLE_ANNOTATION 0x2
27 #define D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT 0x4
29 #ifndef D3D10_BYTES_FROM_BITS
30 #define D3D10_BYTES_FROM_BITS(x) (((x) + 7) >> 3)
31 #endif
33 typedef struct _D3D10_EFFECT_TYPE_DESC
35 LPCSTR TypeName;
36 D3D10_SHADER_VARIABLE_CLASS Class;
37 D3D10_SHADER_VARIABLE_TYPE Type;
38 UINT Elements;
39 UINT Members;
40 UINT Rows;
41 UINT Columns;
42 UINT PackedSize;
43 UINT UnpackedSize;
44 UINT Stride;
45 } D3D10_EFFECT_TYPE_DESC;
47 typedef struct _D3D10_EFFECT_VARIABLE_DESC
49 LPCSTR Name;
50 LPCSTR Semantic;
51 UINT Flags;
52 UINT Annotations;
53 UINT BufferOffset;
54 UINT ExplicitBindPoint;
55 } D3D10_EFFECT_VARIABLE_DESC;
57 typedef struct _D3D10_TECHNIQUE_DESC
59 LPCSTR Name;
60 UINT Passes;
61 UINT Annotations;
62 } D3D10_TECHNIQUE_DESC;
64 typedef struct _D3D10_STATE_BLOCK_MASK
66 BYTE VS;
67 BYTE VSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
68 BYTE VSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
69 BYTE VSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
70 BYTE GS;
71 BYTE GSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
72 BYTE GSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
73 BYTE GSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
74 BYTE PS;
75 BYTE PSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
76 BYTE PSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
77 BYTE PSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
78 BYTE IAVertexBuffers[D3D10_BYTES_FROM_BITS(D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT)];
79 BYTE IAIndexBuffer;
80 BYTE IAInputLayout;
81 BYTE IAPrimitiveTopology;
82 BYTE OMRenderTargets;
83 BYTE OMDepthStencilState;
84 BYTE OMBlendState;
85 BYTE RSViewports;
86 BYTE RSScissorRects;
87 BYTE RSRasterizerState;
88 BYTE SOBuffers;
89 BYTE Predication;
90 } D3D10_STATE_BLOCK_MASK;
92 typedef struct _D3D10_EFFECT_DESC
94 BOOL IsChildEffect;
95 UINT ConstantBuffers;
96 UINT SharedConstantBuffers;
97 UINT GlobalVariables;
98 UINT SharedGlobalVariables;
99 UINT Techniques;
100 } D3D10_EFFECT_DESC;
102 typedef struct _D3D10_PASS_DESC
104 LPCSTR Name;
105 UINT Annotations;
106 BYTE *pIAInputSignature;
107 SIZE_T IAInputSignatureSize;
108 UINT StencilRef;
109 UINT SampleMask;
110 FLOAT BlendFactor[4];
111 } D3D10_PASS_DESC;
113 typedef struct _D3D10_PASS_SHADER_DESC
115 struct ID3D10EffectShaderVariable *pShaderVariable;
116 UINT ShaderIndex;
117 } D3D10_PASS_SHADER_DESC;
119 DEFINE_GUID(IID_ID3D10EffectType, 0x4e9e1ddc, 0xcd9d, 0x4772, 0xa8, 0x37, 0x00, 0x18, 0x0b, 0x9b, 0x88, 0xfd);
121 #define INTERFACE ID3D10EffectType
122 DECLARE_INTERFACE(ID3D10EffectType)
124 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
125 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_TYPE_DESC *desc) PURE;
126 STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
127 STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeByName)(THIS_ LPCSTR name) PURE;
128 STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeBySemantic)(THIS_ LPCSTR semantic) PURE;
129 STDMETHOD_(LPCSTR, GetMemberName)(THIS_ UINT index) PURE;
130 STDMETHOD_(LPCSTR, GetMemberSemantic)(THIS_ UINT index) PURE;
132 #undef INTERFACE
134 DEFINE_GUID(IID_ID3D10EffectVariable, 0xae897105, 0x00e6, 0x45bf, 0xbb, 0x8e, 0x28, 0x1d, 0xd6, 0xdb, 0x8e, 0x1b);
136 #define INTERFACE ID3D10EffectVariable
137 DECLARE_INTERFACE(ID3D10EffectVariable)
139 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
140 STDMETHOD_(struct ID3D10EffectType *, GetType)(THIS) PURE;
141 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_VARIABLE_DESC *desc) PURE;
142 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
143 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
144 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByIndex)(THIS_ UINT index) PURE;
145 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByName)(THIS_ LPCSTR name) PURE;
146 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberBySemantic)(THIS_ LPCSTR semantic) PURE;
147 STDMETHOD_(struct ID3D10EffectVariable *, GetElement)(THIS_ UINT index) PURE;
148 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetParentConstantBuffer)(THIS) PURE;
149 STDMETHOD_(struct ID3D10EffectScalarVariable *, AsScalar)(THIS) PURE;
150 STDMETHOD_(struct ID3D10EffectVectorVariable *, AsVector)(THIS) PURE;
151 STDMETHOD_(struct ID3D10EffectMatrixVariable *, AsMatrix)(THIS) PURE;
152 STDMETHOD_(struct ID3D10EffectStringVariable *, AsString)(THIS) PURE;
153 STDMETHOD_(struct ID3D10EffectShaderResourceVariable *, AsShaderResource)(THIS) PURE;
154 STDMETHOD_(struct ID3D10EffectRenderTargetViewVariable *, AsRenderTargetView)(THIS) PURE;
155 STDMETHOD_(struct ID3D10EffectDepthStencilViewVariable *, AsDepthStencilView)(THIS) PURE;
156 STDMETHOD_(struct ID3D10EffectConstantBuffer *, AsConstantBuffer)(THIS) PURE;
157 STDMETHOD_(struct ID3D10EffectShaderVariable *, AsShader)(THIS) PURE;
158 STDMETHOD_(struct ID3D10EffectBlendVariable *, AsBlend)(THIS) PURE;
159 STDMETHOD_(struct ID3D10EffectDepthStencilVariable *, AsDepthStencil)(THIS) PURE;
160 STDMETHOD_(struct ID3D10EffectRasterizerVariable *, AsRasterizer)(THIS) PURE;
161 STDMETHOD_(struct ID3D10EffectSamplerVariable *, AsSampler)(THIS) PURE;
162 STDMETHOD(SetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
163 STDMETHOD(GetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
165 #undef INTERFACE
167 DEFINE_GUID(IID_ID3D10EffectConstantBuffer, 0x56648f4d, 0xcc8b, 0x4444, 0xa5, 0xad, 0xb5, 0xa3, 0xd7, 0x6e, 0x91, 0xb3);
169 #define INTERFACE ID3D10EffectConstantBuffer
170 DECLARE_INTERFACE_(ID3D10EffectConstantBuffer, ID3D10EffectVariable)
172 /* ID3D10EffectVariable methods */
173 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
174 STDMETHOD_(struct ID3D10EffectType *, GetType)(THIS) PURE;
175 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_VARIABLE_DESC *desc) PURE;
176 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
177 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
178 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByIndex)(THIS_ UINT index) PURE;
179 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByName)(THIS_ LPCSTR name) PURE;
180 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberBySemantic)(THIS_ LPCSTR semantic) PURE;
181 STDMETHOD_(struct ID3D10EffectVariable *, GetElement)(THIS_ UINT index) PURE;
182 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetParentConstantBuffer)(THIS) PURE;
183 STDMETHOD_(struct ID3D10EffectScalarVariable *, AsScalar)(THIS) PURE;
184 STDMETHOD_(struct ID3D10EffectVectorVariable *, AsVector)(THIS) PURE;
185 STDMETHOD_(struct ID3D10EffectMatrixVariable *, AsMatrix)(THIS) PURE;
186 STDMETHOD_(struct ID3D10EffectStringVariable *, AsString)(THIS) PURE;
187 STDMETHOD_(struct ID3D10EffectShaderResourceVariable *, AsShaderResource)(THIS) PURE;
188 STDMETHOD_(struct ID3D10EffectRenderTargetViewVariable *, AsRenderTargetView)(THIS) PURE;
189 STDMETHOD_(struct ID3D10EffectDepthStencilViewVariable *, AsDepthStencilView)(THIS) PURE;
190 STDMETHOD_(struct ID3D10EffectConstantBuffer *, AsConstantBuffer)(THIS) PURE;
191 STDMETHOD_(struct ID3D10EffectShaderVariable *, AsShader)(THIS) PURE;
192 STDMETHOD_(struct ID3D10EffectBlendVariable *, AsBlend)(THIS) PURE;
193 STDMETHOD_(struct ID3D10EffectDepthStencilVariable *, AsDepthStencil)(THIS) PURE;
194 STDMETHOD_(struct ID3D10EffectRasterizerVariable *, AsRasterizer)(THIS) PURE;
195 STDMETHOD_(struct ID3D10EffectSamplerVariable *, AsSampler)(THIS) PURE;
196 STDMETHOD(SetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
197 STDMETHOD(GetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
198 /* ID3D10EffectConstantBuffer methods */
199 STDMETHOD(SetConstantBuffer)(THIS_ ID3D10Buffer *buffer) PURE;
200 STDMETHOD(GetConstantBuffer)(THIS_ ID3D10Buffer **buffer) PURE;
201 STDMETHOD(SetTextureBuffer)(THIS_ ID3D10ShaderResourceView *view) PURE;
202 STDMETHOD(GetTextureBuffer)(THIS_ ID3D10ShaderResourceView **view) PURE;
204 #undef INTERFACE
206 DEFINE_GUID(IID_ID3D10EffectTechnique, 0xdb122ce8, 0xd1c9, 0x4292, 0xb2, 0x37, 0x24, 0xed, 0x3d, 0xe8, 0xb1, 0x75);
208 #define INTERFACE ID3D10EffectTechnique
209 DECLARE_INTERFACE(ID3D10EffectTechnique)
211 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
212 STDMETHOD(GetDesc)(THIS_ D3D10_TECHNIQUE_DESC *desc) PURE;
213 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
214 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
215 STDMETHOD_(struct ID3D10EffectPass *, GetPassByIndex)(THIS_ UINT index) PURE;
216 STDMETHOD_(struct ID3D10EffectPass *, GetPassByName)(THIS_ LPCSTR name) PURE;
217 STDMETHOD(ComputeStateBlockMask)(THIS_ D3D10_STATE_BLOCK_MASK *mask) PURE;
219 #undef INTERFACE
221 DEFINE_GUID(IID_ID3D10Effect, 0x51b0ca8b, 0xec0b, 0x4519, 0x87, 0x0d, 0x8e, 0xe1, 0xcb, 0x50, 0x17, 0xc7);
223 #define INTERFACE ID3D10Effect
224 DECLARE_INTERFACE_(ID3D10Effect, IUnknown)
226 /* IUnknown methods */
227 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
228 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
229 STDMETHOD_(ULONG, Release)(THIS) PURE;
230 /* ID3D10Effect methods */
231 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
232 STDMETHOD_(BOOL, IsPool)(THIS) PURE;
233 STDMETHOD(GetDevice)(THIS_ ID3D10Device **device) PURE;
234 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_DESC *desc) PURE;
235 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
236 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetConstantBufferByName)(THIS_ LPCSTR name) PURE;
237 STDMETHOD_(struct ID3D10EffectVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
238 STDMETHOD_(struct ID3D10EffectVariable *, GetVariableByName)(THIS_ LPCSTR name) PURE;
239 STDMETHOD_(struct ID3D10EffectVariable *, GetVariableBySemantic)(THIS_ LPCSTR semantic) PURE;
240 STDMETHOD_(struct ID3D10EffectTechnique *, GetTechniqueByIndex)(THIS_ UINT index) PURE;
241 STDMETHOD_(struct ID3D10EffectTechnique *, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
242 STDMETHOD(Optimize)(THIS) PURE;
243 STDMETHOD_(BOOL, IsOptimized)(THIS) PURE;
245 #undef INTERFACE
247 DEFINE_GUID(IID_ID3D10EffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
249 #define INTERFACE ID3D10EffectPool
250 DECLARE_INTERFACE_(ID3D10EffectPool, IUnknown)
252 /* IUnknown methods */
253 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
254 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
255 STDMETHOD_(ULONG, Release)(THIS) PURE;
256 /* ID3D10EffectPool methods */
257 STDMETHOD_(struct ID3D10Effect *, AsEffect)(THIS) PURE;
259 #undef INTERFACE
261 DEFINE_GUID(IID_ID3D10EffectPass, 0x5cfbeb89, 0x1a06, 0x46e0, 0xb2, 0x82, 0xe3, 0xf9, 0xbf, 0xa3, 0x6a, 0x54);
263 #define INTERFACE ID3D10EffectPass
264 DECLARE_INTERFACE(ID3D10EffectPass)
266 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
267 STDMETHOD(GetDesc)(THIS_ D3D10_PASS_DESC *desc) PURE;
268 STDMETHOD(GetVertexShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
269 STDMETHOD(GetGeometryShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
270 STDMETHOD(GetPixelShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
271 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
272 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
273 STDMETHOD(Apply)(THIS_ UINT flags) PURE;
274 STDMETHOD(ComputeStateBlockMask)(THIS_ D3D10_STATE_BLOCK_MASK *mask) PURE;
276 #undef INTERFACE
278 #ifdef __cplusplus
279 extern "C" {
280 #endif
282 HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT flags,
283 ID3D10Device *device, ID3D10EffectPool *effect_pool, ID3D10Effect **effect);
285 #ifdef __cplusplus
287 #endif
289 #endif /* __WINE_D3D10EFFECT_H */