From 1882b155677ce11c4fd6e02bb5285fe78a2cc3f4 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 12 Apr 2017 20:50:26 -0700 Subject: [PATCH] DS GX: Don't reset state between swaps (fixes #642) --- CHANGES | 2 +- src/ds/gx.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index c8c7fbf00..ceeefbbfd 100644 --- a/CHANGES +++ b/CHANGES @@ -10,7 +10,6 @@ Bugfixes: - DS Video: Capture with alpha bit set - DS Video: Bitmap sprites use alpha bit for transparent - DS GX: Fix 4-color texture coordinates - - DS GX: Reset polygon attributes between buffer swaps - DS Video: Fix blend bit on windows for 3D layer (fixes mgba.io/i/611) - DS GX: Hack around writing to a full FIFO that has a swap pending (fixes mgba.io/i/608) - DS Video: Enable overflow bit on extended affine modes @@ -18,6 +17,7 @@ Bugfixes: - DS Video: Fix caputre stride - DS Video: Fix affine transformations in video capture - DS GX: Fix bitmap textures when no palette is mapped (fixes mgba.io/i/628) + - DS GX: Don't reset state between buffer swaps (fixes mgba.io/i/642) Misc: - DS: Set boot complete bit in RAM on boot (fixes mgba.io/i/576, mgba.io/i/580, mgba.io/i/586) - DS Memory: Ensure DS9 I/O is 8-byte aligned diff --git a/src/ds/gx.c b/src/ds/gx.c index 8f00e64e7..4b5caf2c5 100644 --- a/src/ds/gx.c +++ b/src/ds/gx.c @@ -1172,11 +1172,6 @@ static void _fifoRun(struct mTiming* timing, void* context, uint32_t cyclesLate) case DS_GX_CMD_SWAP_BUFFERS: gx->swapBuffers = true; gx->wSort = entry.params[0] & 2; - memset(&gx->currentVertex, 0, sizeof(gx->currentVertex)); - memset(&gx->nextPoly, 0, sizeof(gx-> nextPoly)); - gx->currentVertex.color = 0x7FFF; - gx->currentPoly.polyParams = 0x001F00C0; - gx->nextPoly.polyParams = 0x001F00C0; break; case DS_GX_CMD_VIEWPORT: gx->viewportX1 = (uint8_t) entry.params[0];