Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/d3dx9_36/effect.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index 32db4a80ae..3e31d65226 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -152,7 +152,6 @@ struct d3dx9_base_effect
{
struct d3dx_effect *effect;
- struct d3dx_effect_pool *pool;
DWORD flags;
ULONG64 version_counter;
@@ -176,7 +175,7 @@ struct d3dx_effect
struct ID3DXEffectStateManager *manager;
struct IDirect3DDevice9 *device;
- struct ID3DXEffectPool *pool;
+ struct d3dx_effect_pool *pool;
struct d3dx_technique *active_technique;
struct d3dx_pass *active_pass;
BOOL started;
@@ -707,7 +706,7 @@ static void d3dx_effect_cleanup(struct d3dx_effect *effect)
}
if (effect->pool)
- effect->pool->lpVtbl->Release(effect->pool);
+ effect->pool->ID3DXEffectPool_iface.lpVtbl->Release(&effect->pool->ID3DXEffectPool_iface);
if (effect->manager)
IUnknown_Release(effect->manager);
@@ -1124,7 +1123,7 @@ static BOOL walk_parameter_tree(struct d3dx_parameter *param, walk_parameter_dep
static ULONG64 *get_version_counter_ptr(struct d3dx_effect *effect)
{
- return effect->base_effect.pool ? &effect->base_effect.pool->version_counter : &effect->base_effect.version_counter;
+ return effect->pool ? &effect->pool->version_counter : &effect->base_effect.version_counter;
}
static ULONG64 next_effect_update_version(struct d3dx_effect *effect)
@@ -3535,7 +3534,7 @@ static HRESULT WINAPI d3dx_effect_GetPool(ID3DXEffect *iface, ID3DXEffectPool **
if (effect->pool)
{
- *pool = effect->pool;
+ *pool = &effect->pool->ID3DXEffectPool_iface;
(*pool)->lpVtbl->AddRef(*pool);
}
else
@@ -5939,7 +5938,6 @@ static BOOL param_set_top_level_param(void *top_level_param, struct d3dx_paramet
static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, UINT data_size,
DWORD start, const char **skip_constants, unsigned int skip_constants_count)
{
- struct d3dx9_base_effect *base = &effect->base_effect;
const char *ptr = data + start;
UINT stringcount, resourcecount;
HRESULT hr;
@@ -6049,7 +6047,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U
for (i = 0; i < effect->parameter_count; ++i)
{
- if (FAILED(hr = d3dx_pool_sync_shared_parameter(base->pool, &effect->parameters[i])))
+ if (FAILED(hr = d3dx_pool_sync_shared_parameter(effect->pool, &effect->parameters[i])))
goto err_out;
effect->parameters[i].version_counter = get_version_counter_ptr(effect);
set_dirty(&effect->parameters[i].param);
@@ -6155,7 +6153,6 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev
#endif
struct d3dx9_base_effect *base = &effect->base_effect;
ID3DBlob *bytecode = NULL, *temp_errors = NULL;
- struct d3dx_effect_pool *pool_impl = NULL;
unsigned int skip_constants_count = 0;
char *skip_constants_buffer = NULL;
const char **skip_constants = NULL;
@@ -6175,15 +6172,13 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev
if (pool)
{
pool->lpVtbl->AddRef(pool);
- pool_impl = impl_from_ID3DXEffectPool(pool);
+ effect->pool = impl_from_ID3DXEffectPool(pool);
}
- effect->pool = pool;
IDirect3DDevice9_AddRef(device);
effect->device = device;
base->effect = effect;
- base->pool = pool_impl;
base->flags = eflags;
read_dword(&ptr, &tag);
--
2.20.1