DS GX: Fix unpacking to a full FIFO
Vicki Pfau vi@endrift.com
Wed, 08 Mar 2017 22:55:59 -0800
1 files changed,
4 insertions(+),
5 deletions(-)
jump to
M
src/ds/gx.c
→
src/ds/gx.c
@@ -358,19 +358,16 @@ }
} static void _flushOutstanding(struct DSGX* gx) { - if (CircleBufferSize(&gx->fifo) == (DS_GX_FIFO_SIZE * sizeof(struct DSGXEntry))) { - return; - } if (gx->p->cpuBlocked & DS_CPU_BLOCK_GX) { gx->p->cpuBlocked &= ~DS_CPU_BLOCK_GX; DSGXWriteFIFO(gx, gx->outstandingEntry); gx->outstandingEntry.command = 0; } while (gx->outstandingCommand[0] && !gx->outstandingParams[0]) { + DSGXWriteFIFO(gx, (struct DSGXEntry) { 0 }); if (CircleBufferSize(&gx->fifo) == (DS_GX_FIFO_SIZE * sizeof(struct DSGXEntry))) { return; } - DSGXWriteFIFO(gx, (struct DSGXEntry) { 0 }); } }@@ -959,7 +956,9 @@ }
if (cycles && !gx->swapBuffers) { mTimingSchedule(timing, &gx->fifoEvent, cycles - cyclesLate); } - _flushOutstanding(gx); + if (CircleBufferSize(&gx->fifo) < (DS_GX_FIFO_SIZE * sizeof(struct DSGXEntry))) { + _flushOutstanding(gx); + } DSGXUpdateGXSTAT(gx); }