mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 04:50:35 +00:00
Add memory creation info
This commit is contained in:
@@ -262,6 +262,11 @@ void VulkanCreationInfo::Framebuffer::Init(VulkanResourceManager *resourceMan, c
|
||||
attachments[i].view = resourceMan->GetNonDispWrapper(pCreateInfo->pAttachments[i])->id;
|
||||
}
|
||||
|
||||
void VulkanCreationInfo::Memory::Init(VulkanResourceManager *resourceMan, const VkMemoryAllocInfo* pAllocInfo)
|
||||
{
|
||||
size = pAllocInfo->allocationSize;
|
||||
}
|
||||
|
||||
void VulkanCreationInfo::Buffer::Init(VulkanResourceManager *resourceMan, const VkBufferCreateInfo* pCreateInfo)
|
||||
{
|
||||
size = pCreateInfo->size;
|
||||
|
||||
@@ -188,6 +188,14 @@ struct VulkanCreationInfo
|
||||
};
|
||||
map<ResourceId, Framebuffer> m_Framebuffer;
|
||||
|
||||
struct Memory
|
||||
{
|
||||
void Init(VulkanResourceManager *resourceMan, const VkMemoryAllocInfo* pAllocInfo);
|
||||
|
||||
uint64_t size;
|
||||
};
|
||||
map<ResourceId, Memory> m_Memory;
|
||||
|
||||
struct Buffer
|
||||
{
|
||||
void Init(VulkanResourceManager *resourceMan, const VkBufferCreateInfo* pCreateInfo);
|
||||
|
||||
@@ -54,6 +54,8 @@ bool WrappedVulkan::Serialise_vkAllocMemory(
|
||||
{
|
||||
ResourceId live = GetResourceManager()->WrapResource(Unwrap(device), mem);
|
||||
GetResourceManager()->AddLiveResource(id, mem);
|
||||
|
||||
m_CreationInfo.m_Memory[live].Init(GetResourceManager(), &info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +99,8 @@ VkResult WrappedVulkan::vkAllocMemory(
|
||||
else
|
||||
{
|
||||
GetResourceManager()->AddLiveResource(id, *pMem);
|
||||
|
||||
m_CreationInfo.m_Memory[id].Init(GetResourceManager(), pAllocInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user