https://bugs.winehq.org/show_bug.cgi?id=57312
Bug ID: 57312 Summary: Rebuild 3: Broken texture filtering Product: Wine Version: 9.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: d3d Assignee: wine-bugs@winehq.org Reporter: doucha@swarmtech.cz Distribution: ---
Created attachment 77260 --> https://bugs.winehq.org/attachment.cgi?id=77260 Rebuild 3 running in WINE 9.18 (no texture filtering)
I've just updated from WINE 9.12 to WINE 9.18 and texture filtering no longer works in Rebuild 3 (GOG version). https://appdb.winehq.org/objectManager.php?sClass=version&iId=36078 https://www.gog.com/en/game/rebuild_3_gangs_of_deadsville
Instead of smooth graphics in v9.12, the game is now pixelated and fonts are barely legible (see attached screenshot).
My system is Gentoo Linux running on x86_64 AMD CPU with AMD Renoir GPU.
I can reproduce the same issue in the latest git master. I'm currently bisecting WINE to find the breaking commit.
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #1 from next_ghost doucha@swarmtech.cz --- Created attachment 77261 --> https://bugs.winehq.org/attachment.cgi?id=77261 Rebuild 3 running in WINE 9.12 (working texture filtering)
This is what Rebuild 3 is supposed to look like. Screenshot taken by switching back to WINE 9.12 and loading the exact same saved game with the exact same game settings as the v9.18 screenshot.
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #2 from next_ghost doucha@swarmtech.cz --- Created attachment 77262 --> https://bugs.winehq.org/attachment.cgi?id=77262 Rebuild 3 running in WINE git-5bebb241 (broken scaling)
It appears that there are two separate commits causing this issue: 1) Image scaling to full screen broke in commit 5bebb24108954f763acb36175fff99e159f7536c. The game was rendered at the original window size and the rest of the screen was black. See attached screenshot. However, mouse input was scaled correctly so the visual position of in-game buttons did not match their actual active zone. 2) Scaling to full screen was restored in commit 2461297e38a8dda89fdf7f6dc61d9edd99a45d4c but without texture filtering.
Note: All 3 screenshots have been taken with emulated virtual desktop. I've cropped the WINE window title and outline from the first two screenshots because at first I didn't think this setting might matter.
https://bugs.winehq.org/show_bug.cgi?id=57312
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |rebernon@codeweavers.com Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=57312
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|rebernon@codeweavers.com |
https://bugs.winehq.org/show_bug.cgi?id=57312
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |5bebb24108954f763acb36175ff | |f99e159f7536c CC| |rbernon@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #3 from next_ghost doucha@swarmtech.cz --- The same issue also affects Epic Battle Fantasy 3 (and likely any other Flash game) which can be downloaded here: https://kupo-games.itch.io/epic-battle-fantasy-3
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- Thanks for the report, I haven't looked at it yet but could you confirm whether you use the default 96 DPI setting in winecfg or something larger? I'm a bit surprised it takes the DPI scaling path with the default setting.
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #5 from next_ghost doucha@swarmtech.cz --- I've set DPI to 120 in winecfg because I'm using a 15" laptop with 1080p native screen resolution. Fonts would be unreadable with 96 DPI.
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #6 from Rémi Bernon rbernon@codeweavers.com --- I see, I've have some plan to improve XRender DPI scaling, but you can also try the new AppCompat flag support that's been added for bug 57175.
https://bugs.winehq.org/show_bug.cgi?id=57175#c36 shows how to configure it to force every application to be HiDPI aware (and get the old Wine behavior back), but you can also configure it per-application. The flag is compatible with the one that exists on Windows, documented here: https://ss64.com/nt/syntax-compatibility.html.
https://bugs.winehq.org/show_bug.cgi?id=57312
--- Comment #7 from next_ghost doucha@swarmtech.cz --- Hmm, I've tried running Rebuild 3 with WINDEBUG=+d3d and it looks like WINE uses incorrect draw buffer size in HiDPI mode. The is WINE 9.18 with DPI=96:
0024:trace:d3d:wined3d_output_get_display_mode Returning 1280x960@60 WINED3DFMT_B8G8R8X8_UNORM 0x1. 0024:trace:d3d:wined3d_swapchain_state_init Client rect (0,0)-(1280,960). 0024:trace:d3d:wined3d_swapchain_init Creating front buffer. 0024:trace:d3d:wined3d_texture_create device 0121FA88, desc 0031D530, layer_count 1, level_count 1, flags 0, data 00000000, parent 00000000, parent_ops 1F036164, texture 0123F218. 0024:trace:d3d:adapter_gl_create_texture device 0121FA88, desc 0031D530, layer_count 1, level_count 1, flags 0, parent 00000000, parent_ops 1F036164, texture 0123F218. 0024:trace:d3d:wined3d_texture_gl_init texture_gl 0124E308, device 0121FA88, desc 0031D530, layer_count 1, level_count 1, flags 0, parent 00000000, parent_ops 1F036164. 0024:trace:d3d:wined3d_texture_init texture 0124E308, resource_type WINED3D_RTYPE_TEXTURE_2D, format WINED3DFMT_B8G8R8X8_UNORM, multisample_type 0, multisample_quality 0, usage 0, bind_flags 0, access WINED3D_RESOURCE_ACCESS_GPU, width 1280, height 960, depth 1, layer_count 1, level_count 1, flags 0, device 0121FA88, parent 00000000, parent_ops 1F036164, sub_resources 0124E4DC, texture_ops 1F057D60.
And this is with DPI=120: 0024:trace:d3d:wined3d_output_get_display_mode Returning 1280x960@60 WINED3DFMT_B8G8R8X8_UNORM 0x1. 0024:trace:d3d:wined3d_swapchain_state_init Client rect (0,0)-(1136,640). 0024:trace:d3d:wined3d_swapchain_init Creating front buffer. 0024:trace:d3d:wined3d_texture_create device 0121FA88, desc 0031CF50, layer_count 1, level_count 1, flags 0, data 00000000, parent 00000000, parent_ops 1F036164, texture 0123F218. 0024:trace:d3d:adapter_gl_create_texture device 0121FA88, desc 0031CF50, layer_count 1, level_count 1, flags 0, parent 00000000, parent_ops 1F036164, texture 0123F218. 0024:trace:d3d:wined3d_texture_gl_init texture_gl 0123DBE8, device 0121FA88, desc 0031CF50, layer_count 1, level_count 1, flags 0, parent 00000000, parent_ops 1F036164. 0024:trace:d3d:wined3d_texture_init texture 0123DBE8, resource_type WINED3D_RTYPE_TEXTURE_2D, format WINED3DFMT_B8G8R8X8_UNORM, multisample_type 0, multisample_quality 0, usage 0, bind_flags 0, access WINED3D_RESOURCE_ACCESS_GPU, width 1136, height 640, depth 1, layer_count 1, level_count 1, flags 0, device 0121FA88, parent 00000000, parent_ops 1F036164, sub_resources 0123DDBC, texture_ops 1F057D60.
While wined3d_output_get_display_mode correctly returns 1280x960 in both cases, the swapchain buffer is created with different sizes: - 96 DPI: swapchain buffer size is 1280x960 (correct) - 120 DPI: swapchain buffer size is 1136x640