aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/BufferManager.cs
diff options
context:
space:
mode:
authorMary <mary@mary.zone>2023-02-15 07:50:26 +0100
committerGitHub <noreply@github.com>2023-02-15 07:50:26 +0100
commit32450d45de7889318e0f289fc52b3fffc62edf60 (patch)
tree2fc838e1ff71e1bbaede63484958b35a859f491c /Ryujinx.Graphics.Vulkan/BufferManager.cs
parented7a0474c6b126d885e6689abc46264100ec8de0 (diff)
vulkan: Clean up MemoryAllocator (#4418)
This started as an attempt to remove vkGetPhysicalDeviceMemoryProperties in FindSuitableMemoryTypeIndex (As this could have some overhead and shouldn't change at runtime) and turned in a little bigger cleanup.
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/BufferManager.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/BufferManager.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Vulkan/BufferManager.cs b/Ryujinx.Graphics.Vulkan/BufferManager.cs
index 9c50e6ff..49fdd75d 100644
--- a/Ryujinx.Graphics.Vulkan/BufferManager.cs
+++ b/Ryujinx.Graphics.Vulkan/BufferManager.cs
@@ -39,7 +39,6 @@ namespace Ryujinx.Graphics.Vulkan
BufferUsageFlags.VertexBufferBit |
BufferUsageFlags.TransformFeedbackBufferBitExt;
- private readonly PhysicalDevice _physicalDevice;
private readonly Device _device;
private readonly IdList<BufferHolder> _buffers;
@@ -48,9 +47,8 @@ namespace Ryujinx.Graphics.Vulkan
public StagingBuffer StagingBuffer { get; }
- public BufferManager(VulkanRenderer gd, PhysicalDevice physicalDevice, Device device)
+ public BufferManager(VulkanRenderer gd, Device device)
{
- _physicalDevice = physicalDevice;
_device = device;
_buffers = new IdList<BufferHolder>();
StagingBuffer = new StagingBuffer(gd, this);
@@ -114,7 +112,7 @@ namespace Ryujinx.Graphics.Vulkan
allocateFlagsAlt = DefaultBufferMemoryAltFlags;
}
- var allocation = gd.MemoryAllocator.AllocateDeviceMemory(_physicalDevice, requirements, allocateFlags, allocateFlagsAlt);
+ var allocation = gd.MemoryAllocator.AllocateDeviceMemory(requirements, allocateFlags, allocateFlagsAlt);
if (allocation.Memory.Handle == 0UL)
{