From a08a768f503c83b7a4c860d4afbf17dddd05f073 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 20 Mar 2017 22:06:37 +0300 Subject: [PATCH] gl/rsx/blit: Resolve clipping validation a different way. Hopefully no regressions this time --- rpcs3/Emu/RSX/GL/GLTextureCache.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpcs3/Emu/RSX/GL/GLTextureCache.h b/rpcs3/Emu/RSX/GL/GLTextureCache.h index 715c70adec..58d61f20a8 100644 --- a/rpcs3/Emu/RSX/GL/GLTextureCache.h +++ b/rpcs3/Emu/RSX/GL/GLTextureCache.h @@ -1100,6 +1100,13 @@ namespace gl areai src_area = { 0, 0, src_w, src_h }; areai dst_area = { 0, 0, dst.clip_width, dst.clip_height }; + //Validate clip offsets (Persona 4 Arena at 720p) + //Check if can fit + //NOTE: It is possible that the check is simpler (if (clip_x >= clip_width)) + //Needs verification + if ((dst.offset_x + dst.clip_x + dst.clip_width) > dst.width) dst.clip_x = 0; + if ((dst.offset_y + dst.clip_y + dst.clip_width) > dst.height) dst.clip_y = 0; + if (dst.clip_x || dst.clip_y) { //Reproject clip offsets onto source