Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/d3dx9_36/effect.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 1660b47a8c..78aa1c06d6 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -991,25 +991,6 @@ static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor) return (0xfeff0000 | ((major) << 8) | (minor)); }
-static HRESULT d3dx9_base_effect_get_desc(struct d3dx9_base_effect *base, D3DXEFFECT_DESC *desc) -{ - if (!desc) - { - WARN("Invalid argument specified.\n"); - return D3DERR_INVALIDCALL; - } - - FIXME("partial stub!\n"); - - /* TODO: add creator and function count. */ - desc->Creator = NULL; - desc->Functions = 0; - desc->Parameters = base->parameter_count; - desc->Techniques = base->technique_count; - - return D3D_OK; -} - static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) { @@ -3419,9 +3400,21 @@ static HRESULT WINAPI d3dx_effect_GetDesc(ID3DXEffect *iface, D3DXEFFECT_DESC *d { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
- TRACE("iface %p, desc %p.\n", iface, desc); + FIXME("iface %p, desc %p partial stub.\n", iface, desc);
- return d3dx9_base_effect_get_desc(&effect->base_effect, desc); + if (!desc) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + /* TODO: add creator and function count. */ + desc->Creator = NULL; + desc->Functions = 0; + desc->Parameters = effect->base_effect.parameter_count; + desc->Techniques = effect->base_effect.technique_count; + + return D3D_OK; }
static HRESULT WINAPI d3dx_effect_GetParameterDesc(ID3DXEffect *iface, D3DXHANDLE parameter,
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dx9_36/effect.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 45d9ff58838..396bd091f78 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -148,11 +148,9 @@ struct d3dx_technique struct IDirect3DStateBlock9 *saved_state; };
-#define ID3DXEffectImpl d3dx_effect - struct d3dx9_base_effect { - struct ID3DXEffectImpl *effect; + struct d3dx_effect *effect;
UINT parameter_count; UINT technique_count; @@ -718,7 +716,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) } }
-static void free_effect(struct ID3DXEffectImpl *effect) +static void free_effect(struct d3dx_effect *effect) { TRACE("Free effect %p\n", effect);
@@ -2841,7 +2839,7 @@ static void d3dx9_set_material_parameter(enum MATERIAL_TYPE op, D3DMATERIAL9 *ma } }
-static HRESULT d3dx_set_shader_const_state(struct ID3DXEffectImpl *effect, enum SHADER_CONSTANT_TYPE op, UINT index, +static HRESULT d3dx_set_shader_const_state(struct d3dx_effect *effect, enum SHADER_CONSTANT_TYPE op, UINT index, struct d3dx_parameter *param, void *value_ptr) { static const struct @@ -2940,10 +2938,10 @@ static HRESULT d3dx_set_shader_const_state(struct ID3DXEffectImpl *effect, enum return ret; }
-static HRESULT d3dx9_apply_state(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, +static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *pass, struct d3dx_state *state, unsigned int parent_index, BOOL update_all);
-static HRESULT d3dx_set_shader_constants(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, +static HRESULT d3dx_set_shader_constants(struct d3dx_effect *effect, struct d3dx_pass *pass, struct d3dx_parameter *param, BOOL vs, BOOL update_all) { HRESULT hr, ret; @@ -2989,7 +2987,7 @@ static HRESULT d3dx_set_shader_constants(struct ID3DXEffectImpl *effect, struct return ret; }
-static HRESULT d3dx9_apply_state(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, +static HRESULT d3dx9_apply_state(struct d3dx_effect *effect, struct d3dx_pass *pass, struct d3dx_state *state, unsigned int parent_index, BOOL update_all) { struct d3dx_parameter *param; @@ -3125,7 +3123,7 @@ static HRESULT d3dx9_apply_state(struct ID3DXEffectImpl *effect, struct d3dx_pas return D3D_OK; }
-static HRESULT d3dx9_apply_pass_states(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, BOOL update_all) +static HRESULT d3dx9_apply_pass_states(struct d3dx_effect *effect, struct d3dx_pass *pass, BOOL update_all) { unsigned int i; HRESULT ret; @@ -6540,7 +6538,7 @@ static const char **parse_skip_constants_string(char *skip_constants_string, uns
static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include, - UINT eflags, ID3DBlob **errors, struct ID3DXEffectImpl *effect, struct d3dx_effect_pool *pool, + UINT eflags, ID3DBlob **errors, struct d3dx_effect *effect, struct d3dx_effect_pool *pool, const char *skip_constants_string) { DWORD tag, offset; @@ -6683,7 +6681,7 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, return D3D_OK; }
-static HRESULT d3dx9_effect_init(struct ID3DXEffectImpl *effect, struct IDirect3DDevice9 *device, +static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDevice9 *device, const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT eflags, ID3DBlob **error_messages, struct ID3DXEffectPool *pool, const char *skip_constants) { @@ -6727,7 +6725,7 @@ HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *s const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors) { - struct ID3DXEffectImpl *object; + struct d3dx_effect *object; HRESULT hr;
TRACE("device %p, srcdata %p, srcdatalen %u, defines %p, include %p,"
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=48442
Your paranoid android.
=== debian9 (build log) ===
error: patch failed: dlls/d3dx9_36/effect.c:148 Task: Patch failed to apply
=== debian9 (build log) ===
error: patch failed: dlls/d3dx9_36/effect.c:148 Task: Patch failed to apply