radv: Refactor ray tracing support checks

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15860>
This commit is contained in:
Konstantin Seurer
2022-04-11 18:11:26 +02:00
committed by Marge Bot
parent a9fce44dd6
commit 521492e8b1
5 changed files with 24 additions and 10 deletions

View File

@@ -21,9 +21,24 @@
* IN THE SOFTWARE.
*/
#include "radv_debug.h"
#include "radv_rt_common.h"
#include "radv_acceleration_structure.h"
bool
radv_enable_rt(const struct radv_physical_device *pdevice)
{
return (pdevice->instance->perftest_flags & RADV_PERFTEST_RT) && !pdevice->use_llvm;
}
bool
radv_emulate_rt(const struct radv_physical_device *pdevice)
{
assert(radv_enable_rt(pdevice));
return pdevice->rad_info.chip_class < GFX10_3 ||
(pdevice->instance->perftest_flags & RADV_PERFTEST_FORCE_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)