diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index f55c793c4..fa34e321d 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -137,13 +137,6 @@ void SoftwareTransform( bool throughmode = (vertType & GE_VTYPE_THROUGH_MASK) != 0; bool lmode = gstate.isUsingSecondaryColor() && gstate.isLightingEnabled(); - // TODO: Split up into multiple draw calls for GLES 2.0 where you can't guarantee support for more than 0x10000 verts. - -#if defined(MOBILE_DEVICE) - if (vertexCount > 0x10000/3) - vertexCount = 0x10000/3; -#endif - float uscale = 1.0f; float vscale = 1.0f; if (throughmode) { diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index d917437b8..fe1f1e065 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -701,8 +701,15 @@ rotateVBO: params.allowSeparateAlphaClear = true; int maxIndex = indexGen.MaxIndex(); + int vertexCount = indexGen.VertexCount(); + + // TODO: Split up into multiple draw calls for GLES 2.0 where you can't guarantee support for more than 0x10000 verts. +#if defined(MOBILE_DEVICE) + if (vertexCount > 0x10000 / 3) + vertexCount = 0x10000 / 3; +#endif SoftwareTransform( - prim, indexGen.VertexCount(), + prim, vertexCount, dec_->VertexType(), inds, GE_VTYPE_IDX_16BIT, dec_->GetDecVtxFmt(), maxIndex, drawBuffer, numTrans, drawIndexed, ¶ms, &result); ApplyDrawStateLate();