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.
Created attachment 141976 [details]
Created attachment 141977 [details]
Created attachment 141978 [details]
Screenshot of the issue
I forgot to mention, if IRC works better for communication for anyone, I'm TheRealJohnGalt on Freenode #radeon.
This is more likely an llvm or mesa issue than a kernel issue.
(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.
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.
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+
Thanks for the report. An apitrace that reproduces the problem would be extremely helpful.
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.
Would using renderdoc help at all?
llvm 5.0.2 + mesa mild + http://sprunge.us/oPqhzd + polaris, still not past the regression: https://i.imgur.com/RAOwPtM.png
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.
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.
I've updated the main issue to reflect that this is affects all gcn3 cards specifically (AI + VI), and no <=gcn2 or gcn5 cards.
I thought I tested this before, and it turns out I had written R600DEBUG instead :(.
R600_DEBUG=nohyperz works around this issue.
I confirm the issue on a 580 and the workaround worked as well!
(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.
This is a problem with mesa master, I've never used mild myself and still have the issue.
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.