From a71c897d565f20ef5a92c68c82dd1589030f2166 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Sun, 31 Jan 2021 17:30:34 +0100 Subject: [PATCH] vk oit: crash when rendering to texture --- core/rend/vulkan/oit/oit_drawer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rend/vulkan/oit/oit_drawer.cpp b/core/rend/vulkan/oit/oit_drawer.cpp index ac0d36694..768ad80ef 100644 --- a/core/rend/vulkan/oit/oit_drawer.cpp +++ b/core/rend/vulkan/oit/oit_drawer.cpp @@ -355,7 +355,7 @@ bool OITDrawer::Draw(const Texture *fogTexture, const Texture *paletteTexture) cmdBuffer.nextSubpass(vk::SubpassContents::eInline); GetCurrentDescSet().BindColorInputDescSet(cmdBuffer, (pvrrc.render_passes.used() - 1 - render_pass) % 2); - if (initialPass && clearNeeded[GetCurrentImage()] && !pvrrc.isRTT) + if (initialPass && !pvrrc.isRTT && clearNeeded[GetCurrentImage()]) { clearNeeded[GetCurrentImage()] = false; SetScissor(cmdBuffer, viewport);