[Bug 20053] Team-Fortress 2 and other source games suffer from black menu and missing UI textures in dx9 mode

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Oct 13 02:10:16 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=20053

Patrick Rudolph <patrick1804 at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |patrick1804 at web.de

--- Comment #52 from Patrick Rudolph <patrick1804 at 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

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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.



More information about the wine-bugs mailing list