diff options
author | notaz | 2012-10-23 00:34:30 +0300 |
---|---|---|
committer | notaz | 2012-10-24 01:10:16 +0300 |
commit | a8be0debff95f9b56af7c4c19eaacee782a09e28 (patch) | |
tree | 888928531b66c921e28a58ecc2db3f3ecfe2e9de /plugins/gpulib | |
parent | 7956599fa5f666016f71870d9889748c97839041 (diff) | |
download | pcsx_rearmed-a8be0debff95f9b56af7c4c19eaacee782a09e28.tar.gz pcsx_rearmed-a8be0debff95f9b56af7c4c19eaacee782a09e28.tar.bz2 pcsx_rearmed-a8be0debff95f9b56af7c4c19eaacee782a09e28.zip |
gpu: move enhacement logic out of vout_pl
Diffstat (limited to 'plugins/gpulib')
-rw-r--r-- | plugins/gpulib/gpu.h | 3 | ||||
-rw-r--r-- | plugins/gpulib/vout_pl.c | 16 |
2 files changed, 6 insertions, 13 deletions
diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index 78a8990..ea5051e 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -88,7 +88,8 @@ struct psx_gpu { uint32_t last_flip_frame; uint32_t pending_fill[3]; } frameskip; - uint16_t *enhancement_bufer; + uint16_t *(*get_enhancement_bufer) + (int *x, int *y, int *w, int *h, int *stride, int *mask); void *(*mmap)(unsigned int size); void (*munmap)(void *ptr, unsigned int size); }; diff --git a/plugins/gpulib/vout_pl.c b/plugins/gpulib/vout_pl.c index 6e2764c..9a84432 100644 --- a/plugins/gpulib/vout_pl.c +++ b/plugins/gpulib/vout_pl.c @@ -35,7 +35,7 @@ static void check_mode_change(void) int h = gpu.screen.h; gpu.state.enhancement_active = - gpu.enhancement_bufer != NULL && gpu.state.enhancement_enable + gpu.get_enhancement_bufer != NULL && gpu.state.enhancement_enable && w <= 512 && h <= 256 && !gpu.status.rgb24; if (gpu.state.enhancement_active) { @@ -71,17 +71,9 @@ static void blit(void) if (dest == NULL || w == 0 || stride == 0) return; - if (gpu.state.enhancement_active) { - // this layout is gpu_neon specific.. - vram = gpu.enhancement_bufer + - (x + 8) / stride * 1024 * 1024; - x *= 2; - y *= 2; - w = w * 2; - h = h * 2; - stride *= 2; - vram_mask = 1024 * 1024 - 1; - } + if (gpu.state.enhancement_active) + vram = gpu.get_enhancement_bufer(&x, &y, &w, &h, &stride, &vram_mask); + fb_offs = y * vram_stride + x; // only do centering, at least for now |