Buffers are now tagged as buffers for debug labels

This commit is contained in:
Kah Wei 2022-11-07 12:55:18 +08:00
parent 37c765d5cd
commit 4bd9f0817a
3 changed files with 4 additions and 3 deletions

View File

@ -410,7 +410,8 @@ namespace SHADE
auto [tempBuffer, allocInfo] = createBuffer(sizeStored); auto [tempBuffer, allocInfo] = createBuffer(sizeStored);
vkBuffer = tempBuffer; vkBuffer = tempBuffer;
SET_VK_OBJ_NAME(*device, vk::ObjectType::eBuffer, vkBuffer, name); if (!name.empty())
SET_VK_OBJ_NAME(device, vk::ObjectType::eBuffer, vkBuffer, "[Buffer] " + name);
// This probably means that a HOST_CACHED memory type is used on allocation // This probably means that a HOST_CACHED memory type is used on allocation
if (allocFlags & VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT) if (allocFlags & VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)

View File

@ -220,7 +220,7 @@ namespace SHADE
else else
{ {
SHVulkanDebugUtil::ReportVkSuccess("Successfully created a Logical Device. "); SHVulkanDebugUtil::ReportVkSuccess("Successfully created a Logical Device. ");
SET_VK_OBJ_NAME((*this), vk::ObjectType::eDevice, vkLogicalDevice, "Logical Device"); SET_VK_OBJ_NAME(this, vk::ObjectType::eDevice, vkLogicalDevice, "Logical Device");
} }
InitializeVMA(); InitializeVMA();

View File

@ -40,7 +40,7 @@ namespace SHADE
/*-------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------*/
#ifdef _DEBUG #ifdef _DEBUG
#define SET_VK_OBJ_NAME(DEVICE, OBJ_TYPE, OBJ_HDL, OBJ_NAME) \ #define SET_VK_OBJ_NAME(DEVICE, OBJ_TYPE, OBJ_HDL, OBJ_NAME) \
(DEVICE).SetVulkanObjectName(OBJ_TYPE, OBJ_HDL, OBJ_NAME); DEVICE->SetVulkanObjectName(OBJ_TYPE, OBJ_HDL, OBJ_NAME);
#else #else
#define SET_VK_OBJ_NAME(DEVICE, OBJ_TYPE, OBJ_HDL, OBJ_NAME) #define SET_VK_OBJ_NAME(DEVICE, OBJ_TYPE, OBJ_HDL, OBJ_NAME)
#endif #endif