diff --git a/README.md b/README.md index 19854932..edcc90b3 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,11 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [4]:** +**Bugfixes and features included in the next upcoming release [5]:** * Fix caps lock state issues with multiple processes ([Wine Bug #35907](https://bugs.winehq.org/show_bug.cgi?id=35907)) * Fix multithreading issues with fullscreen clipping ([Wine Bug #38087](https://bugs.winehq.org/show_bug.cgi?id=38087)) +* Fix wrong version of ID3DXEffect interface for d3dx9_25 * Implement locking and synchronization of key states ([Wine Bug #31899](https://bugs.winehq.org/show_bug.cgi?id=31899)) * Python PIP needs better NtQueryInformationJobObject stub diff --git a/debian/changelog b/debian/changelog index 55c2213a..d8230145 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ wine-staging (1.7.39) UNRELEASED; urgency=low * Added patch to implement proper locking of keystate and synchronization with desktop thread. * Added patch to implement better stub function for NtQueryInformationJobObject. * Added patch to avoid crash in d3d9 tests by skipping when texture/surface creation fails. + * Added patch to fix wrong version of ID3DXEffect interface for d3dx9_25. * Removed patch to avoid hardcoded values for sizeof(GUID) (accepted upstream). * Removed patches for SLGetWindowsInformationDWORD (accepted upstream). -- Sebastian Lackner Mon, 09 Mar 2015 16:52:35 +0100 diff --git a/patches/d3dx9_25-ID3DXEffect/0001-d3dx9_25-Add-an-interface-wrapper-for-different-vers.patch b/patches/d3dx9_25-ID3DXEffect/0001-d3dx9_25-Add-an-interface-wrapper-for-different-vers.patch new file mode 100644 index 00000000..9c12ccdc --- /dev/null +++ b/patches/d3dx9_25-ID3DXEffect/0001-d3dx9_25-Add-an-interface-wrapper-for-different-vers.patch @@ -0,0 +1,1119 @@ +From f36cc09c704e92158088b90841c008777a7265c7 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sat, 14 Mar 2015 04:48:38 +0100 +Subject: d3dx9_25: Add an interface wrapper for different version of + ID3DXEffect. + +--- + dlls/d3dx9_25/Makefile.in | 5 +- + dlls/d3dx9_25/d3dx9_25.spec | 2 +- + dlls/d3dx9_25/effect.c | 1069 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 1073 insertions(+), 3 deletions(-) + create mode 100644 dlls/d3dx9_25/effect.c + +diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in +index a41cbc2..79e1c6b 100644 +--- a/dlls/d3dx9_25/Makefile.in ++++ b/dlls/d3dx9_25/Makefile.in +@@ -1,7 +1,8 @@ + MODULE = d3dx9_25.dll +-IMPORTS = d3d9 ++IMPORTS = d3d9 d3dx9 + + C_SRCS = \ +- d3dx9_25_main.c ++ d3dx9_25_main.c \ ++ effect.c + + RC_SRCS = version.rc +diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec +index c328108..2674952 100644 +--- a/dlls/d3dx9_25/d3dx9_25.spec ++++ b/dlls/d3dx9_25/d3dx9_25.spec +@@ -43,7 +43,7 @@ + @ stdcall D3DXCreateCubeTextureFromResourceExW(ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceExW + @ stdcall D3DXCreateCubeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceW + @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder +-@ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect ++@ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) D3DXCreateEffect25 + @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler + @ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA + @ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +diff --git a/dlls/d3dx9_25/effect.c b/dlls/d3dx9_25/effect.c +new file mode 100644 +index 0000000..23b56fc +--- /dev/null ++++ b/dlls/d3dx9_25/effect.c +@@ -0,0 +1,1069 @@ ++/* ++ * Copyright 2010 Christian Costa ++ * Copyright 2011 Rico Schüller ++ * Copyright 2015 Sebastian Lackner ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++ */ ++ ++#include "config.h" ++#include "wine/port.h" ++#define NONAMELESSUNION ++#include "wine/debug.h" ++#define INITGUID ++#include "initguid.h" ++#define COBJMACROS ++#include "wingdi.h" ++#include "d3dx9.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(d3dx); ++ ++DEFINE_GUID(IID_ID3DXEffect25, 0xd165ccb1, 0x62b0, 0x4a33, 0xb3, 0xfa, 0xa9, 0x23, 0x0, 0x30, 0x5a, 0x11); ++ ++#define INTERFACE ID3DXEffect25 ++DECLARE_INTERFACE_(ID3DXEffect25, ID3DXBaseEffect) ++{ ++ /*** IUnknown methods ***/ ++ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE; ++ STDMETHOD_(ULONG, AddRef)(THIS) PURE; ++ STDMETHOD_(ULONG, Release)(THIS) PURE; ++ /*** ID3DXBaseEffect methods ***/ ++ STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE; ++ STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE; ++ STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE; ++ STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE; ++ STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE; ++ STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE; ++ STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE; ++ STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE; ++ STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE; ++ STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE; ++ STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE; ++ STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE; ++ STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE; ++ STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index); ++ STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name); ++ STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE; ++ STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE; ++ STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE; ++ STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE; ++ STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE; ++ STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE; ++ STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE; ++ STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE; ++ STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE; ++ STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE; ++ STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE; ++ STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE; ++ STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE; ++ STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE; ++ STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE; ++ STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE; ++ STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE; ++ STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE; ++ STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE; ++ STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE; ++ STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE; ++ STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; ++ STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE; ++ STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; ++ STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE; ++ STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; ++ STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE; ++ STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; ++ STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE; ++ STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; ++ STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE; ++ STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; ++ STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE; ++ STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE; ++ STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE; ++ STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE; ++ STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE; ++ STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE; ++ STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE; ++ /*** ID3DXEffect methods ***/ ++ STDMETHOD(GetPool)(THIS_ ID3DXEffectPool **pool) PURE; ++ STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE technique) PURE; ++ STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE; ++ STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE technique) PURE; ++ STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE technique, D3DXHANDLE* next_technique) PURE; ++ STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE parameter, D3DXHANDLE technique) PURE; ++ STDMETHOD(Begin)(THIS_ UINT *passes, DWORD flags) PURE; ++ STDMETHOD(BeginPass)(THIS_ UINT pass) PURE; ++ STDMETHOD(CommitChanges)(THIS) PURE; ++ STDMETHOD(EndPass)(THIS) PURE; ++ STDMETHOD(End)(THIS) PURE; ++ STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE; ++ STDMETHOD(OnLostDevice)(THIS) PURE; ++ STDMETHOD(OnResetDevice)(THIS) PURE; ++ STDMETHOD(SetStateManager)(THIS_ ID3DXEffectStateManager *manager) PURE; ++ STDMETHOD(GetStateManager)(THIS_ ID3DXEffectStateManager **manager) PURE; ++ STDMETHOD(BeginParameterBlock)(THIS) PURE; ++ STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE; ++ STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE; ++ /* DeleteParameterBlock missing */ ++ STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect25 **effect) PURE; ++ /* SetRawValue missing */ ++}; ++#undef INTERFACE ++ ++struct ID3DXEffect25Impl ++{ ++ ID3DXEffect25 ID3DXEffect25_iface; ++ ID3DXEffect *effect; ++ LONG ref; ++}; ++ ++static const struct ID3DXEffect25Vtbl ID3DXEffect25_Vtbl; ++ ++static inline struct ID3DXEffect25Impl *impl_from_ID3DXEffect25(ID3DXEffect25 *iface) ++{ ++ return CONTAINING_RECORD(iface, struct ID3DXEffect25Impl, ID3DXEffect25_iface); ++} ++ ++/*** IUnknown methods ***/ ++static HRESULT WINAPI ID3DXEffect25Impl_QueryInterface(ID3DXEffect25 *iface, REFIID riid, void **object) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ++ TRACE("iface %p, riid %s, object %p\n", This, debugstr_guid(riid), object); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_ID3DXEffect25)) ++ { ++ iface->lpVtbl->AddRef(iface); ++ *object = This; ++ return S_OK; ++ } ++ ++ ERR("Interface %s not found\n", debugstr_guid(riid)); ++ ++ return E_NOINTERFACE; ++} ++ ++static ULONG WINAPI ID3DXEffect25Impl_AddRef(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ++ TRACE("iface %p: AddRef from %u\n", This, This->ref); ++ ++ return InterlockedIncrement(&This->ref); ++} ++ ++static ULONG WINAPI ID3DXEffect25Impl_Release(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("iface %p: Release from %u\n", This, ref + 1); ++ ++ if (!ref) ++ { ++ ID3DXEffect *effect = This->effect; ++ ++ effect->lpVtbl->Release(effect); ++ HeapFree(GetProcessHeap(), 0, This); ++ } ++ ++ return ref; ++} ++ ++/*** ID3DXBaseEffect methods ***/ ++static HRESULT WINAPI ID3DXEffect25Impl_GetDesc(ID3DXEffect25 *iface, D3DXEFFECT_DESC *desc) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetDesc(effect, desc); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetParameterDesc(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetParameterDesc(effect, parameter, desc); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetTechniqueDesc(ID3DXEffect25 *iface, D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetTechniqueDesc(effect, technique, desc); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetPassDesc(ID3DXEffect25 *iface, D3DXHANDLE pass, D3DXPASS_DESC *desc) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetPassDesc(effect, pass, desc); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetFunctionDesc(ID3DXEffect25 *iface, D3DXHANDLE shader, D3DXFUNCTION_DESC *desc) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetFunctionDesc(effect, shader, desc); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetParameter(ID3DXEffect25 *iface, D3DXHANDLE parameter, UINT index) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetParameter(effect, parameter, index); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetParameterByName(ID3DXEffect25 *iface, D3DXHANDLE parameter, LPCSTR name) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetParameterByName(effect, parameter, name); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetParameterBySemantic(ID3DXEffect25 *iface, D3DXHANDLE parameter, LPCSTR semantic) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetParameterBySemantic(effect, parameter, semantic); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetParameterElement(ID3DXEffect25 *iface, D3DXHANDLE parameter, UINT index) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetParameterElement(effect, parameter, index); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetTechnique(ID3DXEffect25 *iface, UINT index) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetTechnique(effect, index); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetTechniqueByName(ID3DXEffect25 *iface, LPCSTR name) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetTechniqueByName(effect, name); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetPass(ID3DXEffect25 *iface, D3DXHANDLE technique, UINT index) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetPass(effect, technique, index); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetPassByName(ID3DXEffect25 *iface, D3DXHANDLE technique, LPCSTR name) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetPassByName(effect, technique, name); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetFunction(ID3DXEffect25 *iface, UINT index) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetFunction(effect, index); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetFunctionByName(ID3DXEffect25 *iface, LPCSTR name) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetFunctionByName(effect, name); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetAnnotation(ID3DXEffect25 *iface, D3DXHANDLE object, UINT index) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetAnnotation(effect, object, index); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetAnnotationByName(ID3DXEffect25 *iface, D3DXHANDLE object, LPCSTR name) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetAnnotationByName(effect, object, name); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetValue(ID3DXEffect25 *iface, D3DXHANDLE parameter, LPCVOID data, UINT bytes) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetValue(effect, parameter, data, bytes); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetValue(ID3DXEffect25 *iface, D3DXHANDLE parameter, LPVOID data, UINT bytes) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetValue(effect, parameter, data, bytes); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetBool(ID3DXEffect25 *iface, D3DXHANDLE parameter, BOOL b) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetBool(effect, parameter, b); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetBool(ID3DXEffect25 *iface, D3DXHANDLE parameter, BOOL *b) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetBool(effect, parameter, b); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetBoolArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const BOOL *b, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetBoolArray(effect, parameter, b, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetBoolArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, BOOL *b, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetBoolArray(effect, parameter, b, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetInt(ID3DXEffect25 *iface, D3DXHANDLE parameter, INT n) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetInt(effect, parameter, n); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetInt(ID3DXEffect25 *iface, D3DXHANDLE parameter, INT *n) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetInt(effect, parameter, n); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetIntArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const INT *n, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetIntArray(effect, parameter, n, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetIntArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, INT *n, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetIntArray(effect, parameter, n, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetFloat(ID3DXEffect25 *iface, D3DXHANDLE parameter, FLOAT f) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetFloat(effect, parameter, f); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetFloat(ID3DXEffect25 *iface, D3DXHANDLE parameter, FLOAT *f) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetFloat(effect, parameter, f); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetFloatArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const FLOAT *f, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetFloatArray(effect, parameter, f, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetFloatArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, FLOAT *f, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetFloatArray(effect, parameter, f, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetVector(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetVector(effect, parameter, vector); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetVector(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetVector(effect, parameter, vector); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetVectorArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetVectorArray(effect, parameter, vector, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetVectorArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetVectorArray(effect, parameter, vector, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetMatrix(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetMatrix(effect, parameter, matrix); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetMatrix(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetMatrix(effect, parameter, matrix); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetMatrixArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetMatrixArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetMatrixArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetMatrixArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetMatrixPointerArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetMatrixPointerArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetMatrixPointerArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetMatrixPointerArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetMatrixTranspose(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetMatrixTranspose(effect, parameter, matrix); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetMatrixTranspose(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetMatrixTranspose(effect, parameter, matrix); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetMatrixTransposeArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetMatrixTransposeArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetMatrixTransposeArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetMatrixTransposeArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetMatrixTransposePointerArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetMatrixTransposePointerArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetMatrixTransposePointerArray(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetMatrixTransposePointerArray(effect, parameter, matrix, count); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetString(ID3DXEffect25 *iface, D3DXHANDLE parameter, LPCSTR string) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetString(effect, parameter, string); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetString(ID3DXEffect25 *iface, D3DXHANDLE parameter, LPCSTR *string) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetString(effect, parameter, string); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetTexture(ID3DXEffect25 *iface, D3DXHANDLE parameter, IDirect3DBaseTexture9 *texture) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetTexture(effect, parameter, texture); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetTexture(ID3DXEffect25 *iface, D3DXHANDLE parameter, IDirect3DBaseTexture9 **texture) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetTexture(effect, parameter, texture); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetPixelShader(ID3DXEffect25 *iface, D3DXHANDLE parameter, IDirect3DPixelShader9 **pshader) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetPixelShader(effect, parameter, pshader); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetVertexShader(ID3DXEffect25 *iface, D3DXHANDLE parameter, IDirect3DVertexShader9 **vshader) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetVertexShader(effect, parameter, vshader); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetArrayRange(ID3DXEffect25 *iface, D3DXHANDLE parameter, UINT start, UINT end) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetArrayRange(effect, parameter, start, end); ++} ++ ++/*** ID3DXEffect25 methods ***/ ++static HRESULT WINAPI ID3DXEffect25Impl_GetPool(ID3DXEffect25 *iface, ID3DXEffectPool **pool) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetPool(effect, pool); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetTechnique(ID3DXEffect25 *iface, D3DXHANDLE technique) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetTechnique(effect, technique); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_GetCurrentTechnique(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetCurrentTechnique(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_ValidateTechnique(ID3DXEffect25 *iface, D3DXHANDLE technique) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->ValidateTechnique(effect, technique); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_FindNextValidTechnique(ID3DXEffect25 *iface, D3DXHANDLE technique, D3DXHANDLE *next_technique) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->FindNextValidTechnique(effect, technique, next_technique); ++} ++ ++static BOOL WINAPI ID3DXEffect25Impl_IsParameterUsed(ID3DXEffect25 *iface, D3DXHANDLE parameter, D3DXHANDLE technique) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->IsParameterUsed(effect, parameter, technique); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_Begin(ID3DXEffect25 *iface, UINT *passes, DWORD flags) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->Begin(effect, passes, flags); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_BeginPass(ID3DXEffect25 *iface, UINT pass) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->BeginPass(effect, pass); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_CommitChanges(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->CommitChanges(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_EndPass(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->EndPass(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_End(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->End(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetDevice(ID3DXEffect25 *iface, IDirect3DDevice9 **device) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetDevice(effect, device); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_OnLostDevice(ID3DXEffect25* iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->OnLostDevice(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_OnResetDevice(ID3DXEffect25* iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->OnResetDevice(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_SetStateManager(ID3DXEffect25 *iface, ID3DXEffectStateManager *manager) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->SetStateManager(effect, manager); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_GetStateManager(ID3DXEffect25 *iface, ID3DXEffectStateManager **manager) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->GetStateManager(effect, manager); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_BeginParameterBlock(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->BeginParameterBlock(effect); ++} ++ ++static D3DXHANDLE WINAPI ID3DXEffect25Impl_EndParameterBlock(ID3DXEffect25 *iface) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->EndParameterBlock(effect); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_ApplyParameterBlock(ID3DXEffect25 *iface, D3DXHANDLE parameter_block) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ return effect->lpVtbl->ApplyParameterBlock(effect, parameter_block); ++} ++ ++static HRESULT WINAPI ID3DXEffect25Impl_CloneEffect(ID3DXEffect25 *iface, IDirect3DDevice9 *device, ID3DXEffect25 **clone) ++{ ++ struct ID3DXEffect25Impl *This = impl_from_ID3DXEffect25(iface); ++ ID3DXEffect *effect = This->effect; ++ struct ID3DXEffect25Impl *object; ++ HRESULT hr; ++ ++ TRACE("Forward iface %p, effect %p\n", This, effect); ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ { ++ ERR("Out of memory\n"); ++ return E_OUTOFMEMORY; ++ } ++ ++ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl; ++ object->ref = 1; ++ ++ hr = effect->lpVtbl->CloneEffect(effect, device, &object->effect); ++ if (FAILED(hr)) ++ { ++ WARN("Failed to clone effect\n"); ++ HeapFree(GetProcessHeap(), 0, object); ++ return hr; ++ } ++ ++ *clone = &object->ID3DXEffect25_iface; ++ ++ TRACE("Created ID3DXEffect %p\n", clone); ++ ++ return hr; ++} ++ ++static const struct ID3DXEffect25Vtbl ID3DXEffect25_Vtbl = ++{ ++ /*** IUnknown methods ***/ ++ ID3DXEffect25Impl_QueryInterface, ++ ID3DXEffect25Impl_AddRef, ++ ID3DXEffect25Impl_Release, ++ /*** ID3DXBaseEffect methods ***/ ++ ID3DXEffect25Impl_GetDesc, ++ ID3DXEffect25Impl_GetParameterDesc, ++ ID3DXEffect25Impl_GetTechniqueDesc, ++ ID3DXEffect25Impl_GetPassDesc, ++ ID3DXEffect25Impl_GetFunctionDesc, ++ ID3DXEffect25Impl_GetParameter, ++ ID3DXEffect25Impl_GetParameterByName, ++ ID3DXEffect25Impl_GetParameterBySemantic, ++ ID3DXEffect25Impl_GetParameterElement, ++ ID3DXEffect25Impl_GetTechnique, ++ ID3DXEffect25Impl_GetTechniqueByName, ++ ID3DXEffect25Impl_GetPass, ++ ID3DXEffect25Impl_GetPassByName, ++ ID3DXEffect25Impl_GetFunction, ++ ID3DXEffect25Impl_GetFunctionByName, ++ ID3DXEffect25Impl_GetAnnotation, ++ ID3DXEffect25Impl_GetAnnotationByName, ++ ID3DXEffect25Impl_SetValue, ++ ID3DXEffect25Impl_GetValue, ++ ID3DXEffect25Impl_SetBool, ++ ID3DXEffect25Impl_GetBool, ++ ID3DXEffect25Impl_SetBoolArray, ++ ID3DXEffect25Impl_GetBoolArray, ++ ID3DXEffect25Impl_SetInt, ++ ID3DXEffect25Impl_GetInt, ++ ID3DXEffect25Impl_SetIntArray, ++ ID3DXEffect25Impl_GetIntArray, ++ ID3DXEffect25Impl_SetFloat, ++ ID3DXEffect25Impl_GetFloat, ++ ID3DXEffect25Impl_SetFloatArray, ++ ID3DXEffect25Impl_GetFloatArray, ++ ID3DXEffect25Impl_SetVector, ++ ID3DXEffect25Impl_GetVector, ++ ID3DXEffect25Impl_SetVectorArray, ++ ID3DXEffect25Impl_GetVectorArray, ++ ID3DXEffect25Impl_SetMatrix, ++ ID3DXEffect25Impl_GetMatrix, ++ ID3DXEffect25Impl_SetMatrixArray, ++ ID3DXEffect25Impl_GetMatrixArray, ++ ID3DXEffect25Impl_SetMatrixPointerArray, ++ ID3DXEffect25Impl_GetMatrixPointerArray, ++ ID3DXEffect25Impl_SetMatrixTranspose, ++ ID3DXEffect25Impl_GetMatrixTranspose, ++ ID3DXEffect25Impl_SetMatrixTransposeArray, ++ ID3DXEffect25Impl_GetMatrixTransposeArray, ++ ID3DXEffect25Impl_SetMatrixTransposePointerArray, ++ ID3DXEffect25Impl_GetMatrixTransposePointerArray, ++ ID3DXEffect25Impl_SetString, ++ ID3DXEffect25Impl_GetString, ++ ID3DXEffect25Impl_SetTexture, ++ ID3DXEffect25Impl_GetTexture, ++ ID3DXEffect25Impl_GetPixelShader, ++ ID3DXEffect25Impl_GetVertexShader, ++ ID3DXEffect25Impl_SetArrayRange, ++ /*** ID3DXEffect25 methods ***/ ++ ID3DXEffect25Impl_GetPool, ++ ID3DXEffect25Impl_SetTechnique, ++ ID3DXEffect25Impl_GetCurrentTechnique, ++ ID3DXEffect25Impl_ValidateTechnique, ++ ID3DXEffect25Impl_FindNextValidTechnique, ++ ID3DXEffect25Impl_IsParameterUsed, ++ ID3DXEffect25Impl_Begin, ++ ID3DXEffect25Impl_BeginPass, ++ ID3DXEffect25Impl_CommitChanges, ++ ID3DXEffect25Impl_EndPass, ++ ID3DXEffect25Impl_End, ++ ID3DXEffect25Impl_GetDevice, ++ ID3DXEffect25Impl_OnLostDevice, ++ ID3DXEffect25Impl_OnResetDevice, ++ ID3DXEffect25Impl_SetStateManager, ++ ID3DXEffect25Impl_GetStateManager, ++ ID3DXEffect25Impl_BeginParameterBlock, ++ ID3DXEffect25Impl_EndParameterBlock, ++ ID3DXEffect25Impl_ApplyParameterBlock, ++ ID3DXEffect25Impl_CloneEffect, ++}; ++ ++HRESULT WINAPI D3DXCreateEffect25(IDirect3DDevice9 *device, LPCVOID srcdata, ++ UINT srcdatalen, const D3DXMACRO *defines, ID3DXInclude *include, ++ DWORD flags, ID3DXEffectPool *pool, ID3DXEffect25 **effect, ++ ID3DXBuffer **compilation_errors) ++{ ++ struct ID3DXEffect25Impl *object; ++ HRESULT hr; ++ ++ TRACE("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): Forwarded to d3dx9_36.D3DXCreateEffect\n", ++ device, srcdata, srcdatalen, defines, include, flags, pool, effect, compilation_errors); ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ { ++ ERR("Out of memory\n"); ++ return E_OUTOFMEMORY; ++ } ++ ++ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl; ++ object->ref = 1; ++ ++ hr = D3DXCreateEffect(device, srcdata, srcdatalen, defines, include, flags, pool, ++ &object->effect, compilation_errors); ++ if (FAILED(hr)) ++ { ++ WARN("Failed to create effect\n"); ++ HeapFree(GetProcessHeap(), 0, object); ++ return hr; ++ } ++ ++ *effect = &object->ID3DXEffect25_iface; ++ ++ TRACE("Created ID3DXEffect %p\n", object); ++ ++ return hr; ++} +-- +2.3.2 + diff --git a/patches/d3dx9_25-ID3DXEffect/definition b/patches/d3dx9_25-ID3DXEffect/definition new file mode 100644 index 00000000..1dc8997a --- /dev/null +++ b/patches/d3dx9_25-ID3DXEffect/definition @@ -0,0 +1 @@ +Fixes: Fix wrong version of ID3DXEffect interface for d3dx9_25 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d4bfcb0d..5cd672e5 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -74,6 +74,7 @@ patch_enable_all () enable_d3d9_Skip_Tests="$1" enable_d3d9_Surface_Refcount="$1" enable_d3drm_Specfile="$1" + enable_d3dx9_25_ID3DXEffect="$1" enable_d3dx9_36_AnimationController="$1" enable_d3dx9_36_D3DXStubs="$1" enable_d3dx9_36_DDS="$1" @@ -265,6 +266,9 @@ patch_enable () d3drm-Specfile) enable_d3drm_Specfile="$2" ;; + d3dx9_25-ID3DXEffect) + enable_d3dx9_25_ID3DXEffect="$2" + ;; d3dx9_36-AnimationController) enable_d3dx9_36_AnimationController="$2" ;; @@ -1355,6 +1359,18 @@ if test "$enable_d3drm_Specfile" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dx9_25-ID3DXEffect +# | +# | Modified files: +# | * dlls/d3dx9_25/Makefile.in, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_25/effect.c +# | +if test "$enable_d3dx9_25_ID3DXEffect" -eq 1; then + patch_apply d3dx9_25-ID3DXEffect/0001-d3dx9_25-Add-an-interface-wrapper-for-different-vers.patch + ( + echo '+ { "Sebastian Lackner", "d3dx9_25: Add an interface wrapper for different version of ID3DXEffect.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-DXTn # | # | This patchset fixes the following Wine bugs: @@ -1643,18 +1659,6 @@ if test "$enable_dxgi_GetDesc" -eq 1; then ) >> "$patchlist" fi -# Patchset makedep-PARENTSPEC -# | -# | Modified files: -# | * tools/makedep.c -# | -if test "$enable_makedep_PARENTSPEC" -eq 1; then - patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch - ( - echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-DllRedirects # | # | Modified files: @@ -1675,6 +1679,18 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then ) >> "$patchlist" fi +# Patchset makedep-PARENTSPEC +# | +# | Modified files: +# | * tools/makedep.c +# | +if test "$enable_makedep_PARENTSPEC" -eq 1; then + patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch + ( + echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-CSMT_Helper # | # | Modified files: