summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-12 19:53:20 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-12 19:53:20 +0000
commitf320e6908f24ff356303c8905c78ac290e24c2e6 (patch)
tree7a07349f1c2eebff3af3feeacfd5f8e200256a02 /src
parentb1d0ca266cc67df65c81a9dbb9cc83027ff240ea (diff)
sna/gen3: Tweak code generation for gen3_emit_composite_primitive_identity_gradient__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')
-rw-r--r--src/sna/gen3_render.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 59d13db5..805e4c88 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -995,25 +995,25 @@ gen3_emit_composite_primitive_identity_gradient__sse2(struct sna *sna,
const struct sna_composite_op *op,
const struct sna_composite_rectangles *r)
{
- int16_t dst_x, dst_y;
- int16_t src_x, src_y;
-
- dst_x = r->dst.x + op->dst.x;
- dst_y = r->dst.y + op->dst.y;
- src_x = r->src.x + op->src.offset[0];
- src_y = r->src.y + op->src.offset[1];
+ int16_t x, y;
+ float *v;
- gen3_emit_composite_dstcoord(sna, dst_x + r->width, dst_y + r->height);
- OUT_VERTEX(src_x + r->width);
- OUT_VERTEX(src_y + r->height);
+ v = sna->render.vertices + sna->render.vertex_used;
+ sna->render.vertex_used += 12;
- gen3_emit_composite_dstcoord(sna, dst_x, dst_y + r->height);
- OUT_VERTEX(src_x);
- OUT_VERTEX(src_y + r->height);
+ x = r->dst.x + op->dst.x;
+ y = r->dst.y + op->dst.y;
+ v[0] = x + r->width;
+ v[5] = v[1] = y + r->height;
+ v[8] = v[4] = x;
+ v[9] = y;
- gen3_emit_composite_dstcoord(sna, dst_x, dst_y);
- OUT_VERTEX(src_x);
- OUT_VERTEX(src_y);
+ x = r->src.x + op->src.offset[0];
+ y = r->src.y + op->src.offset[1];
+ v[2] = x + r->width;
+ v[7] = v[3] = y + r->height;
+ v[10] = v[6] = x;
+ v[11] = y;
}
sse2 fastcall static void
@@ -1023,18 +1023,13 @@ gen3_emit_composite_boxes_identity_gradient__sse2(const struct sna_composite_op
{
do {
v[0] = box->x2;
- v[1] = box->y2;
- v[2] = box->x2 + op->src.offset[0];
- v[3] = box->y2 + op->src.offset[1];
-
- v[4] = box->x1;
- v[5] = box->y2;
- v[6] = box->x1 + op->src.offset[0];
- v[7] = box->y2 + op->src.offset[1];
-
- v[8] = box->x1;
+ v[5] = v[1] = box->y2;
+ v[8] = v[4] = box->x1;
v[9] = box->y1;
- v[10] = box->x1 + op->src.offset[0];
+
+ v[2] = box->x2 + op->src.offset[0];
+ v[7] = v[3] = box->y2 + op->src.offset[1];
+ v[10] = v[6] = box->x1 + op->src.offset[0];
v[11] = box->y1 + op->src.offset[1];
v += 12;