Commit 23c6e537 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 3ee03624
......@@ -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;
......
......@@ -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);
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment