diff options
author | Eric Anholt <eric@anholt.net> | 2016-09-24 14:37:28 +0300 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-09-26 10:16:06 -0700 |
commit | 453f813bb4afd39eb5b6b3c4a822894e04b6b11b (patch) | |
tree | 743aadb76ba5ee441fd28b4f2415b4dbef9ba1ff | |
parent | 905c877f094eb6cfe905d64e34fdd01a72dd8103 (diff) |
glamor: Properly handle mask formats without alpha.
Even if the pixmap's storage has alpha, it may have been uploaded with
garbage in the alpha channel, so we need to force the shader to set
alpha to 1. This was broken way back in
355334fcd99e4dce62e2be1e27290c9a74ea944f.
Fixes rendercheck -t composite -f x8r8g8b8.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r-- | glamor/glamor_render.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index d4d69a695..f5651eb87 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -868,7 +868,10 @@ glamor_composite_choose_shader(CARD8 op, goto fail; } else { - key.mask = SHADER_MASK_TEXTURE_ALPHA; + if (PICT_FORMAT_A(mask->format)) + key.mask = SHADER_MASK_TEXTURE_ALPHA; + else + key.mask = SHADER_MASK_TEXTURE; } if (!mask->componentAlpha) { |