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()