//CFTTVulkanMemory - [2020-04-13 11:57:46]
#ifndef _CFTTVULKANMEMORY_H_
#define _CFTTVULKANMEMORY_H_

#include "common.h"
#include <vulkan/vulkan.h>

/*
00205E90 CFTTVulkanMemory::CFTTVulkanMemory(VkPhysicalDevice_T *)
0020600C CFTTVulkanMemory::~CFTTVulkanMemory()
00205C44 CFTTVulkanMemory::AllocateDescriptorSet(EFTTVkDescriptorSetType,CFTTVulkanDescriptorSet &)
00205DD0 CFTTVulkanMemory::Create(VkPhysicalDevice_T *)
00205E70 CFTTVulkanMemory::Destroy()
00206180 CFTTVulkanMemory::LongTerm_BufferAlloc(uint64_t,CFTTVkBufferAllocation &,bool)
00206196 CFTTVulkanMemory::LongTerm_BufferResize(CFTTVkBufferAllocation &,uint64_t)
0020619E CFTTVulkanMemory::LongTerm_BufferFree(CFTTVkBufferAllocation const&)
002061A4 CFTTVulkanMemory::QueueBufferAllocFree(CFTTVkBufferAllocation const&)
002061E0 CFTTVulkanMemory::Streaming_BufferAlloc(uint64_t,CFTTVkBufferAllocation &)
00206458 CFTTVulkanMemory::Streaming_BufferResize(CFTTVkBufferAllocation &,uint64_t)
00206672 CFTTVulkanMemory::Streaming_PerformManualFlushes(bool)
00206738 CFTTVulkanMemory::ImageMem_Alloc(uint64_t,CFTTVkImageAllocation &,bool,bool)
002067F8 CFTTVulkanMemory::GetMemoryTypeIndex(uint,uint)
00206826 CFTTVulkanMemory::ImageMem_Free(CFTTVkImageAllocation const&)
0020682C CFTTVulkanMemory::QueueImageAllocFree(CFTTVkImageAllocation const&)
00206868 CFTTVulkanMemory::Uniform_Apply(uint64_t,uchar const*,uint64_t,uchar const*,uint64_t)
00206AD8 CFTTVulkanMemory::QueueFreeDescriptorSet(CFTTVulkanDescriptorSet)
00206B18 CFTTVulkanMemory::AllocateCommandBuffer(VkCommandBufferLevel)
00206BD8 CFTTVulkanMemory::FlushQueuedFrees(int)
00206D58 CFTTVulkanMemory::QueueImageFree(uint64_t)
00206D90 CFTTVulkanMemory::QueueImageViewFree(uint64_t)
00206DC8 CFTTVulkanMemory::QueueFreeRenderPass(uint64_t)
00206E00 CFTTVulkanMemory::QueueFreeFramebuffer(uint64_t)
00206E38 CFTTVulkanMemory::GetMemoryTypeIndex(uint,int,uint const*,int &)

0x320
*/

enum EFTTVkDescriptorSetType {
  EFTTVkDescriptorSetType_0,
  EFTTVkDescriptorSetType_1,
  EFTTVkDescriptorSetType_2,
  EFTTVkDescriptorSetType_3,
  EFTTVkDescriptorSetType_4,
  EFTTVkDescriptorSetType_5,
};

//该类完全未知，先定义出来
class CFTTVkBufferAllocation {
public:
  int field_0;
};

class CFTTVulkanDescriptorSet {
public:
  int field_0;
  int field_4;
  int field_8;
  int field_C;
  int field_10;
};

class CFTTVkImageAllocation {
public:
  int field_0;
};

class CFTTVulkanMemory {
public:
  CFTTVulkanMemory(VkPhysicalDevice_T *);                                          //00205E90
  ~CFTTVulkanMemory();                                                             //0020600C
  void AllocateDescriptorSet(EFTTVkDescriptorSetType, CFTTVulkanDescriptorSet &);  //00205C44
  void Create(VkPhysicalDevice_T *);                                               //00205DD0
  void Destroy();                                                                  //00205E70
  void LongTerm_BufferAlloc(uint64_t, CFTTVkBufferAllocation &, bool);             //00206180
  void LongTerm_BufferResize(CFTTVkBufferAllocation &, uint64_t);                  //00206196
  void LongTerm_BufferFree(CFTTVkBufferAllocation const &);                 //0020619E
  void QueueBufferAllocFree(CFTTVkBufferAllocation const &);                       //002061A4
  void Streaming_BufferAlloc(uint64_t, CFTTVkBufferAllocation &);                  //002061E0
  void Streaming_BufferResize(CFTTVkBufferAllocation &, uint64_t);                 //00206458
  void Streaming_PerformManualFlushes(bool);                                       //00206672
  void ImageMem_Alloc(uint64_t, CFTTVkImageAllocation &, bool, bool);              //00206738
  void GetMemoryTypeIndex(uint, uint);                                             //002067F8
  void ImageMem_Free(CFTTVkImageAllocation const &);                               //00206826
  void QueueImageAllocFree(CFTTVkImageAllocation const &);                         //0020682C
  void Uniform_Apply(uint64_t, uchar const *, uint64_t, uchar const *, uint64_t);  //00206868
  void QueueFreeDescriptorSet(CFTTVulkanDescriptorSet);                            //00206AD8
  void AllocateCommandBuffer(VkCommandBufferLevel);                                //00206B18
  void FlushQueuedFrees(int);                                                      //00206BD8
  void QueueImageFree(uint64_t);                                                   //00206D58
  void QueueImageViewFree(uint64_t);                                               //00206D90
  void QueueFreeRenderPass(uint64_t);                                              //00206DC8
  void QueueFreeFramebuffer(uint64_t);                                             //00206E00
  void GetMemoryTypeIndex(uint, int, uint const *, int &);                         //00206E38
};

extern CFTTVulkanMemory *g_pVulkanMemory;

#endif  //_CFTTVULKANMEMORY_H_