anv: Assume that imported bos already have flat CCS requirements satisfied

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10291
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26711>
This commit is contained in:
José Roberto de Souza
2023-12-15 08:24:26 -08:00
committed by Marge Bot
parent 8d0e70f628
commit 3465e9f352

View File

@@ -2368,8 +2368,15 @@ VkResult anv_BindImageMemory2(
if (!bo || !isl_aux_usage_has_ccs(image->planes[p].aux_usage)) if (!bo || !isl_aux_usage_has_ccs(image->planes[p].aux_usage))
continue; continue;
/* Do nothing if flat CCS requirements are satisfied. */ /* Do nothing if flat CCS requirements are satisfied.
if (device->info->has_flat_ccs && anv_bo_is_vram_only(bo)) *
* Also, assume that imported BOs with a modifier including
* CCS live only in local memory. Otherwise the exporter should
* have failed the creation of the BO.
*/
if (device->info->has_flat_ccs &&
(anv_bo_is_vram_only(bo) ||
(bo->alloc_flags & ANV_BO_ALLOC_IMPORTED)))
continue; continue;
/* Add the plane to the aux map when applicable. */ /* Add the plane to the aux map when applicable. */