all repos — mgba @ 0da019dcc3db00d61a5202887d33221d14e07818

mGBA Game Boy Advance Emulator

DS GX: Reject and log polygons that clip to more than 10 vertices
Vicki Pfau vi@endrift.com
Sun, 19 Jul 2020 15:36:34 -0700
commit

0da019dcc3db00d61a5202887d33221d14e07818

parent

69e289995bb8e46bf8afe6e7f9c62f2459ae2644

2 files changed, 5 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -18,6 +18,7 @@ Misc:

- DS GX: Clean up and unify texture mapping - DS Core: Add symbol loading - DS Video: Simplify VRAM mapping + - DS GX: Reject and log polygons that clip to more than 10 vertices 0.9.0: (Future) Features:
M src/ds/gx.csrc/ds/gx.c

@@ -335,6 +335,10 @@ int plane;

for (plane = 5; plane >= 0; --plane) { newV = 0; for (v = 0; v < poly->verts; ++v) { + if (newV >= 10) { + mLOG(DS_GX, ERROR, "Polygon clipping invariant failed"); + return false; + } if (!(offscreenVerts[v] & (1 << plane))) { outList[newV] = inList[v]; outOffscreenVerts[newV] = offscreenVerts[v];