Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
vulkan_debug.hpp
Go to the documentation of this file.
1
4
5
#pragma once
6
#include "vulkan_core.hpp"
7
8
#include <string>
9
#include <string_view>
10
#include <
toast/log.hpp
>
11
12
namespace
renderer {
13
14
template
<
typename
VkHandle>
15
void
setDebugName(
const
VulkanCore
& core,
const
VkHandle& handle, std::string_view name) {
16
if
(!core.debugUtilsEnabled() || !handle) {
17
return
;
18
}
19
20
try
{
21
core.getDevice().setDebugUtilsObjectNameEXT(handle, std::string(name));
22
}
catch
(
const
std::exception& e) {
TOAST_WARN
(
"Render"
,
"Failed to set debug name '{}': {}"
, name, e.what()); }
23
}
24
25
}
renderer::VulkanCore
Definition
vulkan_core.hpp:48
log.hpp
Public logging interface for the engine.
TOAST_WARN
#define TOAST_WARN(sink,...)
Indicates possible code missuse.
Definition
log.hpp:94
engine
src
toast
renderer
vulkan_debug.hpp
Generated by
1.17.0