From: notaz Date: Fri, 30 Dec 2011 15:25:42 +0000 (+0200) Subject: gpu_neon: flush cmd buffer before blit too X-Git-Tag: r13~21 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7945666b47fa5636762bfa52cd6328125d607c4;p=pcsx_rearmed.git gpu_neon: flush cmd buffer before blit too --- diff --git a/plugins/gpu_neon/gpu.c b/plugins/gpu_neon/gpu.c index 4b181061..c68e81c3 100644 --- a/plugins/gpu_neon/gpu.c +++ b/plugins/gpu_neon/gpu.c @@ -359,7 +359,7 @@ static int check_cmd(uint32_t *data, int count) return count - pos; } -static void flush_cmd_buffer(void) +void flush_cmd_buffer(void) { int left = check_cmd(gpu.cmd_buffer, gpu.cmd_len); if (left > 0) diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h index 3b3e1de5..c761bd6e 100644 --- a/plugins/gpu_neon/gpu.h +++ b/plugins/gpu_neon/gpu.h @@ -87,6 +87,7 @@ struct psx_gpu { extern struct psx_gpu gpu; extern const unsigned char cmd_lengths[256]; +void flush_cmd_buffer(void); void do_cmd_list(uint32_t *list, int count); diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index b84a86b9..a45b5f14 100644 --- a/plugins/gpu_neon/vout_fb.c +++ b/plugins/gpu_neon/vout_fb.c @@ -101,6 +101,8 @@ void GPUupdateLace(void) gpu.frameskip.frame_ready = 0; } + if (gpu.cmd_len > 0) + flush_cmd_buffer(); renderer_flush_queues(); check_mode_change(); if (cbs->pl_vout_raw_flip) diff --git a/plugins/gpu_neon/vout_sdl.c b/plugins/gpu_neon/vout_sdl.c index 53ed197b..0830c56d 100644 --- a/plugins/gpu_neon/vout_sdl.c +++ b/plugins/gpu_neon/vout_sdl.c @@ -80,6 +80,8 @@ static void blit(void) void GPUupdateLace(void) { if (!gpu.status.blanking && gpu.state.fb_dirty) { + if (gpu.cmd_len > 0) + flush_cmd_buffer(); renderer_flush_queues(); blit(); gpu.state.fb_dirty = 0;