From 3c0cbf0529aa06d9809ad3aa9e282400e8209b4d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 1 Oct 2021 18:26:07 +0300 Subject: [PATCH] Tweak handling flags in PipelineState::set_framebuffer Viewports work slightly differently on Vulkan, so set only the framebuffer flag here and instead check both when applying the state. --- source/core/pipelinestate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/pipelinestate.cpp b/source/core/pipelinestate.cpp index 262dd26b..78db195d 100644 --- a/source/core/pipelinestate.cpp +++ b/source/core/pipelinestate.cpp @@ -69,7 +69,7 @@ void PipelineState::set(T &target, T value, unsigned flag) void PipelineState::set_framebuffer(const Framebuffer *f) { - set(framebuffer, f, FRAMEBUFFER|VIEWPORT); + set(framebuffer, f, FRAMEBUFFER); } void PipelineState::set_viewport(const Rect *v) @@ -172,7 +172,7 @@ void PipelineState::apply(unsigned mask) const } } - if(mask&VIEWPORT) + if(mask&(VIEWPORT|FRAMEBUFFER)) { if(viewport) glViewport(viewport->left, viewport->bottom, viewport->width, viewport->height); -- 2.45.2