https://bugs.winehq.org/show_bug.cgi?id=38277
Bug ID: 38277 Summary: Too slow test Advanced Pixel Shaders in 3DMark2001SE Product: Wine Version: 1.7.39 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: isakov-sl@bk.ru Distribution: ---
It works like a slide show. Tested on Geforce7300LE and ADMRadeon 6670. Different fps but both too slow. I think it is the bug because the same test on the same hardware but with Crossover 14.1 gives me 8 times better performance! To compare: Wine1.7.39 <-> CX14.1.0 Game2 Low details 30.8 <-> 28.1 -- about the same High details 28.2 <-> 16.8 -- wine is better Vertex shaders 8.3 <-> 19.8 -- CX 2 times better Advanced Pixel Shaders 4.8 <-> 37.2 !!! -- CX 8 times faster!
Crossover is also open source. Why not apply their patches to get about the same performance?
https://bugs.winehq.org/show_bug.cgi?id=38277
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- OS|Linux |Mac OS X
--- Comment #1 from Sergey Isakov isakov-sl@bk.ru --- Hi sirs, Several day I found the reason and finally got it. The explanation is in Crossover source
/* MacOS dx9 GPU drivers more GLSL vertex shader uniforms than supported by the hardware, and if * more are used it falls back to software. While the compiler can detect if the shader uses all * declared uniforms, the optimization fails if the shader uses relative addressing. So any GLSL * shader using relative addressing falls back to software. * * ARB vp gives the correct amount of uniforms, so use it instead of GLSL. * * In addition, AMD Radeon HD GPUs advertise > 256 constants and can support this in HW, but the * driver nevertheless falls back to software if more than 256 are used. This is fixed in MacOS * 10.8.3 */
------- I can confirm, this is very essential note. It is why I have so poor performance. But copying the function quirk_arb_constants() into wine sources gives a crash. The reason is the quirk_table[] is applied too late. gl_info->limits.glsl_vs_float_constants will change after they used to fill d3d_info.
So I call the function quirk_arb_constants() in procedure wined3d_adapter_init_limits(gl_info). The results: Game2 Low details 41.4 High details 28.2 Vertex shaders 29.9 Advanced Pixel Shaders 39.2 !!! Now my engines fastest in all tests. But my method is not good because it unconditional. I should check as CX did in procedure match_apple_broken_uniforms()
https://bugs.winehq.org/show_bug.cgi?id=38277
--- Comment #2 from Sergey Isakov isakov-sl@bk.ru --- Can be closed "WONT FIX". The patch rejected as not needed.
https://bugs.winehq.org/show_bug.cgi?id=38277
--- Comment #3 from Sergey Isakov isakov-sl@bk.ru --- Created attachment 51455 --> https://bugs.winehq.org/attachment.cgi?id=51455 So called SpeedHack patch
This is final version of known "SpeedHack" patch implemented in Crossover but more correct applied. It is needed for using non-apple videocards in Mac.
https://bugs.winehq.org/show_bug.cgi?id=38277
--- Comment #4 from Sergey Isakov isakov-sl@bk.ru --- Affected bug 38216 as well.
https://bugs.winehq.org/show_bug.cgi?id=38277
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX
--- Comment #5 from Sergey Isakov isakov-sl@bk.ru --- The problem is resolved with this patch. But the patch was not accepted into mainstream.
https://bugs.winehq.org/show_bug.cgi?id=38277
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- Does this happen or not for legitimate Mac OS setup?
https://bugs.winehq.org/show_bug.cgi?id=38277
--- Comment #7 from Sergey Isakov isakov-sl@bk.ru --- (In reply to Nikolay Sivov from comment #6)
Does this happen or not for legitimate Mac OS setup?
The bug is resolved in MacOSX 10.8.2+ The patch was introduced by CrossOver and presents in it. I just modified it for more videocards and corrected a mistake with too late applying this patch.
https://bugs.winehq.org/show_bug.cgi?id=38277
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Austin English austinenglish@gmail.com --- Closing.