| 252 | } |
| 253 | |
| 254 | static VKAPI_ATTR VkBool32 VKAPI_CALL vulkanDebugCallback( |
| 255 | vk::DebugReportFlagsEXT flags, |
| 256 | vk::DebugReportObjectTypeEXT objType, |
| 257 | uint64_t obj, |
| 258 | size_t location, |
| 259 | int32_t code, |
| 260 | const char* layerPrefix, |
| 261 | const char* msg, |
| 262 | void* userData) |
| 263 | { |
| 264 | const DeviceManager_VK* manager = (const DeviceManager_VK*)userData; |
| 265 | |
| 266 | if (manager) |
| 267 | { |
| 268 | const auto& ignored = manager->GetDeviceParams().ignoredVulkanValidationMessageLocations; |
| 269 | const auto found = std::find(ignored.begin(), ignored.end(), location); |
| 270 | if (found != ignored.end()) |
| 271 | return VK_FALSE; |
| 272 | } |
| 273 | |
| 274 | donut::log::warning("[Vulkan: location=0x%zx code=%d, layerPrefix='%s'] %s", location, code, layerPrefix, msg); |
| 275 | |
| 276 | return VK_FALSE; |
| 277 | } |
| 278 | |
| 279 | void DeviceManager_VK::installDebugCallback() |
| 280 | { |