ReactOS  0.4.14-dev-337-gf981a68
d3dx9shader.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Luis Busquets
3  * Copyright 2014 Kai Tietz
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  */
19 
20 #include "d3dx9.h"
21 
22 #ifndef __D3DX9SHADER_H__
23 #define __D3DX9SHADER_H__
24 
25 #define D3DXSHADER_DEBUG 0x1
26 #define D3DXSHADER_SKIPVALIDATION 0x2
27 #define D3DXSHADER_SKIPOPTIMIZATION 0x4
28 #define D3DXSHADER_PACKMATRIX_ROWMAJOR 0x8
29 #define D3DXSHADER_PACKMATRIX_COLUMNMAJOR 0x10
30 #define D3DXSHADER_PARTIALPRECISION 0x20
31 #define D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT 0x40
32 #define D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT 0x80
33 #define D3DXSHADER_NO_PRESHADER 0x100
34 #define D3DXSHADER_AVOID_FLOW_CONTROL 0x200
35 #define D3DXSHADER_PREFER_FLOW_CONTROL 0x400
36 #define D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
37 #define D3DXSHADER_IEEE_STRICTNESS 0x2000
38 
39 #define D3DXSHADER_OPTIMIZATION_LEVEL0 0x4000
40 #define D3DXSHADER_OPTIMIZATION_LEVEL1 0x0
41 #define D3DXSHADER_OPTIMIZATION_LEVEL2 0xC000
42 #define D3DXSHADER_OPTIMIZATION_LEVEL3 0x8000
43 
44 #define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
45 
46 #define D3DXCONSTTABLE_LARGEADDRESSAWARE 0x20000
47 
48 typedef const char *D3DXHANDLE;
50 
51 typedef enum _D3DXREGISTER_SET
52 {
57  D3DXRS_FORCE_DWORD = 0x7fffffff
59 
60 typedef enum D3DXPARAMETER_CLASS
61 {
68  D3DXPC_FORCE_DWORD = 0x7fffffff,
70 
71 typedef enum D3DXPARAMETER_TYPE
72 {
93  D3DXPT_FORCE_DWORD = 0x7fffffff,
95 
97 {
98  const char *Creator;
102 
103 typedef struct _D3DXCONSTANT_DESC
104 {
105  const char *Name;
116  const void *DefaultValue;
118 
119 #if D3DX_SDK_VERSION < 43
120 DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92, 0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b);
121 #else
122 DEFINE_GUID(IID_ID3DXConstantTable, 0xab3c758f, 0x093e, 0x4356, 0xb7, 0x62, 0x4d, 0xb1, 0x8f, 0x1b, 0x3a, 0x01);
123 #endif
124 
125 #undef INTERFACE
126 #define INTERFACE ID3DXConstantTable
127 
128 DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
129 {
130  /*** IUnknown methods ***/
134  /*** ID3DXBuffer methods ***/
135  STDMETHOD_(void *, GetBufferPointer)(THIS) PURE;
136  STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
137  /*** ID3DXConstantTable methods ***/
138  STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE;
139  STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
140  STDMETHOD_(UINT, GetSamplerIndex)(THIS_ D3DXHANDLE hConstant) PURE;
141  STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
142  STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE constant, const char *name) PURE;
143  STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
144  STDMETHOD(SetDefaults)(THIS_ struct IDirect3DDevice9 *device) PURE;
145  STDMETHOD(SetValue)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
146  const void *data, UINT data_size) PURE;
147  STDMETHOD(SetBool)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, BOOL value) PURE;
148  STDMETHOD(SetBoolArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
149  const BOOL *values, UINT value_count) PURE;
150  STDMETHOD(SetInt)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, INT value) PURE;
151  STDMETHOD(SetIntArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
152  const INT *values, UINT value_count) PURE;
153  STDMETHOD(SetFloat)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, float value) PURE;
154  STDMETHOD(SetFloatArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
155  const float *values, UINT value_count) PURE;
156  STDMETHOD(SetVector)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXVECTOR4 *value) PURE;
157  STDMETHOD(SetVectorArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
158  const D3DXVECTOR4 *values, UINT value_count) PURE;
159  STDMETHOD(SetMatrix)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX *value) PURE;
160  STDMETHOD(SetMatrixArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
161  const D3DXMATRIX *values, UINT value_count) PURE;
162  STDMETHOD(SetMatrixPointerArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
163  const D3DXMATRIX **values, UINT value_count) PURE;
164  STDMETHOD(SetMatrixTranspose)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
165  const D3DXMATRIX *value) PURE;
166  STDMETHOD(SetMatrixTransposeArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
167  const D3DXMATRIX *values, UINT value_count) PURE;
168  STDMETHOD(SetMatrixTransposePointerArray)(THIS_ struct IDirect3DDevice9 *device, D3DXHANDLE constant,
169  const D3DXMATRIX **values, UINT value_count) PURE;
170 };
171 #undef INTERFACE
172 
173 #if !defined(__cplusplus) || defined(CINTERFACE)
174 /*** IUnknown methods ***/
175 #define ID3DXConstantTable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
176 #define ID3DXConstantTable_AddRef(p) (p)->lpVtbl->AddRef(p)
177 #define ID3DXConstantTable_Release(p) (p)->lpVtbl->Release(p)
178 /*** ID3DXBuffer methods ***/
179 #define ID3DXConstantTable_GetBufferPointer(p) (p)->lpVtbl->GetBufferPointer(p)
180 #define ID3DXConstantTable_GetBufferSize(p) (p)->lpVtbl->GetBufferSize(p)
181 /*** ID3DXConstantTable methods ***/
182 #define ID3DXConstantTable_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
183 #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->lpVtbl->GetConstantDesc(p,a,b,c)
184 #define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->lpVtbl->GetSamplerIndex(p,a)
185 #define ID3DXConstantTable_GetConstant(p,a,b) (p)->lpVtbl->GetConstant(p,a,b)
186 #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->lpVtbl->GetConstantByName(p,a,b)
187 #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->lpVtbl->GetConstantElement(p,a,b)
188 #define ID3DXConstantTable_SetDefaults(p,a) (p)->lpVtbl->SetDefaults(p,a)
189 #define ID3DXConstantTable_SetValue(p,a,b,c,d) (p)->lpVtbl->SetValue(p,a,b,c,d)
190 #define ID3DXConstantTable_SetBool(p,a,b,c) (p)->lpVtbl->SetBool(p,a,b,c)
191 #define ID3DXConstantTable_SetBoolArray(p,a,b,c,d) (p)->lpVtbl->SetBoolArray(p,a,b,c,d)
192 #define ID3DXConstantTable_SetInt(p,a,b,c) (p)->lpVtbl->SetInt(p,a,b,c)
193 #define ID3DXConstantTable_SetIntArray(p,a,b,c,d) (p)->lpVtbl->SetIntArray(p,a,b,c,d)
194 #define ID3DXConstantTable_SetFloat(p,a,b,c) (p)->lpVtbl->SetFloat(p,a,b,c)
195 #define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->lpVtbl->SetFloatArray(p,a,b,c,d)
196 #define ID3DXConstantTable_SetVector(p,a,b,c) (p)->lpVtbl->SetVector(p,a,b,c)
197 #define ID3DXConstantTable_SetVectorArray(p,a,b,c,d) (p)->lpVtbl->SetVectorArray(p,a,b,c,d)
198 #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->lpVtbl->SetMatrix(p,a,b,c)
199 #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixArray(p,a,b,c,d)
200 #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixPointerArray(p,a,b,c,d)
201 #define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->lpVtbl->SetMatrixTranspose(p,a,b,c)
202 #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixTransposeArray(p,a,b,c,d)
203 #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixTransposePointerArray(p,a,b,c,d)
204 #else
205 /*** IUnknown methods ***/
206 #define ID3DXConstantTable_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
207 #define ID3DXConstantTable_AddRef(p) (p)->AddRef()
208 #define ID3DXConstantTable_Release(p) (p)->Release()
209 /*** ID3DXBuffer methods ***/
210 #define ID3DXConstantTable_GetBufferPointer(p) (p)->GetBufferPointer()
211 #define ID3DXConstantTable_GetBufferSize(p) (p)->GetBufferSize()
212 /*** ID3DXConstantTable methods ***/
213 #define ID3DXConstantTable_GetDesc(p,a) (p)->GetDesc(a)
214 #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->GetConstantDesc(a,b,c)
215 #define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->GetConstantDesc(a)
216 #define ID3DXConstantTable_GetConstant(p,a,b) (p)->GetConstant(a,b)
217 #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->GetConstantByName(a,b)
218 #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->GetConstantElement(a,b)
219 #define ID3DXConstantTable_SetDefaults(p,a) (p)->SetDefaults(a)
220 #define ID3DXConstantTable_SetValue(p,a,b,c,d) (p)->SetValue(a,b,c,d)
221 #define ID3DXConstantTable_SetBool(p,a,b,c) (p)->SetBool(a,b,c)
222 #define ID3DXConstantTable_SetBoolArray(p,a,b,c,d) (p)->SetBoolArray(a,b,c,d)
223 #define ID3DXConstantTable_SetInt(p,a,b,c) (p)->SetInt(a,b,c)
224 #define ID3DXConstantTable_SetIntArray(p,a,b,c,d) (p)->SetIntArray(a,b,c,d)
225 #define ID3DXConstantTable_SetFloat(p,a,b,c) (p)->SetFloat(a,b,c)
226 #define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->SetFloatArray(a,b,c,d)
227 #define ID3DXConstantTable_SetVector(p,a,b,c) (p)->SetVector(a,b,c)
228 #define ID3DXConstantTable_SetVectorArray(p,a,b,c,d) (p)->SetVectorArray(a,b,c,d)
229 #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->SetMatrix(a,b,c)
230 #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->SetMatrixArray(a,b,c,d)
231 #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->SetMatrixPointerArray(a,b,c,d)
232 #define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->SetMatrixTranspose(a,b,c)
233 #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->SetMatrixTransposeArray(a,b,c,d)
234 #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->SetMatrixTransposePointerArray(a,b,c,d)
235 #endif
236 
237 typedef struct ID3DXConstantTable *LPD3DXCONSTANTTABLE;
238 
239 typedef interface ID3DXTextureShader *LPD3DXTEXTURESHADER;
240 
241 DEFINE_GUID(IID_ID3DXTextureShader, 0x3e3d67f8, 0xaa7a, 0x405d, 0xa8, 0x57, 0xba, 0x1, 0xd4, 0x75, 0x84, 0x26);
242 
243 #define INTERFACE ID3DXTextureShader
244 DECLARE_INTERFACE_(ID3DXTextureShader, IUnknown)
245 {
249  STDMETHOD(GetFunction)(THIS_ struct ID3DXBuffer **ppFunction) PURE;
250  STDMETHOD(GetConstantBuffer)(THIS_ struct ID3DXBuffer **ppConstantBuffer) PURE;
251  STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE;
252  STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
253  STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
254  STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, const char *pName) PURE;
255  STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
257  STDMETHOD(SetValue)(THIS_ D3DXHANDLE hConstant, const void *pData, UINT Bytes) PURE;
258  STDMETHOD(SetBool)(THIS_ D3DXHANDLE hConstant, BOOL b) PURE;
259  STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hConstant, const BOOL *pb, UINT Count) PURE;
260  STDMETHOD(SetInt)(THIS_ D3DXHANDLE hConstant, INT n) PURE;
261  STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hConstant, const INT *pn, UINT Count) PURE;
262  STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hConstant, FLOAT f) PURE;
263  STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hConstant, const FLOAT *pf, UINT Count) PURE;
264  STDMETHOD(SetVector)(THIS_ D3DXHANDLE hConstant, const D3DXVECTOR4 *pVector) PURE;
265  STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hConstant, const D3DXVECTOR4 *pVector, UINT Count) PURE;
266  STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hConstant, const D3DXMATRIX *pMatrix) PURE;
267  STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hConstant, const D3DXMATRIX *pMatrix, UINT Count) PURE;
268  STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hConstant, const D3DXMATRIX **ppMatrix, UINT Count) PURE;
269  STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hConstant, const D3DXMATRIX *pMatrix) PURE;
270  STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hConstant, const D3DXMATRIX *pMatrix, UINT Count) PURE;
271  STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hConstant, const D3DXMATRIX **ppMatrix, UINT Count) PURE;
272 };
273 #undef INTERFACE
274 
275 typedef struct _D3DXMACRO
276 {
277  const char *Name;
278  const char *Definition;
280 
281 typedef struct _D3DXSEMANTIC {
285 
286 typedef enum _D3DXINCLUDE_TYPE
287 {
290  D3DXINC_FORCE_DWORD = 0x7fffffff,
292 
293 #define INTERFACE ID3DXInclude
294 
295 DECLARE_INTERFACE(ID3DXInclude)
296 {
297  STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, const char *filename,
298  const void *parent_data, const void **data, UINT *bytes) PURE;
299  STDMETHOD(Close)(THIS_ const void *data) PURE;
300 };
301 #undef INTERFACE
302 
303 #define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
304 #define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
305 
306 typedef struct ID3DXInclude *LPD3DXINCLUDE;
307 
308 typedef struct _D3DXFRAGMENT_DESC
309 {
310  const char *Name;
312 
314 
315 
316 DEFINE_GUID(IID_ID3DXFragmentLinker, 0x1a2c0cc2, 0xe5b6, 0x4ebc, 0x9e, 0x8d, 0x39, 0xe, 0x5, 0x78, 0x11, 0xb6);
317 
318 #define INTERFACE ID3DXFragmentLinker
319 DECLARE_INTERFACE_(ID3DXFragmentLinker, IUnknown)
320 {
324 
325  STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
326  STDMETHOD_(UINT, GetNumberOfFragments)(THIS) PURE;
327 
328  STDMETHOD_(D3DXHANDLE, GetFragmentHandleByIndex)(THIS_ UINT index) PURE;
329  STDMETHOD_(D3DXHANDLE, GetFragmentHandleByName)(THIS_ const char *name) PURE;
330  STDMETHOD(GetFragmentDesc)(THIS_ D3DXHANDLE name, D3DXFRAGMENT_DESC *frag_desc) PURE;
331 
332  STDMETHOD(AddFragments)(THIS_ const DWORD *fragments) PURE;
333 
334  STDMETHOD(GetAllFragments)(THIS_ ID3DXBuffer **buffer) PURE;
336 
337  STDMETHOD(LinkShader)(THIS_ const char *profile, DWORD flags, const D3DXHANDLE *fragmenthandles, UINT fragments, ID3DXBuffer **buffer, ID3DXBuffer **errors) PURE;
338  STDMETHOD(LinkVertexShader)(THIS_ const char *profile, DWORD flags, const D3DXHANDLE *fragment_handles, UINT fragments, IDirect3DVertexShader9 **shader, ID3DXBuffer **errors) PURE;
339  STDMETHOD(LinkPixelShader)(THIS_ const char *profile, DWORD flags, const D3DXHANDLE *fragment_handles, UINT fragments, IDirect3DPixelShader9 **shader, ID3DXBuffer **errors) PURE;
340 
341  STDMETHOD(ClearCache)(THIS) PURE;
342 };
343 #undef INTERFACE
344 
345 #ifdef __cplusplus
346 extern "C" {
347 #endif
348 
349 const char * WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device);
350 UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
351 DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
352 const char * WINAPI D3DXGetVertexShaderProfile(struct IDirect3DDevice9 *device);
353 HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size);
354 HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count);
355 HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count);
356 HRESULT WINAPI D3DXGetShaderOuputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count);
357 
362 #define D3DXAssembleShaderFromFile WINELIB_NAME_AW(D3DXAssembleShaderFromFile)
363 
368 #define D3DXAssembleShaderFromResource WINELIB_NAME_AW(D3DXAssembleShaderFromResource)
369 
370 HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines,
372 
373 HRESULT WINAPI D3DXCompileShader(const char *src_data, UINT data_len, const D3DXMACRO *defines,
374  ID3DXInclude *include, const char *function_name, const char *profile, DWORD flags,
375  ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
376 
377 HRESULT WINAPI D3DXDisassembleShader(const DWORD *pShader, BOOL EnableColorCode, const char *pComments, struct ID3DXBuffer **ppDisassembly);
378 
380  ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
381  ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
383  ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
384  ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
385 #define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
386 
388  ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
389  ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
391  ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
392  ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
393 #define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
394 
395 HRESULT WINAPI D3DXPreprocessShader(const char *data, UINT data_len, const D3DXMACRO *defines,
396  ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
397 
399  ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
401  ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
402 #define D3DXPreprocessShaderFromFile WINELIB_NAME_AW(D3DXPreprocessShaderFromFile)
403 
405  ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
407  ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages);
408 #define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
409 
410 HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table);
411 
412 HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table);
413 
414 HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *pFunction, D3DXSEMANTIC *pSemantics, UINT *pCount);
415 HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *pFunction, D3DXSEMANTIC *pSemantics, UINT *pCount);
416 
417 HRESULT WINAPI D3DXCreateTextureShader(const DWORD *pFunction, ID3DXTextureShader **ppTextureShader);
418 
419 HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker);
420 HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker);
421 
422 #ifdef __cplusplus
423 }
424 #endif
425 
427 {
436 
438 {
447 
448 typedef struct _D3DXSHADER_TYPEINFO
449 {
458 
460 {
464 
465 #endif /* __D3DX9SHADER_H__ */
const char * Name
Definition: d3dx9shader.h:277
HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker)
Definition: shader.c:2122
struct _D3DXSEMANTIC D3DXSEMANTIC
static SIZE_T const char const D3D_SHADER_MACRO * defines
Definition: asm.c:30
struct _D3DXMACRO * LPD3DXMACRO
#define REFIID
Definition: guiddef.h:118
static LONG WINAPI SetValue(HANDLE hcKey, LPCWSTR pszValue, DWORD dwType, const BYTE *pData, DWORD cbData, HANDLE hSpooler)
Definition: localmon.c:185
#define THIS_
Definition: basetyps.h:65
HRESULT WINAPI D3DXCompileShader(const char *src_data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, const char *function_name, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
Definition: shader.c:420
HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker)
Definition: shader.c:2111
_In_ BOOLEAN Release
Definition: classpnp.h:929
D3DXHANDLE * LPD3DXHANDLE
Definition: d3dx9shader.h:49
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
#define THIS
Definition: basetyps.h:66
struct _D3DXFRAGMENT_DESC D3DXFRAGMENT_DESC
REFIID riid
Definition: precomp.h:44
GLuint GLuint GLsizei count
Definition: gl.h:1545
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
REFIID LPVOID * ppv
Definition: atlbase.h:39
_In_ UINT Bytes
Definition: mmcopy.h:9
GLdouble n
Definition: glext.h:7729
HRESULT WINAPI D3DXPreprocessShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:602
const char * Name
Definition: d3dx9shader.h:310
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
GLuint buffer
Definition: glext.h:5915
_D3DXREGISTER_SET
Definition: d3dx9shader.h:51
HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
Definition: shader.c:482
NTSTATUS QueryInterface(IN PDEVICE_OBJECT DeviceObject, IN CONST GUID InterfaceType, IN LONG Size, IN LONG Version, OUT PVOID Interface)
Definition: fdo.c:532
const char * filename
Definition: ioapi.h:135
int32_t INT
Definition: typedefs.h:56
#define STDMETHOD(m)
Definition: basetyps.h:62
struct _D3DXSEMANTIC * LPD3DXSEMANTIC
HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *pFunction, D3DXSEMANTIC *pSemantics, UINT *pCount)
Definition: shader.c:3018
HRESULT WINAPI D3DXPreprocessShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:613
struct _D3DXSHADER_CONSTANTTABLE D3DXSHADER_CONSTANTTABLE
#define Open
Definition: syshdrs.h:62
HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count)
Definition: shader.c:2132
const char *WINAPI D3DXGetVertexShaderProfile(struct IDirect3DDevice9 *device)
Definition: shader.c:120
HRESULT WINAPI D3DXCreateTextureShader(const DWORD *pFunction, ID3DXTextureShader **ppTextureShader)
Definition: shader.c:2756
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
Definition: asm.c:30
HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:402
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
struct _D3DXSHADER_CONSTANTINFO * LPD3DXSHADER_CONSTANTINFO
HRESULT WINAPI D3DXPreprocessShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:636
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: devices.h:37
struct _D3DXFRAGMENT_DESC * LPD3DXFRAGMENT_DESC
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
Definition: shader.c:2104
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:680
DECLARE_INTERFACE(ID3DXInclude)
Definition: d3dx9shader.h:295
enum _D3DXREGISTER_SET * LPD3DXREGISTER_SET
#define b
Definition: ke_i.h:79
D3DXPARAMETER_CLASS Class
Definition: d3dx9shader.h:109
D3DXREGISTER_SET RegisterSet
Definition: d3dx9shader.h:106
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code)
Definition: shader.c:113
DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92, 0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b)
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
Definition: shader.c:560
GLuint shader
Definition: glext.h:6030
_D3DXINCLUDE_TYPE
Definition: d3dx9shader.h:286
static LPSTR pName
Definition: security.c:75
GLsizeiptr size
Definition: glext.h:5919
HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:320
__wchar_t WCHAR
Definition: xmlstorage.h:180
void SetMatrix(HWND hwnd, MATRIX *matrix)
Definition: matrix.c:294
struct _D3DXSHADER_CONSTANTINFO D3DXSHADER_CONSTANTINFO
HRESULT WINAPI D3DXGetShaderOuputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
struct _D3DXSHADER_CONSTANTTABLE * LPD3DXSHADER_CONSTANTTABLE
LONG HRESULT
Definition: typedefs.h:77
enum _D3DXINCLUDE_TYPE D3DXINCLUDE_TYPE
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code)
Definition: shader.c:90
HRESULT WINAPI D3DXDisassembleShader(const DWORD *pShader, BOOL EnableColorCode, const char *pComments, struct ID3DXBuffer **ppDisassembly)
Definition: shader.c:2445
#define WINAPI
Definition: msvc.h:8
static const UCHAR Index[8]
Definition: usbohci.c:18
HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size)
Definition: shader.c:149
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:698
struct _D3DXCONSTANTTABLE_DESC * LPD3DXCONSTANTTABLE_DESC
HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:384
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
enum _D3DXINCLUDE_TYPE * LPD3DXINCLUDE_TYPE
struct _D3DXSHADER_STRUCTMEMBERINFO D3DXSHADER_STRUCTMEMBERINFO
DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
Definition: d3dx9shader.h:128
HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:343
#define index(s, c)
Definition: various.h:29
HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:199
const char * Name
Definition: d3dx9shader.h:105
enum _D3DXREGISTER_SET D3DXREGISTER_SET
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
Definition: shader.c:581
const void * DefaultValue
Definition: d3dx9shader.h:116
GLsizei const GLfloat * value
Definition: glext.h:6069
D3DXPARAMETER_TYPE
Definition: d3dx9shader.h:71
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude UINT ID3DBlob ID3DBlob ** error_messages
Definition: asm.c:30
HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:3011
struct _D3DXMACRO D3DXMACRO
void SetDefaults()
Definition: butterflies.c:36
struct _D3DXCONSTANT_DESC * LPD3DXCONSTANT_DESC
enum D3DXPARAMETER_CLASS * LPD3DXPARAMETER_CLASS
enum D3DXPARAMETER_TYPE * LPD3DXPARAMETER_TYPE
struct ID3DXConstantTable * LPD3DXCONSTANTTABLE
Definition: d3dx9shader.h:237
Definition: sacdrv.h:267
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
Definition: shader.c:1986
#define f
Definition: ke_i.h:83
const char * Definition
Definition: d3dx9shader.h:278
#define PURE
Definition: basetyps.h:64
unsigned int UINT
Definition: ndis.h:50
GLuint * samplers
Definition: glext.h:7280
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
struct _D3DXCONSTANT_DESC D3DXCONSTANT_DESC
struct _D3DXSHADER_TYPEINFO D3DXSHADER_TYPEINFO
float FLOAT
Definition: typedefs.h:67
D3DXPARAMETER_TYPE Type
Definition: d3dx9shader.h:110
unsigned int ULONG
Definition: retypes.h:1
struct _D3DXCONSTANTTABLE_DESC D3DXCONSTANTTABLE_DESC
struct ID3DXInclude * LPD3DXINCLUDE
Definition: d3dx9shader.h:306
#define profile
Definition: kernel32.h:12
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
const char *WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device)
Definition: shader.c:42
HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
Definition: shader.c:510
struct _D3DXSHADER_STRUCTMEMBERINFO * LPD3DXSHADER_STRUCTMEMBERINFO
D3DXPARAMETER_CLASS
Definition: d3dx9shader.h:60
struct _D3DXSHADER_TYPEINFO * LPD3DXSHADER_TYPEINFO
interface ID3DXTextureShader * LPD3DXTEXTURESHADER
Definition: d3dx9shader.h:239
const char * Creator
Definition: d3dx9shader.h:98
GLuint const GLchar * name
Definition: glext.h:6031