Bug 32949 - [glsl wine] Need for Speed renders incorrectly with GLSL enabled
[glsl wine] Need for Speed renders incorrectly with GLSL enabled
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
7.10
x86 (IA32) Linux (All)
: medium major
Assigned To: Kenneth Graunke
: regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-09 21:15 UTC by Md Imam Hossain
Modified: 2011-04-02 20:14 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
GLSL bug (142.45 KB, image/jpeg)
2011-01-09 21:15 UTC, Md Imam Hossain
Details
without the bug (142.86 KB, image/jpeg)
2011-01-09 21:16 UTC, Md Imam Hossain
Details
Need for Speed Most Wanted with the bug (245.38 KB, image/jpeg)
2011-01-09 21:19 UTC, Md Imam Hossain
Details
Need for Speed Most Wanted normal (250.74 KB, image/jpeg)
2011-01-09 21:19 UTC, Md Imam Hossain
Details
terminal output 1 (86.78 KB, text/plain)
2011-01-09 21:30 UTC, Md Imam Hossain
Details
terminal output 2 (123.52 KB, text/plain)
2011-01-09 21:31 UTC, Md Imam Hossain
Details
NFS Underground terminal dump (230.00 KB, application/x-tar)
2011-03-06 07:13 UTC, Md Imam Hossain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Md Imam Hossain 2011-01-09 21:15:16 UTC
Created attachment 41818 [details]
GLSL bug

Playing many games using WINE, got unusual white colour bug.

if I turn off GLSL in WINE then everything is normal.
if I turn on GLSL in WINE then everything becomes brighter and far objects can not be seen: see the attachment ( the game is Need for Speed Underground )

by doing further investigation, I found that

if I turn on GLSL in WINE and either vertex shader or pixel shader is turned off in WINE then everything becomes normal again.

So, the combination of vertex and pixel shader is not working in GLSL.

conclusion:

without using GLSL, vertex and pixel shader both in WINE everything is normal 

the games were running properly with Mesa 7.7.1, 7.8.3-rc1 and 7.9.1


System:

latest WINE 1.3.11
Intel GMA 4500
linux 2.6.37-020637-generic
Mesa 7.10 official and Mesa Master (Mesa 7.11-devel)
libdrm 2.4.23
xf86-video-intel-2.13.0
Ubuntu 10.10's official xserver
Comment 1 Md Imam Hossain 2011-01-09 21:16:39 UTC
Created attachment 41819 [details]
without the bug
Comment 2 Md Imam Hossain 2011-01-09 21:19:03 UTC
Created attachment 41820 [details]
Need for Speed Most Wanted with the bug
Comment 3 Md Imam Hossain 2011-01-09 21:19:42 UTC
Created attachment 41821 [details]
Need for Speed Most Wanted normal
Comment 4 Md Imam Hossain 2011-01-09 21:30:03 UTC
Created attachment 41822 [details]
terminal output 1

output of Need for Speed Underground game with the bug:

commands applied to bash to get the output

export WINEDEBUG=-all
export INTEL_DEBUG=vs,wm
padsp wine Speed.exe 2>&1> err.txt
Comment 5 Md Imam Hossain 2011-01-09 21:31:00 UTC
Created attachment 41823 [details]
terminal output 2

output of Need for Speed Underground game with the bug:

commands applied to bash to get the output

export WINEDEBUG=-all
export MESA_GLSL=dump
padsp wine Speed.exe 2>&1> err1.txt
Comment 6 Ian Romanick 2011-01-10 12:42:10 UTC
Decreasing severity to normal as this isn't a crash or a regression.

Is there any chance you could try reproducing this with the software rasterizer?  It will probably take forever for wine and the game to start up, but that will help narrow down where the bug is.  It would also help to know if the bug is reproducible in Mesa 7.9.1.
Comment 7 Md Imam Hossain 2011-01-10 13:20:04 UTC
I have tested Mesa 7.9.1 before testing Mesa 7.10.

the bug is not present in Mesa 7.9 and 7.9.1
Comment 8 Md Imam Hossain 2011-01-18 04:26:14 UTC
Excuse me, but how to run in software
rasterizer mode. I do not know
Comment 9 Md Imam Hossain 2011-01-21 21:32:57 UTC
Flatout 1 & 2 also suffer from this bug
Comment 10 Jaime Rave 2011-01-31 19:49:39 UTC
This bug is affecting a huge range of games, including Source Based games like Counter:strike, HL2, and also others like Civilization IV, Settlers 2 10th years edition.

