Bug 58042 - [bisected] Garbled UI in Team Fortress 2 and Counter-Strike: Source
[bisected] Garbled UI in Team Fortress 2 and Counter-Strike: Source
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600
git
x86-64 (AMD64) All
: medium normal
Assigned To: Default DRI bug account
: regression
: 60224 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-09 11:22 UTC by dev
Modified: 2013-03-07 21:50 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshot of UI Problem (1.05 MB, image/png)
2012-12-09 11:22 UTC, dev
Details
32bit glxinfo (52.89 KB, text/plain)
2012-12-09 11:30 UTC, dev
Details
Full results of quick-driver piglit tests (370.00 KB, application/x-xz)
2013-02-13 20:01 UTC, Bryan Quigley
Details
possible fix (1.18 KB, patch)
2013-02-22 17:27 UTC, Alex Deucher
Details | Splinter Review
possible fix (1.37 KB, patch)
2013-02-22 21:46 UTC, Alex Deucher
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description dev 2012-12-09 11:22:33 UTC
Created attachment 71229 [details]
Screenshot of UI Problem

With 3.0 Mesa 9.1-devel (git-122dfc5) i get the attached garbled screen output when starting Linux native Team Fortress 2 Beta client. I tried all of the visual settings under advanced options but the problem persists. If you need more input feel free to ask.
Comment 1 dev 2012-12-09 11:30:54 UTC
Created attachment 71230 [details]
32bit glxinfo
Comment 2 Alex Deucher 2012-12-10 16:20:07 UTC
Is this a regression or has it always had rendering problems?  Does it render ok with mesa 9.0.x or 8.0.x?  If so, can you bisect?
Comment 3 dev 2012-12-10 22:56:02 UTC
Only tried it with mesa from git but i can give 9.0 a shot. Though as far as I know the native client is not officially released yet, so I don't know if bisecting will help.
Comment 4 Andreas Boll 2012-12-12 19:08:22 UTC
1eedebc65b02130ef7a27062a1ed67972a317a08 is the first bad commit
commit 1eedebc65b02130ef7a27062a1ed67972a317a08
Author: Marek Olšák <maraeo@gmail.com>
Date:   Thu Nov 1 02:00:37 2012 +0100

    r600g: re-enable handling of DISCARD_RANGE, improving performance
    
    It seems to work for me now. Even the graphics corruption is gone.
    
    This also boosts performance in Reaction Quake.


