radv: Enable ray queries by default
Ray queries and acceleration structure builds are quite stable now and so we can enable those features for CI and more feedback and bug reports. 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/16007>
This commit is contained in:
parent
72910242a6
commit
5f5882ef08
|
@ -722,9 +722,9 @@ RADV driver environment variables
|
|||
enable wave32 for compute shaders (GFX10+)
|
||||
``dccmsaa``
|
||||
enable DCC for MSAA images
|
||||
``force_emulate_rt``
|
||||
forces ray-tracing to be emulated in software,
|
||||
even if there is hardware support.
|
||||
``emulate_rt``
|
||||
forces ray-tracing to be emulated in software on GFX10_3+ and enables
|
||||
rt extensions with older hardware.
|
||||
``gewave32``
|
||||
enable wave32 for vertex/tess/geometry shaders (GFX10+)
|
||||
``localbos``
|
||||
|
@ -738,7 +738,7 @@ RADV driver environment variables
|
|||
``nggc``
|
||||
enable NGG culling on GPUs where it's not enabled by default (GFX10.1 only).
|
||||
``rt``
|
||||
enable rt extensions whose implementation is still experimental.
|
||||
enable rt pipelines whose implementation is still experimental.
|
||||
``sam``
|
||||
enable optimizations to move more driver internal objects to VRAM.
|
||||
``rtwave64``
|
||||
|
|
|
@ -79,7 +79,7 @@ enum {
|
|||
RADV_PERFTEST_SAM = 1u << 7,
|
||||
RADV_PERFTEST_RT = 1u << 8,
|
||||
RADV_PERFTEST_NGGC = 1u << 9,
|
||||
RADV_PERFTEST_FORCE_EMULATE_RT = 1u << 10,
|
||||
RADV_PERFTEST_EMULATE_RT = 1u << 10,
|
||||
RADV_PERFTEST_NV_MS = 1u << 11,
|
||||
RADV_PERFTEST_RT_WAVE_64 = 1u << 12,
|
||||
};
|
||||
|
|
|
@ -400,7 +400,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
|||
*ext = (struct vk_device_extension_table){
|
||||
.KHR_8bit_storage = true,
|
||||
.KHR_16bit_storage = true,
|
||||
.KHR_acceleration_structure = radv_enable_rt(device),
|
||||
.KHR_acceleration_structure = radv_enable_rt(device, false),
|
||||
.KHR_bind_memory2 = true,
|
||||
.KHR_buffer_device_address = true,
|
||||
.KHR_copy_commands2 = true,
|
||||
|
@ -435,8 +435,8 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
|||
.KHR_pipeline_executable_properties = true,
|
||||
.KHR_pipeline_library = !device->use_llvm,
|
||||
.KHR_push_descriptor = true,
|
||||
.KHR_ray_query = radv_enable_rt(device),
|
||||
.KHR_ray_tracing_pipeline = radv_enable_rt(device),
|
||||
.KHR_ray_query = radv_enable_rt(device, false),
|
||||
.KHR_ray_tracing_pipeline = radv_enable_rt(device, true),
|
||||
.KHR_relaxed_block_layout = true,
|
||||
.KHR_sampler_mirror_clamp_to_edge = true,
|
||||
.KHR_sampler_ycbcr_conversion = true,
|
||||
|
@ -921,7 +921,7 @@ static const struct debug_control radv_perftest_options[] = {{"localbos", RADV_P
|
|||
{"sam", RADV_PERFTEST_SAM},
|
||||
{"rt", RADV_PERFTEST_RT},
|
||||
{"nggc", RADV_PERFTEST_NGGC},
|
||||
{"force_emulate_rt", RADV_PERFTEST_FORCE_EMULATE_RT},
|
||||
{"emulate_rt", RADV_PERFTEST_EMULATE_RT},
|
||||
{"nv_ms", RADV_PERFTEST_NV_MS},
|
||||
{"rtwave64", RADV_PERFTEST_RT_WAVE_64},
|
||||
{NULL, 0}};
|
||||
|
|
|
@ -587,7 +587,7 @@ radv_device_init_meta(struct radv_device *device)
|
|||
if (result != VK_SUCCESS)
|
||||
goto fail_fmask_expand;
|
||||
|
||||
if (radv_enable_rt(device->physical_device)) {
|
||||
if (radv_enable_rt(device->physical_device, false)) {
|
||||
result = radv_device_init_accel_struct_build_state(device);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_accel_struct_build;
|
||||
|
|
|
@ -271,8 +271,8 @@ radv_get_hash_flags(const struct radv_device *device, bool stats)
|
|||
|
||||
if (device->physical_device->use_ngg_culling)
|
||||
hash_flags |= RADV_HASH_SHADER_USE_NGG_CULLING;
|
||||
if (device->instance->perftest_flags & RADV_PERFTEST_FORCE_EMULATE_RT)
|
||||
hash_flags |= RADV_HASH_SHADER_FORCE_EMULATE_RT;
|
||||
if (device->instance->perftest_flags & RADV_PERFTEST_EMULATE_RT)
|
||||
hash_flags |= RADV_HASH_SHADER_EMULATE_RT;
|
||||
if (device->physical_device->rt_wave_size == 64)
|
||||
hash_flags |= RADV_HASH_SHADER_RT_WAVE64;
|
||||
if (device->physical_device->cs_wave_size == 32)
|
||||
|
|
|
@ -1760,7 +1760,7 @@ struct radv_event {
|
|||
#define RADV_HASH_SHADER_USE_NGG_CULLING (1 << 13)
|
||||
#define RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS (1 << 14)
|
||||
#define RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS2 (1 << 15)
|
||||
#define RADV_HASH_SHADER_FORCE_EMULATE_RT (1 << 16)
|
||||
#define RADV_HASH_SHADER_EMULATE_RT (1 << 16)
|
||||
#define RADV_HASH_SHADER_SPLIT_FMA (1 << 17)
|
||||
#define RADV_HASH_SHADER_RT_WAVE64 (1 << 18)
|
||||
|
||||
|
@ -1780,7 +1780,7 @@ uint32_t radv_get_hash_flags(const struct radv_device *device, bool stats);
|
|||
|
||||
bool radv_rt_pipeline_has_dynamic_stack_size(const VkRayTracingPipelineCreateInfoKHR *pCreateInfo);
|
||||
|
||||
bool radv_enable_rt(const struct radv_physical_device *pdevice);
|
||||
bool radv_enable_rt(const struct radv_physical_device *pdevice, bool rt_pipelines);
|
||||
|
||||
bool radv_emulate_rt(const struct radv_physical_device *pdevice);
|
||||
|
||||
|
|
|
@ -26,17 +26,21 @@
|
|||
#include "radv_acceleration_structure.h"
|
||||
|
||||
bool
|
||||
radv_enable_rt(const struct radv_physical_device *pdevice)
|
||||
radv_enable_rt(const struct radv_physical_device *pdevice, bool rt_pipelines)
|
||||
{
|
||||
return (pdevice->instance->perftest_flags & RADV_PERFTEST_RT) && !pdevice->use_llvm;
|
||||
if ((pdevice->rad_info.gfx_level < GFX10_3 && !radv_emulate_rt(pdevice)) || pdevice->use_llvm)
|
||||
return false;
|
||||
|
||||
if (rt_pipelines)
|
||||
return pdevice->instance->perftest_flags & RADV_PERFTEST_RT;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
radv_emulate_rt(const struct radv_physical_device *pdevice)
|
||||
{
|
||||
assert(radv_enable_rt(pdevice));
|
||||
return pdevice->rad_info.gfx_level < GFX10_3 ||
|
||||
(pdevice->instance->perftest_flags & RADV_PERFTEST_FORCE_EMULATE_RT);
|
||||
return pdevice->instance->perftest_flags & RADV_PERFTEST_EMULATE_RT;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue