From c7945666b47fa5636762bfa52cd6328125d607c4 Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 30 Dec 2011 17:25:42 +0200 Subject: [PATCH] gpu_neon: flush cmd buffer before blit too --- plugins/gpu_neon/gpu.c | 2 +- plugins/gpu_neon/gpu.h | 1 + plugins/gpu_neon/vout_fb.c | 2 ++ plugins/gpu_neon/vout_sdl.c | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.5