xf86-video-intel: src/sna/gen3_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon May 14 06:07:57 PDT 2012
src/sna/gen3_render.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 3c9759ef2ad755bbe720d4aa031ec67dbc3b7734
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon May 14 14:12:06 2012 +0100
sna/gen3: Fix pre-multiplication of opacity masks
The return type for the multipliation was only 8-bits wide dating back
to the time when the function just computed a single channel and didn't
try to blend the output back into the argb pixel value. Inlining the
shift into the function means that we need the output to be 32-bits wide
instead.
Reported-by: Jiri Slaby <jirislaby at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49887
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index a0de1ee..b8f0970 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2543,7 +2543,7 @@ mul_8_8(uint8_t a, uint8_t b)
return ((t >> 8) + t) >> 8;
}
-static inline uint8_t multa(uint32_t s, uint32_t m, int shift)
+static inline uint32_t multa(uint32_t s, uint32_t m, int shift)
{
return mul_8_8((s >> shift) & 0xff, m >> 24) << shift;
}
@@ -2944,6 +2944,7 @@ gen3_render_composite(struct sna *sna,
tmp->src.u.gen3.type = SHADER_CONSTANT;
tmp->src.u.gen3.mode = v;
+ tmp->src.is_opaque = false;
tmp->mask.u.gen3.type = SHADER_NONE;
}
More information about the xorg-commit
mailing list