Bug 86663 - [radeonsi] Black squares in Sanctum 2
Summary: [radeonsi] Black squares in Sanctum 2
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:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 14:38 UTC by Daniel Scharrer
Modified: 2015-01-15 15:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Sanctum 2 (map Trainstation) with highest texture quality setting (1.23 KB, text/plain)
2014-11-24 14:38 UTC, Daniel Scharrer
Details
Sanctum 2 (map Trainstation) with highest texture quality setting (157.38 KB, image/jpeg)
2014-11-24 14:40 UTC, Daniel Scharrer
Details
Sanctum 2 (map Trainstation) with lowest texture quality setting (178.16 KB, image/jpeg)
2014-11-24 14:41 UTC, Daniel Scharrer
Details
Deadfall Adventures menu screen (560.73 KB, image/jpeg)
2014-11-24 14:55 UTC, Daniel Scharrer
Details
Deadfall Adventures menu screen with DX10_CLAMP patch (597.34 KB, image/jpeg)
2014-12-12 08:55 UTC, Daniel Scharrer
Details

Description Daniel Scharrer 2014-11-24 14:38:09 UTC
Created attachment 109943 [details]
Sanctum 2 (map Trainstation) with highest texture quality setting
Comment 1 Daniel Scharrer 2014-11-24 14:39:05 UTC
(I fail at bugzilla today :/)

On some maps in Sanctum 2 I'm getting black squares in some spots.

The squares always seem to be the same screen-space size (120×120 pixels, some are wider/taller but that could just be overlapping squares), but are centered around fixed positions in the game world and not aligned to a screen-space grid.

Moving the camera or character can cause some of them to disappear/reappear.

The squares don't just cover the world geometry, but also the user interface including the hud and menu, and even loading screens.

This happens with and without R600_DEBUG=nohyperz. It does not happen with fglrx 14.9.

It doesn't happen on all maps, but for those affected (e.g. Trainstation) it is 100% reproducible.

Lowering texture quality in the game's options reduces the number of black squares. For the screenshots I had all other settings at their lowest value (except bloom turned on as that is required for the game to render correctly, even on other drivers).

I have tried to create an apitrace showing the problem but glretrace crashes inside glDrawRangeElements() shortly before getting to the buggy part when replaying with either radeonsi or fglrx. I can still provide it if anyone is interested, but it's probably not appropriate to link here.
Comment 2 Daniel Scharrer 2014-11-24 14:40:33 UTC
Created attachment 109944 [details]
Sanctum 2 (map Trainstation) with highest texture quality setting
Comment 3 Daniel Scharrer 2014-11-24 14:41:06 UTC
Created attachment 109945 [details]
Sanctum 2 (map Trainstation) with lowest texture quality setting
Comment 4 Daniel Scharrer 2014-11-24 14:55:08 UTC
Created attachment 109946 [details]
Deadfall Adventures menu screen

I have also noticed similar black squares in the menu screen of Deadfall Adventures. In that case, changing the texture quality to the lowest setting gets rid of them. Changing all other video settings from highest to lowest reduces the size of the squares from ~104² pixels to 50² pixels.

I guess the root cause might just be single NaN/negative fragments that then get propagated by a subsequent screen-space filter into a whole square?

Neither game has any VGPR register spilling warnings in their console output so it's not that.

Oh, and this is all with Mesa 10.5.0-devel (git-fecae46), but I remember also seeing this with older versions.
Comment 5 Daniel Scharrer 2014-11-24 15:05:40 UTC
GPU is a Radeon HD 7950
Comment 6 Marek Olšák 2014-11-26 10:22:13 UTC
(In reply to Daniel Scharrer from comment #4)
> I guess the root cause might just be single NaN/negative fragments that then
> get propagated by a subsequent screen-space filter into a whole square?

I think you nailed it. Yes, NaNs must be causing this. The question is how they occur.
Comment 7 Christoph Haag 2014-11-28 13:09:42 UTC
Is bug 83510 the same problem?
Comment 8 Daniel Scharrer 2014-11-28 13:31:20 UTC
(In reply to Marek Olšák from comment #6)
> The question is how they occur.

Right, any idea how to track that down? I'll try to figure out why glretrace crashes.

(In reply to Christoph Haag from comment #7)
> Is bug 83510 the same problem?

Looks different enough to me. For example in your videos on that bug the HUD is alpha-blended just fine over the black spots.
Comment 9 Daniel Scharrer 2014-12-04 21:56:52 UTC
FYI, the black squares in Sanctum 2 are also fixed by the legacy RCP workaround [1], so this may be the same root cause as in bug 83510 after all.

No change in the Deadfall Adventures menu screen though.

[1] http://lists.freedesktop.org/archives/mesa-dev/2014-December/071973.html
Comment 10 Daniel Scharrer 2014-12-12 08:55:33 UTC
Created attachment 110770 [details]
Deadfall Adventures menu screen with DX10_CLAMP patch

Setting the DX10_CLAMP bit [1] also fixes the black squares in Sanctum 2. In Deadfall Adventures however there are still much smaller black squares as can be seen in the attached screenshot.

[1] http://lists.freedesktop.org/archives/mesa-dev/2014-December/072402.html
Comment 11 Daniel Scharrer 2015-01-15 15:18:11 UTC
The Sanctum issue has been fixed with commit http://cgit.freedesktop.org/mesa/mesa/commit/?id=2150db4d5daad3781876254d2b440367afd756cd


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.