X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpulib%2Fvout_pl.c;h=2116422b8c751e32b97b931cf8cd81f2872ce11d;hp=513103430d764d5312ddf691d837495a42fefd8a;hb=06bc35c833797ce9f6f3287abf954f037bb12319;hpb=f1359c5758c2e745b1cbec63e21445fa65f7cafe diff --git a/plugins/gpulib/vout_pl.c b/plugins/gpulib/vout_pl.c index 51310343..2116422b 100644 --- a/plugins/gpulib/vout_pl.c +++ b/plugins/gpulib/vout_pl.c @@ -68,18 +68,19 @@ static void blit(void) uint8_t *dest; dest = (uint8_t *)screen_buf; - if (dest == NULL) + if (dest == NULL || w == 0 || stride == 0) return; if (gpu.state.enhancement_active) { - vram = gpu.enhancement_bufer; + // this layout is gpu_neon specific.. + vram = gpu.enhancement_bufer + + (x + 8) / stride * 1024 * 1024; x *= 2; y *= 2; - w *= 2; - h *= 2; + w = w * 2; + h = h * 2; stride *= 2; - vram_stride = 2048; - vram_mask = 2048 * 1024 - 1; + vram_mask = 1024 * 1024 - 1; } fb_offs = y * vram_stride + x; @@ -129,6 +130,7 @@ void vout_update(void) void vout_blank(void) { + gpu.state.enhancement_active = 0; check_mode_change(); if (cbs->pl_vout_raw_flip == NULL) { int bytespp = gpu.status.rgb24 ? 3 : 2;