Vulkan: Ensure no gaps between attachments when using MoltenVK

MoltenVK dynamic rendering is built on top of render passes and framebuffers.
This also means that dynamic rendering has the same limitations.

This PR enables the workarounds for gaps between attachments for MoltenVK.

Pull Request: https://projects.blender.org/blender/blender/pulls/131816
This commit is contained in:
Jeroen Bakker
2024-12-13 09:55:18 +01:00
parent 718e58fb3b
commit c698edcf70

View File

@@ -388,6 +388,15 @@ void VKBackend::detect_workarounds(VKDevice &device)
workarounds.dynamic_rendering_unused_attachments = !device.supports_extension(
VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME);
#ifdef __APPLE__
/* Due to a limitation in MoltenVK, attachments should be sequential even when using
* dynamic rendering. MoltenVK internally uses render passes to simulate dynamic rendering and
* same limitations apply. */
if (GPU_type_matches(GPU_DEVICE_APPLE, GPU_OS_MAC, GPU_DRIVER_ANY)) {
GCaps.render_pass_workaround = true;
}
#endif
device.workarounds_ = workarounds;
}