d3d10/effect: Use case-insensitive comparison in GetVariableBySemantic().
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:
parent
3b074fa3be
commit
a32a495012
|
@ -3322,7 +3322,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
|
|||
{
|
||||
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);
|
||||
return &v->ID3D10EffectVariable_iface;
|
||||
|
@ -3334,7 +3334,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_GetVariableB
|
|||
{
|
||||
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);
|
||||
return &v->ID3D10EffectVariable_iface;
|
||||
|
|
|
@ -3850,6 +3850,9 @@ static void test_effect_get_variable_by(void)
|
|||
variable = effect->lpVtbl->GetVariableBySemantic(effect, "SV_POSITION");
|
||||
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_by_index = effect->lpVtbl->GetVariableByIndex(effect, 1);
|
||||
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)
|
|||
variable = effect->lpVtbl->GetVariableBySemantic(effect, "COLOR0");
|
||||
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_by_index = effect->lpVtbl->GetVariableByIndex(effect, 2);
|
||||
ok(null_variable != variable_by_index, "GetVariableByIndex failed %p\n", variable_by_index);
|
||||
|
|
Loading…
Reference in New Issue