GBA Video: Batch wakeups better
Jeffrey Pfau jeffrey@endrift.com
Thu, 15 Oct 2015 23:13:45 -0700
1 files changed,
3 insertions(+),
4 deletions(-)
jump to
M
src/gba/renderers/thread-proxy.c
→
src/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) {