Setup our debug callback function to be called by Vulkan
| 506 | |
| 507 | // Setup our debug callback function to be called by Vulkan |
| 508 | void setupDebugReportCallback() |
| 509 | { |
| 510 | // Don't try to register the callback if the extension is not available |
| 511 | if (!vkCreateDebugReportCallbackEXT) |
| 512 | return; |
| 513 | |
| 514 | // Register for warnings and errors |
| 515 | VkDebugReportCallbackCreateInfoEXT debugReportCallbackCreateInfo = VkDebugReportCallbackCreateInfoEXT(); |
| 516 | debugReportCallbackCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; |
| 517 | debugReportCallbackCreateInfo.flags = VK_DEBUG_REPORT_WARNING_BIT_EXT | |
| 518 | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT | VK_DEBUG_REPORT_ERROR_BIT_EXT; |
| 519 | debugReportCallbackCreateInfo.pfnCallback = debugCallback; |
| 520 | |
| 521 | // Create the debug callback |
| 522 | if (vkCreateDebugReportCallbackEXT(instance, &debugReportCallbackCreateInfo, nullptr, &debugReportCallback) != |
| 523 | VK_SUCCESS) |
| 524 | { |
| 525 | vulkanAvailable = false; |
| 526 | return; |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | // Setup the SFML window Vulkan rendering surface |
| 531 | void setupSurface() |
nothing calls this directly
no test coverage detected