Module: Mesa Branch: staging/23.3 Commit: c1d0ccd6b4b3b9d2276c3f133998be3fa83969e7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1d0ccd6b4b3b9d2276c3f133998be3fa83969e7
Author: José Roberto de Souza <[email protected]> Date: Fri Dec 15 08:24:26 2023 -0800 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 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> (cherry picked from commit 3465e9f3526c8dbba3ef5ab5bd6158b70422ab83) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26832> --- src/intel/vulkan/anv_image.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 8e14b46a676..aecb2975ebe 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -2301,8 +2301,14 @@ VkResult anv_BindImageMemory2( if (!bo || !isl_aux_usage_has_ccs(image->planes[p].aux_usage)) continue; - /* Do nothing if flat CCS requirements are satisfied. */ - if (device->info->has_flat_ccs && bo->vram_only) + /* Do nothing if flat CCS requirements are satisfied. + * + * 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 && + (bo->vram_only || bo->is_external)) continue; /* Add the plane to the aux map when applicable. */
