radv: only init acceleration structure if RT is enabled

This is to fix a LLVM crash with 13.0 because ATOMIC_FMAX is only
supported on 14.0+, so RADV_DEBUG=llvm was just completely broken.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16305>
This commit is contained in:
Samuel Pitoiset 2022-05-03 18:22:36 +02:00 committed by Marge Bot
parent e53e70fba0
commit 665a671c7d
1 changed files with 5 additions and 3 deletions

View File

@ -587,9 +587,11 @@ radv_device_init_meta(struct radv_device *device)
if (result != VK_SUCCESS)
goto fail_fmask_expand;
result = radv_device_init_accel_struct_build_state(device);
if (result != VK_SUCCESS)
goto fail_accel_struct_build;
if (radv_enable_rt(device->physical_device)) {
result = radv_device_init_accel_struct_build_state(device);
if (result != VK_SUCCESS)
goto fail_accel_struct_build;
}
result = radv_device_init_meta_fmask_copy_state(device);
if (result != VK_SUCCESS)