From 1f898e3b702dfa5588ce28f5128e2b4a307cf46f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 25 Nov 2018 16:56:39 -0800 Subject: [PATCH] GPU: Correctly flush on cull mode change. Fixes #11593 and fixes #11591. --- GPU/GPUCommon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index c6eec3c59..dc53f28cd 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1706,9 +1706,12 @@ bail: currentList->pc += cmdCount * 4; // flush back cull mode if (cullMode != gstate.getCullMode()) { + // We rewrote everything to the old cull mode, so flush first. + drawEngineCommon_->DispatchFlush(); + + // Now update things for next time. gstate.cmdmem[GE_CMD_CULL] ^= 1; gstate_c.Dirty(DIRTY_RASTER_STATE); - drawEngineCommon_->DispatchFlush(); } }