Bug 58840

Summary: [r600g][hd6850] rendering error with MSAA
Product: Mesa Reporter: almos <aaalmosss>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: neverball.png

Description almos 2012-12-28 21:04:18 UTC
There are weird rendering errors when OpenGL applications use MSAA framebuffer. The output is mostly noise. KDE 4.8 with OpenGL compositing is totally unusable this way.

It is also interesting, that MS visuals are only advertised in glxinfo, if I have the msaa-capable r600_dri.so installed on the system. If I only enable it via LIBGL_DRIVERS_PATH and LD_LIBRARY_PATH, they are not advertised, but still selectable. At least with __GL_FSAA_MODE=4 the applications are broken in the same way.
Comment 1 Alex Deucher 2013-01-02 14:18:11 UTC
Please attach your xorg log and dmesg output.
Comment 2 almos 2013-01-02 23:13:03 UTC
(In reply to comment #1)
> Please attach your xorg log and dmesg output.

The same as the ones at bug 58839
Comment 3 almos 2013-01-02 23:40:50 UTC
Created attachment 72400 [details]
neverball.png

The frames of Neverball are ok most of the time, but it flashes to garbage like in the attachment several times per second. The other applications I tried are sauerbraten and kde-window-manager, those are permanently garbage.
Comment 4 almos 2013-01-06 20:07:28 UTC
Now I tried again with updated mesa (git-8ed6b14). Now glxgears, sauerbraten, ut2004 (32bit), fgfs (when did 3d clouds become such a performance killer?) are fine. Neverball still flashes garbage. Nexuiz is 3fps with AA. Etqw (32bit) and team fortress 2 (32bit, wine) cause gpu lockup even without AA (I'll bisect later). Alien-arena with AA dies with
r600_texture.c:776:r600_texture_transfer_map: Assertion `rtex->resource.b.b.nr_samples <= 1' failed.

In all cases I had to use the env var, even games that support setting AA cannot do it themselves.
Comment 5 almos 2013-01-06 22:14:50 UTC
Cogs also works, sort of. It has to be started with the __GL_FSAA_MODE=4 env var *and* antialias must be enabled in the options menu to see AA. However, it cannot start this way, it says
Couldn't set 1280x960 OpenGL video mode: Couldn't find matching GLX visual
on the next startup. The antialias has to be reset to 0 in ~/.local/share/Cogs/cogs.ini, and re-enabled in the menu. Additionally, there is a 90% chance of segfault on startup and on changing the antialias setting.
Comment 6 Marek Olšák 2013-01-07 00:29:54 UTC
(In reply to comment #5)
> Couldn't set 1280x960 OpenGL video mode: Couldn't find matching GLX visual
> on the next startup.

If you want MSAA GLX visuals, you must *install* the gallium driver and restart the X server for it to pick up the visuals.
Comment 7 almos 2013-01-07 09:51:50 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Couldn't set 1280x960 OpenGL video mode: Couldn't find matching GLX visual
> > on the next startup.
> 
> If you want MSAA GLX visuals, you must *install* the gallium driver and
> restart the X server for it to pick up the visuals.

I know, but the last time I tried to install it, the whole screen became noise, like I said in the initial report.
Comment 8 almos 2013-01-24 23:32:41 UTC
Now I tested things again, and I only see rendering errors with neverball.

I don't know if it is expected, but some games completely slow down to a few fps with msaa enabled (etqw, nexuiz), while others slow down only when lots of geometry is seen (sauerbraten). I still can't install the msaa-capable r600_dri.so, because of the kde-window-manager slowdown bug discussed at bug 55998, so I used the __GL_FSAA_MODE=4 env var for the tests.
Comment 9 Marek Olšák 2013-01-25 12:33:37 UTC
(In reply to comment #8)
> Now I tested things again, and I only see rendering errors with neverball.
> 
> I don't know if it is expected, but some games completely slow down to a few
> fps with msaa enabled (etqw, nexuiz), while others slow down only when lots
> of geometry is seen (sauerbraten). I still can't install the msaa-capable
> r600_dri.so, because of the kde-window-manager slowdown bug discussed at bug
> 55998, so I used the __GL_FSAA_MODE=4 env var for the tests.

Does the slowdown happen with the latest kernel from Linus Torvalds's git?
Comment 10 almos 2013-01-25 17:35:13 UTC
(In reply to comment #9)
> 
> Does the slowdown happen with the latest kernel from Linus Torvalds's git?

Currently I use 3.6.4. I plan to upgrade to 3.7.4 this weekend. How stable is the git version? How do I check it out? Is 3.8-rc4 enough?
Comment 11 Marek Olšák 2013-01-26 01:48:58 UTC
The latest kernel may be more stable for your graphics card. You can get it from:

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Comment 12 almos 2013-01-29 00:16:34 UTC
I happened to check out the git exactly at the tag 3.8-rc5 as HEAD. With that the preformance issues in etqw and nexuiz are gone. The neverball problem is still there though.
Comment 13 almos 2014-05-24 20:03:26 UTC
With Mesa 10.1.1 and kernel 3.12 Neverball runs perfectly even with __GL_FSAA_MODE=4. Closing.

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.