tests/shader_runner: Correct the minification filter and mipmap mode calculations.

This commit is contained in:
Shaun Ren
2025-08-23 02:15:43 -04:00
committed by Henri Verbeet
parent d6bed4be37
commit f6cebdb26d
Notes: Henri Verbeet 2025-09-03 13:09:54 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1698
4 changed files with 11 additions and 9 deletions

View File

@@ -540,13 +540,13 @@ static bool d3d9_runner_draw(struct shader_runner *r,
ok(hr == D3D_OK, "Failed to set sampler state, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, sampler->slot, D3DSAMP_MINFILTER,
(sampler->filter & 0x1) ? D3DTEXF_LINEAR : D3DTEXF_POINT);
(sampler->filter & 0x10) ? D3DTEXF_LINEAR : D3DTEXF_POINT);
ok(hr == D3D_OK, "Failed to set sampler state, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, sampler->slot, D3DSAMP_MAGFILTER,
(sampler->filter & 0x4) ? D3DTEXF_LINEAR : D3DTEXF_POINT);
ok(hr == D3D_OK, "Failed to set sampler state, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, sampler->slot, D3DSAMP_MIPFILTER,
(sampler->filter & 0x10) ? D3DTEXF_LINEAR : D3DTEXF_POINT);
(sampler->filter & 0x1) ? D3DTEXF_LINEAR : D3DTEXF_POINT);
ok(hr == D3D_OK, "Failed to set sampler state, hr %#lx.\n", hr);
}