mirror of https://github.com/mgba-emu/mgba.git
DS GX: Reject and log polygons that clip to more than 10 vertices
This commit is contained in:
parent
69e289995b
commit
0da019dcc3
1
CHANGES
1
CHANGES
|
@ -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:
|
||||
|
|
|
@ -335,6 +335,10 @@ static bool _clipPolygon(struct DSGX* gx, struct DSGXPolygon* poly) {
|
|||
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];
|
||||
|
|
Loading…
Reference in New Issue