anv: Disable compression if we have concurrent sharing mode

If a resource is created with sharing mode CONCURRENT when multiple
queues are supported, we can't support the compression since we can't do
FULL_RESOLVE/PARTIAL_RESOLVE to construct the main surface data without
barriers.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27349>
This commit is contained in:
Sagar Ghuge 2024-01-29 15:09:54 -08:00 committed by Marge Bot
parent 9a4d951ef9
commit 01636ee700

View file

@ -740,6 +740,15 @@ add_aux_surface_if_supported(struct anv_device *device,
if (anv_image_is_sparse(image))
return VK_SUCCESS;
/* If resource created with sharing mode CONCURRENT when multiple queues
* are supported, we can't support the compression since we can't do
* FULL_RESOLVE/PARTIAL_RESOLVE to construct the main surface data without
* barrier.
*/
if (image->vk.sharing_mode == VK_SHARING_MODE_CONCURRENT &&
device->queue_count > 1)
return VK_SUCCESS;
uint32_t binding;
if (image->vk.drm_format_mod == DRM_FORMAT_MOD_INVALID ||
isl_drm_modifier_has_aux(image->vk.drm_format_mod)) {