Explorar o código

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

Sasha Szpakowski hai 1 mes
pai
achega
e5055d3cc2
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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);
 		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)
 	if (defaultVertexBuffer)
 	{
 	{