Bug 29226

Summary: on r600 and llvmpipe 3d applications are rendered in too bright colors
Product: DRI Reporter: Michal Suchanek <hramrach>
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
rendered on Intel graphics
none
Rendered on r600
none
rendered on r600g
none
shadowtex on r600
none
shadowtex on intel
none
a simplified version of shadowtex none

Description Michal Suchanek 2010-07-23 03:28:22 UTC
I am running r600 card with 2.6.34 kernel and Mesa 7.8.2.
 ATI Technologies Inc RV710 [Radeon HD 4350]

Since switching to the card I noticed rendering issues the most prominent being incorrect colors.

The colors of many objects seem overly bright and lack saturation, the lighted areas show large patches of white or nearly white color.

The UI which is 2d/unlit looks OK and so do glxgears.

This does not happen on r300 card or Intel card.

I tried running planeshift with software rendering and the character preview after logging in looked much better. However, after running with software renderer the issue is gone. This might be because planeshift calculates some lighting information during runtime and it was changed by the calculations performed on the software renderer.

Planeshift can be found at http://www.planeshift.it/download.html

I am not sure what the exact issue is. So far I was unable to reproduce it visibly with a trivial program. However, it also happens when running a 3D program through wine.
Comment 1 Michal Suchanek 2010-07-23 04:20:17 UTC
I can no longer reproduce the issue with planeshift but it's easily reproducible with Fiesta (it's already visible on the login screen).

The downside is that it requires wine.

http://fiesta-online.gamigo.com/
Comment 2 Michal Suchanek 2010-07-23 05:32:56 UTC
Created attachment 37334 [details]
rendered on Intel graphics
Comment 3 Michal Suchanek 2010-07-23 05:33:41 UTC
Created attachment 37335 [details]
Rendered on r600
Comment 4 Michal Suchanek 2010-08-05 06:52:13 UTC
Created attachment 37585 [details]
rendered on r600g

Apart from other glitches the color issue also appears on r600g
Comment 5 Michal Suchanek 2010-08-05 10:11:07 UTC
As suggested by people on irc I found a demo that shows a similar issue.

The demo is shadowtex from current mesa git.

The green ball in the demo using the fixed function shader (default) on Intel renders only slightly edgy ball but a ball with a flat spot on r600.

The demo currently crashes on r600g. 

Note that the demo is designed to showcase features that don't work at all on Intel and a simpler demo with the shader only should be possible. Note that due to the features present on r600 you may need to cycle through the different composition modes with the 'o' key until most of the surface is shown in the brighter color and the flat area is visible.
Comment 6 Michal Suchanek 2010-08-05 10:11:42 UTC
Created attachment 37596 [details]
shadowtex on r600
Comment 7 Michal Suchanek 2010-08-05 10:12:16 UTC
Created attachment 37597 [details]
shadowtex on intel
Comment 8 Michal Suchanek 2010-08-05 17:24:35 UTC
Created attachment 37605 [details]
a simplified version of shadowtex

Attaching a simplified vesion of shadowtex which only uses the vertex program, no textures.

This demo fails equally on r600 and r600g, no more crash.

For your convenience the scene is rotated so that the misrendered green ball is in front.
Comment 9 Michal Suchanek 2010-08-08 04:30:07 UTC
I tried on r300g but apparently I did not compile the driver and get only llvmpipe:

OpenGL renderer string: Gallium 0.4 on llvmpipe
OpenGL version string: 2.1 Mesa 7.9-devel
OpenGL shading language version string: 1.20

The ligting issue is present and so are interesting texture patterns.
Comment 10 Michal Suchanek 2010-08-08 04:41:05 UTC
ok, so hte r300 gallium driver was only misnamed.

The ligtning issue does not happen with r300g or r300 but does happen with llvmpipe when none of the dri modules can be found.
Comment 11 Michal Suchanek 2010-08-11 09:44:28 UTC
Piglit with test added for the lighting issue.

http://repo.or.cz/w/piglit/hramrach.git/shortlog/refs/heads/wip
Comment 12 Michal Suchanek 2010-08-20 06:55:04 UTC
I am not sure the lighting issue is actually related to the issue in wine.

I tried to build a mesa without GL_LIGHTING and at least some object were still too bright.
Comment 13 Benjamin Bellec 2011-06-04 20:04:24 UTC
Similar behaviour has been fixed recently.
Comment 14 Michal Suchanek 2011-06-06 07:46:16 UTC
Yes, this has been fixed in 7.11.

A piglit test for this would be nice because it was a longstanding issue for which I did not find any test neither in piglit nor in mesa-demos.
Comment 15 Michal Suchanek 2011-06-23 10:12:53 UTC
And no it's back...
Comment 16 Jose Fonseca 2014-11-11 16:45:48 UTC
I just tried the simplied version of shadowtex w/ llvmpipe, and it renders the exactly same things as NVIDIA.

I supposed it was fixed eventually.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.