wip
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
light7734 2025-10-09 14:44:24 +03:30
parent d75a1d9c5f
commit 8bd119468c
Signed by: light7734
GPG key ID: 8C30176798F1A6BA

View file

@ -24,7 +24,6 @@ Swapchain::Swapchain(ISurface *surface, IGpu *gpu, IDevice *device)
const auto queue_indices = m_device->get_family_indices();
m_format = surface_format.format;
std::cout << "CREATING SWAPCHAIN" << std::endl;
m_swapchain = m_device->create_swapchain(
VkSwapchainCreateInfoKHR {
.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
@ -45,6 +44,7 @@ Swapchain::Swapchain(ISurface *surface, IGpu *gpu, IDevice *device)
.oldSwapchain = nullptr,
}
);
log_dbg("CREATED SWAPCHAIN @ {:x}", std::bit_cast<size_t>(m_swapchain));
m_resolution = capabilities.currentExtent;
m_device->name(m_swapchain, "swapchain {}", idx++);
m_device->wait_idle();
@ -89,8 +89,8 @@ Swapchain::~Swapchain()
try
{
m_device->wait_idle();
// m_device->destroy_image_views(m_image_views);
std::cout << "DESTROYING SWAPCHAIN" << std::endl;
log_dbg("DESTROY SWAPCHAIN @ {:x}", std::bit_cast<size_t>(m_swapchain));
m_device->destroy_swapchain(m_swapchain);
m_device->wait_idle();
}