all repos — mgba @ f836a67863e66499c812c8d963d37ff56ad10638

mGBA Game Boy Advance Emulator

GBA Video: Batch wakeups better
Jeffrey Pfau jeffrey@endrift.com
Thu, 15 Oct 2015 23:13:45 -0700
commit

f836a67863e66499c812c8d963d37ff56ad10638

parent

c189f48c631622b9a1d6d6da1c12110411623ecd

1 files changed, 3 insertions(+), 4 deletions(-)

jump to
M src/gba/renderers/thread-proxy.csrc/gba/renderers/thread-proxy.c

@@ -158,7 +158,6 @@ value,

0xDEADBEEF, }; RingFIFOWrite(&proxyRenderer->dirtyQueue, &dirty, sizeof(dirty)); - ConditionWake(&proxyRenderer->toThreadCond); return value; }

@@ -180,7 +179,6 @@ value,

0xDEADBEEF, }; RingFIFOWrite(&proxyRenderer->dirtyQueue, &dirty, sizeof(dirty)); - ConditionWake(&proxyRenderer->toThreadCond); } void GBAVideoThreadProxyRendererWriteOAM(struct GBAVideoRenderer* renderer, uint32_t oam) {

@@ -198,7 +196,6 @@ proxyRenderer->d.oam->raw[oam],

0xDEADBEEF, }; RingFIFOWrite(&proxyRenderer->dirtyQueue, &dirty, sizeof(dirty)); - ConditionWake(&proxyRenderer->toThreadCond); } void GBAVideoThreadProxyRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {

@@ -228,7 +225,9 @@ 0,

0xDEADBEEF, }; RingFIFOWrite(&proxyRenderer->dirtyQueue, &dirty, sizeof(dirty)); - ConditionWake(&proxyRenderer->toThreadCond); + if (!(y & 15)) { + ConditionWake(&proxyRenderer->toThreadCond); + } } void GBAVideoThreadProxyRendererFinishFrame(struct GBAVideoRenderer* renderer) {