http://bugs.winehq.org/show_bug.cgi?id=20053
Patrick Rudolph patrick1804@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick1804@web.de
--- Comment #52 from Patrick Rudolph patrick1804@web.de 2011-10-13 02:10:16 CDT --- Hi I investigated some time and found a fix. I noticed that the game was running without errors inside my Virtual Machine (Virtualbox). Virtualbox does not provide as much GL calls as my host does.
I added gl_info->supported[ARB_SHADING_LANGUAGE_100] = FALSE; gl_info->supported[NV_FRAGMENT_PROGRAM2] = FALSE; to line 2385 in wined3d:directx.c:wined3d_adapter_init_gl_caps. This disables GLSL and SM 3.0 using ARB.
But this is not a good solution, because GLSL isn't working and SM 3.0 too.
Next I tried was so force PixelShader 2.0 instead of PixelShader 3.0. This can be done by if (caps->PixelShaderVersion == WINED3DPS_VERSION(3,0)) caps->PixelShaderVersion = WINED3DPS_VERSION(2,0); in line 4750 in wined3d:directx.c:wined3d_get_device_caps
This removed all graphical problems, but PixelShader 3.0 won't work.
Then I found the problem: caps->PS20Caps.NumInstructionSlots = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS; has to be changed to caps->PS20Caps.NumInstructionSlots = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS-1; in line 4813 in wined3d:directx.c:wined3d_get_device_caps.
This is a hack, MSDN says: SM3.0 has to support WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS NumInstructionSlots.
I'm not sure what this value is good for, I guess some PS instruction queue length ?
With this setting I have no graphical problems, performance is quite well ~70fps with MSAA off and AF off.
Tested on: 2.6.38-11-generic x86_64 wine1.3.30 nvidia driver: 280.13 Geforce 8600GTS 512MB HL2 DirectX9.0 mode