Reverting this commit on current master (e721a76) does fix the garbled UI
on my rv770.
Comment 5 Bryan Quigley 2012-12-29 04:10:17 UTC
I have the garbled issue, but if I try to play the game it soon crashes.  Do you all have this additional issue as well?
Comment 6 Andreas Boll 2013-02-01 15:55:37 UTC
(In reply to comment #5)
> I have the garbled issue, but if I try to play the game it soon crashes.  Do
> you all have this additional issue as well?

Nope, I can play with the garbled issue and it doesn't crash.
Comment 7 Laurent carlier 2013-02-13 17:56:55 UTC
*** Bug 60224 has been marked as a duplicate of this bug. ***
Comment 8 Marek Olšák 2013-02-13 17:59:44 UTC
Do the piglit transform feedback tests pass?
Comment 9 Bryan Quigley 2013-02-13 19:20:10 UTC
All 241 tests with this command pass:  piglit-run.py -t transform_feedback /usr/share/piglit/tests/all.tests
Comment 10 Bryan Quigley 2013-02-13 20:01:45 UTC
Created attachment 74780 [details]
Full results of quick-driver piglit tests
Comment 11 almos 2013-02-17 20:51:13 UTC
I just tried steam and tf2 on linux, and I didn't see any rendering error. The only abnormal thing was this line:
This system DOES NOT support the OpenGL extension GL_ARB_uniform_buffer.

HD6850, OpenGL version string: 3.0 Mesa 9.2-devel (git-b681ed6)
Comment 12 Marek Olšák 2013-02-17 21:49:19 UTC
Could you please attach an apitrace file showing the issue?
Comment 13 Bryan Quigley 2013-02-21 03:36:42 UTC
Apitrace done.. It's about 300MB so I uploaded it to GoogleDrive.

https://docs.google.com/file/d/0B9PdLrdrtm1wRW9VdVJiOTl5YVU/edit?usp=sharing
Comment 14 Marek Olšák 2013-02-22 12:01:22 UTC
Fixed by Mesa commit aac81387447152b5bda99150414d636a003adc5. Closing.
Comment 15 Andreas Boll 2013-02-22 13:17:18 UTC
I can still reproduce the garbled ui on my rv770

Mesa f6b40ddd2d92fd82ccf7ce695d4ed026ef7cfd11
Kernel 3.8.0
Comment 16 Alex Deucher 2013-02-22 15:09:36 UTC
the patches in bug 50655 may help.
Comment 17 Alex Deucher 2013-02-22 17:27:29 UTC
Created attachment 75334 [details] [review]
possible fix

Does this patch help?
Comment 18 Andreas Boll 2013-02-22 18:22:04 UTC
Nope it doesn't help :/
Comment 19 Alex Deucher 2013-02-22 21:46:20 UTC
Created attachment 75374 [details] [review]
possible fix

How about this one?
Comment 20 Andreas Boll 2013-02-22 23:08:41 UTC
It doesn't help either.
Comment 21 Andreas Boll 2013-02-23 18:18:12 UTC
I've tested Mesa f6b40ddd2d92fd82ccf7ce695d4ed026ef7cfd11 
with the patch set "r6xx flushing rework and enable CP DMA (v2)"
from http://lists.freedesktop.org/archives/mesa-dev/2013-February/035081.html
and it doesn't fix the issue.

Note that older kernels (eg 3.5) which don't have CP DMA are affected by this issue too.

I could reproduce the garbled UI on Counter-Strike: Source too.
Reverting 1eedebc65b02130ef7a27062a1ed67972a317a08 fixes the issue on CSS.
Comment 22 Benjamin Bellec 2013-02-25 20:26:12 UTC
(In reply to comment #21)
> I could reproduce the garbled UI on Counter-Strike: Source too.
> Reverting 1eedebc65b02130ef7a27062a1ed67972a317a08 fixes the issue on CSS.

Me too.
I have a RV770 and reverting 1eedebc65b02130ef7a27062a1ed67972a317a08 fixes the issue on CSS.
Comment 23 Simone Scanzoni 2013-02-27 15:54:02 UTC
Mesa 9.2-devel (git-4deefd9) showed the problem here with TF2, I don't have CSS.
Added patches:
 r600g: emit a ps partial flush after CP DMA
 r600g: enable CP DMA on r6xx (v3)
and the problem persisted.
Then reverting commit 1eedebc65b02130ef7a27062a1ed67972a317a08 fixed the issue.
Mesa 9.0.3 works.
HD3850 (RV670) AGP, kernel 3.8.0

First comment so I want to thank the devs for their work. :)
Comment 24 Andreas Boll 2013-02-27 16:19:12 UTC
(In reply to comment #23)
> Mesa 9.2-devel (git-4deefd9) showed the problem here with TF2, I don't have
> CSS.
> Added patches:
>  r600g: emit a ps partial flush after CP DMA
>  r600g: enable CP DMA on r6xx (v3)
> and the problem persisted.
> Then reverting commit 1eedebc65b02130ef7a27062a1ed67972a317a08 fixed the
> issue.
> Mesa 9.0.3 works.
> HD3850 (RV670) AGP, kernel 3.8.0
> 
> First comment so I want to thank the devs for their work. :)

Nice to hear from you!

Could you test this patch
http://lists.freedesktop.org/archives/mesa-dev/2013-February/035347.html

It helps here on rv770 and kernel 3.8.0
Comment 25 Bryan Quigley 2013-02-27 19:20:12 UTC
> Could you test this patch
> http://lists.freedesktop.org/archives/mesa-dev/2013-February/035347.html

Patch 3/5 doesn't help for me.  Should I try out the other patches in that series? (nee ATI RV670 [Radeon HD 3870], Git kernel (pre 3.9))
Comment 26 Alex Deucher 2013-02-27 20:25:41 UTC
(In reply to comment #25)
> > Could you test this patch
> > http://lists.freedesktop.org/archives/mesa-dev/2013-February/035347.html
> 
> Patch 3/5 doesn't help for me.  Should I try out the other patches in that
> series? (nee ATI RV670 [Radeon HD 3870], Git kernel (pre 3.9))

The only patch that's relevant for r6xx is 2/5.  Does that help?  You might need to apply 1/5 first.
Comment 27 Bryan Quigley 2013-02-27 21:00:57 UTC
> The only patch that's relevant for r6xx is 2/5.  Does that help?

That's just turning that off (same as a revert specific to r600 though).  Works perfectly.
Comment 28 Marek Olšák 2013-02-28 09:35:29 UTC
Andreas Boll requested a branch of all my latest Mesa patches for people to test it. It's here:

git://people.freedesktop.org/~mareko/mesa master
Comment 29 Andreas Boll 2013-02-28 16:14:28 UTC
(In reply to comment #28)
> Andreas Boll requested a branch of all my latest Mesa patches for people to
> test it. It's here:
> 
> git://people.freedesktop.org/~mareko/mesa master

This branch fixes the garbled screen and improves the performance (~ 120 - 160%)
here with tf2 and css on my rv770.

Please test it!
Comment 30 Benjamin Bellec 2013-02-28 19:11:40 UTC
(In reply to comment #28)
> Andreas Boll requested a branch of all my latest Mesa patches for people to
> test it. It's here:
> 
> git://people.freedesktop.org/~mareko/mesa master

Awesome!
With my RV770 all is rendering correctly now in CS:S! Moreover, I'm always at 60FPS (vsync certainly enabled) with all graphical options enabled (even MSAA 2x) (1680*1050)!

Note that I'm using 3.7.9-201.fc18.x86_64.
Comment 31 Simone Scanzoni 2013-03-01 21:41:33 UTC
I tested master Mesa 9.2-devel (git-a40ba43) and TF2 works with my RV670.
Comment 32 dev 2013-03-07 21:50:49 UTC
Tested and works for me!