SpiecsEngine
 
Loading...
Searching...
No Matches

◆ InsertLabel()

void Spices::VulkanDebugUtils::InsertLabel ( VkCommandBuffer cmdBuffer,
const std::string & caption,
glm::vec4 color = glm::vec4(1.0f) )
static

Insert Record Commands with a Label.

Parameters
[in]cmdBufferThe VkCommandBuffer in use this frame.
[in]captionThe label be captured.
[in]colorThe label color.

Instance a VkDebugUtilsObjectNameInfoEXT.

Execute the function pointer.

Instance a VkDebugUtilsObjectNameInfoEXT.

Execute the function pointer.

Definition at line 36 of file VulkanDebugUtils.cpp.

41 {
43
47 VkDebugUtilsLabelEXT labelInfo{};
48 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
49 labelInfo.pLabelName = caption.c_str();
50
51 memcpy(labelInfo.color, &color[0], sizeof(float) * 4);
52
56 VulkanRenderBackend::GetState().m_VkFunc.vkCmdInsertDebugUtilsLabelEXT(cmdBuffer, &labelInfo);
57 }
#define SPICES_PROFILE_ZONE
static VulkanState & GetState()
Get VulkanState in use.
VulkanFunctions m_VkFunc
Definition VulkanUtils.h:98