Revert "gl: Fix clip offsets in nv3089::image_in (accelerated path only)"

This reverts commit a784ef5ee4a04870cb461b00284a954b1ed0a833.
This commit is contained in:
kd-11
2017-03-20 21:50:48 +03:00
parent 0f121bdf37
commit cfcb5684a0
+3 -12
View File
@@ -1100,26 +1100,17 @@ namespace gl
areai src_area = { 0, 0, src_w, src_h }; areai src_area = { 0, 0, src_w, src_h };
areai dst_area = { 0, 0, dst.clip_width, dst.clip_height }; areai dst_area = { 0, 0, dst.clip_width, dst.clip_height };
//clip_x and clip_y are not insets into the scaled region!! if (dst.clip_x || dst.clip_y)
//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)
{
const s16 clip_delta_x = dst.clip_x - dst.offset_x;
const s16 clip_delta_y = dst.clip_y - dst.offset_x;
if (clip_delta_x || clip_delta_y)
{ {
//Reproject clip offsets onto source //Reproject clip offsets onto source
const s16 scaled_clip_offset_x = clip_delta_x / scale_x; const u16 scaled_clip_offset_x = dst.clip_x / scale_x;
const s16 scaled_clip_offset_y = clip_delta_y / scale_y; const u16 scaled_clip_offset_y = dst.clip_y / scale_y;
src_area.x1 += scaled_clip_offset_x; src_area.x1 += scaled_clip_offset_x;
src_area.x2 += scaled_clip_offset_x; src_area.x2 += scaled_clip_offset_x;
src_area.y1 += scaled_clip_offset_y; src_area.y1 += scaled_clip_offset_y;
src_area.y2 += scaled_clip_offset_y; src_area.y2 += scaled_clip_offset_y;
} }
}
//Create source texture if does not exist //Create source texture if does not exist
if (!src_is_render_target) if (!src_is_render_target)