X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu_if.c;h=59f69934777470ed0190a20e7ccc401cc1838b54;hb=b9db55a9831ccbe3749abfc97ff49e5fb9379b29;hp=8900d4e8b79573b308fa50c393427ca9e0279a9e;hpb=fa56d36096cd4ab2b227ce2aa61c8404b8874689;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index 8900d4e8..59f69934 100644 --- a/plugins/gpu_neon/psx_gpu_if.c +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -9,7 +9,12 @@ */ #include + +#ifdef _WIN32 +#include +#else #include +#endif extern const unsigned char cmd_lengths[256]; #define command_lengths cmd_lengths @@ -133,7 +138,8 @@ void renderer_sync_ecmds(uint32_t *ecmds) void renderer_update_caches(int x, int y, int w, int h) { update_texture_cache_region(&egpu, x, y, x + w - 1, y + h - 1); - if (gpu.state.enhancement_active && !gpu.status.rgb24) + if (gpu.state.enhancement_active && + !(gpu.status & PSX_GPU_STATUS_RGB24)) sync_enhancement_buffers(x, y, w, h); } @@ -157,7 +163,7 @@ void renderer_notify_res_change(void) if (egpu.enhancement_x_threshold != gpu.screen.hres) { egpu.enhancement_x_threshold = gpu.screen.hres; - update_enhancement_buf_table(&egpu); + update_enhancement_buf_table_from_hres(&egpu); } } @@ -184,4 +190,24 @@ void renderer_set_config(const struct rearmed_cbs *cbs) map_enhancement_buffer(); if (cbs->pl_set_gpu_caps) cbs->pl_set_gpu_caps(GPU_CAP_SUPPORTS_2X); + + egpu.use_dithering = cbs->gpu_neon.allow_dithering; + if(!egpu.use_dithering) { + egpu.dither_table[0] = dither_table_row(0, 0, 0, 0); + egpu.dither_table[1] = dither_table_row(0, 0, 0, 0); + egpu.dither_table[2] = dither_table_row(0, 0, 0, 0); + egpu.dither_table[3] = dither_table_row(0, 0, 0, 0); + } else { + egpu.dither_table[0] = dither_table_row(-4, 0, -3, 1); + egpu.dither_table[1] = dither_table_row(2, -2, 3, -1); + egpu.dither_table[2] = dither_table_row(-3, 1, -4, 0); + egpu.dither_table[3] = dither_table_row(3, -1, 2, -2); + } + +} +void renderer_sync(void) +{ +} +void renderer_notify_update_lace(int updated) +{ }