X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fcommands_backend.cpp;h=5de0f090a9d774aa7e6c8d76d6dc4ebcf7bc5dd8;hb=60f288b3a6b5753702ed2b2c035f29778ae0b7d0;hp=2273d91920e555741f86991c1694e761bc83a877;hpb=94cadd1618f93239b1cb0acbd4f958257c035c98;p=libs%2Fgl.git diff --git a/source/backends/vulkan/commands_backend.cpp b/source/backends/vulkan/commands_backend.cpp index 2273d919..5de0f090 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; @@ -252,7 +246,10 @@ void VulkanCommands::dispatch(unsigned count_x, unsigned count_y, unsigned count void VulkanCommands::resolve_multisample() { - throw logic_error("VulkanCommands::resolve_multisample is unimplemented"); + if(!framebuffer || !framebuffer->has_resolve_attachments()) + throw invalid_operation("VulkanCommands::resolve_multisample"); + + end_render_pass(); } void VulkanCommands::begin_query(const QueryPool &, unsigned)