Commit bc655a40 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3dx9/tests: Add more tests for IsParameterUsed() function.

parent 7b93124e
...@@ -5937,6 +5937,34 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) ...@@ -5937,6 +5937,34 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
effect3->lpVtbl->GetFloat(effect3, param, &fvect.x); effect3->lpVtbl->GetFloat(effect3, param, &fvect.x);
ok(fvect.x == 0.0f, "Unexpected parameter value %g.\n", 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); hr = effect3->lpVtbl->Begin(effect3, &passes_count, 0);
ok(hr == D3D_OK, "Got result %#x.\n", hr); ok(hr == D3D_OK, "Got result %#x.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment