sna/composite: Add debugging modes to disable acceleration
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
984400b95a
commit
dcc7ba8ccf
|
|
@ -41,6 +41,9 @@
|
|||
#define DBG(x) ErrorF x
|
||||
#endif
|
||||
|
||||
#define NO_COMPOSITE 0
|
||||
#define NO_COMPOSITE_RECTANGLES 0
|
||||
|
||||
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
|
||||
|
||||
Bool sna_composite_create(struct sna *sna)
|
||||
|
|
@ -450,10 +453,13 @@ sna_composite(CARD8 op,
|
|||
src, mask, dst,
|
||||
src_x, src_y,
|
||||
mask_x, mask_y,
|
||||
dst_x, dst_y,
|
||||
dst_x, dst_y,
|
||||
width, height))
|
||||
return;
|
||||
|
||||
if (NO_COMPOSITE)
|
||||
goto fallback;
|
||||
|
||||
if (wedged(sna)) {
|
||||
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
|
||||
goto fallback;
|
||||
|
|
@ -526,13 +532,15 @@ sna_composite(CARD8 op,
|
|||
goto out;
|
||||
|
||||
fallback:
|
||||
DBG(("%s -- fallback dst=(%d, %d)+(%d, %d), size=(%d, %d)\n",
|
||||
DBG(("%s -- fallback dst=(%d, %d)+(%d, %d), size=(%d, %d): region=((%d,%d), (%d, %d))\n",
|
||||
__FUNCTION__,
|
||||
dst_x, dst_y,
|
||||
dst->pDrawable->x, dst->pDrawable->y,
|
||||
width, height));
|
||||
if (op == PictOpSrc || op == PictOpClear)
|
||||
flags = MOVE_WRITE;
|
||||
width, height,
|
||||
region.extents.x1, region.extents.y1,
|
||||
region.extents.x2, region.extents.y2));
|
||||
if (op <= PictOpSrc && !dst->alphaMap)
|
||||
flags = MOVE_WRITE | MOVE_INPLACE_HINT;
|
||||
else
|
||||
flags = MOVE_WRITE | MOVE_READ;
|
||||
if (!sna_drawable_move_region_to_cpu(dst->pDrawable, ®ion, flags))
|
||||
|
|
@ -563,10 +571,10 @@ fallback:
|
|||
|
||||
DBG(("%s: fallback -- fbComposite\n", __FUNCTION__));
|
||||
fbComposite(op, src, mask, dst,
|
||||
src_x, src_y,
|
||||
src_x, src_y,
|
||||
mask_x, mask_y,
|
||||
dst_x, dst_y,
|
||||
width, height);
|
||||
dst_x, dst_y,
|
||||
width, height);
|
||||
out:
|
||||
REGION_UNINIT(NULL, ®ion);
|
||||
}
|
||||
|
|
@ -758,6 +766,9 @@ sna_composite_rectangles(CARD8 op,
|
|||
RegionExtents(®ion)->x1, RegionExtents(®ion)->y1,
|
||||
RegionExtents(®ion)->x2, RegionExtents(®ion)->y2));
|
||||
|
||||
if (NO_COMPOSITE_RECTANGLES)
|
||||
goto fallback;
|
||||
|
||||
if (wedged(sna))
|
||||
goto fallback;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue