Module: wine Branch: master Commit: 7a2b34c32492680d32d52a6dde64418f14aa51d0 URL: https://gitlab.winehq.org/wine/wine/-/commit/7a2b34c32492680d32d52a6dde64418...
Author: Sebastian Mayr me@sam.st Date: Wed May 17 18:20:19 2023 +0200
wined3d: Improve d3d8 compatibility of texture filters.
In d3d8, setting texture filters to invalid values does not yield an error when calling IDirect3DDevice8::ValidateDevice. Some applications, such as Worms Blast, rely on this behaviour.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54898
---
dlls/d3d8/device.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 3727ad3e4eb..5cf22b08f79 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2409,6 +2409,15 @@ static HRESULT WINAPI d3d8_device_ValidateDevice(IDirect3DDevice8 *iface, DWORD hr = wined3d_device_validate_device(device->wined3d_device, pass_count); wined3d_mutex_unlock();
+ /* In d3d8, texture filters are not validated, so errors concerning + * unsupported ones are ignored here. */ + if (hr == WINED3DERR_UNSUPPORTEDTEXTUREFILTER) + { + WARN("Ignoring invalid texture filter settings.\n"); + *pass_count = 1; + return D3D_OK; + } + return hr; }