[Bug 43246] New: King's Bounty: The Legend suffers from performance issues
https://bugs.winehq.org/show_bug.cgi?id=43246 Bug ID: 43246 Summary: King's Bounty: The Legend suffers from performance issues Product: Wine Version: 2.1 Hardware: x86 URL: https://www.fileplanet.com/191666/190000/fileinfo/King 's-Bounty:-The-Legend-Updated-Demo OS: Linux Status: NEW Keywords: download, regression Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs(a)winehq.org Reporter: gyebro69(a)gmail.com CC: hverbeet(a)gmail.com Regression SHA1: 15d53761a5fbfc12fc5f9974c029dace00eab33d Distribution: --- Created attachment 58554 --> https://bugs.winehq.org/attachment.cgi?id=58554 terminal output The game runs much slower than it used to: animations, character and mouse movement are way too slow. Reproduced the issue with nouveau/mesa 17.1.3 and nvidia binary drivers 381.22. Disabling anti-aliasing and lowering detail level to the minimum doesn't help. According to my testing the commit which caused the slowdown is commit 15d53761a5fbfc12fc5f9974c029dace00eab33d Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jan 31 15:47:10 2017 +0100 wined3d: Do not pin system memory in wined3d_buffer_load_location(). Maybe a duplicate of bug #42588, although the symptoms are different. With the previous commit the game runs much smoothly. For comparison, in Wine 2.11 I'm getting only 4-5 fps when using nvidia 381.22. Before the regression Wine gave me 32-36 fps. Steps to reproduce the issue with the demo: 1. download and install the demo, install native d3dx9_33.dll before launching the game. 2. in the main menu start a new game, click <Next> on the character selection screen, press <Skip>. You are in a training chamber: run around in the room, rotate the camera using the right mouse button and observe how sluggish the game is. You can save the game here so you can reproduce the issue more easily the next time you enter the game. KingsBounty_TheLegend_Demo2.exe (682 MB) sha1: 7b60066a63cd4ee8a242347ebc1802a60453d9b2 Wine 2.11 OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GT 730/PCIe/SSE2 OpenGL core profile version string: 4.5.0 NVIDIA 381.22 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #1 from Béla Gyebrószki <gyebro69(a)gmail.com> --- Would like to add that enabling CSMT makes things worse in the game: loading times are terrible, in the main menu when you click on a button it takes 5-10 seconds to activate. In-game performance is worse than without CSMT. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |performance -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #2 from Henri Verbeet <hverbeet(a)gmail.com> --- Created attachment 58717 --> https://bugs.winehq.org/attachment.cgi?id=58717 hack The issue seems to be that the application uses buffers without D3DUSAGE_DYNAMIC as if they're dynamic. The attached hack fixes the performance for me, but doesn't strike me as correct. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #3 from Béla Gyebrószki <gyebro69(a)gmail.com> --- (In reply to Henri Verbeet from comment #2)
Created attachment 58717 [details] hack
The issue seems to be that the application uses buffers without D3DUSAGE_DYNAMIC as if they're dynamic. The attached hack fixes the performance for me, but doesn't strike me as correct.
The patch fixes the issue for me as well. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 Chris W <cwadge(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cwadge(a)gmail.com --- Comment #4 from Chris W <cwadge(a)gmail.com> --- Can confirm that King's Bounty is affected. Additionally, this bug seems to affect Jade Empire as well. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #5 from Béla Gyebrószki <gyebro69(a)gmail.com> --- Still present in wine-3.0-rc5 regarding King's Bounty: The Legend. I don't have such issue in Jade Empire, game works fine here. OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GT 730/PCIe/SSE2 OpenGL core profile version string: 4.5.0 NVIDIA 387.34 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #6 from Chris W <cwadge(a)gmail.com> --- (In reply to Béla Gyebrószki from comment #5)
Still present in wine-3.0-rc5 regarding King's Bounty: The Legend.
Seems to be resolved (for me) in 3.0 final, clean prefix. Can you confirm? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #7 from Béla Gyebrószki <gyebro69(a)gmail.com> --- (In reply to Chris W from comment #6)
(In reply to Béla Gyebrószki from comment #5)
Still present in wine-3.0-rc5 regarding King's Bounty: The Legend.
Seems to be resolved (for me) in 3.0 final, clean prefix. Can you confirm?
I can hardly see any improvement in Wine 3.0 or wine-3.0-124-gd877dce7a2. Performance is abysmal even on the lowest settings. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 tokktokk <fdsfgs(a)krutt.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs(a)krutt.org -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #8 from joaopa <jeremielapuree(a)yahoo.fr> --- Is still a bug in current wine(3.20)? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #9 from Béla Gyebrószki <gyebro69(a)gmail.com> --- Still present in Wine 3.20. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #10 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Henri Verbeet from comment #2)
Created attachment 58717 [details] hack
The issue seems to be that the application uses buffers without D3DUSAGE_DYNAMIC as if they're dynamic. The attached hack fixes the performance for me, but doesn't strike me as correct.
I tested non-dynamic D3DPOOL_DEFAULT buffers on Windows. It looks like there is no "consensus" wrt NOOVERWRITE maps (the flag is ignored on Nvidia but not on AMD) but DISCARD does in fact work as you'd expect, i.e. the second map returns a different memory address from the first and it doesn't block waiting for the buffer to become idle. I'll probably have a look at the actual game soon. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #11 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Matteo Bruni from comment #10)
I'll probably have a look at the actual game soon.
Obviously that was wishful thinking on my part. I managed to have a look, finally, and the result is... interesting. I basically confirm comment 2: the game does a lot of buffer maps with DISCARD and NOOVERWRITE with non-DYNAMIC buffers and expects them to work as if they were DYNAMIC. Problem is, they are not supposed to be fast with that kind of usage, as I described in detail in <https://www.winehq.org/pipermail/wine-devel/2018-November/135071.html>, especially for Nvidia. So I brought back the test from that email to investigate this even further on Windows. Nothing new came up from that: non-DYNAMIC DEFAULT buffers simply ignore the NOOVERWRITE map flag on Nvidia and are thus very slow in those cases. Then I had the idea of renaming the test executable to kb.exe (which is the name of the game's executable): sure enough, non-DYNAMIC buffers started to perform exactly like DYNAMIC buffers... I also tried to "break" the game by renaming the executable but that wasn't enough. I suspect it's still recognized somehow. Bottom line: the game is broken, either the driver or the d3d9 runtime have a quirk for the game to workaround the breakage. Not sure what we should do, if anything. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #12 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Matteo Bruni from comment #11)
Bottom line: the game is broken, either the driver or the d3d9 runtime have a quirk for the game to workaround the breakage. Not sure what we should do, if anything.
We could conceivably introduce a registry setting to allow DISCARD/NOOVERWRITE on static buffers. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com --- Comment #13 from Zebediah Figura <z.figura12(a)gmail.com> --- I can't seem to reproduce this with current upstream wine + nouveau, with a GTX 750 and mesa version 21.3.0. FPS is inconsistent, but seems to hover around 15-25, either with the hack enabled or without it, and regardless of whether CSMT is enabled. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #14 from Béla Gyebrószki <gyebro69(a)gmail.com> --- The problem remains on Nvidia 470.63.01. wine-6.15-241-gf33bf35d9a3 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=44863 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24(a)gmail.com See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=42588 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 Jaka <registracije+winebugs(a)lynxlynx.info> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |registracije+winebugs(a)lynxl | |ynx.info --- Comment #15 from Jaka <registracije+winebugs(a)lynxlynx.info> --- Just dropping by to say it's still an issue on 8.19. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #16 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- What about Wine 9.7? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43246 --- Comment #17 from Jaka <registracije+winebugs(a)lynxlynx.info> --- Sorry, don't have easy access to it yet. Considering it's a game bug, I don't expect much to have changed though. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla