gpu_neon: propagate configs to rasterizers
[pcsx_rearmed.git] / plugins / gpu_neon / vout_fb.c
index 5b54bd1..864776e 100644 (file)
@@ -27,7 +27,8 @@ int vout_finish(void)
 
 static void blit(void)
 {
-  static uint32_t old_status, old_h;
+  static uint32_t old_status;
+  static int old_h;
   int x = gpu.screen.x & ~1; // alignment needed by blitter
   int y = gpu.screen.y;
   int w = gpu.screen.w;
@@ -46,7 +47,7 @@ static void blit(void)
     screen_buf = cbs->pl_vout_set_mode(stride, h, gpu.status.rgb24 ? 24 : 16);
   }
 
-  dest = screen_buf;
+  dest = (uint8_t *)screen_buf;
 
   // only do centering, at least for now
   doffs = (stride - w) / 2 & ~1;
@@ -88,12 +89,11 @@ void GPUupdateLace(void)
     return;
 
   if (gpu.frameskip.set) {
-    if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 9) {
-      gpu.frameskip.skipped_blits++;
-      return;
+    if (!gpu.frameskip.frame_ready) {
+      if (*gpu.state.frame_count - gpu.frameskip.last_flip_frame < 9)
+        return;
     }
     gpu.frameskip.frame_ready = 0;
-    gpu.frameskip.skipped_blits = 0;
   }
 
   renderer_flush_queues();
@@ -101,7 +101,7 @@ void GPUupdateLace(void)
   gpu.state.fb_dirty = 0;
 }
 
-long GPUopen(void)
+long GPUopen(void **unused)
 {
   gpu.frameskip.active = 0;
   gpu.frameskip.frame_ready = 1;
@@ -124,6 +124,12 @@ void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_)
   gpu.frameskip.advice = &cbs->fskip_advice;
   gpu.frameskip.active = 0;
   gpu.frameskip.frame_ready = 1;
+  gpu.state.hcnt = cbs->gpu_hcnt;
+  gpu.state.frame_count = cbs->gpu_frame_count;
+
+  if (cbs->pl_vout_set_raw_vram)
+    cbs->pl_vout_set_raw_vram(gpu.vram);
+  renderer_set_config(cbs_);
 }
 
 // vim:shiftwidth=2:expandtab