Use debug utils version of debug markers
This commit is contained in:
parent
e3c50ad204
commit
4ebd53d89f
1 changed files with 8 additions and 10 deletions
|
@ -189,16 +189,14 @@ VkResult name_object(VkDevice device, VkObjectType type, uint64_t object, std::s
|
||||||
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmd_debug_marker_begin(VkDevice device, VkCommandBuffer command_buffer, VkDebugMarkerMarkerInfoEXT marker_info) {
|
void cmd_debug_marker_begin(VkDevice device, VkCommandBuffer command_buffer, VkDebugUtilsLabelEXT marker_info) {
|
||||||
auto func = (PFN_vkCmdDebugMarkerBeginEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT");
|
auto func = (PFN_vkCmdBeginDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkCmdBeginDebugUtilsLabelEXT");
|
||||||
if (func != nullptr)
|
func(command_buffer, &marker_info);
|
||||||
func(command_buffer, &marker_info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmd_debug_marker_end(VkDevice device, VkCommandBuffer command_buffer) {
|
void cmd_debug_marker_end(VkDevice device, VkCommandBuffer command_buffer) {
|
||||||
auto func = (PFN_vkCmdDebugMarkerEndEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT");
|
auto func = (PFN_vkCmdEndDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkCmdEndDebugUtilsLabelEXT");
|
||||||
if (func != nullptr)
|
func(command_buffer);
|
||||||
func(command_buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GFXVulkan::initialize(const GFXCreateInfo& info) {
|
bool GFXVulkan::initialize(const GFXCreateInfo& info) {
|
||||||
|
@ -1475,9 +1473,9 @@ void GFXVulkan::submit(GFXCommandBuffer* command_buffer, const int identifier) {
|
||||||
break;
|
break;
|
||||||
case GFXCommandType::PushGroup:
|
case GFXCommandType::PushGroup:
|
||||||
{
|
{
|
||||||
VkDebugMarkerMarkerInfoEXT marker_info = {};
|
VkDebugUtilsLabelEXT marker_info = {};
|
||||||
marker_info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT;
|
marker_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
|
||||||
marker_info.pMarkerName = command.data.push_group.name.data();\
|
marker_info.pLabelName = command.data.push_group.name.data();
|
||||||
|
|
||||||
cmd_debug_marker_begin(device, cmd, marker_info);
|
cmd_debug_marker_begin(device, cmd, marker_info);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue