X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fcommands_backend.cpp;h=4791122f3528ff47110618aa19996bee1a8ef9e6;hb=627d68b024f0d2fed4a03f0d9d3bb4b78358d6f3;hp=9f53f1ce56f172a060e91bd3cfb102e5c4613c1e;hpb=89d543c07ba80430baebcba19f9a353b25cd8ab4;p=libs%2Fgl.git diff --git a/source/backends/vulkan/commands_backend.cpp b/source/backends/vulkan/commands_backend.cpp index 9f53f1ce..4791122f 100644 --- a/source/backends/vulkan/commands_backend.cpp +++ b/source/backends/vulkan/commands_backend.cpp @@ -10,7 +10,6 @@ #include "rect.h" #include "renderpass.h" #include "semaphore.h" -#include "swapchaintexture.h" #include "vulkan.h" using namespace std; @@ -92,12 +91,7 @@ void VulkanCommands::begin_render_pass(bool clear, const ClearValue *clear_value if(!primary_buffer) begin_buffer(0); - fb_is_swapchain = false; - unsigned n_attachments = framebuffer->get_format().size(); - for(unsigned i=0; (!fb_is_swapchain && i(framebuffer->get_attachment(i))) - fb_is_swapchain = true; - + fb_is_swapchain = framebuffer->is_presentable(); framebuffer->refresh(); RenderPass render_pass; @@ -126,7 +120,7 @@ void VulkanCommands::end_render_pass() Synchronizer &sync = device.get_synchronizer(); sync.reset(); if(!fb_is_swapchain) - framebuffer->prepare_image_layouts(discard_fb_contents); + framebuffer->synchronize_resources(discard_fb_contents); sync.barrier(vkCmd); const VkRenderPassBeginInfo &begin_info = *reinterpret_cast(pass_begin_info.data());