gpu_neon: make enh. res. texturing hack optional
[pcsx_rearmed.git] / plugins / gpu_neon / psx_gpu_if.c
index 3f45b0e..6e7e5fd 100644 (file)
@@ -38,7 +38,8 @@ sync_enhancement_buffers(int x, int y, int w, int h);
 
 static psx_gpu_struct egpu __attribute__((aligned(256)));
 
-int do_cmd_list(uint32_t *list, int count, int *cycles, int *last_cmd)
+int do_cmd_list(uint32_t *list, int count,
+ int *cycles_sum, int *cycles_last, int *last_cmd)
 {
   int ret;
 
@@ -48,9 +49,11 @@ int do_cmd_list(uint32_t *list, int count, int *cycles, int *last_cmd)
 #endif
 
   if (gpu.state.enhancement_active)
-    ret = gpu_parse_enhanced(&egpu, list, count * 4, cycles, (u32 *)last_cmd);
+    ret = gpu_parse_enhanced(&egpu, list, count * 4,
+            cycles_sum, cycles_last, (u32 *)last_cmd);
   else
-    ret = gpu_parse(&egpu, list, count * 4, cycles, (u32 *)last_cmd);
+    ret = gpu_parse(&egpu, list, count * 4,
+            cycles_sum, cycles_last, (u32 *)last_cmd);
 
 #if defined(__arm__) && defined(NEON_BUILD) && !defined(SIMD_BUILD)
   __asm__ __volatile__("":::"q4","q5","q6","q7");
@@ -156,7 +159,7 @@ void renderer_sync_ecmds(uint32_t *ecmds)
 {
   s32 dummy0 = 0;
   u32 dummy1 = 0;
-  gpu_parse(&egpu, ecmds + 1, 6 * 4, &dummy0, &dummy1);
+  gpu_parse(&egpu, ecmds + 1, 6 * 4, &dummy0, &dummy0, &dummy1);
 }
 
 void renderer_update_caches(int x, int y, int w, int h, int state_changed)
@@ -232,7 +235,8 @@ void renderer_set_config(const struct rearmed_cbs *cbs)
     egpu.dither_table[3] = dither_table_row(3, -1, 2, -2); 
   }
 
-  disable_main_render = cbs->gpu_neon.enhancement_no_main;
+  egpu.hack_disable_main = cbs->gpu_neon.enhancement_no_main;
+  egpu.hack_texture_adj = cbs->gpu_neon.enhancement_tex_adj;
   if (gpu.state.enhancement_enable) {
     if (gpu.mmap != NULL && egpu.enhancement_buf_ptr == NULL)
       map_enhancement_buffer();