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>
This commit is contained in:
Sviatoslav Peleshko
2022-03-31 16:44:15 +03:00
committed by Marge Bot
parent f97d82c52b
commit 28ca5636f6
5 changed files with 53 additions and 7 deletions

View File

@@ -1079,6 +1079,11 @@ struct anv_instance {
struct driOptionCache dri_options;
struct driOptionCache available_dri_options;
/**
* Workarounds for game bugs.
*/
bool assume_full_subgroups;
};
VkResult anv_init_wsi(struct anv_physical_device *physical_device);