diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-05 11:28:06 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-05 11:28:06 +0000 |
commit | e309cea3ae5c22c58a918008a52e3d8d694c9ff2 (patch) | |
tree | 7e487aa22f80d0bdfe1d49cb9d60636536c6eee5 /src/sna/gen2_render.c | |
parent | ab3d6d878fa27515eb760107d963d522cc87cd77 (diff) |
sna: Do the supported PictOp check first
There is no point even attempting a BLT operation if we know that it is
an unusual render operation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen2_render.c')
-rw-r--r-- | src/sna/gen2_render.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index 8908ae2a..8e099155 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -1251,6 +1251,12 @@ gen2_render_composite(struct sna *sna, { DBG(("%s()\n", __FUNCTION__)); + if (op >= ARRAY_SIZE(gen2_blend_op)) { + DBG(("%s: fallback due to unhandled blend op: %d\n", + __FUNCTION__, op)); + return FALSE; + } + /* Try to use the BLT engine unless it implies a * 3D -> 2D context switch. */ @@ -1264,12 +1270,6 @@ gen2_render_composite(struct sna *sna, tmp)) return TRUE; - if (op >= ARRAY_SIZE(gen2_blend_op)) { - DBG(("%s: fallback due to unhandled blend op: %d\n", - __FUNCTION__, op)); - return FALSE; - } - if (!gen2_check_dst_format(dst->format)) { DBG(("%s: fallback due to unhandled dst format: %x\n", __FUNCTION__, dst->format)); @@ -1906,6 +1906,12 @@ gen2_render_fill_boxes(struct sna *sna, struct sna_composite_op tmp; uint32_t pixel; + if (op >= ARRAY_SIZE(gen2_blend_op)) { + DBG(("%s: fallback due to unhandled blend op: %d\n", + __FUNCTION__, op)); + return FALSE; + } + #if NO_FILL_BOXES return gen2_render_fill_boxes_try_blt(sna, op, format, color, dst, dst_bo, @@ -1916,12 +1922,6 @@ gen2_render_fill_boxes(struct sna *sna, __FUNCTION__, op, (int)format, color->red, color->green, color->blue, color->alpha)); - if (op >= ARRAY_SIZE(gen2_blend_op)) { - DBG(("%s: fallback due to unhandled blend op: %d\n", - __FUNCTION__, op)); - return FALSE; - } - if (dst->drawable.width > 2048 || dst->drawable.height > 2048 || dst_bo->pitch > 8192 || |