d3dx9: Fix IsParameterUsed() for the case when state references child parameter.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2017-04-24 14:36:48 +03:00 committed by Alexandre Julliard
parent 2be74048d6
commit 1bd3cc24af
2 changed files with 2 additions and 3 deletions

View File

@ -3728,6 +3728,7 @@ static BOOL walk_parameter_dep(struct d3dx_parameter *param, walk_parameter_dep_
unsigned int i;
unsigned int member_count;
param = param->top_level_param;
if (param_func(data, param))
return TRUE;

View File

@ -5949,16 +5949,14 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
param = effect1->lpVtbl->GetParameterByName(effect1, NULL, "vs_arr2");
ok(!!param, "GetParameterByName failed.\n");
todo_wine
ok(!effect3->lpVtbl->IsParameterUsed(effect3, param, "tech0"),
"Unexpected IsParameterUsed result.\n");
todo_wine
ok(effect3->lpVtbl->IsParameterUsed(effect3, "vs_arr2", "tech0"),
"Unexpected IsParameterUsed result.\n");
todo_wine
ok(!effect3->lpVtbl->IsParameterUsed(effect3, "vs_arr2[0]", "tech0"),
"Unexpected IsParameterUsed result.\n");
todo_wine
ok(!effect3->lpVtbl->IsParameterUsed(effect3, "vs_arr2[1]", "tech0"),
"Unexpected IsParameterUsed result.\n");