소스 검색

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

Sasha Szpakowski 1 개월 전
부모
커밋
e5055d3cc2
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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)
 	{