[PATCH v2 5/5] d3d9/tests: Add Fetch4 tests

Stefan Dösinger stefandoesinger at gmail.com
Thu Nov 22 09:00:46 CST 2018


Hi,

Can you add a test showing that FETCH4 is disabled when the bound
texture is not a single-channel texture? I sense that there might be
applications that enable FETCH4 and then "forget" to disable it when
they render from an ARGB texture.

A test for DF16 and DF24 would be great as well, but it doesn't belong
in this patch and should be a separate one. It's probably best to extend
intz_test.

> +    if (caps.TextureCaps & D3DPTEXTURECAPS_POW2)
> +    {
> +        skip("No unconditional NP2 texture support, skipping FETCH4 test.\n");
> +        IDirect3DDevice9_Release(device);
> +        goto done;
> +    }
Do you still need this?

> +    hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
> +    ok(SUCCEEDED(hr), "SetSamplerState failed, hr %#x.\n", hr);
> +    hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
> +    ok(SUCCEEDED(hr), "SetSamplerState failed, hr %#x.\n", hr);
> +    hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
> +    ok(SUCCEEDED(hr), "SetSamplerState failed, hr %#x.\n", hr);
This contradicts AMD's description, but I assume you placed them here to
show that their docs are wrong and FETCH4 is used regardless of the
filter. I think a comment would be useful.




More information about the wine-devel mailing list