venus: relax the requirement for sync2

The current requirement for sync is only to support WSI, and it is not
necessarily needed at all per the comment added. Will drop it later.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33829>
This commit is contained in:
Yiwei Zhang 2025-02-28 14:48:12 -08:00 committed by Marge Bot
parent cf7fa16f8c
commit c35b52638c

View file

@ -1101,6 +1101,17 @@ vn_physical_device_get_passthrough_extensions(
{
struct vn_renderer *renderer = physical_dev->instance->renderer;
#if DETECT_OS_ANDROID || defined(VN_USE_WSI_PLATFORM)
/* WSI support currently requires semaphore sync fd import for
* VK_KHR_synchronization2 for code simplicity. This requirement can be
* dropped by implementing external semaphore purely on the driver side
* (aka no corresponding renderer side object).
*/
const bool can_sync2 = physical_dev->renderer_sync_fd.semaphore_importable;
#else
static const bool can_sync2 = true;
#endif
*exts = (struct vk_device_extension_table){
/* promoted to VK_VERSION_1_1 */
.KHR_16bit_storage = true,
@ -1156,11 +1167,7 @@ vn_physical_device_get_passthrough_extensions(
.KHR_shader_integer_dot_product = true,
.KHR_shader_non_semantic_info = true,
.KHR_shader_terminate_invocation = true,
/* Our implementation requires semaphore sync fd import
* for VK_KHR_synchronization2.
*/
.KHR_synchronization2 =
physical_dev->renderer_sync_fd.semaphore_importable,
.KHR_synchronization2 = can_sync2,
.KHR_zero_initialize_workgroup_memory = true,
.EXT_4444_formats = true,
.EXT_extended_dynamic_state = true,