Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 13 ++++++++----- dlls/d3d10/tests/effect.c | 9 +++------ 2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 672cbae3920..623183311f2 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -3312,7 +3312,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableBySemantic(ID3D10Effect *iface, const char *semantic) { - struct d3d10_effect *This = impl_from_ID3D10Effect(iface); + struct d3d10_effect *effect = impl_from_ID3D10Effect(iface); unsigned int i;
TRACE("iface %p, semantic %s\n", iface, debugstr_a(semantic)); @@ -3323,9 +3323,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) @@ -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)) { @@ -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");
return &null_variable.ID3D10EffectVariable_iface; diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 31edd4a1c48..1dfd420ae36 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -6675,13 +6675,10 @@ todo_wine
v = child_effect->lpVtbl->GetVariableBySemantic(child_effect, "COLOR1"); 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, "f2"), "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, "f2"), "Unexpected name %s.\n", var_desc.Name); +todo_wine + ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_POOLED, "Unexpected flags %#x.\n", var_desc.Flags);
child_effect->lpVtbl->Release(child_effect);