From bc655a40ec6c77c48347aef9e9f508f53ea7bcf8 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 24 Apr 2017 14:36:46 +0300 Subject: [PATCH] d3dx9/tests: Add more tests for IsParameterUsed() function. Signed-off-by: Paul Gofman Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dx9_36/tests/effect.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index b1f7f3ef265..fdbc57987fa 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -5937,6 +5937,34 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) effect3->lpVtbl->GetFloat(effect3, param, &fvect.x); ok(fvect.x == 0.0f, "Unexpected parameter value %g.\n", fvect.x); + param = effect1->lpVtbl->GetParameterByName(effect1, NULL, "arr2"); + ok(!!param, "GetParameterByName failed.\n"); + ok(!effect3->lpVtbl->IsParameterUsed(effect3, param, "tech0"), + "Unexpected IsParameterUsed result.\n"); + + param = effect3->lpVtbl->GetParameterByName(effect3, NULL, "arr2"); + ok(!!param, "GetParameterByName failed.\n"); + ok(effect3->lpVtbl->IsParameterUsed(effect3, param, "tech0"), + "Unexpected IsParameterUsed result.\n"); + + param = effect1->lpVtbl->GetParameterByName(effect1, NULL, "vs_arr2"); + ok(!!param, "GetParameterByName failed.\n"); + 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"); + + ok(effect1->lpVtbl->IsParameterUsed(effect1, param, "tech0"), + "Unexpected IsParameterUsed result.\n"); + hr = effect3->lpVtbl->Begin(effect3, &passes_count, 0); ok(hr == D3D_OK, "Got result %#x.\n", hr);