gpu_neon: flush cmd buffer before blit too
authornotaz <notasas@gmail.com>
Fri, 30 Dec 2011 15:25:42 +0000 (17:25 +0200)
committernotaz <notasas@gmail.com>
Fri, 30 Dec 2011 15:25:42 +0000 (17:25 +0200)
plugins/gpu_neon/gpu.c
plugins/gpu_neon/gpu.h
plugins/gpu_neon/vout_fb.c
plugins/gpu_neon/vout_sdl.c

index 4b18106..c68e81c 100644 (file)
@@ -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)
index 3b3e1de..c761bd6 100644 (file)
@@ -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);
 
index b84a86b..a45b5f1 100644 (file)
@@ -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)
index 53ed197..0830c56 100644 (file)
@@ -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;