Commit 19517f86 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent d3b18bea
...@@ -3312,7 +3312,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB ...@@ -3312,7 +3312,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface, static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface,
const char *semantic) const char *semantic)
{ {
struct d3d10_effect *This = impl_from_ID3D10Effect(iface); struct d3d10_effect *effect = impl_from_ID3D10Effect(iface);
unsigned int i; unsigned int i;
TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic)); TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic));
...@@ -3323,9 +3323,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB ...@@ -3323,9 +3323,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
return &null_variable.ID3D10EffectVariable_iface; 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; unsigned int j;
for (j = 0; j < l->type->member_count; ++j) for (j = 0; j < l->type->member_count; ++j)
...@@ -3340,9 +3340,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB ...@@ -3340,9 +3340,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->semantic && !stricmp(v->semantic, semantic)) if (v->semantic && !stricmp(v->semantic, semantic))
{ {
...@@ -3351,6 +3351,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB ...@@ -3351,6 +3351,9 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
} }
} }
if (effect->pool)
return effect->pool->lpVtbl->GetVariableBySemantic(effect->pool, semantic);
WARN("Invalid semantic specified\n"); WARN("Invalid semantic specified\n");
return &null_variable.ID3D10EffectVariable_iface; return &null_variable.ID3D10EffectVariable_iface;
......
...@@ -6675,13 +6675,10 @@ todo_wine ...@@ -6675,13 +6675,10 @@ todo_wine
v = child_effect->lpVtbl->GetVariableBySemantic(child_effect, "COLOR1"); v = child_effect->lpVtbl->GetVariableBySemantic(child_effect, "COLOR1");
hr = v->lpVtbl->GetDesc(v, &var_desc); hr = v->lpVtbl->GetDesc(v, &var_desc);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr)) ok(!strcmp(var_desc.Name, "f2"), "Unexpected name %s.\n", var_desc.Name);
{ todo_wine
ok(!strcmp(var_desc.Name, "f2"), "Unexpected name %s.\n", var_desc.Name); ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
}
child_effect->lpVtbl->Release(child_effect); child_effect->lpVtbl->Release(child_effect);
......
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