diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-12 19:58:28 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-12 19:58:28 +0000 |
commit | b1952e79021759927361d284b157713a651a10b1 (patch) | |
tree | 91229ea8d661e9ac90697206f29af93dada69a42 /src/sna/gen3_render.c | |
parent | f320e6908f24ff356303c8905c78ac290e24c2e6 (diff) |
sna/gen3: Tweak code generation for gen3_emit_composite_primitive_constant__sse2
References: https://bugs.freedesktop.org/show_bug.cgi?id=62198
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r-- | src/sna/gen3_render.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 805e4c88..c549ebb9 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -962,12 +962,17 @@ gen3_emit_composite_primitive_constant__sse2(struct sna *sna, const struct sna_composite_op *op, const struct sna_composite_rectangles *r) { - int16_t dst_x = r->dst.x + op->dst.x; - int16_t dst_y = r->dst.y + op->dst.y; + float *v; + + v = sna->render.vertices + sna->render.vertex_used; + sna->render.vertex_used += 6; + + v[4] = v[2] = r->dst.x + op->dst.x; + v[5] = r->dst.y + op->dst.y; + + v[0] = v[2] + r->width; + v[3] = v[1] = v[5] + r->height; - gen3_emit_composite_dstcoord(sna, dst_x + r->width, dst_y + r->height); - gen3_emit_composite_dstcoord(sna, dst_x, dst_y + r->height); - gen3_emit_composite_dstcoord(sna, dst_x, dst_y); } sse2 fastcall static void @@ -977,12 +982,8 @@ gen3_emit_composite_boxes_constant__sse2(const struct sna_composite_op *op, { do { v[0] = box->x2; - v[1] = box->y2; - - v[2] = box->x1; - v[3] = box->y2; - - v[4] = box->x1; + v[3] = v[1] = box->y2; + v[4] = v[2] = box->x1; v[5] = box->y1; box++; |