MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / Bool32 VKAPI_CALL debug_callback

Method Bool32 VKAPI_CALL debug_callback

framework/core/hpp_debug.h:169–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169inline VKAPI_ATTR vk::Bool32 VKAPI_CALL debug_callback(vk::DebugReportFlagsEXT flags,
170 vk::DebugReportObjectTypeEXT /*type*/,
171 uint64_t /*object*/,
172 size_t /*location*/,
173 int32_t /*message_code*/,
174 char const *layer_prefix,
175 char const *message,
176 void * /*user_data*/)
177{
178 if (flags & vk::DebugReportFlagBitsEXT::eError)
179 {
180 LOGE("{}: {}", layer_prefix, message);
181 }
182 else if (flags & vk::DebugReportFlagBitsEXT::eWarning)
183 {
184 LOGW("{}: {}", layer_prefix, message);
185 }
186 else if (flags & vk::DebugReportFlagBitsEXT::ePerformanceWarning)
187 {
188 LOGW("{}: {}", layer_prefix, message);
189 }
190 else
191 {
192 LOGI("{}: {}", layer_prefix, message);
193 }
194 return false;
195}
196#endif
197} // namespace core
198} // namespace vkb

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected