Bug 102809 - Rust shadows(?) flash random colours
Summary: Rust shadows(?) flash random colours
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
Depends on:
Reported: 2017-09-16 21:06 UTC by bugzilla.ivah
Modified: 2017-10-23 16:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Video of the colours bug during transition to daytime (26.19 MB, video/mp4)
2017-09-16 21:06 UTC, bugzilla.ivah
Full trace (32 bytes, text/plain)
2017-09-19 07:17 UTC, bugzilla.ivah
possible fix (3.60 KB, patch)
2017-10-12 09:23 UTC, Nicolai Hähnle
Details | Splinter Review

Description bugzilla.ivah 2017-09-16 21:06:05 UTC
Created attachment 134281 [details]
Video of the colours bug during transition to daytime

See the attached mp4. The flashing is at its worst during day-night or night-day transitions, but will still happen at random throughout the day/night. The game is still playable, but it can be rather distracting. This is with the RX Vega 56, using the open source amdgpu driver.

Possibly related to https://bugs.freedesktop.org/show_bug.cgi?id=99413 but doesn't look like the same thing.
Comment 1 Tapani Pälli 2017-09-18 05:48:15 UTC
could you provide trace file (apitrace) of this?
Comment 2 bugzilla.ivah 2017-09-19 07:17:34 UTC
Created attachment 134328 [details]
Full trace

This is my first time working with apitrace, so I am unsure of how to trim the file properly. This trace includes the loading of the game, and then a couple flashes during a day to night transition.
Comment 3 Tapani Pälli 2017-09-19 10:32:32 UTC
on i965 driver there is no 'flashing' (tested on KBL), this is probably amd/gallium bug
Comment 4 bugzilla.ivah 2017-09-19 14:31:32 UTC
Is there anything that I can do to help?
Comment 5 Alex Deucher 2017-09-19 15:39:08 UTC
Please attach your xorg log, dmesg output, and glxinfo output.
Comment 6 Grazvydas Ignotas 2017-09-19 20:18:15 UTC
There is no 'flashing' on rx470 either on mesa git + llvm r311849 (~month old).
Comment 7 Nicolai Hähnle 2017-09-21 08:57:57 UTC
No flashing on Raven either with latest Mesa + LLVM. Most likely this is fixed already.
Comment 8 higuita 2017-09-21 23:43:16 UTC
try running the game outside steam and see if it solves the problem... in the past running the game via steam in linux was forcing a compatibility profile and breaking the game

check https://bugs.freedesktop.org/show_bug.cgi?id=99413
Comment 9 bugzilla.ivah 2017-09-22 04:30:51 UTC
I'm still experiencing this issue on the latest mesa-git and llvm. It looks like this bug is related to the amdgpu support for my card (RX Vega 56) rather than being a general bug.

I have tried running the game outside of steam and it sadly makes no difference.
Comment 10 Nicolai Hähnle 2017-10-10 11:18:04 UTC
I can confirm similar weird color flashes as shown in the video when playing the trace on RX Vega 64. So oddly enough, this seems Vega-specific, as I didn't observe it on Raven. I'm going to take a closer look.
Comment 11 Nicolai Hähnle 2017-10-12 09:23:43 UTC
Created attachment 134808 [details] [review]
possible fix

Please try the attached patch. It fixes the issue in the trace for me.
Comment 12 bugzilla.ivah 2017-10-13 23:00:17 UTC
Using the patch I now no longer have the flashes occurring in game. (In reply to Nicolai Hähnle from comment #11)
> Created attachment 134808 [details] [review] [review]
> possible fix
> Please try the attached patch. It fixes the issue in the trace for me.
Comment 13 Nicolai Hähnle 2017-10-23 16:11:10 UTC
commit f9ccfda9bc8166f833fdb64adf1eca5b8ee69251
Author: Nicolai Hähnle <nicolai.haehnle@amd.com>
Date:   Thu Oct 12 11:21:26 2017 +0200

    amd/common/gfx9: workaround DCC corruption more conservatively
    Fixes KHR-GL45.texture_swizzle.smoke and others on Vega.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102809
    Cc: mesa-stable@lists.freedesktop.org
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>

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.