Added some logging of swapchain parameters when created.

This commit is contained in:
Patrick 2024-06-27 18:14:51 +02:00
parent 32efcc09d2
commit d41e3588fd

View File

@ -3,6 +3,7 @@
#include <mijin/debug/assert.hpp> #include <mijin/debug/assert.hpp>
#include <SDL_vulkan.h> #include <SDL_vulkan.h>
#include <vulkan/vulkan_to_string.hpp>
#include "iwa/device.hpp" #include "iwa/device.hpp"
#include "iwa/log.hpp" #include "iwa/log.hpp"
@ -255,6 +256,13 @@ void Swapchain::recreate()
getOwner()->getVkHandle().destroySwapchainKHR(createInfo.oldSwapchain); getOwner()->getVkHandle().destroySwapchainKHR(createInfo.oldSwapchain);
} }
logMsg("Swapchain (re)created:");
logMsg(" Extent: {}x{}", mExtent.width, mExtent.height);
logMsg(" Image Usage: {}", vk::to_string(createInfo.imageUsage));
logMsg(" Image count: {}", mImages.size());
logMsg(" Format: {}", vk::to_string(mFormat));
logMsg(" Color Space: {}", vk::to_string(createInfo.imageColorSpace));
// update size // update size
// imageSize.width = createInfo.imageExtent.width; // imageSize.width = createInfo.imageExtent.width;
// imageSize.height = createInfo.imageExtent.height; // imageSize.height = createInfo.imageExtent.height;