diff options
| author | Mary <mary@mary.zone> | 2023-02-15 07:50:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-15 07:50:26 +0100 |
| commit | 32450d45de7889318e0f289fc52b3fffc62edf60 (patch) | |
| tree | 2fc838e1ff71e1bbaede63484958b35a859f491c /Ryujinx.Graphics.Vulkan/TextureStorage.cs | |
| parent | ed7a0474c6b126d885e6689abc46264100ec8de0 (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/TextureStorage.cs')
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/TextureStorage.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Vulkan/TextureStorage.cs b/Ryujinx.Graphics.Vulkan/TextureStorage.cs index 92209997..03a47a09 100644 --- a/Ryujinx.Graphics.Vulkan/TextureStorage.cs +++ b/Ryujinx.Graphics.Vulkan/TextureStorage.cs @@ -55,7 +55,6 @@ namespace Ryujinx.Graphics.Vulkan public unsafe TextureStorage( VulkanRenderer gd, - PhysicalDevice physicalDevice, Device device, TextureCreateInfo info, float scaleFactor, @@ -118,7 +117,7 @@ namespace Ryujinx.Graphics.Vulkan if (foreignAllocation == null) { gd.Api.GetImageMemoryRequirements(device, _image, out var requirements); - var allocation = gd.MemoryAllocator.AllocateDeviceMemory(physicalDevice, requirements, DefaultImageMemoryFlags); + var allocation = gd.MemoryAllocator.AllocateDeviceMemory(requirements, DefaultImageMemoryFlags); if (allocation.Memory.Handle == 0UL) { @@ -173,7 +172,7 @@ namespace Ryujinx.Graphics.Vulkan var info = NewCreateInfoWith(ref _info, format, _info.BytesPerPixel); - storage = new TextureStorage(_gd, default, _device, info, ScaleFactor, _allocationAuto); + storage = new TextureStorage(_gd, _device, info, ScaleFactor, _allocationAuto); _aliasedStorages.Add(format, storage); } |
