From cfcb5684a0ec0487834be36ecc71f015e7341f0b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 20 Mar 2017 21:50:48 +0300 Subject: [PATCH] Revert "gl: Fix clip offsets in nv3089::image_in (accelerated path only)" This reverts commit a784ef5ee4a04870cb461b00284a954b1ed0a833. --- rpcs3/Emu/RSX/GL/GLTextureCache.h | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLTextureCache.h b/rpcs3/Emu/RSX/GL/GLTextureCache.h index e32643fa30..715c70adec 100644 --- a/rpcs3/Emu/RSX/GL/GLTextureCache.h +++ b/rpcs3/Emu/RSX/GL/GLTextureCache.h @@ -1100,25 +1100,16 @@ namespace gl areai src_area = { 0, 0, src_w, src_h }; areai dst_area = { 0, 0, dst.clip_width, dst.clip_height }; - //clip_x and clip_y are not insets into the scaled region!! - //They seem to be absolute coordinates into the full dst texture - //Tested with persona 4 arena - if (dst.clip_x != dst.offset_x || dst.clip_y != dst.offset_y) + if (dst.clip_x || dst.clip_y) { - const s16 clip_delta_x = dst.clip_x - dst.offset_x; - const s16 clip_delta_y = dst.clip_y - dst.offset_x; + //Reproject clip offsets onto source + const u16 scaled_clip_offset_x = dst.clip_x / scale_x; + const u16 scaled_clip_offset_y = dst.clip_y / scale_y; - if (clip_delta_x || clip_delta_y) - { - //Reproject clip offsets onto source - const s16 scaled_clip_offset_x = clip_delta_x / scale_x; - const s16 scaled_clip_offset_y = clip_delta_y / scale_y; - - src_area.x1 += scaled_clip_offset_x; - src_area.x2 += scaled_clip_offset_x; - src_area.y1 += scaled_clip_offset_y; - src_area.y2 += scaled_clip_offset_y; - } + src_area.x1 += scaled_clip_offset_x; + src_area.x2 += scaled_clip_offset_x; + src_area.y1 += scaled_clip_offset_y; + src_area.y2 += scaled_clip_offset_y; } //Create source texture if does not exist