From efacbddaef22e2fd0959ad163cb63851957378dc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 4 Jul 2022 13:22:17 -0700 Subject: [PATCH] Reporting: Log when vertex count truncated. --- GPU/GLES/DrawEngineGLES.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 369cc62a02..d36efaffa5 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -373,8 +373,11 @@ void DrawEngineGLES::DoFlush() { // 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; + constexpr int vertexCountLimit = 0x10000 / 3; + if (vertexCount > vertexCountLimit) { + WARN_LOG_REPORT_ONCE(manyVerts, G3D, "Truncating vertex count from %d to %d", vertexCount, vertexCountLimit); + vertexCount = vertexCountLimit; + } #endif SoftwareTransform swTransform(params);