Bug 1186477

Summary: Crashes in Vulkan games since Mesa 21.1.1 due to errornously prefering software driver (lavapipe) over dedicated GPU Vulkan driver (radeon); Workaround available
Product: [openSUSE] openSUSE Tumbleweed Reporter: Volker Armin Hemmann <volkerarmin>
Component: X.OrgAssignee: Gfx Bugs <gfx-bugs>
Status: RESOLVED FIXED QA Contact: Gfx Bugs <gfx-bugs>
Severity: Critical    
Priority: P3 - Medium CC: anubis2497, volkerarmin
Version: CurrentFlags: sndirsch: needinfo? (volkerarmin)
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: output of vulkaninfo

Description Volker Armin Hemmann 2021-05-26 20:58:32 UTC
after the update to mesa-21.1.1-278.1 (and a reboot) I get a crash and the following console output every time I try to run Warthunder:

LLVM ERROR: Cannot select: 0x7ff58018f988: v8i32 = X86ISD::CVTP2SI undef:v8i32
  0x7ff58045c260: v8i32 = undef
In function: draw_llvm_vs_variant

It does not matter if I use the launcher or aces directly.

Please provide a rollback feature. Even gentoo manages to do that. 

Graphics card is a
0b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev cf)
Comment 1 Volker Armin Hemmann 2021-05-27 15:23:28 UTC
additional information: people using other distributions who updated to 21.1. run into the same issue.
Comment 2 Stefan Dirsch 2021-05-27 17:15:23 UTC
Thanks, that's interesting! Of course you can rollback with snapper/btrfs.
Comment 3 Volker Armin Hemmann 2021-05-27 22:43:09 UTC
Not going into any discussions about how to do proper downgrades, I found something else:

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json ./aces

(aces is the Warthunder executable) lets the game run. It still hangs/crashes on exit. But at least it works.

Seems related to this issue:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/4828
Comment 4 Stefan Dirsch 2021-05-28 05:09:50 UTC
Thanks for finding this. Indeed we enabled build of lavapipe recently. I'm watching the gitlab issue now.
Comment 5 Stefan Dirsch 2021-06-10 10:33:26 UTC
Hmm. Just had a try with an Intel GPU. Selection works fine with Mesa 21.1.2. It autoselects the Intel Vulkan driver. I see the difference in vulkaninfo output when selecting manually

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json  vulkaninfo
Comment 6 Stefan Dirsch 2021-06-10 10:37:04 UTC
Could you please double check with latest Mesa version?
Comment 7 Volker Armin Hemmann 2021-06-15 21:16:03 UTC
from glxinfo:
xtended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon (TM) RX 470 Graphics (POLARIS10, DRM 3.40.0, 5.12.9-xanmod1xanmod1, LLVM 12.0.0) (0x67df)
    Version: 21.1.2
    Accelerated: yes
    Video memory: 4096MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2


and Warthunder still crashes, if I do not set the vulkan cd.
Comment 8 Stefan Dirsch 2021-06-16 02:01:05 UTC
Ok. I assume the same applies to running 'vulkaninfo'.
Comment 9 Volker Armin Hemmann 2021-06-16 08:56:00 UTC
Created attachment 850301 [details]
output of vulkaninfo

I added my vulkaninfo output in the attachement. It is a bit much for a comment.
Comment 10 Stefan Dirsch 2021-06-16 14:01:15 UTC
Indeed. Seems you're also falling back to lavapipe with vulkaninfo. Maybe it works with intel and not with radeon since alphabetical order is

intel...
lvp
radeon...
Comment 11 Stefan Dirsch 2021-07-12 09:13:34 UTC
In the ticket it is claimed the issue would have been fixed DXVK. 

  https://gitlab.freedesktop.org/mesa/mesa/-/issues/4828#note_987441

Can you confirm this?
Comment 12 Stefan Dirsch 2021-07-24 09:15:41 UTC
*** Bug 1188657 has been marked as a duplicate of this bug. ***
Comment 13 Stefan Dirsch 2021-08-05 12:26:37 UTC
(In reply to Stefan Dirsch from comment #11)
> In the ticket it is claimed the issue would have been fixed DXVK. 
> 
>   https://gitlab.freedesktop.org/mesa/mesa/-/issues/4828#note_987441
> 
> Can you confirm this?

ping! ;-)
Comment 14 Stefan Dirsch 2021-08-29 16:31:31 UTC
Hello? Still available for testing?
Comment 15 Stefan Dirsch 2021-09-28 15:09:39 UTC
(In reply to Stefan Dirsch from comment #14)
> Hello? Still available for testing?

Doesn't seem so. Let's assume the issue has been fixed. Otherwise please reopen.