From fa32ef92755a51a2567a1bcbb35fb34886b5f979 Mon Sep 17 00:00:00 2001 From: gleng <906346+gleng@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:10:23 -0700 Subject: [PATCH] MacOS: Allow barriers inside a render pass for non-Apple GPUs and don't treat as TBDR (#5440) * MoltenVK: Allow barriers inside a render pass on non-Apple GPUs * Don't treat all non-Apple GPUs using MoltenVK as TBDR --- src/Ryujinx.Graphics.Vulkan/PipelineBase.cs | 4 ++-- src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs index 5ee92691..7f175d93 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -144,9 +144,9 @@ namespace Ryujinx.Graphics.Vulkan { _drawCountSinceBarrier = DrawCount; - // Barriers apparently have no effect inside a render pass on MoltenVK. + // Barriers are not supported inside a render pass on Apple GPUs. // As a workaround, end the render pass. - if (Gd.IsMoltenVk) + if (Gd.Vendor == Vendor.Apple) { EndRenderPass(); } diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index d0bd1b2c..b9b1ba91 100644 --- a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -680,7 +680,8 @@ namespace Ryujinx.Graphics.Vulkan IsAmdWindows = Vendor == Vendor.Amd && OperatingSystem.IsWindows(); IsIntelWindows = Vendor == Vendor.Intel && OperatingSystem.IsWindows(); - IsTBDR = IsMoltenVk || + IsTBDR = + Vendor == Vendor.Apple || Vendor == Vendor.Qualcomm || Vendor == Vendor.ARM || Vendor == Vendor.Broadcom ||