Merge pull request #15646 from unknownbrackets/report-vertex

Reporting: Log when vertex count truncated
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2022-07-04 23:23:36 +02:00
commit 9ffb248e59
1 file changed
+5 -2
+5 -2
View File
@@ -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);