Bug 108317 - [GCN3] Black Textures only on GCN3 in Cemu Zelda Breath of the Wild (OpenGL 4.5)
Summary: [GCN3] Black Textures only on GCN3 in Cemu Zelda Breath of the Wild (OpenGL 4.5)
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-10 15:03 UTC by John Galt
Modified: 2019-09-25 18:27 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg from boot to the issue. (68.78 KB, text/plain)
2018-10-10 15:03 UTC, John Galt
Details
glxinfo (144.58 KB, text/plain)
2018-10-10 15:04 UTC, John Galt
Details
Xorg log (58.26 KB, text/x-log)
2018-10-10 15:04 UTC, John Galt
Details
Screenshot of the issue (839.13 KB, image/png)
2018-10-10 15:04 UTC, John Galt
Details
apitrace of running the game, navigating the menu, and loading the game. (312.91 MB, application/x-xz)
2018-10-16 18:32 UTC, John Galt
Details

Description John Galt 2018-10-10 15:03:15 UTC
Created attachment 141975 [details]
dmesg from boot to the issue.

In this game on Polaris, most of the textures are black (see attachment). This doesn't occur on Tahiti or Pitcairn, and happens on both 4.18.x and amdgpu-staging-drm-next. As far as I'm aware, this has always been an issue on Polaris.

There doesn't seem to be anything in these logs I was told to submit in #radeon, so please let me know what else I can do for you. I'm comfortable building any packages with patches or additional debugging (if applicable).

I've attached dmesg from boot to the issue (nothing I can see), along with glxinfo, Xorg.0.log, and a screenshot of the issue.

Thank you.
Comment 1 John Galt 2018-10-10 15:04:02 UTC
Created attachment 141976 [details]
glxinfo
Comment 2 John Galt 2018-10-10 15:04:29 UTC
Created attachment 141977 [details]
Xorg log
Comment 3 John Galt 2018-10-10 15:04:48 UTC
Created attachment 141978 [details]
Screenshot of the issue
Comment 4 John Galt 2018-10-10 15:29:31 UTC
I forgot to mention, if IRC works better for communication for anyone, I'm TheRealJohnGalt on Freenode #radeon.
Comment 5 Alex Deucher 2018-10-10 20:18:32 UTC
This is more likely an llvm or mesa issue than a kernel issue.
Comment 6 John Galt 2018-10-10 20:22:47 UTC
(In reply to Alex Deucher from comment #5)
> This is more likely an llvm or mesa issue than a kernel issue.

Okay. Seeing as this issue has always persisted on Polaris since mesa mild (when this game was first playable on linux), I'm not sure where to go from here since I can't bisect. Please let me know if there's any additional logging I can get.
Comment 7 Xalphenos 2018-10-13 07:59:50 UTC
I don't know if or in what way I could help but I wanted to add my experiences with this.

I've been using testing this for about the last year with various cards and here are my findings. The issue seems to be that most textures are rendered black.  Light sources are fine and anything transparent is fine.  https://i.imgur.com/J2HCAkb.png

The following are all cards that I have personally tested. 

rx 470 4gb Has this issue.
r9 280 3gb Does not
r9 Fury Has this issue
rx 460 2gb has this issue
vega 8(2200g) Does not

Since I've been at this for so long I've ran in to dozens of others trying to run this emulator as well.

Though not tested by me it seems we can add rx 480 and 580 as having the issue and vega 56 and vega 64 as not having the issue.  

I've been running this on mesa-git from lcarlier for nearly the last year and the results have always been the same.
Comment 8 John Galt 2018-10-15 21:59:20 UTC
I've found evidence of Polaris users without this issue on llvm 6 + mesa mild. However, my attempts at downgrading and building with llvm 6 and current mesa haven't gone well yet.

At least we know this is probably a regression in llvm 7+
Comment 9 Nicolai Hähnle 2018-10-16 17:27:59 UTC
Thanks for the report. An apitrace that reproduces the problem would be extremely helpful.
Comment 10 John Galt 2018-10-16 18:32:47 UTC
Created attachment 142047 [details]
apitrace of running the game, navigating the menu, and loading the game.

Thank you for the attention on this issue. Please let me know what else I can do to help with this.
Comment 11 John Galt 2018-10-17 19:07:30 UTC
Would using renderdoc help at all?
Comment 12 John Galt 2018-10-22 18:52:49 UTC
llvm 5.0.2 + mesa mild + http://sprunge.us/oPqhzd + polaris, still not past the regression: https://i.imgur.com/RAOwPtM.png
Comment 13 John Galt 2018-10-22 19:29:08 UTC
llvm 6.0.1 + above patch + mesa mild + polaris still has the same regression. At this point unsure personally if this has ever worked despite users saying it worked at one point on polaris.
Comment 14 John Galt 2018-10-22 23:08:45 UTC
It would seem that there was only ever one or two reports of this working on Polaris, and they're probably either fake or incorrect for other reasons (like running amdgpu-pro and not realizing).

Unfortunately this means that Polaris probably never worked here.
Comment 15 John Galt 2018-10-23 17:24:09 UTC
I've updated the main issue to reflect that this is affects all gcn3 cards specifically (AI + VI), and no <=gcn2 or gcn5 cards.
Comment 16 John Galt 2018-10-24 17:26:30 UTC
I thought I tested this before, and it turns out I had written R600DEBUG instead :(.

R600_DEBUG=nohyperz works around this issue.
Comment 17 John 2018-11-20 22:45:43 UTC
I confirm the issue on a 580 and the workaround worked as well!
Comment 18 Timothy Arceri 2018-11-29 04:17:36 UTC
(In reply to John Galt from comment #12)
> llvm 5.0.2 + mesa mild + http://sprunge.us/oPqhzd + polaris, still not past
> the regression: https://i.imgur.com/RAOwPtM.png

I had to do a google search to find out what "mesa mild" is. Please do not use this, it seems that was a hack to workaround the fact that radeonsi did not have compatibility profile support. The dev version of Mesa in git has had 4.5 support for a number of months now. As will the stable 18.3 release due out very soon.

Can you check if this is still a problem in Mesa from git? There is no need to use  "mesa mild" it's just forked version on Mesa from June. It seems the original author deleted the project when we got compat support in master and somebody has revived the repo. I really wish they had not done so.
Comment 19 John 2018-11-29 05:18:41 UTC
This is a problem with mesa master, I've never used mild myself and still have the issue.
Comment 20 Dimitar Atanasov 2019-01-22 09:10:47 UTC
I have same problem with kernel 5.0 rc2 and Mesa 19git 7bef192 (trough Padoka PPA), picture is OK if you use R600_DEBUG=nohyperz. For me it is around 10 FPS less with this option set in some games. VegaM.
Comment 21 John 2019-04-23 05:38:04 UTC
Maybe until a fix is found, could we add a driconfig workaround that disables hyperz automatically for cemu.exe?
Comment 22 GitLab Migration User 2019-09-25 18:27:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1334.


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.