Added debug marker region to text overlay command buffer
This commit is contained in:
parent
4dabec717b
commit
50a806130e
3 changed files with 13 additions and 2 deletions
|
|
@ -246,7 +246,7 @@ void VulkanExampleBase::prepare()
|
|||
}
|
||||
if (enableDebugMarkers)
|
||||
{
|
||||
vkDebug::debugReport::setupDebugMarkers(device);
|
||||
vkDebug::DebugMarker::setup(device);
|
||||
}
|
||||
createCommandPool();
|
||||
createSetupCommandBuffer();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "vulkantools.h"
|
||||
#include "vulkandebug.h"
|
||||
|
||||
#include "../external/stb/stb_font_consolas_24_latin1.inl"
|
||||
|
||||
|
|
@ -638,6 +639,11 @@ public:
|
|||
|
||||
VK_CHECK_RESULT(vkBeginCommandBuffer(cmdBuffers[i], &cmdBufInfo));
|
||||
|
||||
if (vkDebug::DebugMarker::active)
|
||||
{
|
||||
vkDebug::DebugMarker::beginRegion(cmdBuffers[i], "Text overlay", glm::vec4(1.0f, 0.94f, 0.3f, 1.0f));
|
||||
}
|
||||
|
||||
vkCmdBeginRenderPass(cmdBuffers[i], &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
|
||||
|
||||
VkViewport viewport = vkTools::initializers::viewport((float)*frameBufferWidth, (float)*frameBufferHeight, 0.0f, 1.0f);
|
||||
|
|
@ -659,6 +665,11 @@ public:
|
|||
|
||||
vkCmdEndRenderPass(cmdBuffers[i]);
|
||||
|
||||
if (vkDebug::DebugMarker::active)
|
||||
{
|
||||
vkDebug::DebugMarker::endRegion(cmdBuffers[i]);
|
||||
}
|
||||
|
||||
VK_CHECK_RESULT(vkEndCommandBuffer(cmdBuffers[i]));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace DebugMarker
|
|||
pfnCmdDebugMarkerInsert = (PFN_vkCmdDebugMarkerInsertEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT");
|
||||
|
||||
// Set flag if at least one function pointer is present
|
||||
active = pfnDebugMarkerSetObjectName;
|
||||
active = (pfnDebugMarkerSetObjectName != VK_NULL_HANDLE);
|
||||
}
|
||||
|
||||
// Sets the debug name of an object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue