summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 834cab3d..389d002b 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -3084,19 +3084,10 @@ gen6_render_composite_spans_done(struct sna *sna,
}
static bool
-gen6_render_composite_spans(struct sna *sna,
- uint8_t op,
- PicturePtr src,
- PicturePtr dst,
- int16_t src_x, int16_t src_y,
- int16_t dst_x, int16_t dst_y,
- int16_t width, int16_t height,
- unsigned flags,
- struct sna_composite_spans_op *tmp)
+gen6_check_composite_spans(struct sna *sna,
+ uint8_t op, PicturePtr src, PicturePtr dst,
+ int16_t width, int16_t height, unsigned flags)
{
- DBG(("%s: %dx%d with flags=%x, current mode=%d\n", __FUNCTION__,
- width, height, flags, sna->kgem.ring));
-
if ((flags & COMPOSITE_SPANS_RECTILINEAR) == 0)
return false;
@@ -3107,15 +3098,35 @@ gen6_render_composite_spans(struct sna *sna,
return false;
if (need_tiling(sna, width, height)) {
- DBG(("%s: tiling, operation (%dx%d) too wide for pipeline\n",
- __FUNCTION__, width, height));
-
if (!is_gpu(dst->pDrawable)) {
DBG(("%s: fallback, tiled operation not on GPU\n",
__FUNCTION__));
return false;
}
+ }
+
+ return true;
+}
+static bool
+gen6_render_composite_spans(struct sna *sna,
+ uint8_t op,
+ PicturePtr src,
+ PicturePtr dst,
+ int16_t src_x, int16_t src_y,
+ int16_t dst_x, int16_t dst_y,
+ int16_t width, int16_t height,
+ unsigned flags,
+ struct sna_composite_spans_op *tmp)
+{
+ DBG(("%s: %dx%d with flags=%x, current mode=%d\n", __FUNCTION__,
+ width, height, flags, sna->kgem.ring));
+
+ assert(gen6_check_composite_spans(sna, op, src, dst, width, height, flags));
+
+ if (need_tiling(sna, width, height)) {
+ DBG(("%s: tiling, operation (%dx%d) too wide for pipeline\n",
+ __FUNCTION__, width, height));
return sna_tiling_composite_spans(op, src, dst,
src_x, src_y, dst_x, dst_y,
width, height, flags, tmp);
@@ -4232,6 +4243,7 @@ bool gen6_render_init(struct sna *sna)
sna->render.composite = gen6_render_composite;
#endif
#if !NO_COMPOSITE_SPANS
+ sna->render.check_composite_spans = gen6_check_composite_spans;
sna->render.composite_spans = gen6_render_composite_spans;
#endif
sna->render.video = gen6_render_video;