radv: Segfault during createAccelerationStructure when the backing buffer is not bound to memory
Description
Tried to run https://github.com/NVIDIAGameWorks/RTXDI but got segfault at https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vulkan/radv_acceleration_structure.c#L269 (buffer->bo
is null, and bo-> va
triggers the segfault)
This application seems to be calling createAccelerationStructureKHR
with a buffer that hasn't been bound memory to it. I don't know if this is a radv or an app bug, but both NV driver and AMDVLK can run this app (running with AMDVLK required WITH_RTXGI=OFF)
I'm using a Mesa source build at the commit 17b61077
Steps to reproduce
Build https://github.com/NVIDIAGameWorks/RTXDI according to its README, and run either rtxdi-sample
or minimal-sample
)
System information
System:
Host: masahi-MS-7C56 Kernel: 5.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 11.3.0
Console: pty pts/0 DM: GDM3 Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish)
CPU:
Info: 6-core model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3 rev: 0 cache:
L1: 384 KiB L2: 3 MiB L3: 32 MiB
Speed (MHz): avg: 3261 high: 3601 min/max: 2200/4650 boost: enabled cores: 1: 3192 2: 2875
3: 2874 4: 3592 5: 3593 6: 3595 7: 2876 8: 2877 9: 2878 10: 3601 11: 3591 12: 3598
bogomips: 88803
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 23 [Radeon RX 6600/6600 XT/6600M] vendor: Tul driver: amdgpu v: 5.18.2.22.40
pcie: speed: 16 GT/s lanes: 16 ports: active: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 2d:00.0
chip-ID: 1002:73ff
Display: server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.1 compositor: gnome-shell driver:
gpu: amdgpu note: X driver n/a tty: 211x60
Monitor-1: HDMI-A-1 model: Philips PHL 234E5 res: 1920x1080 dpi: 96 diag: 584mm (23")