summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-23 11:14:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-23 11:14:25 +0100
commit30348efd57135edee41fccb87133c572b6473aa8 (patch)
tree648ec21e51e3fa2929e612de786c741f9a1f178c
parente1e853edee67c3ced43d5e4b1fbd52ca4c92966d (diff)
sna/gen6+: Avoid adjusting copy coordinates until commited to using them
If we need to fallback to the BLT unit, we need to pass it the original source/dest coordinates and not our transformed render coordinates. So keep the original values intact until we start emitting the render operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_render.c16
-rw-r--r--src/sna/gen7_render.c16
-rw-r--r--src/sna/gen8_render.c16
3 files changed, 24 insertions, 24 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 49a783aa..2b4fd039 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2790,11 +2790,6 @@ fallback_blt:
extents.y2 - extents.y1,
n > 1))
goto fallback_tiled;
-
- dst_dx += tmp.dst.x;
- dst_dy += tmp.dst.y;
-
- tmp.dst.x = tmp.dst.y = 0;
}
tmp.src.card_format = gen6_get_card_format(tmp.src.pict_format);
@@ -2822,9 +2817,6 @@ fallback_blt:
DBG(("%s: unable to extract partial pixmap\n", __FUNCTION__));
goto fallback_tiled_dst;
}
-
- src_dx += tmp.src.offset[0];
- src_dy += tmp.src.offset[1];
} else {
tmp.src.bo = src_bo;
tmp.src.width = src->drawable.width;
@@ -2857,6 +2849,14 @@ fallback_blt:
_kgem_set_mode(&sna->kgem, KGEM_RENDER);
}
+ src_dx += tmp.src.offset[0];
+ src_dy += tmp.src.offset[1];
+
+ dst_dx += tmp.dst.x;
+ dst_dy += tmp.dst.y;
+
+ tmp.dst.x = tmp.dst.y = 0;
+
gen6_align_vertex(sna, &tmp);
gen6_emit_copy_state(sna, &tmp);
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 0d03c3bb..1999aed5 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -3027,11 +3027,6 @@ fallback_blt:
extents.y2 - extents.y1,
n > 1))
goto fallback_tiled;
-
- dst_dx += tmp.dst.x;
- dst_dy += tmp.dst.y;
-
- tmp.dst.x = tmp.dst.y = 0;
}
tmp.src.card_format = gen7_get_card_format(tmp.src.pict_format);
@@ -3057,9 +3052,6 @@ fallback_blt:
extents.x2 - extents.x1,
extents.y2 - extents.y1))
goto fallback_tiled_dst;
-
- src_dx += tmp.src.offset[0];
- src_dy += tmp.src.offset[1];
} else {
tmp.src.bo = src_bo;
tmp.src.width = src->drawable.width;
@@ -3087,6 +3079,14 @@ fallback_blt:
_kgem_set_mode(&sna->kgem, KGEM_RENDER);
}
+ src_dx += tmp.src.offset[0];
+ src_dy += tmp.src.offset[1];
+
+ dst_dx += tmp.dst.x;
+ dst_dy += tmp.dst.y;
+
+ tmp.dst.x = tmp.dst.y = 0;
+
gen7_align_vertex(sna, &tmp);
gen7_emit_copy_state(sna, &tmp);
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index 64976303..f3ccb9b7 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -2851,11 +2851,6 @@ fallback_blt:
extents.y2 - extents.y1,
n > 1))
goto fallback_tiled;
-
- dst_dx += tmp.dst.x;
- dst_dy += tmp.dst.y;
-
- tmp.dst.x = tmp.dst.y = 0;
}
tmp.src.card_format = gen8_get_card_format(tmp.src.pict_format);
@@ -2881,9 +2876,6 @@ fallback_blt:
extents.x2 - extents.x1,
extents.y2 - extents.y1))
goto fallback_tiled_dst;
-
- src_dx += tmp.src.offset[0];
- src_dy += tmp.src.offset[1];
} else {
tmp.src.bo = src_bo;
tmp.src.width = src->drawable.width;
@@ -2911,6 +2903,14 @@ fallback_blt:
_kgem_set_mode(&sna->kgem, KGEM_RENDER);
}
+ src_dx += tmp.src.offset[0];
+ src_dy += tmp.src.offset[1];
+
+ dst_dx += tmp.dst.x;
+ dst_dy += tmp.dst.y;
+
+ tmp.dst.x = tmp.dst.y = 0;
+
gen8_align_vertex(sna, &tmp);
gen8_emit_copy_state(sna, &tmp);