panvk: add support for VK_EXT_queue_family_foreign

We can treat VK_QUEUE_FAMILY_FOREIGN_EXT as the host,  This makes sure
that, on release, all subqueues self-wait and all caches are flushed.
On acquire, all caches are invalidated.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
This commit is contained in:
Chia-I Wu 2024-11-15 10:49:56 -08:00 committed by Marge Bot
parent 715d6e740a
commit 0fb4609d94
3 changed files with 12 additions and 1 deletions

View File

@ -628,7 +628,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_primitive_topology_list_restart DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_primitives_generated_query DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_provoking_vertex DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_queue_family_foreign DONE (anv, hasvk, nvk, lvp, radv, tu, v3dv, vn)
VK_EXT_queue_family_foreign DONE (anv, hasvk, nvk, lvp, panvk, radv, tu, v3dv, vn)
VK_EXT_rasterization_order_attachment_access DONE (lvp, tu, vn)
VK_EXT_robustness2 DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_sample_locations DONE (anv, hasvk, nvk, radv/gfx9-, tu/a650+)

View File

@ -444,6 +444,11 @@ normalize_dependency(VkPipelineStageFlags2 *src_stages,
*src_stages = VK_PIPELINE_STAGE_2_NONE;
*src_access = VK_ACCESS_2_NONE;
break;
case VK_QUEUE_FAMILY_FOREIGN_EXT:
/* treat the foreign queue as the host */
*src_stages = VK_PIPELINE_STAGE_2_HOST_BIT;
*src_access = VK_ACCESS_2_HOST_WRITE_BIT;
break;
default:
break;
}
@ -455,6 +460,11 @@ normalize_dependency(VkPipelineStageFlags2 *src_stages,
*dst_stages = VK_PIPELINE_STAGE_2_NONE;
*dst_access = VK_ACCESS_2_NONE;
break;
case VK_QUEUE_FAMILY_FOREIGN_EXT:
/* treat the foreign queue as the host */
*dst_stages = VK_PIPELINE_STAGE_2_HOST_BIT;
*dst_access = VK_ACCESS_2_HOST_WRITE_BIT;
break;
default:
break;
}

View File

@ -235,6 +235,7 @@ get_device_extensions(const struct panvk_physical_device *device,
.EXT_pipeline_creation_cache_control = true,
.EXT_pipeline_creation_feedback = true,
.EXT_private_data = true,
.EXT_queue_family_foreign = true,
.EXT_shader_module_identifier = true,
.EXT_tooling_info = true,
.EXT_vertex_attribute_divisor = true,