anv: limit implict write with drirc

9f32e1a489 meant to amend 1e80a426c2.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9f32e1a489 ("anv/drirc: Add option to control implicit sync on external BOs")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12629
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33587>
(cherry picked from commit a88c9ea192)
This commit is contained in:
Lionel Landwerlin 2025-02-17 21:01:00 +02:00 committed by Eric Engestrom
parent 5ecc1fb189
commit ba58320a6a
2 changed files with 4 additions and 4 deletions

View file

@ -2464,7 +2464,7 @@
"description": "anv: limit implict write with drirc",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "9f32e1a4899d489cfa54b458328879693b6b7baa",
"notes": null

View file

@ -1528,8 +1528,7 @@ VkResult anv_AllocateMemory(
alloc_flags |= ANV_BO_ALLOC_EXTERNAL;
/* wsi has its own way of synchronizing with the compositor */
if (pdevice->instance->external_memory_implicit_sync &&
!wsi_info && dedicated_info &&
if (!wsi_info && dedicated_info &&
dedicated_info->image != VK_NULL_HANDLE) {
ANV_FROM_HANDLE(anv_image, image, dedicated_info->image);
@ -1544,7 +1543,8 @@ VkResult anv_AllocateMemory(
* consumer side relying on implicit fencing can have a fence to
* wait for render complete.
*/
if (image->vk.usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
if (pdevice->instance->external_memory_implicit_sync &&
(image->vk.usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT))
alloc_flags |= ANV_BO_ALLOC_IMPLICIT_WRITE;
}
}