I'm using Wine 1.3.12 and also Wine from Git with Mesa from Git. Ubuntu 10.10
Comment 11 Md Imam Hossain 2011-01-31 20:08:08 UTC
(In reply to comment #6)
> Decreasing severity to normal as this isn't a crash or a regression.
> 
> Is there any chance you could try reproducing this with the software
> rasterizer?  It will probably take forever for wine and the game to start up,
> but that will help narrow down where the bug is.  It would also help to know if
> the bug is reproducible in Mesa 7.9.1.

Changed severity to high as this a regression
Comment 12 Jaime Rave 2011-01-31 21:53:19 UTC
(In reply to comment #6)
> Decreasing severity to normal as this isn't a crash or a regression.
> 
> Is there any chance you could try reproducing this with the software
> rasterizer?  It will probably take forever for wine and the game to start up,
> but that will help narrow down where the bug is.  It would also help to know if
> the bug is reproducible in Mesa 7.9.1.

The bug is not on Civilization IV using software rasterizer.
Comment 13 Gordon Jin 2011-02-25 00:11:57 UTC
(In reply to comment #8)
> Excuse me, but how to run in software
> rasterizer mode. I do not know

set LIBGL_ALWAYS_SOFTWARE=1 before your command
Comment 14 Md Imam Hossain 2011-03-02 04:19:41 UTC
still present in the git Mesa 7.11-devel
Comment 15 Md Imam Hossain 2011-03-03 03:45:12 UTC
also present in just released Mesa 7.10.1
Comment 16 Md Imam Hossain 2011-03-06 07:13:28 UTC
Created attachment 44176 [details]
NFS Underground terminal dump

ran NFS Underground on Wine and got Mesa GLSL dump with and without Software Rasterizer by invoking these commands in the terminal.

For Normal Mesa Renderer (Hardware):
export WINEDEBUG=-all
export MESA_GLSL=dump
padsp wine Speed.exe 2>&1> outwithoutbug.txt

For Mesa Software Rasterizer Renderer:
export LIBGL_ALWAYS_SOFTWARE=1
export WINEDEBUG=-all
export MESA_GLSL=dump
padsp wine Speed.exe 2>&1> outwithbug.txt

please use attached tar file to get these files.
Comment 17 Md Imam Hossain 2011-03-06 07:15:06 UTC
(In reply to comment #16)
> Created an attachment (id=44176) [details]
> NFS Underground terminal dump
> 
> ran NFS Underground on Wine and got Mesa GLSL dump with and without Software
> Rasterizer by invoking these commands in the terminal.
> 
> For Normal Mesa Renderer (Hardware):
> export WINEDEBUG=-all
> export MESA_GLSL=dump
> padsp wine Speed.exe 2>&1> outwithoutbug.txt
> 
> For Mesa Software Rasterizer Renderer:
> export LIBGL_ALWAYS_SOFTWARE=1
> export WINEDEBUG=-all
> export MESA_GLSL=dump
> padsp wine Speed.exe 2>&1> outwithbug.txt
> 
> please use attached tar file to get these files.

In Mesa Software Rasterizer Renderer mode the problem is not visible
Comment 18 Jaime Rave 2011-03-11 21:10:55 UTC
Here's a demo of Civilization IV that's been affected by this bug.

http://download.cnet.com/Civilization-IV-demo/3000-7489_4-10465206.html
Comment 19 Md Imam Hossain 2011-03-15 09:37:46 UTC
this bug maybe related to this WINE bug:
http://bugs.winehq.org/show_bug.cgi?id=17715
Comment 20 Md Imam Hossain 2011-03-15 09:50:02 UTC
have no clue but from google search http://bugs.winehq.org/show_bug.cgi?id=7284
Comment 21 Kenneth Graunke 2011-03-25 16:50:21 UTC
Looking into this.
Comment 22 Kenneth Graunke 2011-03-26 22:42:28 UTC
I believe this may have been fixed by the following commit (in Mesa master):

commit 0c8beb0ab5e72a9d2ecaad51db16a7d5291e120b
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sat Mar 26 22:04:23 2011 -0700

    i965/fs: Fix linear gl_Color interpolation on pre-gen6 hardware.
    
    Civilization 4's shaders make heavy use of gl_Color and don't use
    perspective interpolation.  This resulted in rivers, units, trees, and
    so on being rendered almost entirely white.  This is a regression
    compared to the old fragment shader backend.
    
    Found by inspection (comparing the old and new FS backend code).
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=32949
    
    NOTE: This is a candidate for the 7.10 branch.

Could you please test it?  Thanks.
Comment 23 Md Imam Hossain 2011-03-26 23:29:53 UTC
Great!, I can not believe in my eyes, developers are so smart that it took only few days to trigger this bug out of the field.
Now, Mesa 7.10.1 is as good as 7.8.3-rc1 bug wise, plus extra functionality.

When this patch is going to merge to 7.10.1, so that next Ubuntu 11.04 can use it.

Thanks
Comment 24 Md Imam Hossain 2011-03-26 23:30:48 UTC
fixed by commit 0c8beb0ab5e72a9d2ecaad51db16a7d5291e120b
Comment 25 Tobias Jakobi 2011-03-27 06:09:26 UTC
The wine bugs mentioned in comment 19 and 20 are totally unrelated btw.
Comment 26 Gordon Jin 2011-03-30 22:18:20 UTC
let's keep this bug open until the patch cherry-picked to 7.10 branch.
Comment 27 Kenneth Graunke 2011-04-02 20:14:05 UTC
I just cherry-picked the fix to the 7.10 branch.  Marking fixed.