From bf5741a1f495a4b67c6642a94c4cf1b145223feb Mon Sep 17 00:00:00 2001 From: raven02 Date: Wed, 4 Sep 2013 17:12:53 +0800 Subject: [PATCH 1/2] Continue previous prim command when it was a STRIP or FAN --- GPU/GLES/TransformPipeline.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 50d11d95aa..dde37fd379 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -838,7 +838,18 @@ void TransformDrawEngine::SubmitPrim(void *verts, void *inds, GEPrimitiveType pr if (!indexGen.PrimCompatible(prevPrim_, prim) || numDrawCalls >= MAX_DEFERRED_DRAW_CALLS) Flush(); + + if (prim == GE_PRIM_KEEP_PREVIOUS) { + switch(prevPrim_) { + case GE_PRIM_LINE_STRIP: + case GE_PRIM_TRIANGLE_STRIP: + case GE_PRIM_TRIANGLE_FAN: + break; + } + prim = prevPrim_; + } prevPrim_ = prim; + SetupVertexDecoder(vertType); dec_->IncrementStat(STAT_VERTSSUBMITTED, vertexCount); From 4866a992ecf982387ab85dbcbb8d905fa91e28f1 Mon Sep 17 00:00:00 2001 From: raven02 Date: Wed, 4 Sep 2013 17:14:49 +0800 Subject: [PATCH 2/2] Break if vertex count = 0 --- GPU/GLES/GLES_GPU.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index e43262d80a..dcbfe55ab2 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -645,7 +645,10 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { u32 count = data & 0xFFFF; GEPrimitiveType prim = static_cast(data >> 16); - + + if (count == 0) + break; + // Discard AA lines as we can't do anything that makes sense with these anyway. The SW plugin might, though. // Discard AA lines in DOA