diff options
author | gdkchan <gab.dark.100@gmail.com> | 2023-09-25 21:00:02 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 02:00:02 +0200 |
commit | 4744bde0e59578baeb5f94126087953f6d8ddba0 (patch) | |
tree | 6f85ea9241d2b1dbdc67b73c072f145395153eab /src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs | |
parent | 4a835bb2b9130b91d35968b2f7800084cf286de4 (diff) |
Reduce the amount of descriptor pool allocations on Vulkan (#5673)1.1.1030
* Reduce the amount of descriptor pool allocations on Vulkan
* Formatting
* Slice can be simplified
* Make GetDescriptorPoolSizes static
* Adjust CanFit calculation so that TryAllocateDescriptorSets never fails
* Remove unused field
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs index 17eeef68..4d3b8640 100644 --- a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs +++ b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs @@ -27,6 +27,7 @@ namespace Ryujinx.Graphics.Vulkan { public bool InUse; public bool InConsumption; + public int SubmissionCount; public CommandBuffer CommandBuffer; public FenceHolder Fence; public SemaphoreHolder Semaphore; @@ -193,6 +194,11 @@ namespace Ryujinx.Graphics.Vulkan return _commandBuffers[cbIndex].Fence; } + public int GetSubmissionCount(int cbIndex) + { + return _commandBuffers[cbIndex].SubmissionCount; + } + private int FreeConsumed(bool wait) { int freeEntry = 0; @@ -282,6 +288,7 @@ namespace Ryujinx.Graphics.Vulkan Debug.Assert(entry.CommandBuffer.Handle == cbs.CommandBuffer.Handle); entry.InUse = false; entry.InConsumption = true; + entry.SubmissionCount++; _inUseCount--; var commandBuffer = entry.CommandBuffer; |