Skip to content
Snippets Groups Projects
Commit 68b587bf authored by Alex Laptop's avatar Alex Laptop
Browse files

[#114] Add separate macro for vulkan debug labels, so labels can be used in Release mode

parent 3dd21e3a
No related branches found
No related tags found
1 merge request!98Resolve "Voxelization auf AMD iGPU broken"
Pipeline #27279 passed
......@@ -45,6 +45,9 @@ endif()
# configure everything to use the required dependencies
include(${vkcv_config}/Libraries.cmake)
# set macro to enable vulkan debug labels
list(APPEND vkcv_definitions VULKAN_DEBUG_LABELS)
# set the compile definitions aka preprocessor variables
add_compile_definitions(${vkcv_definitions})
......
......@@ -443,7 +443,7 @@ namespace vkcv
void Core::recordBeginDebugLabel(const CommandStreamHandle &cmdStream,
const std::string& label,
const std::array<float, 4>& color) {
#ifndef NDEBUG
#ifdef VULKAN_DEBUG_LABELS
static PFN_vkCmdBeginDebugUtilsLabelEXT beginDebugLabel = reinterpret_cast<PFN_vkCmdBeginDebugUtilsLabelEXT>(
m_Context.getDevice().getProcAddr("vkCmdBeginDebugUtilsLabelEXT")
);
......@@ -462,11 +462,11 @@ namespace vkcv
};
recordCommandsToStream(cmdStream, submitFunction, nullptr);
#endif
#endif
}
void Core::recordEndDebugLabel(const CommandStreamHandle &cmdStream) {
#ifndef NDEBUG
#ifdef VULKAN_DEBUG_LABELS
static PFN_vkCmdEndDebugUtilsLabelEXT endDebugLabel = reinterpret_cast<PFN_vkCmdEndDebugUtilsLabelEXT>(
m_Context.getDevice().getProcAddr("vkCmdEndDebugUtilsLabelEXT")
);
......@@ -480,7 +480,7 @@ namespace vkcv
};
recordCommandsToStream(cmdStream, submitFunction, nullptr);
#endif
#endif
}
void Core::recordComputeIndirectDispatchToCmdStream(
......@@ -864,7 +864,7 @@ namespace vkcv
static void setDebugObjectLabel(const vk::Device& device, const vk::ObjectType& type,
uint64_t handle, const std::string& label) {
#ifndef NDEBUG
#ifndef VULKAN_DEBUG_LABELS
static PFN_vkSetDebugUtilsObjectNameEXT setDebugLabel = reinterpret_cast<PFN_vkSetDebugUtilsObjectNameEXT>(
device.getProcAddr("vkSetDebugUtilsObjectNameEXT")
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment