Module: Mesa
Branch: main
Commit: 685c4b6337467120e6c6ddc45cdc98656b8e1e9a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=685c4b6337467120e6c6ddc45cdc98656b8e1e9a

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Tue Jan  2 14:14:29 2024 +0100

radv: move radv_{emulate,enable}_rt() to radv_physical_device.c

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851>

---

 src/amd/vulkan/radv_physical_device.c | 18 ++++++++++++++++++
 src/amd/vulkan/radv_rt_common.c       | 18 ------------------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/amd/vulkan/radv_physical_device.c 
b/src/amd/vulkan/radv_physical_device.c
index 17caa2ddcec..17aec0f65aa 100644
--- a/src/amd/vulkan/radv_physical_device.c
+++ b/src/amd/vulkan/radv_physical_device.c
@@ -90,6 +90,24 @@ radv_calibrated_timestamps_enabled(const struct 
radv_physical_device *pdevice)
           !(pdevice->rad_info.family == CHIP_RAVEN || pdevice->rad_info.family 
== CHIP_RAVEN2);
 }
 
+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))
+      return false;
+
+   if (rt_pipelines && pdevice->use_llvm)
+      return false;
+
+   return true;
+}
+
+bool
+radv_emulate_rt(const struct radv_physical_device *pdevice)
+{
+   return pdevice->instance->perftest_flags & RADV_PERFTEST_EMULATE_RT;
+}
+
 static bool
 radv_is_conformant(const struct radv_physical_device *pdevice)
 {
diff --git a/src/amd/vulkan/radv_rt_common.c b/src/amd/vulkan/radv_rt_common.c
index 929ce945a48..722fd772913 100644
--- a/src/amd/vulkan/radv_rt_common.c
+++ b/src/amd/vulkan/radv_rt_common.c
@@ -31,24 +31,6 @@
 
 static nir_def *build_node_to_addr(struct radv_device *device, nir_builder *b, 
nir_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))
-      return false;
-
-   if (rt_pipelines && pdevice->use_llvm)
-      return false;
-
-   return true;
-}
-
-bool
-radv_emulate_rt(const struct radv_physical_device *pdevice)
-{
-   return pdevice->instance->perftest_flags & RADV_PERFTEST_EMULATE_RT;
-}
-
 void
 nir_sort_hit_pair(nir_builder *b, nir_variable *var_distances, nir_variable 
*var_indices, uint32_t chan_1,
                   uint32_t chan_2)

Reply via email to