[PATCH 1/5] d3dx9_36: Add stub for D3DXGetShaderConstantTableEx. Implement D3DXGetShaderConstantTable.

Christian Costa titan.costa at wanadoo.fr
Sun Feb 21 15:30:27 CST 2010


---

 dlls/d3dx9_36/d3dx9_36.spec |    4 ++--
 dlls/d3dx9_36/shader.c      |   20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)
-------------- next part --------------
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index 43551b2..d22ab5f 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -157,8 +157,8 @@
 @ stdcall D3DXGetImageInfoFromResourceA(long str ptr)
 @ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr)
 @ stdcall D3DXGetPixelShaderProfile(ptr)
-@ stub D3DXGetShaderConstantTable
-@ stub D3DXGetShaderConstantTableEx
+@ stdcall D3DXGetShaderConstantTable(ptr ptr)
+@ stdcall D3DXGetShaderConstantTableEx(ptr long ptr)
 @ stub D3DXGetShaderInputSemantics
 @ stub D3DXGetShaderOutputSemantics
 @ stub D3DXGetShaderSamplers
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index 16fdd78..d8f7325 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -237,3 +237,23 @@ HRESULT WINAPI D3DXCompileShader(LPCSTR pSrcData,
           pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable);
     return D3DERR_INVALIDCALL;
 }
+
+HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* pFunction,
+                                            DWORD flags,
+                                            LPD3DXCONSTANTTABLE* ppConstantTable)
+{
+    FIXME("(%p, %x, %p): stub\n", pFunction, flags, ppConstantTable);
+
+    if (!pFunction || !ppConstantTable)
+        return D3DERR_INVALIDCALL;
+
+    return D3DXERR_INVALIDDATA;
+}
+
+HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* pFunction,
+                                          LPD3DXCONSTANTTABLE* ppConstantTable)
+{
+    TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", pFunction, ppConstantTable);
+
+    return D3DXGetShaderConstantTableEx(pFunction, 0, ppConstantTable);
+}


More information about the wine-patches mailing list