add texture:getDebugName and buffer:getDebugName

This commit is contained in:
niki
2023-12-14 00:09:08 +01:00
parent 834398335d
commit 7a25dfa7fc
15 changed files with 47 additions and 25 deletions
+2 -3
View File
@@ -34,7 +34,6 @@ namespace vulkan
Texture::Texture(love::graphics::Graphics *gfx, const Settings &settings, const Slices *data)
: love::graphics::Texture(gfx, settings, data)
, vgfx(dynamic_cast<Graphics*>(gfx))
, debugName(settings.debugName)
, slices(settings.type)
, imageAspect(0)
{
@@ -202,7 +201,7 @@ bool Texture::loadVolatile()
setGraphicsMemorySize(memsize);
if (!debugName.empty())
if (debugName.hasValue)
{
if (vgfx->getEnabledOptionalInstanceExtensions().debugInfo)
{
@@ -210,7 +209,7 @@ bool Texture::loadVolatile()
nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
nameInfo.objectType = VK_OBJECT_TYPE_IMAGE;
nameInfo.objectHandle = (uint64_t)textureImage;
nameInfo.pObjectName = debugName.c_str();
nameInfo.pObjectName = debugName.value.c_str();
vkSetDebugUtilsObjectNameEXT(device, &nameInfo);
}
}