Bug 50149

Summary: Faulty shaders on RS600
Product: Mesa Reporter: Roman Šmakal <schmakerisko>
Component: Drivers/Gallium/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact:
Severity: major    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: dmesg logfile
glxinfo logfile
xorg logfile
Video of HoN bug
"Screen shot" of the HoN bug
Lightsmark rant with RADEON_DEBUG=fp
Possible fix patch 1
Possible fix patch 2
Fix patch #1
Fix patch #2
Possible fix
Frets on Fire font bug

Description Roman Šmakal 2012-05-20 11:01:04 UTC
Good day,
im owner of Dell Latitude XT laptop and have issues with any version of Mesa drivers. To specify problem correctly - i do have problems with shaders and textures on this laptop.
On Lightsmark i do have some artifacts on screen, no (or better to say) faulty reflection. With oibaf PPA repository (git-based repository) i do have pretty much all textures black. So no luck at all.
On Penumbra Black Plague GPU even causes laptop lockup - game will stop and after a moment the colors will disappear to strange white-ish recoloring and computer no longer works (hard reset required).
Im upgrading to PPA drivers ATM, so if i can submit some logs or try some variables, tell me and im up to try it.
Thank you for good job at the drivers.
Comment 1 Alex Deucher 2012-05-21 09:15:09 UTC
Please attach your xorg log, dmesg output, and glxinfo output.
Comment 2 Roman Šmakal 2012-05-21 13:50:51 UTC
Created attachment 61930 [details]
dmesg logfile
Comment 3 Roman Šmakal 2012-05-21 13:51:09 UTC
Created attachment 61931 [details]
glxinfo logfile
Comment 4 Roman Šmakal 2012-05-21 13:51:29 UTC
Created attachment 61932 [details]
xorg logfile
Comment 5 Roman Šmakal 2012-05-26 04:13:01 UTC
compiler/r300_fragprog_emit.c::begin_tex(): Too many texture indirections
Using a dummy shader instead.

This is an error reported by Lightsmark when using Mesa version git1205111237.c2f1fb. In LIBGL_ALWAYS_SOFTWARE textures are rendered correctly though. Tried the Lightsmark on other r300-series GPU and it worked perfectly (not sure which version of Mesa stack though, its my GFs PC).

Any more things i can debug to make a report more usefull?
Comment 6 Roman Šmakal 2012-05-26 04:37:39 UTC
Created attachment 62124 [details]
Video of HoN bug

Heroes of Newerth flickering textures. Notice the flickering tree on the right. Sorry for poor quality, its taken with cell phone
Comment 7 Roman Šmakal 2012-05-26 04:39:25 UTC
Created attachment 62125 [details]
"Screen shot" of the HoN bug

