sna/gen7: Tidy detection of unbounded render op

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-10-03 14:12:50 +01:00
parent 3e770f09db
commit 47c76bb968
1 changed files with 6 additions and 5 deletions

View File

@ -2430,10 +2430,11 @@ gen7_composite_set_target(struct sna *sna,
op->dst.pixmap = get_drawable_pixmap(dst->pDrawable);
op->dst.format = dst->format;
op->dst.width = op->dst.pixmap->drawable.width;
op->dst.width = op->dst.pixmap->drawable.width;
op->dst.height = op->dst.pixmap->drawable.height;
if (w && h) {
if (w | h) {
assert(w && h);
box.x1 = x;
box.y1 = y;
box.x2 = x + w;
@ -2441,9 +2442,9 @@ gen7_composite_set_target(struct sna *sna,
} else
sna_render_picture_extents(dst, &box);
op->dst.bo = sna_drawable_use_bo (dst->pDrawable,
PREFER_GPU | FORCE_GPU | RENDER_GPU,
&box, &op->damage);
op->dst.bo = sna_drawable_use_bo(dst->pDrawable,
PREFER_GPU | FORCE_GPU | RENDER_GPU,
&box, &op->damage);
if (op->dst.bo == NULL)
return false;