drirc/anv: add flag to disable VK_EXT_subgroup_size_control

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

v2: removed intel_use_jay for stable branch

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit c105366165)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41269>
This commit is contained in:
Tapani Pälli 2026-04-23 18:20:59 +03:00 committed by Eric Engestrom
parent b25cd86569
commit b039e6ba60
5 changed files with 12 additions and 2 deletions

View file

@ -2374,7 +2374,7 @@
"description": "drirc/anv: add flag to disable VK_EXT_subgroup_size_control",
"nominated": false,
"nomination_type": 0,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -35,6 +35,7 @@ static const driOptionDescription anv_dri_options[] = {
DRI_CONF_ANV_QUERY_CLEAR_WITH_BLORP_THRESHOLD(6)
DRI_CONF_ANV_QUERY_COPY_WITH_SHADER_THRESHOLD(6)
DRI_CONF_ANV_FORCE_INDIRECT_DESCRIPTORS(false)
DRI_CONF_ANV_BRW_DISABLE_SUBGROUP_SIZE_CONTROL(false)
DRI_CONF_SHADER_SPILLING_RATE(11)
DRI_CONFIG_INTEL_TBIMR(true)
DRI_CONFIG_INTEL_VF_DISTRIBUTION(true)

View file

@ -380,7 +380,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
@ -2740,6 +2740,9 @@ 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 =
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

@ -1518,6 +1518,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 uses_ex_bso;

View file

@ -948,6 +948,10 @@
DRI_CONF_OPT_B(anv_barrier_post_typed_clear_shader, def, \
"Insert pipeline barriers post clearing shader on typed data")
#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
*/