From: notaz Date: Thu, 8 Dec 2011 21:09:36 +0000 (+0200) Subject: gpu_neon: propagate configs to rasterizers X-Git-Tag: r12~28 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914455e692f4720c43f4bc2122a4795e6c45bc7c;p=pcsx_rearmed.git gpu_neon: propagate configs to rasterizers --- diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h index f5cc6328..8ad71c29 100644 --- a/plugins/gpu_neon/gpu.h +++ b/plugins/gpu_neon/gpu.h @@ -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); diff --git a/plugins/gpu_neon/peops_if.c b/plugins/gpu_neon/peops_if.c index 1a4072f6..d6c47e23 100644 --- a/plugins/gpu_neon/peops_if.c +++ b/plugins/gpu_neon/peops_if.c @@ -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; +} diff --git a/plugins/gpu_neon/unai_if.cpp b/plugins/gpu_neon/unai_if.cpp index 2b524d92..0497ddaf 100644 --- a/plugins/gpu_neon/unai_if.cpp +++ b/plugins/gpu_neon/unai_if.cpp @@ -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; +} diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index 4d03859a..864776ec 100644 --- a/plugins/gpu_neon/vout_fb.c +++ b/plugins/gpu_neon/vout_fb.c @@ -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 diff --git a/plugins/gpu_neon/vout_sdl.c b/plugins/gpu_neon/vout_sdl.c index 98397266..53ed197b 100644 --- a/plugins/gpu_neon/vout_sdl.c +++ b/plugins/gpu_neon/vout_sdl.c @@ -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