mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 13:28:08 +02:00
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
355334fcd9.
Fixes rendercheck -t composite -f x8r8g8b8.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
905c877f09
commit
453f813bb4
1 changed files with 4 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue