From 71bcfbab6974d8103c6b19d4de3d80771bb3ab28 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Mon, 24 Jul 2023 19:23:47 +0300 Subject: [PATCH] [Vulkan] Respect GPU_DEBUG_INFO --- src/core/renderer_vk/vk_debug.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/renderer_vk/vk_debug.cpp b/src/core/renderer_vk/vk_debug.cpp index 973d2a09..f3f099c8 100644 --- a/src/core/renderer_vk/vk_debug.cpp +++ b/src/core/renderer_vk/vk_debug.cpp @@ -70,6 +70,7 @@ namespace Vulkan { return VK_FALSE; } + #ifdef GPU_DEBUG_INFO void setObjectName(vk::Device device, vk::ObjectType objectType, const void* objectHandle, const char* format, ...) { va_list args; va_start(args, format); @@ -152,5 +153,11 @@ namespace Vulkan { } void endDebugLabel(vk::CommandBuffer commandBuffer) { commandBuffer.endDebugUtilsLabelEXT(); } + #else + void setObjectName(vk::Device device, vk::ObjectType objectType, const void* objectHandle, const char* format, ...) {} + void beginDebugLabel(vk::CommandBuffer commandBuffer, std::span color, const char* format, ...) {} + void insertDebugLabel(vk::CommandBuffer commandBuffer, std::span color, const char* format, ...) {} + void endDebugLabel(vk::CommandBuffer commandBuffer) {} + #endif // GPU_DEBUG_INFO } // namespace Vulkan \ No newline at end of file