fixing issue with swapchain recreation

This commit is contained in:
2024-01-16 07:19:27 +01:00
parent 47aead9e2d
commit 708e509bfa
550 changed files with 102 additions and 115 deletions

0
src/core/UUID.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/UUID.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/application.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/application.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/application.inl git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/bridge.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/errors.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/errors.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/graphics.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/graphics.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/graphics.inl git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/memory.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/memory.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/profiler.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/core/profiler.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/platform/inputs.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/platform/inputs.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/platform/window.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/platform/window.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_buffer.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_buffer.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_ibo.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_ubo.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_ubo.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_vbo.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/buffers/vk_vbo.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/cmd_manager.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/cmd_manager.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/single_time_cmd_manager.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/single_time_cmd_manager.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/vk_cmd_buffer.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/vk_cmd_buffer.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/vk_cmd_pool.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/command/vk_cmd_pool.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/cmd_resource.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/drawable_resource.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/memory.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/memory.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/render_core.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/render_core.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_device.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_device.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_fence.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_fence.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_instance.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_instance.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_queues.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_queues.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_semaphore.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_semaphore.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_surface.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_surface.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_validation_layers.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/core/vk_validation_layers.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/descriptors/vk_descriptor_pool.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/descriptors/vk_descriptor_pool.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/descriptors/vk_descriptor_set.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/descriptors/vk_descriptor_set.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/descriptors/vk_descriptor_set_layout.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/descriptors/vk_descriptor_set_layout.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/texture.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/texture.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/texture_atlas.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/texture_atlas.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/texture_descriptor.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/texture_manager.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/vk_image.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/images/vk_image.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/pipeline/pipeline.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/pipeline/pipeline.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/pixel_put.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/pixel_put.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

12
src/renderer/renderer.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/18 17:25:16 by maldavid #+# #+# */
/* Updated: 2024/01/10 14:18:35 by maldavid ### ########.fr */
/* Updated: 2024/01/16 07:14:19 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -83,6 +83,11 @@ namespace mlx
if(result == VK_ERROR_OUT_OF_DATE_KHR)
{
_swapchain.recreate();
_pass.destroy();
_pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR);
_framebuffers.clear();
for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++)
_framebuffers.emplace_back().init(_pass, _swapchain.getImage(i));
return false;
}
else if(result != VK_SUCCESS && result != VK_SUBOPTIMAL_KHR)
@@ -146,6 +151,11 @@ namespace mlx
{
_framebufferResized = false;
_swapchain.recreate();
_pass.destroy();
_pass.init(_swapchain.getImagesFormat(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR);
_framebuffers.clear();
for(std::size_t i = 0; i < _swapchain.getImagesNumber(); i++)
_framebuffers.emplace_back().init(_pass, _swapchain.getImage(i));
}
else if(result != VK_SUCCESS)
core::error::report(e_kind::fatal_error, "Vulkan error : failed to present swap chain image");

0
src/renderer/renderer.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/renderpass/vk_framebuffer.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/renderpass/vk_framebuffer.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/renderpass/vk_render_pass.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/renderpass/vk_render_pass.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/swapchain/vk_swapchain.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/swapchain/vk_swapchain.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/font.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/font.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text_descriptor.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text_descriptor.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text_library.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text_library.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text_manager.cpp git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/renderer/texts/text_manager.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/utils/combine_hash.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/utils/dogica_ttf.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/utils/icon_mlx.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/utils/non_copyable.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File

0
src/utils/singleton.h git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.normal_file, template.HTML=git.filemode.executable_file)
View File