anv: workaround apps that assume full subgroups without specifying it
authorSviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Thu, 31 Mar 2022 13:44:15 +0000 (16:44 +0300)
committerMarge Bot <emma+marge@anholt.net>
Tue, 26 Apr 2022 13:21:43 +0000 (13:21 +0000)
commit28ca5636f6519f70cede02742f5ba0e00e6afcd3
tree24d4b361774b793fb719f7bf6e711763c55dd42e
parentf97d82c52bec095a4592c40e19869f95fa07f561
anv: workaround apps that assume full subgroups without specifying it

Without this we might choose 8 or 16 width, while the app assumes 32.
With subgroup operations it may cause wrong calculations and thus bugs.

Examples of such games are Aperture Desk Job and DOOM Eternal.

v2: Make it a driconf option instead of applying unconditionally, move
    from brw_required_dispatch_width to brw_compile_cs
v3: Rename allow_assuming_full_subgroups -> assume_full_subgroups.
    Include assume_full_subgroups value in anv_pipeline_hash_compute().
v4: Move actual workaround code from brw_fs.c -> anv_pipeline.c.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6171
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ĺšlusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15708>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_private.h
src/util/00-mesa-defaults.conf
src/util/driconf.h