mmdevapi: Don't use invalid This pointer on static object.
[wine/multimedia.git] / include / d3dx9shader.h
blob3d6ce98014c978c672bdc6c606c16e28a21e2f90
1 /*
2 * Copyright 2008 Luis Busquets
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 #include "d3dx9.h"
21 #ifndef __D3DX9SHADER_H__
22 #define __D3DX9SHADER_H__
24 #define D3DXSHADER_DEBUG 0x1
25 #define D3DXSHADER_SKIPVALIDATION 0x2
26 #define D3DXSHADER_SKIPOPTIMIZATION 0x4
27 #define D3DXSHADER_PACKMATRIX_ROWMAJOR 0x8
28 #define D3DXSHADER_PACKMATRIX_COLUMNMAJOR 0x10
29 #define D3DXSHADER_PARTIALPRECISION 0x20
30 #define D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT 0x40
31 #define D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT 0x80
32 #define D3DXSHADER_NO_PRESHADER 0x100
33 #define D3DXSHADER_AVOID_FLOW_CONTROL 0x200
34 #define D3DXSHADER_PREFER_FLOW_CONTROL 0x400
35 #define D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
36 #define D3DXSHADER_IEEE_STRICTNESS 0x2000
38 #define D3DXSHADER_OPTIMIZATION_LEVEL0 0x4000
39 #define D3DXSHADER_OPTIMIZATION_LEVEL1 0x0
40 #define D3DXSHADER_OPTIMIZATION_LEVEL2 0xC000
41 #define D3DXSHADER_OPTIMIZATION_LEVEL3 0x8000
43 #define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
45 typedef LPCSTR D3DXHANDLE;
47 typedef enum _D3DXREGISTER_SET
49 D3DXRS_BOOL,
50 D3DXRS_INT4,
51 D3DXRS_FLOAT4,
52 D3DXRS_SAMPLER,
53 D3DXRS_FORCE_DWORD = 0x7fffffff
54 } D3DXREGISTER_SET, *LPD3DXREGISTER_SET;
56 typedef enum D3DXPARAMETER_CLASS
58 D3DXPC_SCALAR,
59 D3DXPC_VECTOR,
60 D3DXPC_MATRIX_ROWS,
61 D3DXPC_MATRIX_COLUMNS,
62 D3DXPC_OBJECT,
63 D3DXPC_STRUCT,
64 D3DXPC_FORCE_DWORD = 0x7fffffff,
65 } D3DXPARAMETER_CLASS, *LPD3DXPARAMETER_CLASS;
67 typedef enum D3DXPARAMETER_TYPE
69 D3DXPT_VOID,
70 D3DXPT_BOOL,
71 D3DXPT_INT,
72 D3DXPT_FLOAT,
73 D3DXPT_STRING,
74 D3DXPT_TEXTURE,
75 D3DXPT_TEXTURE1D,
76 D3DXPT_TEXTURE2D,
77 D3DXPT_TEXTURE3D,
78 D3DXPT_TEXTURECUBE,
79 D3DXPT_SAMPLER,
80 D3DXPT_SAMPLER1D,
81 D3DXPT_SAMPLER2D,
82 D3DXPT_SAMPLER3D,
83 D3DXPT_SAMPLERCUBE,
84 D3DXPT_PIXELSHADER,
85 D3DXPT_VERTEXSHADER,
86 D3DXPT_PIXELFRAGMENT,
87 D3DXPT_VERTEXFRAGMENT,
88 D3DXPT_UNSUPPORTED,
89 D3DXPT_FORCE_DWORD = 0x7fffffff,
90 } D3DXPARAMETER_TYPE, *LPD3DXPARAMETER_TYPE;
92 typedef struct _D3DXCONSTANTTABLE_DESC
94 LPCSTR Creator;
95 DWORD Version;
96 UINT Constants;
97 } D3DXCONSTANTTABLE_DESC, *LPD3DXCONSTANTTABLE_DESC;
99 typedef struct _D3DXCONSTANT_DESC
101 LPCSTR Name;
102 D3DXREGISTER_SET RegisterSet;
103 UINT RegisterIndex;
104 UINT RegisterCount;
105 D3DXPARAMETER_CLASS Class;
106 D3DXPARAMETER_TYPE Type;
107 UINT Rows;
108 UINT Columns;
109 UINT Elements;
110 UINT StructMembers;
111 UINT Bytes;
112 LPCVOID DefaultValue;
113 } D3DXCONSTANT_DESC, *LPD3DXCONSTANT_DESC;
115 DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92, 0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b);
117 #undef INTERFACE
118 #define INTERFACE ID3DXConstantTable
120 DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
122 /*** IUnknown methods ***/
123 STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
124 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
125 STDMETHOD_(ULONG, Release)(THIS) PURE;
126 /*** ID3DXBuffer methods ***/
127 STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
128 STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
129 /*** ID3DXConstantTable methods ***/
130 STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE;
131 STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
132 STDMETHOD_(UINT, GetSamplerIndex)(THIS_ D3DXHANDLE hConstant) PURE;
133 STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
134 STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, LPCSTR pName) PURE;
135 STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
136 STDMETHOD(SetDefaults)(THIS_ LPDIRECT3DDEVICE9 pDevice) PURE;
137 STDMETHOD(SetValue)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, LPCVOID pData, UINT Bytes) PURE;
138 STDMETHOD(SetBool)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, BOOL b) PURE;
139 STDMETHOD(SetBoolArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST BOOL* pb, UINT Count) PURE;
140 STDMETHOD(SetInt)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, INT n) PURE;
141 STDMETHOD(SetIntArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST INT* pn, UINT Count) PURE;
142 STDMETHOD(SetFloat)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, FLOAT f) PURE;
143 STDMETHOD(SetFloatArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST FLOAT* pf, UINT Count) PURE;
144 STDMETHOD(SetVector)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector) PURE;
145 STDMETHOD(SetVectorArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
146 STDMETHOD(SetMatrix)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE;
147 STDMETHOD(SetMatrixArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
148 STDMETHOD(SetMatrixPointerArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
149 STDMETHOD(SetMatrixTranspose)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE;
150 STDMETHOD(SetMatrixTransposeArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
151 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
154 #if !defined(__cplusplus) || defined(CINTERFACE)
155 /*** IUnknown methods ***/
156 #define ID3DXConstantTable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
157 #define ID3DXConstantTable_AddRef(p) (p)->lpVtbl->AddRef(p)
158 #define ID3DXConstantTable_Release(p) (p)->lpVtbl->Release(p)
159 /*** ID3DXBuffer methods ***/
160 #define ID3DXConstantTable_GetBufferPointer(p) (p)->lpVtbl->GetBufferPointer(p)
161 #define ID3DXConstantTable_GetBufferSize(p) (p)->lpVtbl->GetBufferSize(p)
162 /*** ID3DXConstantTable methods ***/
163 #define ID3DXConstantTable_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
164 #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->lpVtbl->GetConstantDesc(p,a,b,c)
165 #define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->lpVtbl->GetSamplerIndex(p,a)
166 #define ID3DXConstantTable_GetConstant(p,a,b) (p)->lpVtbl->GetConstant(p,a,b)
167 #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->lpVtbl->GetConstantByName(p,a,b)
168 #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->lpVtbl->GetConstantElement(p,a,b)
169 #define ID3DXConstantTable_SetDefaults(p,a) (p)->lpVtbl->SetDefaults(p,a)
170 #define ID3DXConstantTable_SetValue(p,a,b,c,d) (p)->lpVtbl->SetValue(p,a,b,c,d)
171 #define ID3DXConstantTable_SetBool(p,a,b,c) (p)->lpVtbl->SetBool(p,a,b,c)
172 #define ID3DXConstantTable_SetBoolArray(p,a,b,c,d) (p)->lpVtbl->SetBoolArray(p,a,b,c,d)
173 #define ID3DXConstantTable_SetInt(p,a,b,c) (p)->lpVtbl->SetInt(p,a,b,c)
174 #define ID3DXConstantTable_SetIntArray(p,a,b,c,d) (p)->lpVtbl->SetIntArray(p,a,b,c,d)
175 #define ID3DXConstantTable_SetFloat(p,a,b,c) (p)->lpVtbl->SetFloat(p,a,b,c)
176 #define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->lpVtbl->SetFloatArray(p,a,b,c,d)
177 #define ID3DXConstantTable_SetVector(p,a,b,c) (p)->lpVtbl->SetVector(p,a,b,c)
178 #define ID3DXConstantTable_SetVectorArray(p,a,b,c,d) (p)->lpVtbl->SetVectorArray(p,a,b,c,d)
179 #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->lpVtbl->SetMatrix(p,a,b,c)
180 #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixArray(p,a,b,c,d)
181 #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixPointerArray(p,a,b,c,d)
182 #define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->lpVtbl->SetMatrixTranspose(p,a,b,c)
183 #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixTransposeArray(p,a,b,c,d)
184 #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->lpVtbl->SetMatrixTransposePointerArray(p,a,b,c,d)
185 #else
186 /*** IUnknown methods ***/
187 #define ID3DXConstantTable_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
188 #define ID3DXConstantTable_AddRef(p) (p)->AddRef()
189 #define ID3DXConstantTable_Release(p) (p)->Release()
190 /*** ID3DXBuffer methods ***/
191 #define ID3DXConstantTable_GetBufferPointer(p) (p)->GetBufferPointer()
192 #define ID3DXConstantTable_GetBufferSize(p) (p)->GetBufferSize()
193 /*** ID3DXConstantTable methods ***/
194 #define ID3DXConstantTable_GetDesc(p,a) (p)->GetDesc(a)
195 #define ID3DXConstantTable_GetConstantDesc(p,a,b,c) (p)->GetConstantDesc(a,b,c)
196 #define ID3DXConstantTable_GetSamplerIndex(p,a) (p)->GetConstantDesc(a)
197 #define ID3DXConstantTable_GetConstant(p,a,b) (p)->GetConstant(a,b)
198 #define ID3DXConstantTable_GetConstantByName(p,a,b) (p)->GetConstantByName(a,b)
199 #define ID3DXConstantTable_GetConstantElement(p,a,b) (p)->GetConstantElement(a,b)
200 #define ID3DXConstantTable_SetDefaults(p,a) (p)->SetDefaults(a)
201 #define ID3DXConstantTable_SetValue(p,a,b,c,d) (p)->SetValue(a,b,c,d)
202 #define ID3DXConstantTable_SetBool(p,a,b,c) (p)->SetBool(a,b,c)
203 #define ID3DXConstantTable_SetBoolArray(p,a,b,c,d) (p)->SetBoolArray(a,b,c,d)
204 #define ID3DXConstantTable_SetInt(p,a,b,c) (p)->SetInt(a,b,c)
205 #define ID3DXConstantTable_SetIntArray(p,a,b,c,d) (p)->SetIntArray(a,b,c,d)
206 #define ID3DXConstantTable_SetFloat(p,a,b,c) (p)->SetFloat(a,b,c)
207 #define ID3DXConstantTable_SetFloatArray(p,a,b,c,d) (p)->SetFloatArray(a,b,c,d)
208 #define ID3DXConstantTable_SetVector(p,a,b,c) (p)->SetVector(a,b,c)
209 #define ID3DXConstantTable_SetVectorArray(p,a,b,c,d) (p)->SetVectorArray(a,b,c,d)
210 #define ID3DXConstantTable_SetMatrix(p,a,b,c) (p)->SetMatrix(a,b,c)
211 #define ID3DXConstantTable_SetMatrixArray(p,a,b,c,d) (p)->SetMatrixArray(a,b,c,d)
212 #define ID3DXConstantTable_SetMatrixPointerArray(p,a,b,c,d) (p)->SetMatrixPointerArray(a,b,c,d)
213 #define ID3DXConstantTable_SetMatrixTranspose(p,a,b,c) (p)->SetMatrixTranspose(a,b,c)
214 #define ID3DXConstantTable_SetMatrixTransposeArray(p,a,b,c,d) (p)->SetMatrixTransposeArray(a,b,c,d)
215 #define ID3DXConstantTable_SetMatrixTransposePointerArray(p,a,b,c,d) (p)->SetMatrixTransposePointerArray(a,b,c,d)
216 #endif
218 typedef struct ID3DXConstantTable *LPD3DXCONSTANTTABLE;
220 typedef struct _D3DXMACRO {
221 LPCSTR Name;
222 LPCSTR Definition;
223 } D3DXMACRO, *LPD3DXMACRO;
225 typedef struct _D3DXSEMANTIC {
226 UINT Usage;
227 UINT UsageIndex;
228 } D3DXSEMANTIC, *LPD3DXSEMANTIC;
230 typedef enum _D3DXINCLUDE_TYPE
232 D3DXINC_LOCAL,
233 D3DXINC_SYSTEM,
234 D3DXINC_FORCE_DWORD = 0x7fffffff,
235 } D3DXINCLUDE_TYPE, *LPD3DXINCLUDE_TYPE;
237 #undef INTERFACE
238 #define INTERFACE ID3DXInclude
240 DECLARE_INTERFACE(ID3DXInclude)
242 STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, LPCSTR filename, LPCVOID parent_data, LPCVOID *data, UINT *bytes) PURE;
243 STDMETHOD(Close)(THIS_ LPCVOID data) PURE;
246 #define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
247 #define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
249 typedef struct ID3DXInclude *LPD3DXINCLUDE;
251 #ifdef __cplusplus
252 extern "C" {
253 #endif
255 LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device);
256 UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
257 DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
258 LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device);
259 HRESULT WINAPI D3DXFindShaderComment(CONST DWORD* byte_code, DWORD fourcc, LPCVOID* data, UINT* size);
260 HRESULT WINAPI D3DXGetShaderSamplers(CONST DWORD *byte_code, LPCSTR *samplers, UINT *count);
262 HRESULT WINAPI D3DXAssembleShaderFromFileA(LPCSTR filename,
263 CONST D3DXMACRO* defines,
264 LPD3DXINCLUDE include,
265 DWORD flags,
266 LPD3DXBUFFER* shader,
267 LPD3DXBUFFER* error_messages);
268 HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename,
269 CONST D3DXMACRO* defines,
270 LPD3DXINCLUDE include,
271 DWORD flags,
272 LPD3DXBUFFER* shader,
273 LPD3DXBUFFER* error_messages);
274 #define D3DXAssembleShaderFromFile WINELIB_NAME_AW(D3DXAssembleShaderFromFile)
276 HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module,
277 LPCSTR resource,
278 CONST D3DXMACRO* defines,
279 LPD3DXINCLUDE include,
280 DWORD flags,
281 LPD3DXBUFFER* shader,
282 LPD3DXBUFFER* error_messages);
283 HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
284 LPCWSTR resource,
285 CONST D3DXMACRO* defines,
286 LPD3DXINCLUDE include,
287 DWORD flags,
288 LPD3DXBUFFER* shader,
289 LPD3DXBUFFER* error_messages);
290 #define D3DXAssembleShaderFromResource WINELIB_NAME_AW(D3DXAssembleShaderFromResource)
292 HRESULT WINAPI D3DXAssembleShader(LPCSTR data,
293 UINT data_len,
294 CONST D3DXMACRO* defines,
295 LPD3DXINCLUDE include,
296 DWORD flags,
297 LPD3DXBUFFER* shader,
298 LPD3DXBUFFER* error_messages);
300 HRESULT WINAPI D3DXCompileShader(LPCSTR src_data,
301 UINT data_len,
302 const D3DXMACRO* defines,
303 LPD3DXINCLUDE include,
304 LPCSTR function_name,
305 LPCSTR profile,
306 DWORD flags,
307 LPD3DXBUFFER* shader,
308 LPD3DXBUFFER* error_messages,
309 LPD3DXCONSTANTTABLE* constant_table);
311 HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
312 CONST D3DXMACRO* defines,
313 LPD3DXINCLUDE include,
314 LPCSTR entrypoint,
315 LPCSTR profile,
316 DWORD flags,
317 LPD3DXBUFFER* shader,
318 LPD3DXBUFFER* error_messages,
319 LPD3DXCONSTANTTABLE* constant_table);
320 HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
321 CONST D3DXMACRO* defines,
322 LPD3DXINCLUDE include,
323 LPCSTR entrypoint,
324 LPCSTR profile,
325 DWORD flags,
326 LPD3DXBUFFER* shader,
327 LPD3DXBUFFER* error_messages,
328 LPD3DXCONSTANTTABLE* constant_table);
329 #define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
331 HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
332 LPCSTR resource,
333 CONST D3DXMACRO* defines,
334 LPD3DXINCLUDE include,
335 LPCSTR entrypoint,
336 LPCSTR profile,
337 DWORD flags,
338 LPD3DXBUFFER* shader,
339 LPD3DXBUFFER* error_messages,
340 LPD3DXCONSTANTTABLE* constant_table);
341 HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module,
342 LPCWSTR resource,
343 CONST D3DXMACRO* defines,
344 LPD3DXINCLUDE include,
345 LPCSTR entrypoint,
346 LPCSTR profile,
347 DWORD flags,
348 LPD3DXBUFFER* shader,
349 LPD3DXBUFFER* error_messages,
350 LPD3DXCONSTANTTABLE* constant_table);
351 #define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
353 HRESULT WINAPI D3DXPreprocessShader(LPCSTR data,
354 UINT data_len,
355 CONST D3DXMACRO* defines,
356 LPD3DXINCLUDE include,
357 LPD3DXBUFFER* shader,
358 LPD3DXBUFFER* error_messages);
360 HRESULT WINAPI D3DXPreprocessShaderFromFileA(LPCSTR filename,
361 CONST D3DXMACRO* defines,
362 LPD3DXINCLUDE include,
363 LPD3DXBUFFER* shader,
364 LPD3DXBUFFER* error_messages);
365 HRESULT WINAPI D3DXPreprocessShaderFromFileW(LPCWSTR filename,
366 CONST D3DXMACRO* defines,
367 LPD3DXINCLUDE include,
368 LPD3DXBUFFER* shader,
369 LPD3DXBUFFER* error_messages);
370 #define D3DXPreprocessShaderFromFile WINELIB_NAME_AW(D3DXPreprocessShaderFromFile)
372 HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module,
373 LPCSTR resource,
374 CONST D3DXMACRO* defines,
375 LPD3DXINCLUDE include,
376 LPD3DXBUFFER* shader,
377 LPD3DXBUFFER* error_messages);
378 HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module,
379 LPCWSTR resource,
380 CONST D3DXMACRO* defines,
381 LPD3DXINCLUDE include,
382 LPD3DXBUFFER* shader,
383 LPD3DXBUFFER* error_messages);
384 #define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
386 HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
387 DWORD flags,
388 LPD3DXCONSTANTTABLE* constant_table);
390 HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code,
391 LPD3DXCONSTANTTABLE* constant_table);
393 #ifdef __cplusplus
395 #endif
397 typedef struct _D3DXSHADER_CONSTANTTABLE
399 DWORD Size;
400 DWORD Creator;
401 DWORD Version;
402 DWORD Constants;
403 DWORD ConstantInfo;
404 DWORD Flags;
405 DWORD Target;
406 } D3DXSHADER_CONSTANTTABLE, *LPD3DXSHADER_CONSTANTTABLE;
408 typedef struct _D3DXSHADER_CONSTANTINFO
410 DWORD Name;
411 WORD RegisterSet;
412 WORD RegisterIndex;
413 WORD RegisterCount;
414 WORD Reserved;
415 DWORD TypeInfo;
416 DWORD DefaultValue;
417 } D3DXSHADER_CONSTANTINFO, *LPD3DXSHADER_CONSTANTINFO;
419 typedef struct _D3DXSHADER_TYPEINFO
421 WORD Class;
422 WORD Type;
423 WORD Rows;
424 WORD Columns;
425 WORD Elements;
426 WORD StructMembers;
427 DWORD StructMemberInfo;
428 } D3DXSHADER_TYPEINFO, *LPD3DXSHADER_TYPEINFO;
430 typedef struct _D3DXSHADER_STRUCTMEMBERINFO
432 DWORD Name;
433 DWORD TypeInfo;
434 } D3DXSHADER_STRUCTMEMBERINFO, *LPD3DXSHADER_STRUCTMEMBERINFO;
436 #endif /* __D3DX9SHADER_H__ */