diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2024-01-02 14:14:29 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-01-03 09:40:29 +0000 |
commit | 685c4b6337467120e6c6ddc45cdc98656b8e1e9a (patch) | |
tree | d81cbdcaac8210b8c3bde13b560a7808d15f5ce2 | |
parent | c100905796fb1b1de9862e24570e00931639db4c (diff) |
radv: move radv_{emulate,enable}_rt() to radv_physical_device.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851>
-rw-r--r-- | src/amd/vulkan/radv_physical_device.c | 18 | ||||
-rw-r--r-- | 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) |