d3d10/effect: Forward to pool effect in GetVariableByName().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-09-21 08:22:15 +03:00 committed by Alexandre Julliard
parent 3ee036245b
commit 23c6e537c2
2 changed files with 11 additions and 11 deletions

View file

@ -3258,7 +3258,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableByName(ID3D10Effect *iface,
const char *name)
{
struct d3d10_effect *This = impl_from_ID3D10Effect(iface);
struct d3d10_effect *effect = impl_from_ID3D10Effect(iface);
unsigned int i;
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
@ -3269,9 +3269,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
return &null_variable.ID3D10EffectVariable_iface;
}
for (i = 0; i < This->local_buffer_count; ++i)
for (i = 0; i < effect->local_buffer_count; ++i)
{
struct d3d10_effect_variable *l = &This->local_buffers[i];
struct d3d10_effect_variable *l = &effect->local_buffers[i];
unsigned int j;
for (j = 0; j < l->type->member_count; ++j)
@ -3286,9 +3286,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
}
}
for (i = 0; i < This->local_variable_count; ++i)
for (i = 0; i < effect->local_variable_count; ++i)
{
struct d3d10_effect_variable *v = &This->local_variables[i];
struct d3d10_effect_variable *v = &effect->local_variables[i];
if (v->name && !strcmp(v->name, name))
{
@ -3297,6 +3297,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
}
}
if (effect->pool)
return effect->pool->lpVtbl->GetVariableByName(effect->pool, name);
WARN("Invalid name specified\n");
return &null_variable.ID3D10EffectVariable_iface;

View file

@ -6671,13 +6671,10 @@ todo_wine
v = child_effect->lpVtbl->GetVariableByName(child_effect, "s_texture");
hr = v->lpVtbl->GetDesc(v, &var_desc);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
ok(!strcmp(var_desc.Name, "s_texture"), "Unexpected name %s.\n", var_desc.Name);
ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
}
ok(!strcmp(var_desc.Name, "s_texture"), "Unexpected name %s.\n", var_desc.Name);
todo_wine
ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
v = child_effect->lpVtbl->GetVariableBySemantic(child_effect, "COLOR0");
hr = v->lpVtbl->GetDesc(v, &var_desc);