Bug 100239 - Incorrect rendering in CS:GO
Summary: Incorrect rendering in CS:GO
Status: REOPENED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 77449
  Show dependency treegraph
 
Reported: 2017-03-16 20:35 UTC by network723
Modified: 2019-01-10 09:44 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Broken AUG scope (231.69 KB, image/jpeg)
2017-03-16 20:35 UTC, network723
Details
bo clear hack, needs 4.9 kernel at least (853 bytes, patch)
2017-05-10 23:44 UTC, Grazvydas Ignotas
Details | Splinter Review
issue on 18.1.3 (182.22 KB, image/jpeg)
2018-07-07 21:11 UTC, Bruno Jacquet (Xaapyks)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description network723 2017-03-16 20:35:30 UTC
Created attachment 130271 [details]
Broken AUG scope

In windows, when you're aiming with AUG the screen around the scope is blurred. On Mesa we have strange black pattern. The pattern changes on each cs:go restart.

I can reproduce it on Mesa 17.1-git + llvm 5.0 + RX480 and on stock Ubuntu 16.04.2 (Mesa 13.0, I believe) + R7 240

Note: green rectangles are not the bug, it's me hiding my steam name.
Comment 1 Samuel Pitoiset 2017-03-16 21:05:41 UTC
Thanks for reporting this.

It would be nice if you can upload good/bad screenshots. And it would be very nice if you can record an apitrace which reproduces the issue.
Comment 2 Ernst Sjöstrand 2017-03-22 18:56:52 UTC
I can't reproduce this with my Fury, and have never seen it, for reference...
Any tweaks like R600_DEBUG etc?
Comment 3 Bruno Jacquet (Xaapyks) 2017-04-27 19:39:20 UTC
Hello,

I have the same problem on my RX 480 and current mesa git.
I produced an apitrace but it is ~734MiB and trimming seems to be corrupting it, I might be doing something wrong.
How should I share and eventually trim/extract only the relevant part from the trace?
Comment 4 Nicolai Hähnle 2017-04-29 08:52:37 UTC
You can upload the trace on Google Drive or some similar storage service.
Comment 5 Bruno Jacquet (Xaapyks) 2017-04-29 12:22:14 UTC
I took another apitrace, which I uploaded here : http://dl.free.fr/u43NDpptG
But when I replay my traces (glretrace), I notice :
- Graphical corruptions when I open the ingame console or when a map is loaded  (which is NOT a problem I seen during normal runtime). The menu is fine.
- The scope bug (this report subject) is not visible from the replayed trace on my end... 

Maybe it is an apitrace bug from my side? Not sure if I may report this to the apitrace project, this happens in apitrace from git too.
Comment 6 Michel Dänzer 2017-05-01 03:44:16 UTC
Try setting the environment variable MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage when capturing the apitrace.
Comment 7 Bruno Jacquet (Xaapyks) 2017-05-01 12:16:20 UTC
Thank you very much Michel, indeed masking this extension produces a correct trace that can be replayed to reproduce the scope bug.

So here is a new apitrace showing the bug : http://dl.free.fr/oD7tgoSw9

For reference, the outside of the scope is supposed to be slightly blurred. Random screenshot found on google images to show the expected rendering : http://misc.team-aaa.com/perso_skullgun/MaJCSGO/Augscope.jpg
Comment 8 Samuel Pitoiset 2017-05-06 14:59:15 UTC
Thanks for the trace.

The issue can be reproduced with mesa/llvm from today on RX480. I'm investigating.
Comment 9 Grazvydas Ignotas 2017-05-10 23:44:59 UTC
Created attachment 131302 [details] [review]
bo clear hack, needs 4.9 kernel at least

This seems to be the same problem as with DOOM Vulkan, some buffer is not cleared  when it should be. It still needs to be investigated wether it's game's fault or radeonsi's though...
Comment 10 Bruno Jacquet (Xaapyks) 2017-05-13 08:32:01 UTC
Thank you Samuel.

Grazvydas, thanks for the patch, it does fix the visual issue, even though I understand this is not a proper fix. I did not notice a performance drop (in CS:GO at least) with it, so I will be using until this issue is resolved.
Comment 11 network723 2017-12-16 16:04:23 UTC
There is no corruption on scope with current mesa git + llvm 6.0 on TAHITI. I don't have RX480 anymore, so I can't test it with POLARIS.
Comment 12 Timothy Arceri 2018-04-02 11:02:08 UTC
The apitrace link not longer works so can't test on POLARIS but assuming this is fixed as per comment 11. Please reopen if this is not the case.
Comment 13 Bruno Jacquet (Xaapyks) 2018-07-07 21:11:54 UTC
Created attachment 140499 [details]
issue on 18.1.3
Comment 14 Bruno Jacquet (Xaapyks) 2018-07-07 21:12:41 UTC
Unfortunately this is not resolved on RX480 and mesa 18.1.3.
I attached a screenshot of the issue.
Comment 15 network723 2018-07-08 09:30:56 UTC
(In reply to Bruno Jacquet (Xaapyks) from comment #14)
> Unfortunately this is not resolved on RX480 and mesa 18.1.3.
> I attached a screenshot of the issue.

I confirm this is happening on mesa-git + RX560. Unfortunately, the hardware is not mine, so I cannot test it with bo clear hack. There is also some texture corruption ob de_nuke, but i'm not sure if it's related to this bug: https://i.imgur.com/tjfI2uY.jpg. If someone can test these with bo clear hack please do it, I can't do it myself as I'm still waiting for the refund money for my dead RX480 :(
Comment 16 Bruno Jacquet (Xaapyks) 2018-07-08 10:27:51 UTC
Here is the apitrace for the scope bug : http://xaapyks.info/csgo_linux64.3.trace.bz2 (mesa 18.1.3)
md5 = a876e4fd64168486c3e6dfefd9edca86

It seems I have to set STEAM_RUNTIME=0 to reproduce it.

>There is also some texture corruption ob de_nuke, but i'm not sure if it's related to this bug: https://i.imgur.com/tjfI2uY.jpg.
I am not experiencing this.
Comment 17 network723 2018-11-25 09:52:14 UTC
Still happens with Mesa git master 9fc1ce258cf956d21a9d4940a3c10c5547d93408, Polaris10 only, Oland and Tahiti are not affected.
Comment 18 network723 2019-01-10 09:44:33 UTC
Is this bug still being worked on?

The problem is still here, but there's a little update: sometimes texture gets cleared correctly. 

Currently running Mesa git master 31e4c9ce400341df9b0136419b3b3c73b8c9eb7e


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.