radv: Add driconf to force wave64 for RT

...and enable it for Hellblade: Senua's Sacrifice.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23585>
This commit is contained in:
Friedrich Vock
2023-06-11 15:47:50 +02:00
committed by Marge Bot
parent 4284705733
commit 496ea57d41
5 changed files with 15 additions and 1 deletions

View File

@@ -146,6 +146,7 @@ static const driOptionDescription radv_dri_options[] = {
DRI_CONF_RADV_TEX_NON_UNIFORM(false) DRI_CONF_RADV_TEX_NON_UNIFORM(false)
DRI_CONF_RADV_RT(false) DRI_CONF_RADV_RT(false)
DRI_CONF_RADV_FLUSH_BEFORE_TIMESTAMP_WRITE(false) DRI_CONF_RADV_FLUSH_BEFORE_TIMESTAMP_WRITE(false)
DRI_CONF_RADV_RT_WAVE64(false)
DRI_CONF_RADV_APP_LAYER() DRI_CONF_RADV_APP_LAYER()
DRI_CONF_SECTION_END DRI_CONF_SECTION_END
}; };
@@ -207,6 +208,8 @@ radv_init_dri_options(struct radv_instance *instance)
instance->flush_before_timestamp_write = instance->flush_before_timestamp_write =
driQueryOptionb(&instance->dri_options, "radv_flush_before_timestamp_write"); driQueryOptionb(&instance->dri_options, "radv_flush_before_timestamp_write");
instance->force_rt_wave64 = driQueryOptionb(&instance->dri_options, "radv_rt_wave64");
} }
static const struct vk_instance_extension_table radv_instance_extensions_supported = { static const struct vk_instance_extension_table radv_instance_extensions_supported = {

View File

@@ -2061,7 +2061,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
* problematic) * problematic)
*/ */
if (!(device->instance->perftest_flags & RADV_PERFTEST_RT_WAVE_64) && if (!(device->instance->perftest_flags & RADV_PERFTEST_RT_WAVE_64) &&
device->rad_info.gfx_level < GFX11) !(device->instance->force_rt_wave64) && device->rad_info.gfx_level < GFX11)
device->rt_wave_size = 32; device->rt_wave_size = 32;
} }

View File

@@ -416,6 +416,7 @@ struct radv_instance {
bool enable_unified_heap_on_apu; bool enable_unified_heap_on_apu;
bool tex_non_uniform; bool tex_non_uniform;
bool flush_before_timestamp_write; bool flush_before_timestamp_write;
bool force_rt_wave64;
char *app_layer; char *app_layer;
}; };

View File

@@ -156,6 +156,12 @@ Application bugs worked around in this file:
<option name="radv_app_layer" value="metroexodus" /> <option name="radv_app_layer" value="metroexodus" />
</application> </application>
<application name="Hellblade: Senua's Sacrifice" application_name_match="HellbladeGame-Win64-Shipping.exe">
<!-- RT shaders in Hellblade: Senua's Sacrifice cause misrenders because they assume full subgroups.
This is only guaranteed with wave64, so force wave64 on for this game. -->
<option name="radv_rt_wave64" value="true" />
</application>
<!-- OpenGL Game workarounds (zink) --> <!-- OpenGL Game workarounds (zink) -->
<application name="Black Geyser: Couriers of Darkness" executable="BlackGeyser.x86_64"> <application name="Black Geyser: Couriers of Darkness" executable="BlackGeyser.x86_64">
<option name="radv_zero_vram" value="true" /> <option name="radv_zero_vram" value="true" />

View File

@@ -645,6 +645,10 @@
DRI_CONF_OPT_B(radv_flush_before_timestamp_write, def, \ DRI_CONF_OPT_B(radv_flush_before_timestamp_write, def, \
"Wait for previous commands to finish before writing timestamps") "Wait for previous commands to finish before writing timestamps")
#define DRI_CONF_RADV_RT_WAVE64(def) \
DRI_CONF_OPT_B(radv_rt_wave64, def, \
"Force wave64 in RT shaders")
#define DRI_CONF_RADV_APP_LAYER() DRI_CONF_OPT_S_NODEF(radv_app_layer, "Select an application layer.") #define DRI_CONF_RADV_APP_LAYER() DRI_CONF_OPT_S_NODEF(radv_app_layer, "Select an application layer.")
/** /**