From e5055d3cc22c340a2eb8118a72e2a9908f118f49 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 1 Aug 2025 21:25:38 -0300 Subject: [PATCH] vulkan: fix graphics state if readbackBuffer is called while a canvas is active. --- src/modules/graphics/vulkan/Graphics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 448277ec8..7d4c926c7 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -1468,7 +1468,10 @@ void Graphics::startRecordingGraphicsCommands() fakeBackbuffer.set((Texture*)newTexture(settings, nullptr), Acquire::NORETAIN); } - setDefaultRenderPass(); + // Update the pending render pass state with current backbuffer data if no RT is active. + // If one is active, the state shouldn't need updating. + if (!isRenderTargetActive()) + setDefaultRenderPass(); if (defaultVertexBuffer) {