diff options
author | notaz | 2012-08-18 02:37:49 +0300 |
---|---|---|
committer | notaz | 2012-10-12 00:05:08 +0300 |
commit | e929dec505f8d3692248fe0d42c84a37c994ad39 (patch) | |
tree | b79f2f336a93618c2310bb8c70735a621aaa9957 /plugins/gpu_neon/psx_gpu_if.c | |
parent | 99d767a0cbf8ee7406000cbac647d9681d885282 (diff) | |
download | pcsx_rearmed-e929dec505f8d3692248fe0d42c84a37c994ad39.tar.gz pcsx_rearmed-e929dec505f8d3692248fe0d42c84a37c994ad39.tar.bz2 pcsx_rearmed-e929dec505f8d3692248fe0d42c84a37c994ad39.zip |
psx_gpu: switch to 1024 width again.
Diffstat (limited to 'plugins/gpu_neon/psx_gpu_if.c')
-rw-r--r-- | plugins/gpu_neon/psx_gpu_if.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index d42f83a..250aa8c 100644 --- a/plugins/gpu_neon/psx_gpu_if.c +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -43,10 +43,27 @@ int renderer_init(void) { initialize_psx_gpu(&egpu, gpu.vram); ex_regs = gpu.ex_regs; - gpu.state.enhancement_available = 1; + + if (gpu.enhancement_bufer == NULL) { + // currently we use 4x 1024*1024 buffers instead of single 2048*1024 + // to be able to reuse 1024-width code better (triangle setup, + // dithering phase, lines). + gpu.enhancement_bufer = malloc(1024 * 1024 * 2 * 4); + if (gpu.enhancement_bufer == NULL) + printf("OOM for enhancement buffer\n"); + } + egpu.enhancement_buf_ptr = gpu.enhancement_bufer; + return 0; } +void renderer_finish(void) +{ + free(gpu.enhancement_bufer); + gpu.enhancement_bufer = NULL; + egpu.enhancement_buf_ptr = NULL; +} + void renderer_sync_ecmds(uint32_t *ecmds) { gpu_parse(&egpu, ecmds + 1, 6 * 4, NULL); @@ -71,10 +88,14 @@ void renderer_set_interlace(int enable, int is_odd) egpu.render_mode |= RENDER_INTERLACE_ODD; } +void renderer_notify_res_change(void) +{ + egpu.enhancement_x_threshold = gpu.screen.hres; +} + #include "../../frontend/plugin_lib.h" void renderer_set_config(const struct rearmed_cbs *cbs) { - egpu.enhancement_buf_ptr = gpu.enhancement_bufer; disable_main_render = cbs->gpu_neon.enhancement_no_main; } |