[v2 3/6] d3dx9: Fix IsParameterUsed() for the case when state references child parameter.

Paul Gofman gofmanp at gmail.com
Mon Apr 24 06:36:48 CDT 2017


Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
v2:
    no changes.
---
 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 8861a05..1fd99832 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 fdbc579..9a436d5 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.\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");
 
-- 
2.9.3




More information about the wine-patches mailing list