From 8e80ee68370c2acf3e7ce1a2f123278595512888 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 21 Jul 2016 09:06:29 +0000 Subject: [PATCH] d3dx9: Implement D3DXCreateTextureShader with stubbed ID3DXTextureShader interface. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dx9_24/d3dx9_24.spec | 2 +- dlls/d3dx9_25/d3dx9_25.spec | 2 +- dlls/d3dx9_26/d3dx9_26.spec | 2 +- dlls/d3dx9_27/d3dx9_27.spec | 2 +- dlls/d3dx9_28/d3dx9_28.spec | 2 +- dlls/d3dx9_29/d3dx9_29.spec | 2 +- dlls/d3dx9_30/d3dx9_30.spec | 2 +- dlls/d3dx9_31/d3dx9_31.spec | 2 +- dlls/d3dx9_32/d3dx9_32.spec | 2 +- dlls/d3dx9_33/d3dx9_33.spec | 2 +- dlls/d3dx9_34/d3dx9_34.spec | 2 +- dlls/d3dx9_35/d3dx9_35.spec | 2 +- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/shader.c | 267 ++++++++++++++++++++++++++++++++++++ dlls/d3dx9_37/d3dx9_37.spec | 2 +- dlls/d3dx9_38/d3dx9_38.spec | 2 +- dlls/d3dx9_39/d3dx9_39.spec | 2 +- dlls/d3dx9_40/d3dx9_40.spec | 2 +- dlls/d3dx9_41/d3dx9_41.spec | 2 +- dlls/d3dx9_42/d3dx9_42.spec | 2 +- dlls/d3dx9_43/d3dx9_43.spec | 2 +- 21 files changed, 287 insertions(+), 20 deletions(-) diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec index 88ad9afeba3..f182d7e3645 100644 --- a/dlls/d3dx9_24/d3dx9_24.spec +++ b/dlls/d3dx9_24/d3dx9_24.spec @@ -100,7 +100,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec index fc64fb4efe2..300dc1d4692 100644 --- a/dlls/d3dx9_25/d3dx9_25.spec +++ b/dlls/d3dx9_25/d3dx9_25.spec @@ -100,7 +100,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec index 5bcf2cc4fca..79e0a0c0fb5 100644 --- a/dlls/d3dx9_26/d3dx9_26.spec +++ b/dlls/d3dx9_26/d3dx9_26.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec index 5bcf2cc4fca..79e0a0c0fb5 100644 --- a/dlls/d3dx9_27/d3dx9_27.spec +++ b/dlls/d3dx9_27/d3dx9_27.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec index edb494e535c..abbfa94d087 100644 --- a/dlls/d3dx9_28/d3dx9_28.spec +++ b/dlls/d3dx9_28/d3dx9_28.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec index edb494e535c..abbfa94d087 100644 --- a/dlls/d3dx9_29/d3dx9_29.spec +++ b/dlls/d3dx9_29/d3dx9_29.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec index dc000863944..0269caa5f33 100644 --- a/dlls/d3dx9_30/d3dx9_30.spec +++ b/dlls/d3dx9_30/d3dx9_30.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec index c650a775a94..be37e8f657b 100644 --- a/dlls/d3dx9_31/d3dx9_31.spec +++ b/dlls/d3dx9_31/d3dx9_31.spec @@ -103,7 +103,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec index 8c2fe788b2b..6d9e24496a1 100644 --- a/dlls/d3dx9_32/d3dx9_32.spec +++ b/dlls/d3dx9_32/d3dx9_32.spec @@ -103,7 +103,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec index 8c2fe788b2b..6d9e24496a1 100644 --- a/dlls/d3dx9_33/d3dx9_33.spec +++ b/dlls/d3dx9_33/d3dx9_33.spec @@ -103,7 +103,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec index 8c2fe788b2b..6d9e24496a1 100644 --- a/dlls/d3dx9_34/d3dx9_34.spec +++ b/dlls/d3dx9_34/d3dx9_34.spec @@ -103,7 +103,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec index 8c2fe788b2b..6d9e24496a1 100644 --- a/dlls/d3dx9_35/d3dx9_35.spec +++ b/dlls/d3dx9_35/d3dx9_35.spec @@ -103,7 +103,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 622f2d0663c..2db01525438 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 9723aa46e81..4dbecb15a44 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -2146,3 +2146,270 @@ HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly); return E_OUTOFMEMORY; } + +struct d3dx9_texture_shader +{ + ID3DXTextureShader ID3DXTextureShader_iface; + LONG ref; +}; + +static inline struct d3dx9_texture_shader *impl_from_ID3DXTextureShader(ID3DXTextureShader *iface) +{ + return CONTAINING_RECORD(iface, struct d3dx9_texture_shader, ID3DXTextureShader_iface); +} + +static HRESULT WINAPI d3dx9_texture_shader_QueryInterface(ID3DXTextureShader *iface, REFIID riid, void **out) +{ + TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXTextureShader)) + { + iface->lpVtbl->AddRef(iface); + *out = iface; + return D3D_OK; + } + + WARN("Interface %s not found.\n", debugstr_guid(riid)); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI d3dx9_texture_shader_AddRef(ID3DXTextureShader *iface) +{ + struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface); + ULONG refcount = InterlockedIncrement(&texture_shader->ref); + + TRACE("%p increasing refcount to %u.\n", texture_shader, refcount); + + return refcount; +} + +static ULONG WINAPI d3dx9_texture_shader_Release(ID3DXTextureShader *iface) +{ + struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface); + ULONG refcount = InterlockedDecrement(&texture_shader->ref); + + TRACE("%p decreasing refcount to %u.\n", texture_shader, refcount); + + if (!refcount) + { + HeapFree(GetProcessHeap(), 0, texture_shader); + } + + return refcount; +} + +static HRESULT WINAPI d3dx9_texture_shader_GetFunction(ID3DXTextureShader *iface, struct ID3DXBuffer **function) +{ + FIXME("iface %p, function %p stub.\n", iface, function); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_GetConstantBuffer(ID3DXTextureShader *iface, struct ID3DXBuffer **constant_buffer) +{ + FIXME("iface %p, constant_buffer %p stub.\n", iface, constant_buffer); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_GetDesc(ID3DXTextureShader *iface, D3DXCONSTANTTABLE_DESC *desc) +{ + FIXME("iface %p, desc %p stub.\n", iface, desc); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_GetConstantDesc(ID3DXTextureShader *iface, D3DXHANDLE constant, D3DXCONSTANT_DESC *constant_desc, UINT *count) +{ + FIXME("iface %p, constant %p, constant_desc %p, count %p stub.\n", iface, constant, constant_desc, count); + + return E_NOTIMPL; +} + +static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstant(ID3DXTextureShader *iface, D3DXHANDLE constant, UINT index) +{ + FIXME("iface %p, constant %p, index %u stub.\n", iface, constant, index); + + return NULL; +} + +static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstantByName(ID3DXTextureShader *iface, D3DXHANDLE constant, const char *name) +{ + FIXME("iface %p, constant %p, name %s stub.\n", iface, constant, debugstr_a(name)); + + return NULL; +} + +static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstantElement(ID3DXTextureShader *iface, D3DXHANDLE constant, UINT index) +{ + FIXME("iface %p, constant %p, index %u stub.\n", iface, constant, index); + + return NULL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetDefaults(ID3DXTextureShader *iface) +{ + FIXME("iface %p stub.\n", iface); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetValue(ID3DXTextureShader *iface, D3DXHANDLE constant, const void *data, UINT bytes) +{ + FIXME("iface %p, constant %p, data %p, bytes %u stub.\n", iface, constant, data, bytes); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetBool(ID3DXTextureShader *iface, D3DXHANDLE constant, BOOL b) +{ + FIXME("iface %p, constant %p, b %u stub.\n", iface, constant, b); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetBoolArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const BOOL *b, UINT count) +{ + FIXME("iface %p, constant %p, b %p, count %u stub.\n", iface, constant, b, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetInt(ID3DXTextureShader *iface, D3DXHANDLE constant, INT n) +{ + FIXME("iface %p, constant %p, n %d stub.\n", iface, constant, n); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetIntArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const INT *n, UINT count) +{ + FIXME("iface %p, constant %p, n %p, count %u stub.\n", iface, constant, n, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetFloat(ID3DXTextureShader *iface, D3DXHANDLE constant, FLOAT f) +{ + FIXME("iface %p, constant %p, f %f stub.\n", iface, constant, f); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetFloatArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const FLOAT *f, UINT count) +{ + FIXME("iface %p, constant %p, f %p, count %u stub.\n", iface, constant, f, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetVector(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXVECTOR4 *vector) +{ + FIXME("iface %p, constant %p, vector %p stub.\n", iface, constant, vector); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetVectorArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXVECTOR4 *vector, UINT count) +{ + FIXME("iface %p, constant %p, vector %p, count %u stub.\n", iface, constant, vector, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetMatrix(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix) +{ + FIXME("iface %p, constant %p, matrix %p stub.\n", iface, constant, matrix); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetMatrixArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count) +{ + FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetMatrixPointerArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count) +{ + FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTranspose(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix) +{ + FIXME("iface %p, constant %p, matrix %p stub.\n", iface, constant, matrix); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTransposeArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count) +{ + FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTransposePointerArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count) +{ + FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count); + + return E_NOTIMPL; +} + +static const struct ID3DXTextureShaderVtbl d3dx9_texture_shader_vtbl = +{ + /*** IUnknown methods ***/ + d3dx9_texture_shader_QueryInterface, + d3dx9_texture_shader_AddRef, + d3dx9_texture_shader_Release, + /*** ID3DXTextureShader methods ***/ + d3dx9_texture_shader_GetFunction, + d3dx9_texture_shader_GetConstantBuffer, + d3dx9_texture_shader_GetDesc, + d3dx9_texture_shader_GetConstantDesc, + d3dx9_texture_shader_GetConstant, + d3dx9_texture_shader_GetConstantByName, + d3dx9_texture_shader_GetConstantElement, + d3dx9_texture_shader_SetDefaults, + d3dx9_texture_shader_SetValue, + d3dx9_texture_shader_SetBool, + d3dx9_texture_shader_SetBoolArray, + d3dx9_texture_shader_SetInt, + d3dx9_texture_shader_SetIntArray, + d3dx9_texture_shader_SetFloat, + d3dx9_texture_shader_SetFloatArray, + d3dx9_texture_shader_SetVector, + d3dx9_texture_shader_SetVectorArray, + d3dx9_texture_shader_SetMatrix, + d3dx9_texture_shader_SetMatrixArray, + d3dx9_texture_shader_SetMatrixPointerArray, + d3dx9_texture_shader_SetMatrixTranspose, + d3dx9_texture_shader_SetMatrixTransposeArray, + d3dx9_texture_shader_SetMatrixTransposePointerArray +}; + +HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader **texture_shader) +{ + struct d3dx9_texture_shader *object; + + TRACE("function %p, texture_shader %p.\n", function, texture_shader); + + if (!function || !texture_shader) + return D3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXTextureShader_iface.lpVtbl = &d3dx9_texture_shader_vtbl; + object->ref = 1; + + *texture_shader = &object->ID3DXTextureShader_iface; + + return D3D_OK; +} diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec index 622f2d0663c..2db01525438 100644 --- a/dlls/d3dx9_37/d3dx9_37.spec +++ b/dlls/d3dx9_37/d3dx9_37.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec index 622f2d0663c..2db01525438 100644 --- a/dlls/d3dx9_38/d3dx9_38.spec +++ b/dlls/d3dx9_38/d3dx9_38.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec index 622f2d0663c..2db01525438 100644 --- a/dlls/d3dx9_39/d3dx9_39.spec +++ b/dlls/d3dx9_39/d3dx9_39.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec index 622f2d0663c..2db01525438 100644 --- a/dlls/d3dx9_40/d3dx9_40.spec +++ b/dlls/d3dx9_40/d3dx9_40.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec index 622f2d0663c..2db01525438 100644 --- a/dlls/d3dx9_41/d3dx9_41.spec +++ b/dlls/d3dx9_41/d3dx9_41.spec @@ -104,7 +104,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec index 7851c60f1de..9a69e7636ed 100644 --- a/dlls/d3dx9_42/d3dx9_42.spec +++ b/dlls/d3dx9_42/d3dx9_42.spec @@ -102,7 +102,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec index 7851c60f1de..9a69e7636ed 100644 --- a/dlls/d3dx9_43/d3dx9_43.spec +++ b/dlls/d3dx9_43/d3dx9_43.spec @@ -102,7 +102,7 @@ @ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) @ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) @ stub D3DXCreateTextureGutterHelper(long long ptr long ptr) -@ stub D3DXCreateTextureShader(ptr ptr) +@ stdcall D3DXCreateTextureShader(ptr ptr) @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) @ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) @ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr)