From b01b5c973c881ff5ca7c32d68f8829aa1d503763 Mon Sep 17 00:00:00 2001 From: jcm <6864788+jcm93@users.noreply.github.com> Date: Sun, 15 Sep 2024 07:44:35 -0500 Subject: [PATCH] Update push descriptor workaround for upstream MoltenVK fix --- vulkan/device.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vulkan/device.cpp b/vulkan/device.cpp index 6623a9dd..8afa1833 100644 --- a/vulkan/device.cpp +++ b/vulkan/device.cpp @@ -855,11 +855,13 @@ void Device::init_workarounds() // Events are not supported in MoltenVK. // TODO: Use VK_KHR_portability_subset to determine this. workarounds.emulate_event_as_pipeline_barrier = true; - // MoltenVK is broken with push descriptor templates. - // KhronosGroup/MoltenVK issue 2323. - workarounds.broken_push_descriptors = true; - LOGW("Emulating events as pipeline barriers on Metal emulation.\n"); - LOGW("Disabling push descriptors on Metal emulation.\n"); + if (gpu_props.driverVersion < VK_MAKE_VERSION(1, 2, 11)) { + // MoltenVK was broken with push descriptor templates. + // KhronosGroup/MoltenVK issue 2323, fix observed in driver version 1.2.11. + workarounds.broken_push_descriptors = true; + LOGW("Emulating events as pipeline barriers on Metal emulation.\n"); + LOGW("Disabling push descriptors on Metal emulation.\n"); + } #else bool sync2_workarounds = false; const bool mesa_driver = ext.driver_id == VK_DRIVER_ID_MESA_RADV ||