22#ifndef __D3DX9SHADER_H__
23#define __D3DX9SHADER_H__
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
39#define D3DXSHADER_OPTIMIZATION_LEVEL0 0x4000
40#define D3DXSHADER_OPTIMIZATION_LEVEL1 0x0
41#define D3DXSHADER_OPTIMIZATION_LEVEL2 0xC000
42#define D3DXSHADER_OPTIMIZATION_LEVEL3 0x8000
44#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
46#define D3DXCONSTTABLE_LARGEADDRESSAWARE 0x20000
119#if D3DX_SDK_VERSION < 43
120DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92, 0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b);
122DEFINE_GUID(IID_ID3DXConstantTable, 0xab3c758f, 0x093e, 0x4356, 0xb7, 0x62, 0x4d, 0xb1, 0x8f, 0x1b, 0x3a, 0x01);
126#define INTERFACE ID3DXConstantTable
173#if !defined(__cplusplus) || defined(CINTERFACE)
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)
179#define ID3DXConstantTable_GetBufferPointer(p) (p)->lpVtbl->GetBufferPointer(p)
180#define ID3DXConstantTable_GetBufferSize(p) (p)->lpVtbl->GetBufferSize(p)
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)
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()
210#define ID3DXConstantTable_GetBufferPointer(p) (p)->GetBufferPointer()
211#define ID3DXConstantTable_GetBufferSize(p) (p)->GetBufferSize()
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)
241DEFINE_GUID(IID_ID3DXTextureShader, 0x3e3d67f8, 0xaa7a, 0x405d, 0xa8, 0x57, 0xba, 0x1, 0xd4, 0x75, 0x84, 0x26);
243#define INTERFACE ID3DXTextureShader
293#define INTERFACE ID3DXInclude
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)
316DEFINE_GUID(IID_ID3DXFragmentLinker, 0x1a2c0cc2, 0xe5b6, 0x4ebc, 0x9e, 0x8d, 0x39, 0xe, 0x5, 0x78, 0x11, 0xb6);
318#define INTERFACE ID3DXFragmentLinker
362#define D3DXAssembleShaderFromFile WINELIB_NAME_AW(D3DXAssembleShaderFromFile)
368#define D3DXAssembleShaderFromResource WINELIB_NAME_AW(D3DXAssembleShaderFromResource)
385#define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
393#define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
402#define D3DXPreprocessShaderFromFile WINELIB_NAME_AW(D3DXPreprocessShaderFromFile)
408#define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
static unsigned char bytes[4]
#define DECLARE_INTERFACE_(i, b)
#define DECLARE_INTERFACE(i)
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude UINT ID3DBlob ID3DBlob ** error_messages
static SIZE_T const char const D3D_SHADER_MACRO * defines
struct ID3DXBuffer ID3DXBuffer
HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
HRESULT WINAPI D3DXPreprocessShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
struct _D3DXCONSTANT_DESC D3DXCONSTANT_DESC
struct _D3DXSHADER_STRUCTMEMBERINFO * LPD3DXSHADER_STRUCTMEMBERINFO
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
struct ID3DXConstantTable * LPD3DXCONSTANTTABLE
HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker)
HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
HRESULT WINAPI D3DXDisassembleShader(const DWORD *pShader, BOOL EnableColorCode, const char *pComments, struct ID3DXBuffer **ppDisassembly)
enum _D3DXINCLUDE_TYPE * LPD3DXINCLUDE_TYPE
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code)
struct _D3DXSHADER_CONSTANTTABLE * LPD3DXSHADER_CONSTANTTABLE
const char *WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device)
HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
enum D3DXPARAMETER_TYPE * LPD3DXPARAMETER_TYPE
HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
interface ID3DXTextureShader * LPD3DXTEXTURESHADER
struct _D3DXSEMANTIC * LPD3DXSEMANTIC
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)
HRESULT WINAPI D3DXPreprocessShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
struct _D3DXSHADER_TYPEINFO * LPD3DXSHADER_TYPEINFO
HRESULT WINAPI D3DXCreateTextureShader(const DWORD *pFunction, ID3DXTextureShader **ppTextureShader)
struct ID3DXInclude * LPD3DXINCLUDE
HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size)
struct _D3DXSHADER_STRUCTMEMBERINFO D3DXSHADER_STRUCTMEMBERINFO
struct _D3DXSHADER_TYPEINFO D3DXSHADER_TYPEINFO
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)
struct _D3DXSEMANTIC D3DXSEMANTIC
HRESULT WINAPI D3DXPreprocessShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
enum _D3DXREGISTER_SET * LPD3DXREGISTER_SET
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code)
HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
struct _D3DXMACRO D3DXMACRO
HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count)
enum D3DXPARAMETER_CLASS * LPD3DXPARAMETER_CLASS
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)
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)
D3DXHANDLE * LPD3DXHANDLE
HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
struct _D3DXFRAGMENT_DESC D3DXFRAGMENT_DESC
HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
struct _D3DXCONSTANT_DESC * LPD3DXCONSTANT_DESC
struct _D3DXCONSTANTTABLE_DESC * LPD3DXCONSTANTTABLE_DESC
enum _D3DXREGISTER_SET D3DXREGISTER_SET
enum _D3DXINCLUDE_TYPE D3DXINCLUDE_TYPE
const char *WINAPI D3DXGetVertexShaderProfile(struct IDirect3DDevice9 *device)
struct _D3DXSHADER_CONSTANTTABLE D3DXSHADER_CONSTANTTABLE
HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
struct _D3DXCONSTANTTABLE_DESC D3DXCONSTANTTABLE_DESC
HRESULT WINAPI D3DXGetShaderOuputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
struct _D3DXSHADER_CONSTANTINFO * LPD3DXSHADER_CONSTANTINFO
struct _D3DXFRAGMENT_DESC * LPD3DXFRAGMENT_DESC
HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker)
struct _D3DXSHADER_CONSTANTINFO D3DXSHADER_CONSTANTINFO
HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *pFunction, D3DXSEMANTIC *pSemantics, UINT *pCount)
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)
struct _D3DXMACRO * LPD3DXMACRO
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLenum GLenum GLvoid * values
@ SetMatrixTransposePointerArray
@ SetMatrixTransposeArray
static HRESULT QueryInterface(REFIID, void **)
static ULONG WINAPI AddRef(IStream *iface)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
const void * DefaultValue
D3DXPARAMETER_CLASS Class
D3DXREGISTER_SET RegisterSet
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
_In_ WDFCOLLECTION _In_ ULONG Index