diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2023-12-15 08:24:26 -0800 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-12-28 12:07:33 +0000 |
commit | 0aa0ae31d3ea07471600353c2ae4325446f970ae (patch) | |
tree | 9f1967d368762d991cb20d4d4bf818919e4e67a7 | |
parent | be59925ab2ad629aef48ead8afcbfae04e556e4a (diff) | |
download | mesa-0aa0ae31d3ea07471600353c2ae4325446f970ae.tar.gz mesa-0aa0ae31d3ea07471600353c2ae4325446f970ae.tar.bz2 mesa-0aa0ae31d3ea07471600353c2ae4325446f970ae.zip |
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>
(cherry picked from commit 3465e9f3526c8dbba3ef5ab5bd6158b70422ab83)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_image.c | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json index 1dd5d26d8ca..14a0536ed0c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -34,7 +34,7 @@ "description": "anv: Assume that imported bos already have flat CCS requirements satisfied", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null 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. */ |