Add names to some more objects

This commit is contained in:
baldurk
2022-02-09 18:01:39 +00:00
parent f7aec1a5f6
commit 53b507c44b
3 changed files with 16 additions and 0 deletions
+5
View File
@@ -174,6 +174,11 @@ VkObjectType objType<VkImageView>()
{
return VK_OBJECT_TYPE_IMAGE_VIEW;
}
template <>
VkObjectType objType<VkFramebuffer>()
{
return VK_OBJECT_TYPE_FRAMEBUFFER;
}
void GPUBuffer::Create(WrappedVulkan *driver, VkDevice dev, VkDeviceSize size, uint32_t ringSize,
uint32_t flags)
@@ -996,6 +996,12 @@ protected:
m_pDriver->CheckVkResult(vkr);
m_FbsToDestroy.push_back(framebuffer);
NameVulkanObject(
framebuffer,
StringFormat::Fmt("Pixel history patched framebuffer %s fmt %s",
newColorAtt == VK_NULL_HANDLE ? "no new attachment" : "new attachment",
ToStr(newColorFormat).c_str()));
pipestate.SetFramebuffer(m_pDriver, GetResID(framebuffer));
return framebuffer;
@@ -771,6 +771,8 @@ bool WrappedVulkan::Serialise_vkCreateFramebuffer(SerialiserType &ser, VkDevice
live = GetResourceManager()->WrapResource(Unwrap(device), fb);
GetResourceManager()->AddLiveResource(Framebuffer, fb);
NameVulkanObject(fb, StringFormat::Fmt("Framebuffer %s", ToStr(Framebuffer).c_str()));
VulkanCreationInfo::Framebuffer fbinfo;
fbinfo.Init(GetResourceManager(), m_CreationInfo, &CreateInfo);
@@ -805,6 +807,9 @@ bool WrappedVulkan::Serialise_vkCreateFramebuffer(SerialiserType &ser, VkDevice
// register as a live-only resource, so it is cleaned up properly
GetResourceManager()->AddLiveResource(loadFBid, fbinfo.loadFBs[s]);
NameVulkanObject(fbinfo.loadFBs[s], StringFormat::Fmt("Framebuffer %s loadFB %d",
ToStr(Framebuffer).c_str(), s));
}
}