From c76060c253fd81de0f4bf2616786ef5dbf2b45da Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 11 Feb 2023 22:27:45 +0100 Subject: [PATCH] radv: Advertise ray query support with LLVM What could go wrong? Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_rt_common.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_rt_common.c b/src/amd/vulkan/radv_rt_common.c index a9217f35ee9..22fe2841c40 100644 --- a/src/amd/vulkan/radv_rt_common.c +++ b/src/amd/vulkan/radv_rt_common.c @@ -25,18 +25,31 @@ #include "radv_rt_common.h" #include "radv_acceleration_structure.h" +#ifdef LLVM_AVAILABLE +#include +#endif + static nir_ssa_def *build_node_to_addr(struct radv_device *device, nir_builder *b, nir_ssa_def *node, bool skip_type_and); bool radv_enable_rt(const struct radv_physical_device *pdevice, bool rt_pipelines) { - if ((pdevice->rad_info.gfx_level < GFX10_3 && !radv_emulate_rt(pdevice)) || pdevice->use_llvm) +#ifdef LLVM_AVAILABLE + if (pdevice->use_llvm && LLVM_VERSION_MAJOR < 14) + return false; +#endif + + if (pdevice->rad_info.gfx_level < GFX10_3 && !radv_emulate_rt(pdevice)) return false; - if (rt_pipelines) + if (rt_pipelines) { + if (pdevice->use_llvm) + return false; + return (pdevice->instance->perftest_flags & RADV_PERFTEST_RT) || driQueryOptionb(&pdevice->instance->dri_options, "radv_rt"); + } return true; }