https://bugs.freedesktop.org/show_bug.cgi?id=73110
Priority: medium Bug ID: 73110 Assignee: dri-devel@lists.freedesktop.org Summary: [BISECTED] Serious Sam 3 crashes with R600_LLVM=1 (CAYMAN) Severity: normal Classification: Unclassified OS: All Reporter: alexandre.f.demers@gmail.com Hardware: All Status: NEW Version: git Component: Drivers/Gallium/r600 Product: Mesa
More than a week ago, after updating mesa, I began experiencing trouble launching Serious Sam 3. Bisecting gave me the following:
696229523d919de15ebc25d0f475bf56d7dad4a9 is the first bad commit commit 696229523d919de15ebc25d0f475bf56d7dad4a9 Author: Marek Olšák marek.olsak@amd.com Date: Thu Dec 12 18:09:08 2013 +0100
r600g: use shader-based MSAA resolving when hw-based one cannot be used
This fixes some MSAA integer tests.
:040000 040000 b04b89764c5edee6dd685e22d47e36a11060583f 147827de9fe4e00bae5cc5844052b4fc45bb396c M src
However, setting R600_LLVM=0 prevent the crash.
Using an HD6950 (Cayman) on kernel 3.13-rc5 with latest drm and ddx from git on ArchLinux 64bit.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
Alexandre Demers alexandre.f.demers@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|[BISECTED] Serious Sam 3 |[BISECTED] commit "r600g: |crashes with R600_LLVM=1 |use shader-based MSAA |(CAYMAN) |resolving when hw-based one | |cannot be used" crashes | |some games with R600_LLVM=1
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #1 from Alexandre Demers alexandre.f.demers@gmail.com --- This also affects Awesomenauts, Bastion and Trine 2 in the games I own.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #2 from Alexandre Demers alexandre.f.demers@gmail.com --- A bit more info. Serious Sam 3 will launch and begin to load. However, once it has loaded, it crashes when the menu is about to appear and I can even hear a fraction of music before it happens.
Marek, can I provide you with something specific? Anything about the shaders I could try to get (with and without R600_LLVM)?
https://bugs.freedesktop.org/show_bug.cgi?id=73110
Alex Deucher agd5f@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tstellar@gmail.com, | |vljn@ovi.com
--- Comment #3 from Alex Deucher agd5f@yahoo.com --- I suspect the llvm support for r600 class hardware needs to add support for some additional instructions, etc. that that patch uses. Vincent or Tom may be able to identify what's missing.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #4 from Marek Olšák maraeo@gmail.com --- The shaders are generated by this code:
http://cgit.freedesktop.org/mesa/mesa/diff/src/gallium/auxiliary/util/u_simp... http://cgit.freedesktop.org/mesa/mesa/diff/src/gallium/auxiliary/util/u_simp...
There is nothing special except for the texel fetch instructions which read from MSAA textures. The shaders also contain float<->int and float<->unsigned conversions. I think the latter is not used with GLSL very often.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #5 from Alexandre Demers alexandre.f.demers@gmail.com --- (In reply to comment #3)
I suspect the llvm support for r600 class hardware needs to add support for some additional instructions, etc. that that patch uses. Vincent or Tom may be able to identify what's missing.
I'm still using LLVM 3.3. I'll try with LLVM 3.4 later if possible just in case it works with that, since LLVM 3.4 has landed in the testing repositories of ArchLinux last night.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #6 from Marek Olšák maraeo@gmail.com --- That might be it. I think LLVM 3.3 doesn't support MSAA texture fetches on R600.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #7 from Alexandre Demers alexandre.f.demers@gmail.com --- Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #8 from Marek Olšák maraeo@gmail.com --- (In reply to comment #7)
Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?
Did you mean "it doesn't crash"?
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #9 from Alexandre Demers alexandre.f.demers@gmail.com --- (In reply to comment #8)
(In reply to comment #7)
Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?
Did you mean "it doesn't crash"?
Yes, sorry. "... LLVM 3.4 and it doesn't crash."
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #10 from Alexandre Demers alexandre.f.demers@gmail.com --- I've been testing with LLVM 3.4. While it doesn't crash anymore, there are some visual glitches. Do you want me to open a different bug about it?
https://bugs.freedesktop.org/show_bug.cgi?id=73110
Alexandre Demers alexandre.f.demers@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|[BISECTED] commit "r600g: |[BISECTED] commit "r600g: |use shader-based MSAA |use shader-based MSAA |resolving when hw-based one |resolving when hw-based one |cannot be used" crashes |cannot be used" crashes |some games with R600_LLVM=1 |some games when R600_LLVM=1 | |with LLVM < 3.4
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #11 from Alexandre Demers alexandre.f.demers@gmail.com --- I'm closing this bug since it is fixed by using LLVM 3.4. But my question in comment 7 is still pending.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
Alexandre Demers alexandre.f.demers@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #12 from Marek Olšák maraeo@gmail.com --- (In reply to comment #7)
Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?
The workaround would be to disable MSAA (and therefore GL 3 too) if the LLVM backend is enabled and the LLVM version is older than 3.4.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #13 from Fabio Pedretti fabio.ped@libero.it --- Alternatively, LLVM 3.4 could be required as the minimum version on r600 and radeonsi, there are other bugs I remember only happens with 3.3.
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #14 from Alexandre Demers alexandre.f.demers@gmail.com --- (In reply to comment #13)
Alternatively, LLVM 3.4 could be required as the minimum version on r600 and radeonsi, there are other bugs I remember only happens with 3.3.
Since LLVM 3.4 is officially out, I would go with this solution. Otherwise, could we wrap 696229523d919de15ebc25d0f475bf56d7dad4a9 code in a if (LLVM >= 3.4) kind of condition?
https://bugs.freedesktop.org/show_bug.cgi?id=73110
--- Comment #15 from Marek Olšák maraeo@gmail.com --- No, the code would be too complex.
dri-devel@lists.freedesktop.org