Revert "GBA Video: Add sprite cycle counting to GL (fixes #1635)"

This reverts commit a87cde8e93.
This commit is contained in:
Vicki Pfau 2020-06-14 19:45:09 -07:00
parent 40c0fc5b37
commit 7f975f56f7
2 changed files with 0 additions and 12 deletions

View File

@ -14,7 +14,6 @@ Emulation fixes:
- GBA Video: Add missing parts of 256-color mode 0 mosaic (fixes mgba.io/i/1701) - GBA Video: Add missing parts of 256-color mode 0 mosaic (fixes mgba.io/i/1701)
- GBA Video: Fix double-size OBJ wrapping in GL renderer (fixes mgba.io/i/1712) - GBA Video: Fix double-size OBJ wrapping in GL renderer (fixes mgba.io/i/1712)
- GBA Video: Simplify sprite cycle counting (fixes mgba.io/i/1279) - GBA Video: Simplify sprite cycle counting (fixes mgba.io/i/1279)
- GBA Video: Add sprite cycle counting to GL (fixes mgba.io/i/1635)
- GBA Video: Fix sprite/backdrop blending regression - GBA Video: Fix sprite/backdrop blending regression
Other fixes: Other fixes:
- 3DS: Fix framelimiter on newer citro3d (fixes mgba.io/i/1771) - 3DS: Fix framelimiter on newer citro3d (fixes mgba.io/i/1771)

View File

@ -1427,7 +1427,6 @@ void _drawScanlines(struct GBAVideoGLRenderer* glRenderer, int y) {
GBAVideoGLRendererDrawWindow(glRenderer, y); GBAVideoGLRendererDrawWindow(glRenderer, y);
if (GBARegisterDISPCNTIsObjEnable(glRenderer->dispcnt) && !glRenderer->d.disableOBJ) { if (GBARegisterDISPCNTIsObjEnable(glRenderer->dispcnt) && !glRenderer->d.disableOBJ) {
int i; int i;
int spriteCyclesRemaining = GBARegisterDISPCNTIsHblankIntervalFree(glRenderer->dispcnt) ? OBJ_HBLANK_FREE_LENGTH : OBJ_LENGTH;
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
glEnable(GL_STENCIL_TEST); glEnable(GL_STENCIL_TEST);
glDepthFunc(GL_LESS); glDepthFunc(GL_LESS);
@ -1438,16 +1437,6 @@ void _drawScanlines(struct GBAVideoGLRenderer* glRenderer, int y) {
} }
GBAVideoGLRendererDrawSprite(glRenderer, &sprite->obj, y, sprite->y); GBAVideoGLRendererDrawSprite(glRenderer, &sprite->obj, y, sprite->y);
int cycles = GBAVideoObjSizes[GBAObjAttributesAGetShape(sprite->obj.a) * 4 + GBAObjAttributesBGetSize(sprite->obj.b)][0];
if (GBAObjAttributesAIsTransformed(sprite->obj.a)) {
cycles <<= GBAObjAttributesAGetDoubleSize(sprite->obj.a) + 1;
cycles += 10;
}
spriteCyclesRemaining -= cycles;
if (spriteCyclesRemaining <= 0) {
break;
}
} }
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glDisable(GL_STENCIL_TEST); glDisable(GL_STENCIL_TEST);