d3dx9: Pass a struct d3dx_effect to the version helpers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
956b30dbf3
commit
f9351bae3e
|
@ -1143,14 +1143,14 @@ static BOOL walk_parameter_tree(struct d3dx_parameter *param, walk_parameter_dep
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static ULONG64 *get_version_counter_ptr(struct d3dx9_base_effect *base)
|
||||
static ULONG64 *get_version_counter_ptr(struct d3dx_effect *effect)
|
||||
{
|
||||
return base->pool ? &base->pool->version_counter : &base->version_counter;
|
||||
return effect->base_effect.pool ? &effect->base_effect.pool->version_counter : &effect->base_effect.version_counter;
|
||||
}
|
||||
|
||||
static ULONG64 next_effect_update_version(struct d3dx9_base_effect *base)
|
||||
static ULONG64 next_effect_update_version(struct d3dx_effect *effect)
|
||||
{
|
||||
return next_update_version(get_version_counter_ptr(base));
|
||||
return next_update_version(get_version_counter_ptr(effect));
|
||||
}
|
||||
|
||||
static void set_dirty(struct d3dx_parameter *param)
|
||||
|
@ -1577,7 +1577,7 @@ static HRESULT d3dx9_apply_pass_states(struct d3dx_effect *effect, struct d3dx_p
|
|||
unsigned int i;
|
||||
HRESULT ret;
|
||||
HRESULT hr;
|
||||
ULONG64 new_update_version = next_effect_update_version(&effect->base_effect);
|
||||
ULONG64 new_update_version = next_effect_update_version(effect);
|
||||
|
||||
TRACE("effect %p, pass %p, state_count %u.\n", effect, pass, pass->state_count);
|
||||
|
||||
|
@ -5745,7 +5745,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx
|
|||
FIXME("Unaligned string_size %u.\n", string_size);
|
||||
if (FAILED(ret = d3dx_create_param_eval(base, (DWORD *)(ptr + string_size) + 1,
|
||||
object->size - (string_size + sizeof(DWORD)), D3DXPT_INT, ¶m->param_eval,
|
||||
get_version_counter_ptr(base), NULL, 0)))
|
||||
get_version_counter_ptr(effect), NULL, 0)))
|
||||
return ret;
|
||||
ret = D3D_OK;
|
||||
param = state->referenced_param;
|
||||
|
@ -5765,7 +5765,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx
|
|||
TRACE("Creating preshader for object %u.\n", param->members[i].object_id);
|
||||
object = &effect->objects[param->members[i].object_id];
|
||||
if (FAILED(ret = d3dx_create_param_eval(base, object->data, object->size, param->type,
|
||||
¶m->members[i].param_eval, get_version_counter_ptr(base),
|
||||
¶m->members[i].param_eval, get_version_counter_ptr(effect),
|
||||
skip_constants, skip_constants_count)))
|
||||
break;
|
||||
}
|
||||
|
@ -5884,7 +5884,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
|||
if (FAILED(hr = d3dx9_create_object(base, object)))
|
||||
return hr;
|
||||
if (FAILED(hr = d3dx_create_param_eval(base, object->data, object->size, param->type,
|
||||
¶m->param_eval, get_version_counter_ptr(base),
|
||||
¶m->param_eval, get_version_counter_ptr(effect),
|
||||
skip_constants, skip_constants_count)))
|
||||
return hr;
|
||||
}
|
||||
|
@ -5898,7 +5898,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
|||
if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr)))
|
||||
return hr;
|
||||
if (FAILED(hr = d3dx_create_param_eval(base, object->data, object->size, param->type,
|
||||
¶m->param_eval, get_version_counter_ptr(base), NULL, 0)))
|
||||
¶m->param_eval, get_version_counter_ptr(effect), NULL, 0)))
|
||||
return hr;
|
||||
break;
|
||||
|
||||
|
@ -5927,7 +5927,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data,
|
|||
if (!refpar->param_eval)
|
||||
{
|
||||
if (FAILED(hr = d3dx_create_param_eval(base, refobj->data, refobj->size,
|
||||
refpar->type, &refpar->param_eval, get_version_counter_ptr(base),
|
||||
refpar->type, &refpar->param_eval, get_version_counter_ptr(effect),
|
||||
skip_constants, skip_constants_count)))
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue