sna/blt: Upload the box using a single 64-bit instruction

So long as we have 64-bit instructions of course!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-10-21 22:15:09 +01:00
parent 40af32a0e9
commit e7f19d85fe
1 changed files with 3 additions and 6 deletions

View File

@ -1294,8 +1294,7 @@ fastcall static void sna_blt_fill_op_box(struct sna *sna,
kgem->nbatch += 3;
b[0] = op->base.u.blt.cmd;
b[1] = box->y1 << 16 | box->x1;
b[2] = box->y2 << 16 | box->x2;
*(uint64_t *)(b+1) = *(uint64_t *)box;
}
static void sna_blt_fill_op_done(struct sna *sna,
@ -1447,8 +1446,7 @@ static Bool sna_blt_fill_box(struct sna *sna, uint8_t alu,
b[0] = cmd;
b[1] = br13;
b[2] = box->y1 << 16 | box->x1;
b[3] = box->y2 << 16 | box->x2;
*(uint64_t *)(b+2) = *(uint64_t *)box;
b[4] = kgem_add_reloc(kgem, kgem->nbatch + 4,
bo,
I915_GEM_DOMAIN_RENDER << 16 |
@ -1566,8 +1564,7 @@ Bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
b = kgem->batch + kgem->nbatch;
kgem->nbatch += 3;
b[0] = cmd;
b[1] = box->y1 << 16 | box->x1;
b[2] = box->y2 << 16 | box->x2;
*(uint64_t *)(b+1) = *(uint64_t *)box;
box++;
} while (--nbox_this_time);