From e6d8798296d3c7bf42a0433d7d5f17ec3a014273 Mon Sep 17 00:00:00 2001 From: light7734 Date: Thu, 9 Oct 2025 14:29:07 +0330 Subject: [PATCH] wip --- .../private/backend/vk/context/swapchain.cpp | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/modules/renderer/private/backend/vk/context/swapchain.cpp b/modules/renderer/private/backend/vk/context/swapchain.cpp index 5a40f28..698370d 100644 --- a/modules/renderer/private/backend/vk/context/swapchain.cpp +++ b/modules/renderer/private/backend/vk/context/swapchain.cpp @@ -49,33 +49,33 @@ Swapchain::Swapchain(ISurface *surface, IGpu *gpu, IDevice *device) m_device->wait_idle(); - m_images = m_device->get_swapchain_images(m_swapchain); - m_image_views.resize(m_images.size()); - for (auto idx = 0u; auto [image, view] : std::views::zip(m_images, m_image_views)) - { - view = m_device->create_image_view(VkImageViewCreateInfo { - .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, - .image = image, - .viewType = VK_IMAGE_VIEW_TYPE_2D, - .format = surface_format.format, - .components = VkComponentMapping { - .r = VK_COMPONENT_SWIZZLE_IDENTITY, - .g = VK_COMPONENT_SWIZZLE_IDENTITY, - .b = VK_COMPONENT_SWIZZLE_IDENTITY, - .a = VK_COMPONENT_SWIZZLE_IDENTITY, - }, - .subresourceRange = VkImageSubresourceRange { - .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, - .baseMipLevel = 0u, - .levelCount = 1u, - .baseArrayLayer = 0u, - .layerCount = 1u, - } - }); - - m_device->name(image, "swapchain image {}", idx++); - m_device->name(view, "swapchain image view {}", idx++); - } + // m_images = m_device->get_swapchain_images(m_swapchain); + // m_image_views.resize(m_images.size()); + // for (auto idx = 0u; auto [image, view] : std::views::zip(m_images, m_image_views)) + // { + // view = m_device->create_image_view(VkImageViewCreateInfo { + // .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, + // .image = image, + // .viewType = VK_IMAGE_VIEW_TYPE_2D, + // .format = surface_format.format, + // .components = VkComponentMapping { + // .r = VK_COMPONENT_SWIZZLE_IDENTITY, + // .g = VK_COMPONENT_SWIZZLE_IDENTITY, + // .b = VK_COMPONENT_SWIZZLE_IDENTITY, + // .a = VK_COMPONENT_SWIZZLE_IDENTITY, + // }, + // .subresourceRange = VkImageSubresourceRange { + // .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, + // .baseMipLevel = 0u, + // .levelCount = 1u, + // .baseArrayLayer = 0u, + // .layerCount = 1u, + // } + // }); + // + // m_device->name(image, "swapchain image {}", idx++); + // m_device->name(view, "swapchain image view {}", idx++); + // } } Swapchain::~Swapchain() @@ -88,7 +88,7 @@ Swapchain::~Swapchain() try { m_device->wait_idle(); - m_device->destroy_image_views(m_image_views); + // m_device->destroy_image_views(m_image_views); m_device->destroy_swapchain(m_swapchain); } catch (const std::exception &exp)