Jump to content

Shaders cause graphical glitches with Mesa / Gallium


Mircea Lobo
 Share

You are about to reply to a thread that has been inactive for 3786 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

This issue addresses people who run Second Life on Linux and use the free video drivers (Mesa  / Gallium 3D). I have an ATI card and therefore use the OSS Radeon driver, I don't know if this problem also applies to Nouveau.

Important: Before anyone can test this, you need to modify the viewer's shaders to be compatible with Mesa. See this discussion. You need to comment out all #extension lines, and change all double underscores into single underscores (__ to _), in every *.glsl file. This is needed due to another problem, but it's is a separate subject.

Now onto the actual issue: Shaders cause graphical glitches when enabled. There are primarily two symptoms: The most common and obvious one is corruption showing over some surfaces, consisting of little little squares / patches of various colors. The second symptom which is more discrete, is that textures are sometimes swapped. Occasionally, the real texture and another texture blend in depending on which angle you look at the surface from. This only appears to be present where the corruption is.

The problem also has two stages. The least severe one takes place when you enable Basic Shaders. It causes only a bit of junk on some surfaces and the texture blending. The second stage comes when you also enable Advanced Lighting Model. This adds a new layer of graphical corruption, consisting of patches of a single color outlining various objects. After some testing, I found that this is caused by local lights in combination with bump mapping (turning either off stops the issue).

Below are two screenshots. The first one shows the issue when only basic shaders are turned on, and the second shows the additional color outlines when enabling deferred rendering:

shaders_bug_1.jpg

shaders_bug_2.jpg

First of all, I'm curious if anyone else who has a Linux machine and the free (non-proprietary) video drivers (especially Radeon) can confirm this. I'd then like to know if anyone can figure out how to fix this, so hopefully we can bring the issue to a Linden who can include a solution. I also hope to temporarily fix the problem until either Mesa or SL do it, but have no idea where in the shaders to look.

Link to comment
Share on other sites

Upgraded from Mesa 9.2.2 to 9.2.3. The issue is still present and unchanged.

I found a way to fix the noise caused by Basic Shaders. Setting RenderMaxTextureIndex to a lower value removes the graphical junk. The default value is 16, and the problem is fixed if I set it to 4 or less (any higher causes the corruption). However, this doesn't fix the color outlines when enabling Advanced Lighting Model.

Link to comment
Share on other sites

Playing the :matte-motes-evil:'s advocate now: just use the proprietary drivers. :matte-motes-nerdy: I'm on Nvidia and have never used the Nouveau crappola drivers. Hey, I've paid good money for my gpu so I'm entitled to use the manufacturer's drivers, even if they aren't open source and not politically correct and Nvidia is a terrible company, hostile against Linux. Their **bleep** does just work.

Link to comment
Share on other sites

Proprietary drivers are crucial on Windows, but very bad on Linux. At least that's my experience; fglrx caused me many problems, and I was glad to get rid of it and return to the OSS ones. Except for some issues like the SL shaders of course.

Besides... the free video drivers are catching up to the proprietary ones in this era, and becoming usable for gaming. Performance in all 3D engines (including SL) is almost the same with both drivers here! So the free ones need someone to test them too and report issues. I don't mind being that someone for Radeon and Second Life :matte-motes-bashful-cute-2:

Link to comment
Share on other sites

I dug up more information on when the color outlines occur. As previously mentioned, they appear when Advanced Lighting Model (deferred pipeline) is enabled. However, two other options must be turned on too: "Local Lights" + "Bump mapping and shiny" (RenderLocalLights + RenderObjectBump). Experimenting with light sources also revealed the in-world trigger: Intersection of multiple light sources. There's no junk if only one local light affects an area, or there are no lights present. But if anything is touched by two or more local lights, the outlines form... noise increasing with the amount of lights.

Link to comment
Share on other sites

No tech savy person uses free drivers for Nvidia cards under linux unless this person intentionally wants his gpu performance  reduceded by up to 90%

Phoronix: Open-Source Nouveau Driver Remains Slow For NVIDIA's Fermi, Kepler

The free Nvidia nouveau drivers are for  oss fundementalists only (like Richard Stallman)  who don't browse the web directly and who still run cli based linux from scratch to work in emacs.

 

J,

Link to comment
Share on other sites

Proprietary drivers are crucial on Windows, but very bad on Linux. At least that's my experience

Huh? I just installled Mint 16 a couple days ago and then wanted to run SL. The world looked like crap and when I wanted to tweak the graphics settings I noticed most stuff wasn't available for me. Turned out I was on the standard Nouveau driver and had forgotten to install the proprietary Nvidia one. So, thanks Nouveau guys for your tries, but no thanks. That stuff just don't work.

 

PS: huhu Jeannie \o/

Link to comment
Share on other sites

Although any discussion is welcome, I'd rather this doesn't turn into a debate about which driver is best and should be used. I know most people prefer the proprietary video drivers for gaming (even on Linux), and might have no problems maintaining them or get better performance. It's everyone's personal choice and experience... I have my own reasons for sticking to the free drivers after trying both.

What's important is that the builtin drivers are striving to become better, and some are getting there. I never tried Nouveau since I have ATI (Radeon driver). But as surprising as this might sound, I can barely notice any lower performance to fglrx in any game, especially since last month's update. Including high-end games (like Xonotic on "Ultra" settings) or older Windows games ran on WINE (NFS Carbon actually runs better).

On Second Life performance is absolutely the same, and every feature works perfectly. The only exception are those shader issues, which are likely due to few people testing SL with the free drivers, and neither side noticing its problems in relation to the other. Even if it's just to support Linux and its free software (including the drivers), I aim to get such bugs solved.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3786 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...