From 4744bde0e59578baeb5f94126087953f6d8ddba0 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Mon, 25 Sep 2023 21:00:02 -0300 Subject: Reduce the amount of descriptor pool allocations on Vulkan (#5673) * 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 --- src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs') diff --git a/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs b/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs index 346fd916..0cb80ac7 100644 --- a/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs +++ b/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs @@ -464,13 +464,14 @@ namespace Ryujinx.Graphics.Vulkan return true; } - public Auto GetNewDescriptorSetCollection( - VulkanRenderer gd, - int commandBufferIndex, - int setIndex, - out bool isNew) + public void UpdateDescriptorCacheCommandBufferIndex(int commandBufferIndex) + { + _plce.UpdateCommandBufferIndex(commandBufferIndex); + } + + public Auto GetNewDescriptorSetCollection(int setIndex, out bool isNew) { - return _plce.GetNewDescriptorSetCollection(gd, commandBufferIndex, setIndex, out isNew); + return _plce.GetNewDescriptorSetCollection(setIndex, out isNew); } protected virtual void Dispose(bool disposing) -- cgit v1.2.3