anv, hasvk: ignore QFOT if both src and dst queue families are equal

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34779>
This commit is contained in:
Iván Briano 2025-04-30 15:11:32 -07:00 committed by Marge Bot
parent c1dbfa0e0f
commit cf9b0dd589
2 changed files with 20 additions and 0 deletions

View file

@ -1078,6 +1078,16 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
? isl_drm_modifier_get_info(image->vk.drm_format_mod)
: NULL;
/**
* Vulkan 1.4.313, 7.7.4. Queue Family Ownership Transfer:
*
* If the values of srcQueueFamilyIndex and dstQueueFamilyIndex are equal,
* no ownership transfer is performed, and the barrier operates as if they
* were both set to VK_QUEUE_FAMILY_IGNORED.
*/
if (src_queue_family == dst_queue_family)
src_queue_family = dst_queue_family = VK_QUEUE_FAMILY_IGNORED;
const bool src_queue_external = queue_family_is_external(src_queue_family);
const bool dst_queue_external = queue_family_is_external(dst_queue_family);

View file

@ -928,6 +928,16 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
? isl_drm_modifier_get_info(image->vk.drm_format_mod)
: NULL;
/**
* Vulkan 1.4.313, 7.7.4. Queue Family Ownership Transfer:
*
* If the values of srcQueueFamilyIndex and dstQueueFamilyIndex are equal,
* no ownership transfer is performed, and the barrier operates as if they
* were both set to VK_QUEUE_FAMILY_IGNORED.
*/
if (src_queue_family == dst_queue_family)
src_queue_family = dst_queue_family = VK_QUEUE_FAMILY_IGNORED;
const bool src_queue_external =
src_queue_family == VK_QUEUE_FAMILY_FOREIGN_EXT ||
src_queue_family == VK_QUEUE_FAMILY_EXTERNAL;