drirc/anv: add flag to disable VK_EXT_subgroup_size_control

This can be used to workaround problem cases with application
controlled subgroup size.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40813>
This commit is contained in:
Tapani Pälli 2026-04-07 07:54:39 +03:00 committed by Marge Bot
parent f2938d2708
commit c105366165
4 changed files with 12 additions and 2 deletions

View file

@ -42,6 +42,7 @@ static const driOptionDescription anv_dri_options[] = {
DRI_CONF_ANV_FORCE_INDIRECT_DESCRIPTORS(false)
DRI_CONF_ANV_DISABLE_LINK_TIME_OPTIMIZATION(false)
DRI_CONF_ANV_ENABLE_OPT_DIVERGENT_ATOMICS(0)
DRI_CONF_ANV_BRW_DISABLE_SUBGROUP_SIZE_CONTROL(false)
DRI_CONF_SHADER_SPILLING_RATE(11)
DRI_CONFIG_INTEL_FORCE_COMPUTE_SURFACE_PREFETCH(true)
DRI_CONFIG_INTEL_FORCE_SAMPLER_PREFETCH(false)

View file

@ -375,7 +375,7 @@ get_device_extensions(const struct anv_physical_device *device,
.EXT_shader_subgroup_vote = true,
.EXT_shader_viewport_index_layer = true,
.EXT_shader_uniform_buffer_unsized_array = true,
.EXT_subgroup_size_control = true,
.EXT_subgroup_size_control = !device->brw_disable_subgroup_size_control,
#ifdef ANV_USE_WSI_PLATFORM
.EXT_swapchain_maintenance1 = true,
#endif
@ -2776,6 +2776,10 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
}
device->disable_fcv = device->info.verx10 >= 125 ||
instance->disable_fcv;
device->brw_disable_subgroup_size_control =
!intel_use_jay(&device->info, MESA_SHADER_COMPUTE) &&
driQueryOptionb(&device->instance->dri_options,
"anv_brw_disable_subgroup_size_control");
result = anv_physical_device_init_heaps(device, fd);
if (result != VK_SUCCESS)

View file

@ -1554,7 +1554,8 @@ struct anv_physical_device {
bool emu_astc_ldr;
/* true if FCV optimization should be disabled. */
bool disable_fcv;
/**/
/* true if EXT_subgroup_size_control extension should be disabled. */
bool brw_disable_subgroup_size_control;
bool always_flush_cache;

View file

@ -960,6 +960,10 @@
DRI_CONF_OPT_I(anv_enable_opt_divergent_atomics, def, 0, 3,\
"Enable fusion of divergent atomics (see brw_divergent_atomics_flags)")
#define DRI_CONF_ANV_BRW_DISABLE_SUBGROUP_SIZE_CONTROL(def) \
DRI_CONF_OPT_B(anv_brw_disable_subgroup_size_control, def, \
"Disable EXT_subgroup_size_control support when using brw compiler.")
/**
* \brief HASVK specific configuration options
*/