Commit a32a4950 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Use case-insensitive comparison in GetVariableBySemantic().

parent 3b074fa3
...@@ -3322,7 +3322,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB ...@@ -3322,7 +3322,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
{ {
struct d3d10_effect_variable *v = &l->members[j]; struct d3d10_effect_variable *v = &l->members[j];
if (v->semantic && !strcmp(v->semantic, semantic)) if (v->semantic && !stricmp(v->semantic, semantic))
{ {
TRACE("Returning variable %p.\n", v); TRACE("Returning variable %p.\n", v);
return &v->ID3D10EffectVariable_iface; return &v->ID3D10EffectVariable_iface;
...@@ -3334,7 +3334,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB ...@@ -3334,7 +3334,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
{ {
struct d3d10_effect_variable *v = &This->local_variables[i]; struct d3d10_effect_variable *v = &This->local_variables[i];
if (v->semantic && !strcmp(v->semantic, semantic)) if (v->semantic && !stricmp(v->semantic, semantic))
{ {
TRACE("Returning variable %p.\n", v); TRACE("Returning variable %p.\n", v);
return &v->ID3D10EffectVariable_iface; return &v->ID3D10EffectVariable_iface;
......
...@@ -3850,6 +3850,9 @@ static void test_effect_get_variable_by(void) ...@@ -3850,6 +3850,9 @@ static void test_effect_get_variable_by(void)
variable = effect->lpVtbl->GetVariableBySemantic(effect, "SV_POSITION"); variable = effect->lpVtbl->GetVariableBySemantic(effect, "SV_POSITION");
ok(variable_by_index == variable, "GetVariableBySemantic got %p, expected %p\n", variable, variable_by_index); ok(variable_by_index == variable, "GetVariableBySemantic got %p, expected %p\n", variable, variable_by_index);
variable = effect->lpVtbl->GetVariableBySemantic(effect, "sv_POSITION");
ok(variable_by_index == variable, "GetVariableBySemantic got %p, expected %p\n", variable, variable_by_index);
/* variable f2 */ /* variable f2 */
variable_by_index = effect->lpVtbl->GetVariableByIndex(effect, 1); variable_by_index = effect->lpVtbl->GetVariableByIndex(effect, 1);
ok(null_variable != variable_by_index, "GetVariableByIndex failed %p\n", variable_by_index); ok(null_variable != variable_by_index, "GetVariableByIndex failed %p\n", variable_by_index);
...@@ -3860,6 +3863,9 @@ static void test_effect_get_variable_by(void) ...@@ -3860,6 +3863,9 @@ static void test_effect_get_variable_by(void)
variable = effect->lpVtbl->GetVariableBySemantic(effect, "COLOR0"); variable = effect->lpVtbl->GetVariableBySemantic(effect, "COLOR0");
ok(variable_by_index == variable, "GetVariableBySemantic got %p, expected %p\n", variable, variable_by_index); ok(variable_by_index == variable, "GetVariableBySemantic got %p, expected %p\n", variable, variable_by_index);
variable = effect->lpVtbl->GetVariableBySemantic(effect, "color0");
ok(variable_by_index == variable, "GetVariableBySemantic got %p, expected %p\n", variable, variable_by_index);
/* variable f3 */ /* variable f3 */
variable_by_index = effect->lpVtbl->GetVariableByIndex(effect, 2); variable_by_index = effect->lpVtbl->GetVariableByIndex(effect, 2);
ok(null_variable != variable_by_index, "GetVariableByIndex failed %p\n", variable_by_index); ok(null_variable != variable_by_index, "GetVariableByIndex failed %p\n", variable_by_index);
......
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