From a830eb666b058df38f734c6369eb18cc7212f36c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 7 Jul 2024 19:33:28 -0300 Subject: Disallow concurrent fence waits on Adreno (#7001) * Disallow concurrent fence waits on Adreno * Ensure locks are released if exceptions are thrown --- src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs') diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index 86a347e0..c1689651 100644 --- a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -90,6 +90,8 @@ namespace Ryujinx.Graphics.Vulkan internal bool IsMoltenVk { get; private set; } internal bool IsTBDR { get; private set; } internal bool IsSharedMemory { get; private set; } + internal bool IsConcurrentFenceWaitUnsupported { get; private set; } + public string GpuVendor { get; private set; } public string GpuDriver { get; private set; } public string GpuRenderer { get; private set; } @@ -323,6 +325,8 @@ namespace Ryujinx.Graphics.Vulkan Vendor == Vendor.Broadcom || Vendor == Vendor.ImgTec; + IsConcurrentFenceWaitUnsupported = Vendor == Vendor.Qualcomm; + GpuVendor = VendorUtils.GetNameFromId(properties.VendorID); GpuDriver = hasDriverProperties && !OperatingSystem.IsMacOS() ? VendorUtils.GetFriendlyDriverName(driverProperties.DriverID) : GpuVendor; // Fallback to vendor name if driver is unavailable or on MacOS where vendor is preferred. @@ -411,7 +415,7 @@ namespace Ryujinx.Graphics.Vulkan Api.TryGetDeviceExtension(_instance.Instance, _device, out ExtExternalMemoryHost hostMemoryApi); HostMemoryAllocator = new HostMemoryAllocator(MemoryAllocator, Api, hostMemoryApi, _device); - CommandBufferPool = new CommandBufferPool(Api, _device, Queue, QueueLock, queueFamilyIndex); + CommandBufferPool = new CommandBufferPool(Api, _device, Queue, QueueLock, queueFamilyIndex, IsConcurrentFenceWaitUnsupported); PipelineLayoutCache = new PipelineLayoutCache(); -- cgit v1.2.3