Bug 96239 - [radeonsi tessellation] [R9 290/390] Random "texture flickering" (Shadow of Mordor, Tomb Raider, Unigine Heaven 4.0)
Summary: [radeonsi tessellation] [R9 290/390] Random "texture flickering" (Shadow of M...
Status: RESOLVED FIXED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-27 08:20 UTC by Jan Ziak (http://atom-symbol.net)
Modified: 2016-05-30 08:28 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Shadow of Mordor screenshot (1.33 MB, image/png)
2016-05-27 08:20 UTC, Jan Ziak (http://atom-symbol.net)
Details
Tomb Raider with tessellation (449.59 KB, image/jpeg)
2016-05-27 10:22 UTC, Jan Ziak (http://atom-symbol.net)
Details
ci-64-tess-blocks.patch (635 bytes, patch)
2016-05-28 23:52 UTC, Bas Nieuwenhuizen
Details | Splinter Review
Tomb Raider ci-64-tess-blocks screenshot (411.46 KB, image/jpeg)
2016-05-29 08:50 UTC, Jan Ziak (http://atom-symbol.net)
Details
S_03093C_OFFCHIP_BUFFERING(offchip_blocks) if >= CIK (797 bytes, patch)
2016-05-29 12:23 UTC, Jan Ziak (http://atom-symbol.net)
Details | Splinter Review

Description Jan Ziak (http://atom-symbol.net) 2016-05-27 08:20:52 UTC
Created attachment 124124 [details]
Shadow of Mordor screenshot

See the screenshot attached to this bug.

GPU: R9 390
OpenGL version string: 4.3 (Core Profile) Mesa 11.3.0-devel (git-8314dd7)

$ export MESA_GLSL_VERSION_OVERRIDE=430

This may be related to the off-chip tessellation patches, but the issue doesn't depend on whether tessellation is enabled or disabled.
Comment 1 Jan Ziak (http://atom-symbol.net) 2016-05-27 10:22:51 UTC
Created attachment 124125 [details]
Tomb Raider with tessellation

Tomb Raider without tessellation: OK
Tomb Raider with tessellation: random flickering
Comment 2 prazola 2016-05-28 18:20:47 UTC
I confirm the bug. It affects tessellation on heaven benchmark 4.0.
r9 390.
Comment 3 Clésio Luiz 2016-05-28 18:50:32 UTC
This affect me too, in a R9 290, radeonsi driver, using padoka PPA with Kubuntu 16.04.

When you disable tesselation in those games the problem goes away.
Comment 4 Bas Nieuwenhuizen 2016-05-28 23:52:26 UTC
Created attachment 124151 [details] [review]
ci-64-tess-blocks.patch

Does the attached patch help? If not I would appreciate it if someone could find the first commit that fails (using e.g. bisect).

Also, I noticed all reporters use hawaii/grenada pro chips. If anyone with a different chip also has this issue, please let me know.
Comment 5 Rafael Castillo 2016-05-29 02:13:16 UTC
i can confirm this patches generates 0 issues on TAHITI R9-280 and CAPE VERDE HD7700, so it seems it is specific to hawaii/grenada pro
Comment 6 Jan Ziak (http://atom-symbol.net) 2016-05-29 08:48:55 UTC
(In reply to Bas Nieuwenhuizen from comment #4)
> Created attachment 124151 [details] [review] [review]
> ci-64-tess-blocks.patch
> 
> Does the attached patch help? If not I would appreciate it if someone could
> find the first commit that fails (using e.g. bisect).
> 
> Also, I noticed all reporters use hawaii/grenada pro chips. If anyone with a
> different chip also has this issue, please let me know.

Unfortunately, ci-64-tess-blocks.patch is making the issue more severe. The frequency of "black triangles on screen" in Tomb Raider is higher.
Comment 7 Jan Ziak (http://atom-symbol.net) 2016-05-29 08:50:49 UTC
Created attachment 124154 [details]
Tomb Raider ci-64-tess-blocks screenshot
Comment 8 Jan Ziak (http://atom-symbol.net) 2016-05-29 10:50:39 UTC
(In reply to Bas Nieuwenhuizen from comment #4)
> Does the attached patch help? If not I would appreciate it if someone could
> find the first commit that fails (using e.g. bisect).

Checking out for example f91c85b29b8261ab3f44d292ed2130d4f577d976 and starting Tomb Raider restarts the X server on my machine.
Comment 9 Jan Ziak (http://atom-symbol.net) 2016-05-29 12:23:27 UTC
Created attachment 124155 [details] [review]
S_03093C_OFFCHIP_BUFFERING(offchip_blocks) if >= CIK

This patch fixes the issue on my R9 390.

The code is just a guesswork. Maybe it should be (2*offchip_blocks-1) instead?
Comment 10 Jan Ziak (http://atom-symbol.net) 2016-05-29 12:27:40 UTC
Passing +1 to S_03093C_OFFCHIP_BUFFERING() explains why changing offchip_blocks from 256 to 64 increases the severity of the issue.
Comment 11 Bas Nieuwenhuizen 2016-05-30 08:18:28 UTC
Thanks a lot for finding the cause of the issue.

I pushed e9d3246a7a74282fbbf95ed077e3c3b7750c8ddd to git, that patch should fix the issue.
Comment 12 Jan Ziak (http://atom-symbol.net) 2016-05-30 08:28:34 UTC
Fixed. Shadow of Mordor renders OK.


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.