[patch]: include : Add missing API to direct-x 9's shader header
Kai Tietz
ktietz70 at googlemail.com
Tue Jan 21 09:57:47 CST 2014
Regards,
Kai
>From bc71b775336c307742882c4c705432c95c092b05 Mon Sep 17 00:00:00 2001
From: Kai Tietz <ktietz70 at googlemail.com>
Date: Tue, 21 Jan 2014 16:49:07 +0100
Subject: include: Add missing API to direct-x 9's shader.
---
include/d3dx9shader.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/include/d3dx9shader.h b/include/d3dx9shader.h
index 2a083da..cc84525 100644
--- a/include/d3dx9shader.h
+++ b/include/d3dx9shader.h
@@ -1,5 +1,6 @@
/*
* Copyright 2008 Luis Busquets
+ * Copyright 2014 Kai Tietz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -42,7 +43,10 @@
#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
+#define D3DXCONSTTABLE_LARGEADDRESSAWARE 0x20000
+
typedef const char *D3DXHANDLE;
+typedef D3DXHANDLE *LPD3DXHANDLE;
typedef enum _D3DXREGISTER_SET
{
@@ -112,7 +116,7 @@ typedef struct _D3DXCONSTANT_DESC
const void *DefaultValue;
} D3DXCONSTANT_DESC, *LPD3DXCONSTANT_DESC;
-DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92,
0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b);
+DEFINE_GUID(IID_ID3DXConstantTable, 0xab3c758f, 0x93e, 0x4356, 0xb7,
0x62, 0x4d, 0xb1, 0x8f, 0x1b, 0x3a, 0x1);
#undef INTERFACE
#define INTERFACE ID3DXConstantTable
@@ -228,6 +232,43 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
typedef struct ID3DXConstantTable *LPD3DXCONSTANTTABLE;
+typedef interface ID3DXTextureShader ID3DXTextureShader;
+typedef interface ID3DXTextureShader *LPD3DXTEXTURESHADER;
+
+DEFINE_GUID(IID_ID3DXTextureShader, 0x3e3d67f8, 0xaa7a, 0x405d, 0xa8,
0x57, 0xba, 0x1, 0xd4, 0x75, 0x84, 0x26);
+
+#define INTERFACE ID3DXTextureShader
+DECLARE_INTERFACE_(ID3DXTextureShader, IUnknown)
+{
+ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
+ STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG, Release)(THIS) PURE;
+ STDMETHOD(GetFunction)(THIS_ LPD3DXBUFFER *ppFunction) PURE;
+ STDMETHOD(GetConstantBuffer)(THIS_ LPD3DXBUFFER *ppConstantBuffer) PURE;
+ STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE;
+ STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant,
D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
+ STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant,
UINT Index) PURE;
+ STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE
hConstant, LPCSTR pName) PURE;
+ STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE
hConstant, UINT Index) PURE;
+ STDMETHOD(SetDefaults)(THIS) PURE;
+ STDMETHOD(SetValue)(THIS_ D3DXHANDLE hConstant, LPCVOID pData,
UINT Bytes) PURE;
+ STDMETHOD(SetBool)(THIS_ D3DXHANDLE hConstant, BOOL b) PURE;
+ STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hConstant, CONST BOOL*
pb, UINT Count) PURE;
+ STDMETHOD(SetInt)(THIS_ D3DXHANDLE hConstant, INT n) PURE;
+ STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hConstant, CONST INT* pn,
UINT Count) PURE;
+ STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hConstant, FLOAT f) PURE;
+ STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hConstant, CONST FLOAT*
pf, UINT Count) PURE;
+ STDMETHOD(SetVector)(THIS_ D3DXHANDLE hConstant, CONST
D3DXVECTOR4* pVector) PURE;
+ STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hConstant, CONST
D3DXVECTOR4* pVector, UINT Count) PURE;
+ STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hConstant, CONST
D3DXMATRIX* pMatrix) PURE;
+ STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hConstant, CONST
D3DXMATRIX* pMatrix, UINT Count) PURE;
+ STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hConstant,
CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
+ STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hConstant, CONST
D3DXMATRIX* pMatrix) PURE;
+ STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hConstant,
CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
+ STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE
hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
+};
+#undef INTERFACE
+
typedef struct _D3DXMACRO
{
const char *Name;
@@ -259,6 +300,7 @@ DECLARE_INTERFACE(ID3DXInclude)
#define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
#define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
+typedef struct ID3DXInclude ID3DXInclude;
typedef struct ID3DXInclude *LPD3DXINCLUDE;
#ifdef __cplusplus
@@ -291,6 +333,8 @@ HRESULT WINAPI D3DXCompileShader(const char
*src_data, UINT data_len, const D3DX
ID3DXInclude *include, const char *function_name, const char
*profile, DWORD flags,
ID3DXBuffer **shader, ID3DXBuffer **error_messages,
ID3DXConstantTable **constant_table);
+HRESULT WINAPI D3DXDisassembleShader(const DWORD *pShader, BOOL
EnableColorCode, const char *pComments, LPD3DXBUFFER *ppDisassembly);
+
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);
@@ -326,6 +370,11 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const
DWORD *byte_code, DWORD flags,
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code,
ID3DXConstantTable **constant_table);
+HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *pFunction,
D3DXSEMANTIC *pSemantics, UINT *pCount);
+HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *pFunction,
D3DXSEMANTIC *pSemantics, UINT *pCount);
+
+HRESULT WINAPI D3DXCreateTextureShader(const DWORD *pFunction,
LPD3DXTEXTURESHADER *ppTextureShader);
+
#ifdef __cplusplus
}
#endif
--
1.7.9
-------------- next part --------------
From bc71b775336c307742882c4c705432c95c092b05 Mon Sep 17 00:00:00 2001
From: Kai Tietz <ktietz70 at googlemail.com>
Date: Tue, 21 Jan 2014 16:49:07 +0100
Subject: include: Add missing API to direct-x 9's shader.
---
include/d3dx9shader.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/include/d3dx9shader.h b/include/d3dx9shader.h
index 2a083da..cc84525 100644
--- a/include/d3dx9shader.h
+++ b/include/d3dx9shader.h
@@ -1,5 +1,6 @@
/*
* Copyright 2008 Luis Busquets
+ * Copyright 2014 Kai Tietz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -42,7 +43,10 @@
#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
+#define D3DXCONSTTABLE_LARGEADDRESSAWARE 0x20000
+
typedef const char *D3DXHANDLE;
+typedef D3DXHANDLE *LPD3DXHANDLE;
typedef enum _D3DXREGISTER_SET
{
@@ -112,7 +116,7 @@ typedef struct _D3DXCONSTANT_DESC
const void *DefaultValue;
} D3DXCONSTANT_DESC, *LPD3DXCONSTANT_DESC;
-DEFINE_GUID(IID_ID3DXConstantTable, 0x9dca3190, 0x38b9, 0x4fc3, 0x92, 0xe3, 0x39, 0xc6, 0xdd, 0xfb, 0x35, 0x8b);
+DEFINE_GUID(IID_ID3DXConstantTable, 0xab3c758f, 0x93e, 0x4356, 0xb7, 0x62, 0x4d, 0xb1, 0x8f, 0x1b, 0x3a, 0x1);
#undef INTERFACE
#define INTERFACE ID3DXConstantTable
@@ -228,6 +232,43 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
typedef struct ID3DXConstantTable *LPD3DXCONSTANTTABLE;
+typedef interface ID3DXTextureShader ID3DXTextureShader;
+typedef interface ID3DXTextureShader *LPD3DXTEXTURESHADER;
+
+DEFINE_GUID(IID_ID3DXTextureShader, 0x3e3d67f8, 0xaa7a, 0x405d, 0xa8, 0x57, 0xba, 0x1, 0xd4, 0x75, 0x84, 0x26);
+
+#define INTERFACE ID3DXTextureShader
+DECLARE_INTERFACE_(ID3DXTextureShader, IUnknown)
+{
+ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
+ STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG, Release)(THIS) PURE;
+ STDMETHOD(GetFunction)(THIS_ LPD3DXBUFFER *ppFunction) PURE;
+ STDMETHOD(GetConstantBuffer)(THIS_ LPD3DXBUFFER *ppConstantBuffer) PURE;
+ STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE;
+ STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE;
+ STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
+ STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, LPCSTR pName) PURE;
+ STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE;
+ STDMETHOD(SetDefaults)(THIS) PURE;
+ STDMETHOD(SetValue)(THIS_ D3DXHANDLE hConstant, LPCVOID pData, UINT Bytes) PURE;
+ STDMETHOD(SetBool)(THIS_ D3DXHANDLE hConstant, BOOL b) PURE;
+ STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hConstant, CONST BOOL* pb, UINT Count) PURE;
+ STDMETHOD(SetInt)(THIS_ D3DXHANDLE hConstant, INT n) PURE;
+ STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hConstant, CONST INT* pn, UINT Count) PURE;
+ STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hConstant, FLOAT f) PURE;
+ STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hConstant, CONST FLOAT* pf, UINT Count) PURE;
+ STDMETHOD(SetVector)(THIS_ D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector) PURE;
+ STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
+ STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE;
+ STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
+ STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
+ STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE;
+ STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
+ STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
+};
+#undef INTERFACE
+
typedef struct _D3DXMACRO
{
const char *Name;
@@ -259,6 +300,7 @@ DECLARE_INTERFACE(ID3DXInclude)
#define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
#define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
+typedef struct ID3DXInclude ID3DXInclude;
typedef struct ID3DXInclude *LPD3DXINCLUDE;
#ifdef __cplusplus
@@ -291,6 +333,8 @@ HRESULT WINAPI D3DXCompileShader(const char *src_data, UINT data_len, const D3DX
ID3DXInclude *include, const char *function_name, const char *profile, DWORD flags,
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
+HRESULT WINAPI D3DXDisassembleShader(const DWORD *pShader, BOOL EnableColorCode, const char *pComments, LPD3DXBUFFER *ppDisassembly);
+
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);
@@ -326,6 +370,11 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags,
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table);
+HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *pFunction, D3DXSEMANTIC *pSemantics, UINT *pCount);
+HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *pFunction, D3DXSEMANTIC *pSemantics, UINT *pCount);
+
+HRESULT WINAPI D3DXCreateTextureShader(const DWORD *pFunction, LPD3DXTEXTURESHADER *ppTextureShader);
+
#ifdef __cplusplus
}
#endif
--
1.7.9
More information about the wine-patches
mailing list