summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-09 18:09:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-09 18:09:55 +0100
commitb3429cf12d6e3e8dd89372f8f70c64205d835b0c (patch)
tree30ba61341373df271fb303b05c0d603b0c2d61fe
parentb6837c21b459a99cb51b0d41906d82604e515dc0 (diff)
sna/gen3: Use a clear pattern for ill-defined radial gradients
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen3_render.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 46a5ddd8..85263016 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -1886,8 +1886,10 @@ gen3_init_radial(struct sna *sna,
n = op->u.gen3.num_constants;
channel->u.gen3.constants = FS_C0 + n / 4;
if (radial->c2.x == radial->c1.x && radial->c2.y == radial->c1.y) {
- if (radial->c2.radius == radial->c1.radius)
- return 0;
+ if (radial->c2.radius == radial->c1.radius) {
+ channel->u.gen3.type = SHADER_ZERO;
+ return 1;
+ }
op->u.gen3.constants[n++] = xFixedToDouble(radial->c1.x) / dr;
op->u.gen3.constants[n++] = xFixedToDouble(radial->c1.y) / dr;