MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / MaxVerticesForPrim

Function MaxVerticesForPrim

pcsx2/GS/GSState.cpp:262–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262static constexpr u32 MaxVerticesForPrim(u32 prim)
263{
264 switch (prim)
265 {
266 // Four indices per 1 vertex.
267 case GS_POINTLIST:
268 case GS_INVALID:
269
270 // Indices are shifted left by 2 to form quads.
271 case GS_LINELIST:
272 case GS_LINESTRIP:
273 return (std::numeric_limits<u16>::max() / 4) - 4;
274
275 // Four indices per two vertices.
276 case GS_SPRITE:
277 return (std::numeric_limits<u16>::max() / 2) - 2;
278
279 case GS_TRIANGLELIST:
280 case GS_TRIANGLESTRIP:
281 case GS_TRIANGLEFAN:
282 default:
283 return (std::numeric_limits<u16>::max() - 3);
284 }
285}
286
287
288void GSState::ResetDrawBufferIdx()

Callers 1

VertexKickMethod · 0.85

Calls 1

maxFunction · 0.70

Tested by

no test coverage detected