aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-07-07 19:33:28 -0300
committerGitHub <noreply@github.com>2024-07-07 19:33:28 -0300
commita830eb666b058df38f734c6369eb18cc7212f36c (patch)
tree5c23278f5452153405975825f640659cb5f7e5bd /src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
parentcfc75d7e78a63fe3bde06b6e4896a42e8dedaf82 (diff)
Disallow concurrent fence waits on Adreno (#7001)
* Disallow concurrent fence waits on Adreno * Ensure locks are released if exceptions are thrown
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
index 278dbecf..80054ce2 100644
--- a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
+++ b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
@@ -18,6 +18,7 @@ namespace Ryujinx.Graphics.Vulkan
private readonly Device _device;
private readonly Queue _queue;
private readonly object _queueLock;
+ private readonly bool _concurrentFenceWaitUnsupported;
private readonly CommandPool _pool;
private readonly Thread _owner;
@@ -61,12 +62,20 @@ namespace Ryujinx.Graphics.Vulkan
private int _queuedCount;
private int _inUseCount;
- public unsafe CommandBufferPool(Vk api, Device device, Queue queue, object queueLock, uint queueFamilyIndex, bool isLight = false)
+ public unsafe CommandBufferPool(
+ Vk api,
+ Device device,
+ Queue queue,
+ object queueLock,
+ uint queueFamilyIndex,
+ bool concurrentFenceWaitUnsupported,
+ bool isLight = false)
{
_api = api;
_device = device;
_queue = queue;
_queueLock = queueLock;
+ _concurrentFenceWaitUnsupported = concurrentFenceWaitUnsupported;
_owner = Thread.CurrentThread;
var commandPoolCreateInfo = new CommandPoolCreateInfo
@@ -357,7 +366,7 @@ namespace Ryujinx.Graphics.Vulkan
if (refreshFence)
{
- entry.Fence = new FenceHolder(_api, _device);
+ entry.Fence = new FenceHolder(_api, _device, _concurrentFenceWaitUnsupported);
}
else
{