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 <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
a69907288d
commit
747160016b
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user