VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3d10effect.h@ 19678

Last change on this file since 19678 was 19678, checked in by vboxsync, 16 years ago

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • Property svn:eol-style set to native
File size: 13.1 KB
Line 
1/*
2 * Copyright 2009 Henri Verbeet 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
20/*
21 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
22 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
23 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
24 * a choice of LGPL license versions is made available with the language indicating
25 * that LGPLv2 or any later version may be used, or where a choice of which version
26 * of the LGPL is applied is otherwise unspecified.
27 */
28
29#ifndef __WINE_D3D10EFFECT_H
30#define __WINE_D3D10EFFECT_H
31
32#include "d3d10.h"
33
34#define D3D10_EFFECT_VARIABLE_POOLED 0x1
35#define D3D10_EFFECT_VARIABLE_ANNOTATION 0x2
36#define D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT 0x4
37
38#ifndef D3D10_BYTES_FROM_BITS
39#define D3D10_BYTES_FROM_BITS(x) (((x) + 7) >> 3)
40#endif
41
42typedef struct _D3D10_EFFECT_TYPE_DESC
43{
44 LPCSTR TypeName;
45 D3D10_SHADER_VARIABLE_CLASS Class;
46 D3D10_SHADER_VARIABLE_TYPE Type;
47 UINT Elements;
48 UINT Members;
49 UINT Rows;
50 UINT Columns;
51 UINT PackedSize;
52 UINT UnpackedSize;
53 UINT Stride;
54} D3D10_EFFECT_TYPE_DESC;
55
56typedef struct _D3D10_EFFECT_VARIABLE_DESC
57{
58 LPCSTR Name;
59 LPCSTR Semantic;
60 UINT Flags;
61 UINT Annotations;
62 UINT BufferOffset;
63 UINT ExplicitBindPoint;
64} D3D10_EFFECT_VARIABLE_DESC;
65
66typedef struct _D3D10_TECHNIQUE_DESC
67{
68 LPCSTR Name;
69 UINT Passes;
70 UINT Annotations;
71} D3D10_TECHNIQUE_DESC;
72
73typedef struct _D3D10_STATE_BLOCK_MASK
74{
75 BYTE VS;
76 BYTE VSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
77 BYTE VSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
78 BYTE VSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
79 BYTE GS;
80 BYTE GSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
81 BYTE GSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
82 BYTE GSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
83 BYTE PS;
84 BYTE PSSamplers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT)];
85 BYTE PSShaderResources[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT)];
86 BYTE PSConstantBuffers[D3D10_BYTES_FROM_BITS(D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT)];
87 BYTE IAVertexBuffers[D3D10_BYTES_FROM_BITS(D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT)];
88 BYTE IAIndexBuffer;
89 BYTE IAInputLayout;
90 BYTE IAPrimitiveTopology;
91 BYTE OMRenderTargets;
92 BYTE OMDepthStencilState;
93 BYTE OMBlendState;
94 BYTE RSViewports;
95 BYTE RSScissorRects;
96 BYTE RSRasterizerState;
97 BYTE SOBuffers;
98 BYTE Predication;
99} D3D10_STATE_BLOCK_MASK;
100
101typedef struct _D3D10_EFFECT_DESC
102{
103 BOOL IsChildEffect;
104 UINT ConstantBuffers;
105 UINT SharedConstantBuffers;
106 UINT GlobalVariables;
107 UINT SharedGlobalVariables;
108 UINT Techniques;
109} D3D10_EFFECT_DESC;
110
111typedef struct _D3D10_PASS_DESC
112{
113 LPCSTR Name;
114 UINT Annotations;
115 BYTE *pIAInputSignature;
116 SIZE_T IAInputSignatureSize;
117 UINT StencilRef;
118 UINT SampleMask;
119 FLOAT BlendFactor[4];
120} D3D10_PASS_DESC;
121
122typedef struct _D3D10_PASS_SHADER_DESC
123{
124 struct ID3D10EffectShaderVariable *pShaderVariable;
125 UINT ShaderIndex;
126} D3D10_PASS_SHADER_DESC;
127
128DEFINE_GUID(IID_ID3D10EffectType, 0x4e9e1ddc, 0xcd9d, 0x4772, 0xa8, 0x37, 0x00, 0x18, 0x0b, 0x9b, 0x88, 0xfd);
129
130#define INTERFACE ID3D10EffectType
131DECLARE_INTERFACE(ID3D10EffectType)
132{
133 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
134 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_TYPE_DESC *desc) PURE;
135 STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE;
136 STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeByName)(THIS_ LPCSTR name) PURE;
137 STDMETHOD_(struct ID3D10EffectType *, GetMemberTypeBySemantic)(THIS_ LPCSTR semantic) PURE;
138 STDMETHOD_(LPCSTR, GetMemberName)(THIS_ UINT index) PURE;
139 STDMETHOD_(LPCSTR, GetMemberSemantic)(THIS_ UINT index) PURE;
140};
141#undef INTERFACE
142
143DEFINE_GUID(IID_ID3D10EffectVariable, 0xae897105, 0x00e6, 0x45bf, 0xbb, 0x8e, 0x28, 0x1d, 0xd6, 0xdb, 0x8e, 0x1b);
144
145#define INTERFACE ID3D10EffectVariable
146DECLARE_INTERFACE(ID3D10EffectVariable)
147{
148 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
149 STDMETHOD_(struct ID3D10EffectType *, GetType)(THIS) PURE;
150 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_VARIABLE_DESC *desc) PURE;
151 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
152 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
153 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByIndex)(THIS_ UINT index) PURE;
154 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByName)(THIS_ LPCSTR name) PURE;
155 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberBySemantic)(THIS_ LPCSTR semantic) PURE;
156 STDMETHOD_(struct ID3D10EffectVariable *, GetElement)(THIS_ UINT index) PURE;
157 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetParentConstantBuffer)(THIS) PURE;
158 STDMETHOD_(struct ID3D10EffectScalarVariable *, AsScalar)(THIS) PURE;
159 STDMETHOD_(struct ID3D10EffectVectorVariable *, AsVector)(THIS) PURE;
160 STDMETHOD_(struct ID3D10EffectMatrixVariable *, AsMatrix)(THIS) PURE;
161 STDMETHOD_(struct ID3D10EffectStringVariable *, AsString)(THIS) PURE;
162 STDMETHOD_(struct ID3D10EffectShaderResourceVariable *, AsShaderResource)(THIS) PURE;
163 STDMETHOD_(struct ID3D10EffectRenderTargetViewVariable *, AsRenderTargetView)(THIS) PURE;
164 STDMETHOD_(struct ID3D10EffectDepthStencilViewVariable *, AsDepthStencilView)(THIS) PURE;
165 STDMETHOD_(struct ID3D10EffectConstantBuffer *, AsConstantBuffer)(THIS) PURE;
166 STDMETHOD_(struct ID3D10EffectShaderVariable *, AsShader)(THIS) PURE;
167 STDMETHOD_(struct ID3D10EffectBlendVariable *, AsBlend)(THIS) PURE;
168 STDMETHOD_(struct ID3D10EffectDepthStencilVariable *, AsDepthStencil)(THIS) PURE;
169 STDMETHOD_(struct ID3D10EffectRasterizerVariable *, AsRasterizer)(THIS) PURE;
170 STDMETHOD_(struct ID3D10EffectSamplerVariable *, AsSampler)(THIS) PURE;
171 STDMETHOD(SetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
172 STDMETHOD(GetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
173};
174#undef INTERFACE
175
176DEFINE_GUID(IID_ID3D10EffectConstantBuffer, 0x56648f4d, 0xcc8b, 0x4444, 0xa5, 0xad, 0xb5, 0xa3, 0xd7, 0x6e, 0x91, 0xb3);
177
178#define INTERFACE ID3D10EffectConstantBuffer
179DECLARE_INTERFACE_(ID3D10EffectConstantBuffer, ID3D10EffectVariable)
180{
181 /* ID3D10EffectVariable methods */
182 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
183 STDMETHOD_(struct ID3D10EffectType *, GetType)(THIS) PURE;
184 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_VARIABLE_DESC *desc) PURE;
185 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
186 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
187 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByIndex)(THIS_ UINT index) PURE;
188 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberByName)(THIS_ LPCSTR name) PURE;
189 STDMETHOD_(struct ID3D10EffectVariable *, GetMemberBySemantic)(THIS_ LPCSTR semantic) PURE;
190 STDMETHOD_(struct ID3D10EffectVariable *, GetElement)(THIS_ UINT index) PURE;
191 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetParentConstantBuffer)(THIS) PURE;
192 STDMETHOD_(struct ID3D10EffectScalarVariable *, AsScalar)(THIS) PURE;
193 STDMETHOD_(struct ID3D10EffectVectorVariable *, AsVector)(THIS) PURE;
194 STDMETHOD_(struct ID3D10EffectMatrixVariable *, AsMatrix)(THIS) PURE;
195 STDMETHOD_(struct ID3D10EffectStringVariable *, AsString)(THIS) PURE;
196 STDMETHOD_(struct ID3D10EffectShaderResourceVariable *, AsShaderResource)(THIS) PURE;
197 STDMETHOD_(struct ID3D10EffectRenderTargetViewVariable *, AsRenderTargetView)(THIS) PURE;
198 STDMETHOD_(struct ID3D10EffectDepthStencilViewVariable *, AsDepthStencilView)(THIS) PURE;
199 STDMETHOD_(struct ID3D10EffectConstantBuffer *, AsConstantBuffer)(THIS) PURE;
200 STDMETHOD_(struct ID3D10EffectShaderVariable *, AsShader)(THIS) PURE;
201 STDMETHOD_(struct ID3D10EffectBlendVariable *, AsBlend)(THIS) PURE;
202 STDMETHOD_(struct ID3D10EffectDepthStencilVariable *, AsDepthStencil)(THIS) PURE;
203 STDMETHOD_(struct ID3D10EffectRasterizerVariable *, AsRasterizer)(THIS) PURE;
204 STDMETHOD_(struct ID3D10EffectSamplerVariable *, AsSampler)(THIS) PURE;
205 STDMETHOD(SetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
206 STDMETHOD(GetRawValue)(THIS_ void *data, UINT offset, UINT count) PURE;
207 /* ID3D10EffectConstantBuffer methods */
208 STDMETHOD(SetConstantBuffer)(THIS_ ID3D10Buffer *buffer) PURE;
209 STDMETHOD(GetConstantBuffer)(THIS_ ID3D10Buffer **buffer) PURE;
210 STDMETHOD(SetTextureBuffer)(THIS_ ID3D10ShaderResourceView *view) PURE;
211 STDMETHOD(GetTextureBuffer)(THIS_ ID3D10ShaderResourceView **view) PURE;
212};
213#undef INTERFACE
214
215DEFINE_GUID(IID_ID3D10EffectTechnique, 0xdb122ce8, 0xd1c9, 0x4292, 0xb2, 0x37, 0x24, 0xed, 0x3d, 0xe8, 0xb1, 0x75);
216
217#define INTERFACE ID3D10EffectTechnique
218DECLARE_INTERFACE(ID3D10EffectTechnique)
219{
220 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
221 STDMETHOD(GetDesc)(THIS_ D3D10_TECHNIQUE_DESC *desc) PURE;
222 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
223 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
224 STDMETHOD_(struct ID3D10EffectPass *, GetPassByIndex)(THIS_ UINT index) PURE;
225 STDMETHOD_(struct ID3D10EffectPass *, GetPassByName)(THIS_ LPCSTR name) PURE;
226 STDMETHOD(ComputeStateBlockMask)(THIS_ D3D10_STATE_BLOCK_MASK *mask) PURE;
227};
228#undef INTERFACE
229
230DEFINE_GUID(IID_ID3D10Effect, 0x51b0ca8b, 0xec0b, 0x4519, 0x87, 0x0d, 0x8e, 0xe1, 0xcb, 0x50, 0x17, 0xc7);
231
232#define INTERFACE ID3D10Effect
233DECLARE_INTERFACE_(ID3D10Effect, IUnknown)
234{
235 /* IUnknown methods */
236 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
237 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
238 STDMETHOD_(ULONG, Release)(THIS) PURE;
239 /* ID3D10Effect methods */
240 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
241 STDMETHOD_(BOOL, IsPool)(THIS) PURE;
242 STDMETHOD(GetDevice)(THIS_ ID3D10Device **device) PURE;
243 STDMETHOD(GetDesc)(THIS_ D3D10_EFFECT_DESC *desc) PURE;
244 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE;
245 STDMETHOD_(struct ID3D10EffectConstantBuffer *, GetConstantBufferByName)(THIS_ LPCSTR name) PURE;
246 STDMETHOD_(struct ID3D10EffectVariable *, GetVariableByIndex)(THIS_ UINT index) PURE;
247 STDMETHOD_(struct ID3D10EffectVariable *, GetVariableByName)(THIS_ LPCSTR name) PURE;
248 STDMETHOD_(struct ID3D10EffectVariable *, GetVariableBySemantic)(THIS_ LPCSTR semantic) PURE;
249 STDMETHOD_(struct ID3D10EffectTechnique *, GetTechniqueByIndex)(THIS_ UINT index) PURE;
250 STDMETHOD_(struct ID3D10EffectTechnique *, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
251 STDMETHOD(Optimize)(THIS) PURE;
252 STDMETHOD_(BOOL, IsOptimized)(THIS) PURE;
253};
254#undef INTERFACE
255
256DEFINE_GUID(IID_ID3D10EffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
257
258#define INTERFACE ID3D10EffectPool
259DECLARE_INTERFACE_(ID3D10EffectPool, IUnknown)
260{
261 /* IUnknown methods */
262 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *object) PURE;
263 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
264 STDMETHOD_(ULONG, Release)(THIS) PURE;
265 /* ID3D10EffectPool methods */
266 STDMETHOD_(struct ID3D10Effect *, AsEffect)(THIS) PURE;
267};
268#undef INTERFACE
269
270DEFINE_GUID(IID_ID3D10EffectPass, 0x5cfbeb89, 0x1a06, 0x46e0, 0xb2, 0x82, 0xe3, 0xf9, 0xbf, 0xa3, 0x6a, 0x54);
271
272#define INTERFACE ID3D10EffectPass
273DECLARE_INTERFACE(ID3D10EffectPass)
274{
275 STDMETHOD_(BOOL, IsValid)(THIS) PURE;
276 STDMETHOD(GetDesc)(THIS_ D3D10_PASS_DESC *desc) PURE;
277 STDMETHOD(GetVertexShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
278 STDMETHOD(GetGeometryShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
279 STDMETHOD(GetPixelShaderDesc)(THIS_ D3D10_PASS_SHADER_DESC *desc) PURE;
280 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByIndex)(THIS_ UINT index) PURE;
281 STDMETHOD_(struct ID3D10EffectVariable *, GetAnnotationByName)(THIS_ LPCSTR name) PURE;
282 STDMETHOD(Apply)(THIS_ UINT flags) PURE;
283 STDMETHOD(ComputeStateBlockMask)(THIS_ D3D10_STATE_BLOCK_MASK *mask) PURE;
284};
285#undef INTERFACE
286
287#ifdef __cplusplus
288extern "C" {
289#endif
290
291HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT flags,
292 ID3D10Device *device, ID3D10EffectPool *effect_pool, ID3D10Effect **effect);
293
294#ifdef __cplusplus
295}
296#endif
297
298#endif /* __WINE_D3D10EFFECT_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette