http://bugs.winehq.org/show_bug.cgi?id=30232
Bug #: 30232 Summary: Kingdoms of Amalur severe slow down with when NPCs are present Product: Wine Version: 1.5.0 Platform: x86-64 OS/Version: Mac OS X Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: praus_aluco@yahoo.com Classification: Unclassified
Created attachment 39475 --> http://bugs.winehq.org/attachment.cgi?id=39475 Kingdoms of Amalur fixme, err log
This is possibly related to GLSL bug reported here: http://bugs.winehq.org/show_bug.cgi?id=30168.
After applying the patch recommended in the GLSL bug report mentioned above and upgrading to wine 1.5 dev I noticed a possibly related, severe slowdown of the game any time more then a few NPCs are in the game with you. When no NPCs are around the game runs very smoothly and none of the graphical glitches from the previous bug are visible. I've included a copy of the fixme+all,err+all trace from the moment of slowdown.
If it matters: I'm running Mac OS X Lion 10.7.3 (11D50) graphics card is an ATI Radeon HD 4850 with 512 MB. Processor 2.8 GHz Intel Core i7.
http://bugs.winehq.org/show_bug.cgi?id=30232
David praus_aluco@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.winehq.org/show | |_bug.cgi?id=30168
http://bugs.winehq.org/show_bug.cgi?id=30232
David praus_aluco@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |praus_aluco@yahoo.com
http://bugs.winehq.org/show_bug.cgi?id=30232
thanoulas thanoulas@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thanoulas@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30232
Matthew matthew.rathbone@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matthew.rathbone@gmail.com
--- Comment #1 from Matthew matthew.rathbone@gmail.com 2012-03-21 11:54:14 CDT --- The behavior is the same on Mass Effect 3 when in outdoor areas. Severe slow down, even on high-end hardware.
I think it's some sort of memory leak related to AMD/ATI graphics cards (maybe brought on by that patch?). Worth noting that mac-owners with older ATI cards are not experiencing these issues (9600M was the example I saw)
There is some work being done on AMD / Lion compatibility over on the porting team website: http://portingteam.com/index.php/files/file/7192-mass-effect-3-lion-compatib... (see the comments, page 4)
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #2 from Henri Verbeet hverbeet@gmail.com 2012-03-21 12:27:38 CDT --- (In reply to comment #1)
There is some work being done on AMD / Lion compatibility over on the porting team website: http://portingteam.com/index.php/files/file/7192-mass-effect-3-lion-compatib... (see the comments, page 4)
I certainly haven't seen any patches from those people being submitted to Wine. My impression from that website is that the "porting" these people do is mostly a matter of packaging some version of Wine, maybe with some hacks or custom registry settings, together with an installer. Although calling that "porting" may be somewhat morally questionable, I guess that's more or less fine as long as they respect the licenses of all the software involved. As far as Wine is concerned, I didn't immediately see source code or any indication that the code is under the LGPL on that website. The downloads for the actual "ports" require registration though, so I suppose it's possible the source is included in there.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #3 from Matthew matthew.rathbone@gmail.com 2012-03-21 12:38:04 CDT --- Hey Henri,
They're just wrappers mostly containing isolated wine environments, I don't think they're modifying wine, just including the correct config settings, libraries, directory structures, etc for each particular application.
I'm sure they aren't doing anything against the wine license, or any other licenses for that matter.
My personal opinion is that OS X behaves so differently than the other *nix distributions that wine runs on that it really helps to have people who know their way around doing testing, and configuring things in an organized fashion.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #4 from thanoulas thanoulas@gmail.com 2012-03-21 12:41:33 CDT --- Most "ports" are done using Wineskin, which is of course wine with tools. And is released under the LGPL, full source code is always available on Sourceforge where the project is hosted. As for the source code, it is always available for download in the forum as far as I know. All patches that we make are there, but most of them are ugly hacks just to make a specific game start. 99% of the times, these wrappers are wine with a patch or two from here, compiled by someone that will make a game play on OSX.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #5 from David praus_aluco@yahoo.com 2012-03-21 14:52:47 CDT --- It would be very nice to know if there is some sort of wine related, OS X specific, memory leak for newer ATI cards. Could also just be a driver issue on Apple's end. Anyone have any suggestions on how to diagnose that sort of leak and/or determine any other cause of this slowdown?
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #6 from Henri Verbeet hverbeet@gmail.com 2012-03-21 15:45:10 CDT --- Sounds like mostly speculation to me. Regardless, I'd suggest using a profiler.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #7 from David praus_aluco@yahoo.com 2012-03-21 15:52:45 CDT --- Yes it all is very much speculation thats why I want to actually diagnose it hehe. Thanks very much for the suggestion. I think I might have something like that in the OS X dev tools I'll poke around.
http://bugs.winehq.org/show_bug.cgi?id=30232
julusp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julusp@gmail.com
--- Comment #8 from julusp@gmail.com 2012-04-03 04:56:52 CDT --- Commit aa55603b731fee304ce949cdcaa6572907c99604 causes severe performance impact also in another games (gray matter, swtor and others) on Ati base Macs. Games looks like runnin 1 fps, reverting commit fixes performance issue.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #9 from julusp@gmail.com 2012-04-03 05:50:21 CDT --- Created attachment 39662 --> http://bugs.winehq.org/attachment.cgi?id=39662 sample differenence with and without ati patch
As you can see from the screenshot of sampling IDirect3DDevice9Impl_DrawIndexedPrimitive after ATI patch is consuming most of the CPU.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #10 from Henri Verbeet hverbeet@gmail.com 2012-04-03 05:58:24 CDT --- It's probably hitting the software fallback that hack was originally supposed to avoid, which is stupid because the hardware can easily run these shaders. You should probably ask Apple to fix the drivers, one way or another.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #11 from thanoulas thanoulas@gmail.com 2012-04-03 07:52:24 CDT --- ATi X1600XT is not affected by the slowdown.
Does this help? http://homepage.mac.com/arekkusu/bugs/GLInfo.html Based on that, wine's detection for HD4850 looks right to me
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #12 from julusp@gmail.com 2012-04-03 07:59:38 CDT --- (In reply to comment #10)
It's probably hitting the software fallback that hack was originally supposed to avoid, which is stupid because the hardware can easily run these shaders. You should probably ask Apple to fix the drivers, one way or another.
Just to make things clear. The hack was rewriting value from GL_MAX_PROGRAM_ENV_PARAMETERS_ARB to value from GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB.
so in the wine code (before hacking) limits.arb_ps_float_constants = 128 (windows and linux reporting 256) limits.arb_ps_native_constants = 256 limits.arb_vs_float_constants = 256 limits.arb_vs_native_constants = 256
will become: limits.arb_ps_float_constants = 256 limits.arb_ps_native_constants = 256 limits.arb_vs_float_constants = 256 limits.arb_vs_native_constants = 256
but if thats true, then NVIDIA (9600GT M and others) was affected as well - the limits.arb_ps_float_constants (128) was overwriten by limits.arb_ps_native_constants (1024). For reference: limits.arb_ps_float_constants on win and linux was detected to 256.
also the number of mismatch of windows/linux and macos GL capabilities are... well. insane http://feedback.wildfiregames.com/report/opengl/device/Radeon%20HD%204850
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #13 from thanoulas thanoulas@gmail.com 2012-04-03 08:21:52 CDT --- Same goes for my nVidia GT330M,
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB (128) was overwritten by GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB (1024).
But I wasn't getting broken graphics like the ATi's reported in the bug http://bugs.winehq.org/show_bug.cgi?id=30168
Neither has the patch affected the game's speed.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #14 from Henri Verbeet hverbeet@gmail.com 2012-04-03 08:39:08 CDT --- (In reply to comment #12)
Just to make things clear. The hack was rewriting value from GL_MAX_PROGRAM_ENV_PARAMETERS_ARB to value from GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB.
No. The hack replaced the values from MAX_VERTEX_UNIFORM_COMPONENTS and MAX_FRAGMENT_UNIFORM_COMPONENTS with the vertex / fragment MAX_PROGRAM_NATIVE_PARAMETERS. It did this because as the link in comment 11 shows MacOS pretty much just always returns 4096 for the number of supported uniform components, regardless of what the hardware can actually do. For example, the maximum pre-GF8 and pre-R600 hardware can do is 256 constants, which would give you 1024 uniform components. On the other hand, something like a HD 4850 actually supports 16 constant buffers of 4096 constants (-> 16384 uniform components) each.
A 256 constant limit on current Radeon hardware doesn't make a lot of sense. The only thing that would be sort of close would be if the driver used the 256 (legacy) cfile constants instead of the kcache mechanism, but cfile was removed with Evergreen and wouldn't even work on the HD 6750M that bug 30168 was originally reported for.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #15 from julusp@gmail.com 2012-04-03 19:54:00 CDT --- Sorry, i didn't noticed the glsl in var name. Anyway I played a little with the hack. The slowdown is caused by removing gl_info->limits.glsl_vs_float_constants = gl_info->limits.arb_vs_native_constants;
the removing of fragment limit has no effect on performance. The googling confirms, that the reported number for MAX_VERTEX_UNIFORM_COMPONENTS for ATI is wrong, and should be divided by 16 and not by 4 as is in the declaration. thus resulting in 256 max. (at least on mac)
Anyway for reporting to apple we need test case.
http://bugs.winehq.org/show_bug.cgi?id=30232
Michael Bond mikejbond@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mikejbond@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30232
doh123@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |doh123@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30232
PommeGolden lapommegolden@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lapommegolden@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30232
lelandhaynes@yahoo.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lelandhaynes@yahoo.ca
--- Comment #16 from lelandhaynes@yahoo.ca 2012-05-24 19:34:09 CDT --- Having massive slow downs on Kingdoms of Amalur: Reckoning when entering areas with large amounts of NPC's or enemies (there are even slowdowns when in combat with multiple enemies).
Running game on:
OS X 10.7.3
3.4GHz Intel Core i7
AMD Radeon HD 6970M 2048MB
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #17 from lelandhaynes@yahoo.ca 2012-05-25 17:01:30 CDT --- Having massive slow downs on Kingdoms of Amalur: Reckoning when entering areas with large amounts of NPC's or enemies (there are even slowdowns when in combat with multiple enemies).
Running game on:
OS X 10.7.3
3.4GHz Intel Core i7
AMD Radeon HD 6970M 2048MB
http://bugs.winehq.org/show_bug.cgi?id=30232
zoroaster zoroaster@inode.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zoroaster@inode.at
--- Comment #18 from zoroaster zoroaster@inode.at 2012-09-03 13:05:19 CDT --- GLSL related performance problem exists in Wine 1.5.11 with AMD Radeon HD 6750M.
http://bugs.winehq.org/show_bug.cgi?id=30232
--- Comment #19 from zoroaster zoroaster@inode.at 2013-03-17 10:27:46 CDT --- This bug is fixed by the new AMD graphics driver from Apple in OSX >=10.8.3
http://bugs.winehq.org/show_bug.cgi?id=30232
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |UPSTREAM
--- Comment #20 from Austin English austinenglish@gmail.com 2013-03-18 11:58:10 CDT --- (In reply to comment #19)
This bug is fixed by the new AMD graphics driver from Apple in OSX >=10.8.3
UPSTREAM
http://bugs.winehq.org/show_bug.cgi?id=30232
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Austin English austinenglish@gmail.com 2013-03-18 11:58:18 CDT --- Closing.