X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu_if.c;h=81b9bae2271cbc723d649dc55a0e91c37388a51c;hb=f770faad8e05014d16e9c1f3c46bfd76274695c6;hp=3ce9c1cfdfb91738f3e4df6cf1c76b6818531666;hpb=a8be0debff95f9b56af7c4c19eaacee782a09e28;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index 3ce9c1cf..81b9bae2 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 @@ -44,7 +49,7 @@ int do_cmd_list(uint32_t *list, int count, int *last_cmd) #define ENHANCEMENT_BUF_SIZE (1024 * 1024 * 2 * 4 + 4096 * 2) static uint16_t *get_enhancement_bufer(int *x, int *y, int *w, int *h, - int *stride, int *mask) + int *vram_h) { uint16_t *ret = select_enhancement_buf_ptr(&egpu, *x); @@ -52,8 +57,7 @@ static uint16_t *get_enhancement_bufer(int *x, int *y, int *w, int *h, *y *= 2; *w = *w * 2; *h = *h * 2; - *stride *= 2; - *mask = 1024 * 1024 - 1; + *vram_h = 1024; return ret; } @@ -158,7 +162,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); } } @@ -183,4 +187,26 @@ void renderer_set_config(const struct rearmed_cbs *cbs) if (gpu.mmap != NULL && egpu.enhancement_buf_ptr == NULL) 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) +{ }