[PATCH 4/8] d3dx9: Fix IsParameterUsed() for the case when state references child parameter.

Paul Gofman gofmanp at gmail.com
Thu Apr 20 06:26:46 CDT 2017


Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
 dlls/d3dx9_36/effect.c       | 1 +
 dlls/d3dx9_36/tests/effect.c | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index af0b0de..4668df0 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -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;
 
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 659c861..a4239d1 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -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 TRUE.\n");
 
-    todo_wine
     ok(effect3->lpVtbl->IsParameterUsed(effect3, "vs_arr2", "tech0"),
             "Unexpected IsParameterUsed result FALSE.\n");
-    todo_wine
     ok(!effect3->lpVtbl->IsParameterUsed(effect3, "vs_arr2[0]", "tech0"),
             "Unexpected IsParameterUsed result FALSE.\n");
-    todo_wine
     ok(!effect3->lpVtbl->IsParameterUsed(effect3, "vs_arr2[1]", "tech0"),
             "Unexpected IsParameterUsed result TRUE.\n");
 
-- 
2.9.3




More information about the wine-patches mailing list