Skip to content

Commit 0750574

Browse files
committed
Update VulkanMemoryAllocator to 3.3.0
1 parent 3dca4dd commit 0750574

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@
106106
ignore = dirty
107107
[submodule "3rdparty/GPUOpen/VulkanMemoryAllocator"]
108108
path = 3rdparty/GPUOpen/VulkanMemoryAllocator
109-
url = ../../Megamouse/VulkanMemoryAllocator.git
109+
url = ../../GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
110110
ignore = dirty

rpcs3/Emu/RSX/VK/VKMemAlloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class VmaRWMutex
5353
#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
5454
#endif
5555
#endif
56-
#include "3rdparty/GPUOpen/VulkanMemoryAllocator/src/vk_mem_alloc.h"
56+
#include "3rdparty/GPUOpen/VulkanMemoryAllocator/include/vk_mem_alloc.h"
5757
#ifdef _MSC_VER
5858
#pragma warning(pop)
5959
#else

rpcs3/Emu/RSX/VK/vkutils/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ namespace vk
880880
}
881881
else
882882
{
883-
m_allocator = std::make_unique<vk::mem_allocator_vma>(*this, pdev);
883+
m_allocator = std::make_unique<vk::mem_allocator_vma>(*this, pdev, pdev);
884884
}
885885

886886
// Useful for debugging different VRAM configurations

rpcs3/Emu/RSX/VK/vkutils/memory.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ namespace vk
153153
rsx_log.warning("Rebalanced memory types successfully");
154154
}
155155

156-
mem_allocator_base::mem_allocator_base(const vk::render_device& dev, VkPhysicalDevice)
156+
mem_allocator_base::mem_allocator_base(const vk::render_device& dev, VkPhysicalDevice /*pdev*/)
157157
: m_device(dev), m_allocation_flags(0)
158158
{}
159159

160-
mem_allocator_vma::mem_allocator_vma(const vk::render_device& dev, VkPhysicalDevice pdev)
160+
mem_allocator_vma::mem_allocator_vma(const vk::render_device& dev, VkPhysicalDevice pdev, VkInstance inst)
161161
: mem_allocator_base(dev, pdev)
162162
{
163163
// Initialize stats pool
@@ -166,6 +166,7 @@ namespace vk
166166
VmaAllocatorCreateInfo allocatorInfo = {};
167167
allocatorInfo.physicalDevice = pdev;
168168
allocatorInfo.device = dev;
169+
allocatorInfo.instance = inst;
169170

170171
std::vector<VkDeviceSize> heap_limits;
171172
const auto vram_allocation_limit = g_cfg.video.vk.vram_allocation_limit * 0x100000ull;
@@ -299,7 +300,7 @@ namespace vk
299300

300301
f32 mem_allocator_vma::get_memory_usage()
301302
{
302-
vmaGetBudget(m_allocator, stats.data());
303+
vmaGetHeapBudgets(m_allocator, stats.data());
303304

304305
float max_usage = 0.f;
305306
for (const auto& info : stats)

rpcs3/Emu/RSX/VK/vkutils/memory.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "../../rsx_utils.h"
55
#include "shared.h"
66

7-
#include "3rdparty/GPUOpen/VulkanMemoryAllocator/src/vk_mem_alloc.h"
7+
#include "3rdparty/GPUOpen/VulkanMemoryAllocator/include/vk_mem_alloc.h"
88

99
namespace vk
1010
{
@@ -55,7 +55,7 @@ namespace vk
5555
public:
5656
using mem_handle_t = void*;
5757

58-
mem_allocator_base(const vk::render_device& dev, VkPhysicalDevice /*pdev*/);
58+
mem_allocator_base(const vk::render_device& dev, VkPhysicalDevice pdev);
5959
virtual ~mem_allocator_base() = default;
6060

6161
virtual void destroy() = 0;
@@ -83,7 +83,7 @@ namespace vk
8383
class mem_allocator_vma : public mem_allocator_base
8484
{
8585
public:
86-
mem_allocator_vma(const vk::render_device& dev, VkPhysicalDevice pdev);
86+
mem_allocator_vma(const vk::render_device& dev, VkPhysicalDevice pdev, VkInstance inst);
8787
~mem_allocator_vma() override = default;
8888

8989
void destroy() override;

0 commit comments

Comments
 (0)