From 712c36b98b552b2360fffff7cd29972d4a37db62 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 4 Apr 2017 00:06:45 +0200 Subject: [PATCH] Dirty RASTER_STATE when switching between rect and non-rect primitives (culling) --- GPU/GPUCommon.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 2a953ccce9..fb5d5db497 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -232,6 +232,12 @@ protected: gstate_c.Dirty(DIRTY_UVSCALEOFFSET); lastDraw_ = type; } + // Prim == RECTANGLES can cause CanUseHardwareTransform to flip, so we need to dirty. + // Also, culling may be affected. + if ((prim == GE_PRIM_RECTANGLES) != (lastPrim_ == GE_PRIM_RECTANGLES)) { + gstate_c.Dirty(DIRTY_RASTER_STATE); + lastPrim_ = prim; + } } virtual void InitClearInternal() {}