From: notaz Date: Wed, 25 Oct 2023 20:08:48 +0000 (+0300) Subject: gpu_neon: fix some missing ebuf updates X-Git-Tag: r24~86 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1587b08ecb80dd257ac255f76e716a6053c2785b;p=pcsx_rearmed.git gpu_neon: fix some missing ebuf updates --- diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c index de227d5b..5f69919e 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c @@ -889,8 +889,8 @@ static void *select_enhancement_buf_ptr(psx_gpu_struct *psx_gpu, s32 x, s32 y) static void select_enhancement_buf(psx_gpu_struct *psx_gpu) { - s32 x = psx_gpu->saved_viewport_start_x; - s32 y = psx_gpu->saved_viewport_start_y; + s32 x = psx_gpu->saved_viewport_start_x + 16; + s32 y = psx_gpu->saved_viewport_start_y + 16; psx_gpu->enhancement_current_buf_ptr = select_enhancement_buf_ptr(psx_gpu, x, y); } @@ -1704,7 +1704,12 @@ u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size, psx_gpu->saved_viewport_end_y = viewport_end_y; select_enhancement_buf(psx_gpu); - +#if 0 + if (!psx_gpu->enhancement_current_buf_ptr) + log_anomaly("vp %3d,%3d %3d,%d - no buf\n", + psx_gpu->viewport_start_x, psx_gpu->viewport_start_y, + viewport_end_x, viewport_end_y); +#endif #ifdef TEXTURE_CACHE_4BPP psx_gpu->viewport_mask = texture_region_mask(psx_gpu->viewport_start_x, diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c index 04a15eb2..ea98ade8 100644 --- a/plugins/gpu_neon/psx_gpu_if.c +++ b/plugins/gpu_neon/psx_gpu_if.c @@ -161,6 +161,8 @@ void renderer_update_caches(int x, int y, int w, int h, int state_changed) if (state_changed) { memset(egpu.enhancement_scanouts, 0, sizeof(egpu.enhancement_scanouts)); egpu.enhancement_scanout_eselect = 0; + update_enhancement_buf_scanouts(&egpu, + gpu.screen.src_x, gpu.screen.src_y, gpu.screen.hres, gpu.screen.vres); return; } sync_enhancement_buffers(x, y, w, h);