Commit 453f813b authored by Eric Anholt's avatar Eric Anholt

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
355334fc.

Fixes rendercheck -t composite -f x8r8g8b8.
Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent 905c877f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment