summaryrefslogtreecommitdiff
path: root/src/sna/gen4_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-04 12:37:23 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-12-04 12:42:54 +0000
commitdbdb8fabfbade3f19fd8af3524468b5e6668bb66 (patch)
treea6f9535599e8b37ee02df50213c5c2b439591a15 /src/sna/gen4_render.c
parenta17354d5ce6aeeab3f6e42aba63fce06ad18c526 (diff)
sna/gen4: Special case solids through the general vertex emitter
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen4_render.c')
-rw-r--r--src/sna/gen4_render.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 3ec51137..fb1c742e 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -840,7 +840,15 @@ gen4_emit_composite_primitive(struct sna *sna,
const float *mask_sf = op->mask.scale;
bool has_mask = op->u.gen4.ve_id & 2;
- if (is_affine) {
+ if (op->src.is_solid) {
+ src_x[0] = 0;
+ src_y[0] = 0;
+ src_x[1] = 0;
+ src_y[1] = 1;
+ src_x[2] = 1;
+ src_y[2] = 1;
+ src_w[0] = src_w[1] = src_w[2] = 1;
+ } else if (is_affine) {
sna_get_transformed_coordinates(r->src.x + op->src.offset[0],
r->src.y + op->src.offset[1],
op->src.transform,
@@ -880,7 +888,15 @@ gen4_emit_composite_primitive(struct sna *sna,
}
if (has_mask) {
- if (is_affine) {
+ if (op->mask.is_solid) {
+ mask_x[0] = 0;
+ mask_y[0] = 0;
+ mask_x[1] = 0;
+ mask_y[1] = 1;
+ mask_x[2] = 1;
+ mask_y[2] = 1;
+ mask_w[0] = mask_w[1] = mask_w[2] = 1;
+ } else if (is_affine) {
sna_get_transformed_coordinates(r->mask.x + op->mask.offset[0],
r->mask.y + op->mask.offset[1],
op->mask.transform,