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
This commit is contained in:
gdkchan 2023-09-25 21:00:02 -03:00 committed by GitHub
parent 4a835bb2b9
commit 4744bde0e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 173 additions and 57 deletions

View file

@ -464,13 +464,14 @@ namespace Ryujinx.Graphics.Vulkan
return true;
}
public Auto<DescriptorSetCollection> GetNewDescriptorSetCollection(
VulkanRenderer gd,
int commandBufferIndex,
int setIndex,
out bool isNew)
public void UpdateDescriptorCacheCommandBufferIndex(int commandBufferIndex)
{
return _plce.GetNewDescriptorSetCollection(gd, commandBufferIndex, setIndex, out isNew);
_plce.UpdateCommandBufferIndex(commandBufferIndex);
}
public Auto<DescriptorSetCollection> GetNewDescriptorSetCollection(int setIndex, out bool isNew)
{
return _plce.GetNewDescriptorSetCollection(setIndex, out isNew);
}
protected virtual void Dispose(bool disposing)