Vulkan: Add a memory allocator and hook it up to the texture cache.
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#include "xenia/ui/vulkan/vulkan.h"
|
||||
#include "xenia/ui/vulkan/vulkan_device.h"
|
||||
|
||||
#include "third_party/vulkan/vk_mem_alloc.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace vulkan {
|
||||
@@ -41,9 +43,8 @@ class TextureCache {
|
||||
VkFormat format;
|
||||
VkImage image;
|
||||
VkImageLayout image_layout;
|
||||
VkDeviceMemory image_memory;
|
||||
VkDeviceSize memory_offset;
|
||||
VkDeviceSize memory_size;
|
||||
VmaAllocation alloc;
|
||||
VmaAllocationInfo alloc_info;
|
||||
VkFramebuffer framebuffer; // Blit target frame buffer.
|
||||
|
||||
uintptr_t access_watch_handle;
|
||||
@@ -187,6 +188,8 @@ class TextureCache {
|
||||
std::unordered_map<uint64_t, VkDescriptorSet> texture_bindings_;
|
||||
VkDescriptorSetLayout texture_descriptor_set_layout_ = nullptr;
|
||||
|
||||
VmaAllocator mem_allocator_ = nullptr;
|
||||
|
||||
ui::vulkan::CircularBuffer staging_buffer_;
|
||||
ui::vulkan::CircularBuffer wb_staging_buffer_;
|
||||
std::unordered_map<uint64_t, Texture*> textures_;
|
||||
|
||||
Reference in New Issue
Block a user