Notice the lines on UI elements.
Comment 8 Roman Šmakal 2012-05-26 04:47:02 UTC
http://s000.tinyupload.com/?file_id=42612426716764011418 < video of Penumra bug.
First character looks around then game freezes. I wait around minute for unfreezing, but its not gonna happen.
So i decide to try going to tty and back (Ctrl + Alt + F1 >> Alt + F7) and then hang happens.
Comment 9 Tom Stellard 2012-05-28 17:14:51 UTC
(In reply to comment #5)
> compiler/r300_fragprog_emit.c::begin_tex(): Too many texture indirections
> Using a dummy shader instead.
> 
> This is an error reported by Lightsmark when using Mesa version
> git1205111237.c2f1fb. In LIBGL_ALWAYS_SOFTWARE textures are rendered correctly
> though. Tried the Lightsmark on other r300-series GPU and it worked perfectly
> (not sure which version of Mesa stack though, its my GFs PC).
> 
> Any more things i can debug to make a report more usefull?

Can you set the environment variable RADEON_DEBUG=fp and post the output from lightsmark?
Comment 10 Roman Šmakal 2012-05-28 21:53:21 UTC
Created attachment 62189 [details]
Lightsmark rant with RADEON_DEBUG=fp

There we go. I hope it will be usefull
Comment 11 Tom Stellard 2012-05-29 16:39:47 UTC
(In reply to comment #10)
> Created attachment 62189 [details]
> Lightsmark rant with RADEON_DEBUG=fp
> 
> There we go. I hope it will be usefull

I think I see the bug.  Do you still get errors in Lightsmark if you set the env variable RADEON_TEX_GROUP=32
Comment 12 Roman Šmakal 2012-05-29 21:35:06 UTC
With this settings textures are rendered, but they are red-shaded instead, so its not a fix for the issue
Comment 13 Tom Stellard 2012-06-25 19:10:56 UTC
Created attachment 63471 [details] [review]
Possible fix patch 1
Comment 14 Tom Stellard 2012-06-25 19:13:09 UTC
Created attachment 63472 [details] [review]
Possible fix patch 2

Can you apply these two patches and try again.  Lightsmark looks a lot better to me with these patches.  Do they help with any of your other games?
Comment 15 Roman Šmakal 2012-06-25 19:30:13 UTC
Actually i cant. My laptop cooling broken 2 weeks ago so i have to buy new fan for it. Will try these patches as soon as i fix it
Comment 16 Roman Šmakal 2012-06-28 11:47:19 UTC
For me Lightsmark is slightly better in first scene, textures at least appears (but colors and shade are flickering) but its not really okayish. Reflections not working and so on. Anyway, maybe i just did bad job at compiling mesa stack, im not really good at patching&compiling things.
Heroes of Newerth UI is still looking same and i cant try Penumbra, because i would need to recompile mesa stack for 32bit.
Comment 17 Tom Stellard 2012-08-27 01:15:34 UTC
I've pushed the first patch, and you can get the same behavior as the second patch by setting RADEON_TEX_GROUP=128.  There is still a bug somewhere, though, and if you play around with the RADEON_TEX_GROUP variable you'll notice there is a value that causes the rendering to look very different I think it's around 30.  So less than that value will render one way and greater than that value will render another.  I'm not sure what is happening here.
Comment 18 Tom Stellard 2012-09-19 03:16:18 UTC
Created attachment 67361 [details] [review]
Fix patch #1
Comment 19 Tom Stellard 2012-09-19 03:17:56 UTC
Created attachment 67362 [details] [review]
Fix patch #2

If you apply these two patches and run Lightsmark with RADEON_TEX_GROUP=32, does it render correctly?  How about with lower values of RADEON_TEX_GROUP, like 16 or 24?
Comment 20 Roman Šmakal 2012-09-30 12:38:52 UTC
I cant apply patch #2, 3 hunks rejected. Version of mesa i tried to patch was mesa_9.1~git20120929.9549e55f from xorg-edgers ppa. Im not really into programming and stuff and i dont like to apply it incorrect way, so any tips are welcome.
Comment 21 Tom Stellard 2012-09-30 18:27:58 UTC
Created attachment 67899 [details]
Possible fix

Try this patch, it should apply correctly.
Comment 22 Roman Šmakal 2012-09-30 21:08:33 UTC
Compiled it (hope that -glx and -dri packages are enough to install) and here are my impressions.
Lightsmark works 90% okay. Still there remains some minor issues with texturing (first scene - some texturing artifacts on the window). As a bonus - reflections now partially works too (not reflecting correctly though) so i guess we are on the right way to fix this issue. Im not at home right now so i cant test much more.
Comment 23 Roman Šmakal 2012-10-01 13:23:11 UTC
Created attachment 67926 [details]
Frets on Fire font bug

Just noticed that frets on fire are bugged too. Not sure if its related to faulty shaders though.
Comment 24 Roman Šmakal 2012-10-08 09:50:49 UTC
Torchlight seems to have same rendering issues as seen on HoN video. Time after time textures and models flickers. Playable though ..
Comment 25 Roman Šmakal 2012-10-30 06:39:19 UTC
I have tried Enemy Territory this week. Menu and stuff works well. When loading map, all textures on screen are just noise - nothing really looking like it should and game crashes at textures loading. Not sure if its related, but it may help solving this issue
Comment 26 GitLab Migration User 2019-09-18 18:51:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/342.

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.