[radv] Crash when VkGraphicsPipelineCreateInfo::flags = ~0u
Description
When using Vulkan and when I set VkGraphicsPipelineCreateInfo::flags = ~0u
and supply VkPipelineCreateFlags2CreateInfoKHR
the driver crashes (only the user-side part). If VkPipelineCreateFlags2CreateInfoKHR
is in the pNext
chain of pipeline create info VkGraphicsPipelineCreateInfo::flags
should be ignored, but it looks like it is not.
Log files (for system lockups / game freezes / crashes)
gef➤ bt
#0 0x00007ffff635acda in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
#1 0x00007ffff635aecd in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
#2 0x00007ffff635b211 in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
#3 0x0000555555585d97 in vk::raii::Device::createGraphicsPipeline (allocator=..., createInfo=..., pipelineCache=..., this=0x7fffffffcec0)
at /usr/include/vulkan/vulkan_raii.hpp:12602
#4 vk::raii::Pipeline::Pipeline (this=0x7fffffffd1d0, device=..., pipelineCache=..., createInfo=..., allocator=...) at /usr/include/vulkan/vulkan_raii.hpp:9308
#5 0x000055555555d238 in main () at /home/kuba/Desktop/gitproj/vk_khr_maintenance5_test/test.cpp:212
gef➤ info sharedlibrary
From To Syms Read Shared Object Library
[...]
0x00007ffff6298140 0x00007ffff66ea6c2 Yes (*) /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so
[...]
0x00007fffec45f500 0x00007fffec7dacf2 Yes (*) /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so
0x00007fffeb290040 0x00007fffeb9a5302 Yes (*) /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
0x00007fffea470ec0 0x00007fffea9d0b62 Yes (*) /usr/lib/x86_64-linux-gnu/libvulkan_intel_hasvk.so
0x00007ffff60ec7c0 0x00007ffff61a3c42 Yes (*) /usr/lib/x86_64-linux-gnu/libvulkan_virtio.so
0x00007fffe9c529c0 0x00007fffe9e69402 Yes (*) /usr/lib/x86_64-linux-gnu/libvulkan_dzn.so
0x00007ffff6cd3840 0x00007ffff6cdb4d2 Yes (*) /lib/x86_64-linux-gnu/libVkLayer_MESA_device_select.so
SIGSEGV was sent
Steps to reproduce
// create device with enabled VK_KHR_maintenance5
VkPipelineCreateFlags2CreateInfoKHR pcf2{
VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR,
nullptr,
0
};
VkGraphicsPipelineCreateInfo gci{
VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
&pcf2,
[...]
};
VkPipeline pipeline{};
VkResult res = vkCreateGraphicsPipelines(dev, VK_NULL_HANDLE, 1, &gci, nullptr, &pipeline); // here crashed
System information
System:
Host: kuba-hp Kernel: 6.5.0-21-generic arch: x86_64 bits: 64 compiler: N/A
Desktop: GNOME v: 45.2 tk: GTK v: 3.24.38 wm: gnome-shell dm: GDM3
Distro: Ubuntu 23.10 (Mantic Minotaur)
CPU:
Info: 8-core model: AMD Ryzen 7 5825U with Radeon Graphics bits: 64
type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
Speed (MHz): avg: 1818 high: 3257 min/max: 400/4546 cores: 1: 400 2: 3257
3: 1476 4: 1557 5: 2953 6: 400 7: 1999 8: 3171 9: 2788 10: 2947 11: 2144
12: 2637 13: 2161 14: 400 15: 400 16: 400 bogomips: 63882
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Barcelo vendor: Hewlett-Packard driver: amdgpu v: kernel
arch: GCN-5 pcie: speed: 8 GT/s lanes: 16 ports: active: eDP-1
empty: HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:15e7 temp: 40.0 C
Device-2: Cheng Uei Precision Industry (Foxlink) HP True Vision HD Camera
driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-3:2
chip-ID: 05c8:0b05
Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 23.2.0
compositor: gnome-shell driver: X: loaded: amdgpu
unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
display-ID: 0
Monitor-1: eDP-1 model: AU Optronics 0x5799 res: 1920x1080 dpi: 142
diag: 395mm (15.5")
API: OpenGL v: 4.6 Mesa 24.0.1 - kisak-mesa PPA renderer: AMD Radeon
Graphics (radeonsi renoir LLVM 15.0.7 DRM 3.54 6.5.0-21-generic)
direct-render: Yes
- OS: Ubuntu 23.10
- GPU: Advanced Micro Devices, Inc. [AMD/ATI] Barcelo [1002:15e7] (rev c1)
- Kernel version: 6.5.0-21-generic #21 (closed)-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
- Mesa version: Mesa 24.0.1 - kisak-mesa PPA
- Desktop environment: ubuntu:GNOME
Edited by Janeczko Jakub