https://bugs.freedesktop.org/show_bug.cgi?id=93292
Bug ID: 93292 Summary: "Thea: The Awakening" world map textures not rendered (blue background) Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/r600 Assignee: dri-devel@lists.freedesktop.org Reporter: glogow@fbihome.de QA Contact: dri-devel@lists.freedesktop.org
Created attachment 120410 --> https://bugs.freedesktop.org/attachment.cgi?id=120410&action=edit Thea with interface only world map
The problematic game can be downloaded from the link in the first message in the following steam thread or via the steam beta channel (DRM free, free for Linux): https://steamcommunity.com/app/378720/discussions/0/490125737485986607?fp=2#...
Someone else with older AMD hardware reported the same problem in the linked communty thread. My hardware is: 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV710/M92 [Mobility Radeon HD 4530/4570/545v]
When starting the actual gameplay, only the interface is rendered but not the games world map, basically rendering the game unplayable (see attached image).
I'm on Ubuntu Trusty 14.04, 3.13 kernel. This happens with stock Mesa from the Ubuntu release and with the git release from the oibaf PPA: https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers
The apitrace is too large to upload for me (1.5 GB), but doesn't show a particular error, except for an early glClear without a context; even the trimmed one is 1,25GB. xz compressed is still 620MB.
The game renders correctly when started with "LIBGL_ALWAYS_SOFTWARE=1". I confirmed this by also rendering the apitrace in software. imirkin told me on IRC, that this actually is a bug in the r600 driver.
I've compiled Mesa git packages with "--enable-debug" and can test a patch, if needed. I'm jmux on freenode and will be lingering around in the channel for some time and normally can be found in the libreoffice-dev channel.
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #1 from Jan-Marek Glogowski glogow@fbihome.de --- I added an trimmed apitrace run for download: https://docs.google.com/uc?id=0Bwde9zQo1PeCVEExTm83Wk16WDA&export=downlo...
https://bugs.freedesktop.org/show_bug.cgi?id=93292
Ilia Mirkin imirkin@alum.mit.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #120410|text/plain |image/png mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #2 from Ilia Mirkin imirkin@alum.mit.edu --- In case it's of any interest, I tested this on nouveau -- on nvc0 (GF108) the trace replays seemingly fine. On nv50 (GT215), I also get a failure on the map screen, but it's different -- everything is drawn except the background, so it appears as though it's all black(ish), with trees/etc drawn over it.
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #3 from Jan-Marek Glogowski glogow@fbihome.de --- (In reply to Ilia Mirkin from comment #2)
The current bugs component is tagged Drivers/Gallium/r600
Probably you should open a new bug for nv50 or change the component, otherwise it'll probably be unnoticed. I'm actually not sure if the component is right, as I expected it to be reported to the mesa-dev mailing list.
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #4 from Jan-Marek Glogowski glogow@fbihome.de --- I uploaded a new apitrace with low details settings and disabled intro video, which makes it much smaller (170 MB xz).
https://docs.google.com/uc?id=0Bwde9zQo1PeCVVdZU2ZSM3hKcXc&export=downlo...
While I was at it I played a bit with qapitrace, comparing the r600 and swrast output. And I found the origin of the bug.
The "breaking" call is "1247216" in the new trace: glDrawElements(mode = GL_TRIANGLES, count = 600, type = GL_UNSIGNED_SHORT, indices = NULL)
The call "destroys" the depth map, filling it with a constant value, so nothing is rendered.
Actually I suspect the glUseProgram(87) in call 1247202 to be the origin of the problem, as it installs a shader program (AFAIK OpenGL) and because I'm able to play Thea using the llvm r600 backend via "R600_DEBUG=llvm" and if I disable "ambient occlusion", which is also broken.
My current mesa build is based on commit 6303231a1ddf646b05c43c6bbc7fa71314ebb3fc
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #5 from Jan-Marek Glogowski glogow@fbihome.de --- Created attachment 121137 --> https://bugs.freedesktop.org/attachment.cgi?id=121137&action=edit Additional debugging for the r600/sb shader compiler
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #6 from Jan-Marek Glogowski glogow@fbihome.de --- Created attachment 121138 --> https://bugs.freedesktop.org/attachment.cgi?id=121138&action=edit Shader with peephole optimize_CNDcc_op run
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #7 from Jan-Marek Glogowski glogow@fbihome.de --- Created attachment 121139 --> https://bugs.freedesktop.org/attachment.cgi?id=121139&action=edit Shader without peephole optimize_CNDcc_op run
Working shader
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #8 from Jan-Marek Glogowski glogow@fbihome.de --- working command line with patch to get the shader log: R600_SB_DSKIP_START=94 R600_SB_DSKIP_END=94 R600_SB_DSKIP_MODE=63 glretrace thea.trace
working command line without the patch to verify shader bug: R600_SB_DSKIP_START=94 R600_SB_DSKIP_END=94 R600_SB_DSKIP_MODE=1 glretrace thea.trace
In the end I'm just using the llvm backend (R600_DEBUG=llvm). I just see a minimal difference on this HW in game of ~0.5 frames (slower LLVM). Actually I had other small rendering glitches with the SB shader backend, which I didn't track down.
(In reply to Ilia Mirkin from comment #2)
The original (large) apitrace had ambient occlusion (AO) activated AFAIK, but I deleted it, so I don't know. AO was fixed for me with a patch in the last week. As my hardware is already slow (just 15fps in the game), enabling this renders the game unplayable, but now I get soft shadows at the price of ~50% frame drop.
https://bugs.freedesktop.org/show_bug.cgi?id=93292
--- Comment #9 from Grazvydas Ignotas notasas@gmail.com --- (In reply to Jan-Marek Glogowski from comment #4)
FWIW this trace works fine for me on my Juniper XT [Radeon HD 5770] on current git (cd9c07e7cdf) with default settings. R600_DEBUG=llvm crashes, R600_DEBUG=llvm,nosb shows some glitches and R600_DEBUG=nosb seems to be fine too. The other trace does a 404 now so can't check.
https://bugs.freedesktop.org/show_bug.cgi?id=93292
GitLab Migration User gitlab-migration@fdo.invalid changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |MOVED
--- Comment #10 from GitLab Migration User gitlab-migration@fdo.invalid --- -- 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/561.
dri-devel@lists.freedesktop.org