Ver código fonte

vulkan: fix graphics state if readbackBuffer is called while a canvas is active.

Sasha Szpakowski 1 mês atrás
pai
commit
e5055d3cc2
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/modules/graphics/vulkan/Graphics.cpp

+ 4 - 1
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)
 	{