diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-21 22:15:09 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-23 17:59:00 +0100 |
commit | e7f19d85fead62df21eedc87409b5abacfec4a17 (patch) | |
tree | acf4216a2ae3caf2d44229372cc66f562ea9741c /src/sna/sna_blt.c | |
parent | 40af32a0e9ed971a1f2c2a45266f32016bda7ed3 (diff) |
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>
Diffstat (limited to 'src/sna/sna_blt.c')
-rw-r--r-- | src/sna/sna_blt.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 9ab7d8e4..62f8cdf2 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -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); |