Reporting: Log when vertex count truncated.

This commit is contained in:
Unknown W. Brackets committed 2022-07-04 13:22:17 -07:00
1 parent 21bf41e6dd
commit efacbddaef
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);