[PATCH 4/9] d3dx9/tests: Add test for D3DXFX_LARGEADDRESSAWARE effect creation flag.

Matteo Bruni matteo.mystral at gmail.com
Thu Apr 27 17:29:57 CDT 2017


2017-04-27 13:05 GMT+02:00 Paul Gofman <gofmanp at gmail.com>:
> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
> ---
>  dlls/d3dx9_36/tests/effect.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
> index 997c1fc..a58352e 100644
> --- a/dlls/d3dx9_36/tests/effect.c
> +++ b/dlls/d3dx9_36/tests/effect.c
> @@ -5743,6 +5743,30 @@ static void test_cross_effect_handle(IDirect3DDevice9 *device)
>
>      effect2->lpVtbl->Release(effect2);
>      effect1->lpVtbl->Release(effect1);
> +
> +    hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob),
> +            NULL, NULL, D3DXFX_LARGEADDRESSAWARE, NULL, &effect1, NULL);
> +    ok(hr == D3D_OK, "Got result %#x.\n", hr);
> +
> +    param1 = effect1->lpVtbl->GetParameterByName(effect1, NULL, "g_iVect");
> +    ok(!!param1, "GetParameterByName failed.\n");
> +
> +    hr = effect1->lpVtbl->SetValue(effect1, param1, expected_ivect, sizeof(expected_ivect));
> +    ok(hr == D3D_OK, "Got result %#x.\n", hr);
> +
> +    hr = effect1->lpVtbl->GetValue(effect1, param1, ivect, sizeof(ivect));
> +    ok(hr == D3D_OK, "Got result %#x.\n", hr);
> +
> +    ok(!memcmp(ivect, expected_ivect, sizeof(expected_ivect)), "Vector value mismatch.\n");
> +
> +    if (0)
> +    {
> +        /* Native d3dx crashes in GetValue(). */
> +        hr = effect1->lpVtbl->GetValue(effect1, "g_iVect", ivect, sizeof(ivect));
> +        ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
> +    }
> +
> +    effect1->lpVtbl->Release(effect1);
>  }

The test is okay but it doesn't feel right to put it in
test_cross_effect_handle(). Probably just make a separate function.



More information about the wine-devel mailing list