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

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:
Nikolay Sivov 2021-09-03 12:30:05 +03:00 committed by Alexandre Julliard
parent af20f75f7c
commit e8843de0f9
2 changed files with 7 additions and 1 deletions

View File

@ -4109,7 +4109,7 @@ static struct ID3D10EffectVariable * STDMETHODCALLTYPE d3d10_effect_variable_Get
{
struct d3d10_effect_variable *m = &This->members[i];
if (m->semantic && !strcmp(m->semantic, semantic))
if (m->semantic && !stricmp(m->semantic, semantic))
{
TRACE("Returning member %p\n", m);
return &m->ID3D10EffectVariable_iface;

View File

@ -651,6 +651,9 @@ static void test_effect_variable_member(void)
variable = variable2->lpVtbl->GetMemberBySemantic(variable2, "SV_POSITION");
ok(variable == variable3, "GetMemberBySemantic got %p, expected %p\n", variable, variable3);
variable = variable2->lpVtbl->GetMemberBySemantic(variable2, "sv_POSITION");
ok(variable == variable3, "GetMemberBySemantic got %p, expected %p\n", variable, variable3);
variable = variable2->lpVtbl->GetMemberByIndex(variable2, 0);
ok(variable == variable3, "GetMemberByIndex got %p, expected %p\n", variable, variable3);
@ -668,6 +671,9 @@ static void test_effect_variable_member(void)
variable = variable2->lpVtbl->GetMemberBySemantic(variable2, "COLOR0");
ok(variable == variable3, "GetMemberBySemantic got %p, expected %p\n", variable, variable3);
variable = variable2->lpVtbl->GetMemberBySemantic(variable2, "color0");
ok(variable == variable3, "GetMemberBySemantic got %p, expected %p\n", variable, variable3);
variable = variable2->lpVtbl->GetMemberByIndex(variable2, 1);
ok(variable == variable3, "GetMemberByIndex got %p, expected %p\n", variable, variable3);