From 665a671c7d88f9a4941b07099c875b16245e0ac6 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 3 May 2022 18:22:36 +0200 Subject: [PATCH] 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 Reviewed-by: Konstantin Seurer Part-of: --- src/amd/vulkan/radv_meta.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index 9ce6619a0b6..f9abd3735a7 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -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)