radv: Add radv_enable_float16_gfx8 drirc and enable for Indiana Jones TGC

This is a hard requirement from the game preventing it to start on GFX8.
Adding this allows playing it on GFX8.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
This commit is contained in:
Natalie Vock 2025-03-23 17:46:53 +01:00 committed by Marge Bot
parent e385cb1750
commit f0f4ae1713
5 changed files with 11 additions and 1 deletions

View file

@ -193,6 +193,7 @@ static const driOptionDescription radv_dri_options[] = {
DRI_CONF_RADV_LOWER_TERMINATE_TO_DISCARD(false) DRI_CONF_RADV_LOWER_TERMINATE_TO_DISCARD(false)
DRI_CONF_RADV_APP_LAYER() DRI_CONF_RADV_APP_LAYER()
DRI_CONF_RADV_EMULATE_RT(false) DRI_CONF_RADV_EMULATE_RT(false)
DRI_CONF_RADV_ENABLE_FLOAT16_GFX8(false)
DRI_CONF_SECTION_END DRI_CONF_SECTION_END
}; };
// clang-format on // clang-format on
@ -289,6 +290,8 @@ radv_init_dri_options(struct radv_instance *instance)
driQueryOptionb(&instance->drirc.options, "radv_lower_terminate_to_discard"); driQueryOptionb(&instance->drirc.options, "radv_lower_terminate_to_discard");
instance->drirc.emulate_rt = driQueryOptionb(&instance->drirc.options, "radv_emulate_rt"); instance->drirc.emulate_rt = driQueryOptionb(&instance->drirc.options, "radv_emulate_rt");
instance->drirc.expose_float16_gfx8 = driQueryOptionb(&instance->drirc.options, "radv_enable_float16_gfx8");
} }
static const struct vk_instance_extension_table radv_instance_extensions_supported = { static const struct vk_instance_extension_table radv_instance_extensions_supported = {

View file

@ -73,6 +73,7 @@ struct radv_instance {
bool disable_dcc_stores; bool disable_dcc_stores;
bool lower_terminate_to_discard; bool lower_terminate_to_discard;
bool emulate_rt; bool emulate_rt;
bool expose_float16_gfx8;
char *app_layer; char *app_layer;
uint8_t override_graphics_shader_version; uint8_t override_graphics_shader_version;
uint8_t override_compute_shader_version; uint8_t override_compute_shader_version;

View file

@ -827,7 +827,8 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
.storagePushConstant8 = true, .storagePushConstant8 = true,
.shaderBufferInt64Atomics = true, .shaderBufferInt64Atomics = true,
.shaderSharedInt64Atomics = true, .shaderSharedInt64Atomics = true,
.shaderFloat16 = pdev->info.has_packed_math_16bit, .shaderFloat16 = pdev->info.has_packed_math_16bit ||
(pdev->info.gfx_level == GFX8 && instance->drirc.expose_float16_gfx8),
.shaderInt8 = true, .shaderInt8 = true,
.descriptorIndexing = true, .descriptorIndexing = true,

View file

@ -115,6 +115,7 @@ Application bugs worked around in this file:
<option name="radv_invariant_geom" value="true" /> <option name="radv_invariant_geom" value="true" />
<option name="radv_lower_terminate_to_discard" value="true" /> <option name="radv_lower_terminate_to_discard" value="true" />
<option name="radv_emulate_rt" value="true" /> <option name="radv_emulate_rt" value="true" />
<option name="radv_enable_float16_gfx8" value="true" />
</application> </application>
<application name="DOOM (2016)" application_name_match="DOOM$"> <application name="DOOM (2016)" application_name_match="DOOM$">

View file

@ -802,6 +802,10 @@
DRI_CONF_OPT_B(radv_emulate_rt, def, \ DRI_CONF_OPT_B(radv_emulate_rt, def, \
"Expose RT extensions on GFX10 and below through software emulation.") "Expose RT extensions on GFX10 and below through software emulation.")
#define DRI_CONF_RADV_ENABLE_FLOAT16_GFX8(def) \
DRI_CONF_OPT_B(radv_enable_float16_gfx8, def, \
"Expose float16 on GFX8, where it's supported but usually not beneficial.")
/** /**
* \brief ANV specific configuration options * \brief ANV specific configuration options
*/ */