From 9a841664a6d838529f54fb6fdef40415ee198f4c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 2 Aug 2021 23:45:49 -0700 Subject: [PATCH] D3D11: Use right state in flush before output. We were accidentally changing the blend state for the final draw in a frame. This could cause apparently random issues if a game didn't align drawing with vblanks. Fixes #13152. --- GPU/D3D11/GPU_D3D11.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GPU/D3D11/GPU_D3D11.cpp b/GPU/D3D11/GPU_D3D11.cpp index 22725465df..f973d49e5e 100644 --- a/GPU/D3D11/GPU_D3D11.cpp +++ b/GPU/D3D11/GPU_D3D11.cpp @@ -242,11 +242,12 @@ void GPU_D3D11::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat f } void GPU_D3D11::CopyDisplayToOutput(bool reallyDirty) { + // Flush anything left over. + drawEngine_.Flush(); + float blendColor[4]{}; context_->OMSetBlendState(stockD3D11.blendStateDisabledWithColorMask[0xF], blendColor, 0xFFFFFFFF); - drawEngine_.Flush(); - framebufferManagerD3D11_->CopyDisplayToOutput(reallyDirty); framebufferManagerD3D11_->EndFrame();