https://bugs.freedesktop.org/show_bug.cgi?id=106594
Bug ID: 106594 Summary: [radeonsi,regression,apitrace] Prison Architect exhibits glitches Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Keywords: regression Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: kai@dev.carbon-project.org QA Contact: dri-devel@lists.freedesktop.org Blocks: 77449
Created attachment 139660 --> https://bugs.freedesktop.org/attachment.cgi?id=139660&action=edit Compressed trace
I wanted to play Prison Architect again, but when I launch the game and during gameplay there are sometimes triangles flickering over the screen in various colours of the rainbow (see the first frame of the trace). And there are actions that trigger these glitches reliably like opening the staff menu and placing the mouse with a staff type selected over the map (see attached screenshot or eg. Frame 599 in the trace).
This is a regression, because I was able to play Prison Architect with no trouble in the past. However I cannot say whether this is a regression in PA or in Mesa/LLVM, since it has been a while since I last played PA and there have been updates to PA as well as the graphics stack. In any case I prepared a trace (which looks a bit funny on reply: lots of black with the game window stuck in the lower left corner of the replay), I'll attach as a compressed file to this bug. I'll also attach the log from the game, there are couple of lines, that seem interesting, like:
==OPENGL==> [location 'Bitmap::ConvertToTexture Before Texture Creation'] error code 0x502 (invalid operation)
While I'm using the "experimental VBO" feature of PA, turning that off, doesn't fix this bug and thus seems unrelated.
This bug affects at least the Steam and the Humble Bundle builds of version 13f.
The graphics stack I used (fully updated Debian testing as a base) for testing is: GPU: Hawaii PRO [Radeon R9 290] (ChipID = 0x67b1) Mesa: Git:master/6f558fb0f7 libdrm: 2.4.91-2 LLVM: SVN:trunk/r332816 (7.0 devel) X.Org: 2:1.19.6-1 Linux: 4.16.10 Firmware (firmware-amd-graphics): 20170823-1 libclc: Git:master/a2118d58fc DDX (xserver-xorg-video-amdgpu): 18.0.1-1
Let me know, if you need anything else.
Referenced Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=77449 [Bug 77449] Tracker bug for all bugs related to Steam titles
https://bugs.freedesktop.org/show_bug.cgi?id=106594
--- Comment #1 from Kai kai@dev.carbon-project.org --- Created attachment 139661 --> https://bugs.freedesktop.org/attachment.cgi?id=139661&action=edit Glitch while placing new staff on the map
https://bugs.freedesktop.org/show_bug.cgi?id=106594
--- Comment #2 from Kai kai@dev.carbon-project.org --- Created attachment 139662 --> https://bugs.freedesktop.org/attachment.cgi?id=139662&action=edit Game output to STDOUT and STDERR
https://bugs.freedesktop.org/show_bug.cgi?id=106594
--- Comment #3 from Kai kai@dev.carbon-project.org --- I was able to check for this behaviour on a system with an integrated Intel GPU (HD Graphics 530 (Skylake GT2); PCIID: 0x1912) on Mesa 18.0.3 and it didn't show these glitches.
The OpenGL error line ("==OPENGL==> [location 'Bitmap::ConvertToTexture Before Texture Creation'] error code 0x502 (invalid operation)") is shown with the Intel GPU as well.
https://bugs.freedesktop.org/show_bug.cgi?id=106594
Kai kai@dev.carbon-project.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|[radeonsi,regression,apitra |[radeonsi,regression,apitra |ce] Prison Architect |ce] Prison Architect |exhibits glitches |rendered unplayable by | |multicoloured flickering | |triangles and overlayed | |triangles when performing | |certain actions
https://bugs.freedesktop.org/show_bug.cgi?id=106594
--- Comment #4 from Kai kai@dev.carbon-project.org --- Still an issue with the following stack (fully updated Debian testing as a base): GPU: Hawaii PRO [Radeon R9 290] (ChipID = 0x67b1) Mesa: Git:master/79fe00efb4 libdrm: 2.4.92-1 LLVM: SVN:trunk/r333339 (7.0 devel) X.Org: 2:1.19.6-1 Linux: 4.16.11 Firmware (firmware-amd-graphics): 20170823-1 libclc: Git:master/a2118d58fc DDX (xserver-xorg-video-amdgpu): 18.0.1-1
Forcing the OpenGL level back to 3.0 (the same OpenGL level the Intel GPU from comment #3 supported) doesn't help either.
However, I did find, that when I downgrade to Debian's Mesa package 18.0.4-1 (built against LLVM 6.0 (package version 1:6.0-3+b1)), I cannot reproduce this bug any longer. Therefore the bug must have been introduced in either Mesa between 18.0.4 and the current Git HEAD or LLVM between the 6.0 release and the current SVN HEAD.
https://bugs.freedesktop.org/show_bug.cgi?id=106594
--- Comment #5 from Kai kai@dev.carbon-project.org --- I just tested Debian's 18.1.0-1 package (also built against LLVM 6.0 (package version 1:6.0-3+b1)) and that version of Mesa doesn't produce the glitch either, thus narrowing the regression space to: - Mesa: between 18.1 and current HEAD of Git - LLVM: between 6.0 and current HEAD of SVN.
Further testing with a version of Debian's 18.1.0-1 package built against LLVM 7 (SVN r333339) didn't exhibit the bug either, therefore the bug must have been introduced between Mesa 18.1.0 and the current Git HEAD of Mesa. I'll see, if I can do a bisection.
https://bugs.freedesktop.org/show_bug.cgi?id=106594
Kai kai@dev.carbon-project.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |brianp@vmware.com, | |Mathias.Froehlich@web.de QA Contact|dri-devel@lists.freedesktop |mesa-dev@lists.freedesktop. |.org |org Assignee|dri-devel@lists.freedesktop |mesa-dev@lists.freedesktop. |.org |org Keywords| |bisected Component|Drivers/Gallium/radeonsi |Mesa core
--- Comment #6 from Kai kai@dev.carbon-project.org --- The bisection result is:
9c7be67968aaba224d518dee86dff736a4b599c6 is the first bad commit commit 9c7be67968aaba224d518dee86dff736a4b599c6 Author: Mathias Fröhlich mathias.froehlich@web.de Date: Sun May 13 09:18:57 2018 +0200
mesa: Remove FLUSH_VERTICES from VAO state changes. Pending draw calls on immediate mode or display list calls do not depend on changes of the VAO state. So, remove calls to FLUSH_VERTICES and flag _NEW_ARRAY as appropriate. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
:040000 040000 ad95067168b41b30d17d7ff05ecd47be4ca150e4 97ab8bde466f83da431193b045a664e540595d80 M src
Reverting that commit generates several conflicts. I'd probably have to revert the whole series?
Since this touches core Mesa, the bug shouldn't be constrained to radeonsi, I'll adjust the component accordingly.
dri-devel@lists.freedesktop.org