Commit 74716001 authored by Keith Packard's avatar Keith Packard Committed by Eric Anholt

glamor: Wire alpha to 1 for pictures without alpha bits

When sourcing a picture that has no alpha values, make sure any
texture fetches wire the alpha value to one. This ensures that bits
beyond the depth of the pixmap, or bits other than the RGB values
aren't used.
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent a6990728
......@@ -870,7 +870,10 @@ glamor_composite_choose_shader(CARD8 op,
goto fail;
}
else {
key.source = SHADER_SOURCE_TEXTURE_ALPHA;
if (PICT_FORMAT_A(source->format))
key.source = SHADER_SOURCE_TEXTURE_ALPHA;
else
key.source = SHADER_SOURCE_TEXTURE;
}
if (mask) {
......
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