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>
This commit is contained in:
Lionel Landwerlin 2025-02-17 21:01:00 +02:00 committed by Marge Bot
parent 09656e3dc4
commit a88c9ea192

View file

@ -1562,8 +1562,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);
@ -1578,7 +1577,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;
}
}