2
3
4
5
9#include "Render/Vulkan/VulkanRenderBackend.h"
14 VkCommandBuffer cmdBuffer ,
15 const std::string& caption ,
22
23
24 VkDebugUtilsLabelEXT labelInfo{};
25 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
26 labelInfo.pLabelName = caption.c_str();
28 memcpy(labelInfo.color, &color[0],
sizeof(
float) * 4);
31
32
33 VulkanRenderBackend::GetState().m_VkFunc.vkCmdBeginDebugUtilsLabelEXT(cmdBuffer, &labelInfo);
37 VkCommandBuffer cmdBuffer ,
38 const std::string& caption ,
45
46
47 VkDebugUtilsLabelEXT labelInfo{};
48 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
49 labelInfo.pLabelName = caption.c_str();
51 memcpy(labelInfo.color, &color[0],
sizeof(
float) * 4);
54
55
56 VulkanRenderBackend::GetState().m_VkFunc.vkCmdInsertDebugUtilsLabelEXT(cmdBuffer, &labelInfo);
64
65
66 VulkanRenderBackend::GetState().m_VkFunc.vkCmdEndDebugUtilsLabelEXT(cmdBuffer);
71 const std::string& caption ,
78
79
80 VkDebugUtilsLabelEXT labelInfo{};
81 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
82 labelInfo.pLabelName = caption.c_str();
84 memcpy(labelInfo.color, &color[0],
sizeof(
float) * 4);
87
88
89 VulkanRenderBackend::GetState().m_VkFunc.vkQueueBeginDebugUtilsLabelEXT(queue, &labelInfo);
97
98
99 VulkanRenderBackend::GetState().m_VkFunc.vkQueueEndDebugUtilsLabelEXT(queue);
102 void VulkanDebugUtils::InsertQueueLabel(VkQueue queue,
const std::string& caption, glm::vec4 color)
107
108
109 VkDebugUtilsLabelEXT labelInfo{};
110 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
111 labelInfo.pLabelName = caption.c_str();
113 memcpy(labelInfo.color, &color[0],
sizeof(
float) * 4);
116
117
118 VulkanRenderBackend::GetState().m_VkFunc.vkQueueInsertDebugUtilsLabelEXT(queue, &labelInfo);
125 const std::string& caption
131
132
133 VkDebugUtilsObjectNameInfoEXT name_info{};
134 name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
135 name_info.objectType = type;
136 name_info.objectHandle = handle;
137 name_info.pObjectName = caption.c_str();
140
141
142 VK_CHECK(VulkanRenderBackend::GetState().m_VkFunc.vkSetDebugUtilsObjectNameEXT(device, &name_info))
149 const std::vector<
char*>& captions
155
156
157 VkDebugUtilsObjectTagInfoEXT tag_info{};
158 tag_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT;
159 tag_info.objectType = type;
160 tag_info.objectHandle = handle;
161 tag_info.tagName = 0;
162 tag_info.tagSize = captions.size();
163 tag_info.pTag = captions.data();
166
167
168 VK_CHECK(VulkanRenderBackend::GetState().m_VkFunc.vkSetDebugUtilsObjectTagEXT(device, &tag_info))
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
This Class Defines static function for helping vulkan debug.