Ignore triangle strips with less than 3 vertices.

Should fix the new issue reported in #18273
This commit is contained in:
Henrik Rydgård 2023-11-01 20:07:40 -06:00
parent a4d667caf8
commit ee6ffac28e

View File

@ -115,6 +115,9 @@ alignas(16) static const uint16_t offsets_counter_clockwise[24] = {
void IndexGenerator::AddStrip(int numVerts, int indexOffset, bool clockwise) {
int numTris = numVerts - 2;
if (numTris <= 0) {
return;
}
#ifdef _M_SSE
// In an SSE2 register we can fit 8 16-bit integers.
// However, we need to output a multiple of 3 indices.