aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_neon
diff options
context:
space:
mode:
authorTwinaphex2017-05-07 02:17:23 +0200
committerGitHub2017-05-07 02:17:23 +0200
commit1b330b71ffa80c8c3a0e27d4581bf6e9bbf0e5da (patch)
treefd4ed2acace992d4fac92b1c4e3f4913b97d85b9 /plugins/gpu_neon
parentf0a02fdcf0043d9afa9c4b26c38c28cb761e1e10 (diff)
parent5c1cbedc034c59caba3955c663868c74e9631731 (diff)
downloadpcsx_rearmed-1b330b71ffa80c8c3a0e27d4581bf6e9bbf0e5da.tar.gz
pcsx_rearmed-1b330b71ffa80c8c3a0e27d4581bf6e9bbf0e5da.tar.bz2
pcsx_rearmed-1b330b71ffa80c8c3a0e27d4581bf6e9bbf0e5da.zip
Merge pull request #120 from pjft/pjft-experimental
Adding enable/disable dithering core option with support for Neon GPU
Diffstat (limited to 'plugins/gpu_neon')
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu.h1
-rw-r--r--plugins/gpu_neon/psx_gpu_if.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.h b/plugins/gpu_neon/psx_gpu/psx_gpu.h
index 1eaa99a..1fa6b98 100644
--- a/plugins/gpu_neon/psx_gpu/psx_gpu.h
+++ b/plugins/gpu_neon/psx_gpu/psx_gpu.h
@@ -207,6 +207,7 @@ typedef struct
u8 texture_4bpp_cache[32][256 * 256];
u8 texture_8bpp_even_cache[16][256 * 256];
u8 texture_8bpp_odd_cache[16][256 * 256];
+ int use_dithering;
} psx_gpu_struct;
typedef struct __attribute__((aligned(16)))
diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c
index ad01761..788e3b4 100644
--- a/plugins/gpu_neon/psx_gpu_if.c
+++ b/plugins/gpu_neon/psx_gpu_if.c
@@ -184,4 +184,18 @@ 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);
+ }
+
}