Procházet zdrojové kódy

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

Sasha Szpakowski před 1 měsícem
rodič
revize
e5055d3cc2
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  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)
 	{