gpu_neon: propagate configs to rasterizers
authornotaz <notasas@gmail.com>
Thu, 8 Dec 2011 21:09:36 +0000 (23:09 +0200)
committernotaz <notasas@gmail.com>
Thu, 8 Dec 2011 23:29:54 +0000 (01:29 +0200)
plugins/gpu_neon/gpu.h
plugins/gpu_neon/peops_if.c
plugins/gpu_neon/unai_if.cpp
plugins/gpu_neon/vout_fb.c
plugins/gpu_neon/vout_sdl.c

index f5cc632..8ad71c2 100644 (file)
@@ -89,17 +89,19 @@ extern const unsigned char cmd_lengths[256];
 
 void do_cmd_list(uint32_t *list, int count);
 
+struct rearmed_cbs;
+
 int  renderer_init(void);
 void renderer_sync_ecmds(uint32_t * ecmds);
 void renderer_invalidate_caches(int x, int y, int w, int h);
 void renderer_flush_queues(void);
+void renderer_set_config(const struct rearmed_cbs *config);
 
 int vout_init(void);
 int vout_finish(void);
 
 /* listing these here for correct linkage if rasterizer uses c++ */
 struct GPUFreeze;
-struct rearmed_cbs;
 
 long GPUinit(void);
 long GPUshutdown(void);
index 1a4072f..d6c47e2 100644 (file)
@@ -382,3 +382,11 @@ void renderer_invalidate_caches(int x, int y, int w, int h)
 void renderer_flush_queues(void)
 {
 }
+
+#include "../../frontend/plugin_lib.h"
+
+void renderer_set_config(const struct rearmed_cbs *cbs)
+{
+ iUseDither = cbs->gpu_peops.iUseDither;
+ dwActFixes = cbs->gpu_peops.dwActFixes;
+}
index 2b524d9..0497dda 100644 (file)
@@ -250,3 +250,12 @@ void renderer_invalidate_caches(int x, int y, int w, int h)
 void renderer_flush_queues(void)
 {
 }
+
+#include "../../frontend/plugin_lib.h"
+
+void renderer_set_config(const struct rearmed_cbs *cbs)
+{
+  enableAbbeyHack = cbs->gpu_unai.abe_hack;
+  light = !cbs->gpu_unai.no_light;
+  blend = !cbs->gpu_unai.no_blend;
+}
index 4d03859..864776e 100644 (file)
@@ -126,6 +126,10 @@ void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_)
   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
index 9839726..53ed197 100644 (file)
@@ -97,8 +97,16 @@ long GPUclose(void)
   return 0;
 }
 
-void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_)
+#include "../../frontend/plugin_lib.h"
+
+void GPUrearmedCallbacks(const struct rearmed_cbs *cbs)
 {
+  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