xserver: Branch 'master' - 3 commits
Eric Anholt
anholt at kemper.freedesktop.org
Mon Sep 26 17:17:30 UTC 2016
glamor/glamor_render.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 453f813bb4afd39eb5b6b3c4a822894e04b6b11b
Author: Eric Anholt <eric at anholt.net>
Date: Sat Sep 24 14:37:28 2016 +0300
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 at anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index d4d69a6..f5651eb 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) {
commit 905c877f094eb6cfe905d64e34fdd01a72dd8103
Author: Eric Anholt <eric at anholt.net>
Date: Tue Sep 20 12:24:38 2016 +0100
glamor: Require that pixmap depths match for Render copies.
The copy optimization in d37329cba42fa8e72fe4be8a7be18e512268b5bd
replicated a bug from last time we did a copy optimization: CopyArea
is only defined for matching depths. This is only a problem at 15 vs
16 depth right now (24 vs 32 would also have matching Render formats,
but they should work) but be strict in case we store other depths
differently in the future.
Fixes rendercheck -t blend -o src -f x4r4g4b4,x3r4g4b4
v2: Drop excessive src->depth == dst->depth check that snuck in.
v3: Switch back to src->depth == dst->depth
v4: Touch up commit message (s/bpp/depth).
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index a06868e..d4d69a6 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1423,6 +1423,8 @@ glamor_composite_clipped_region(CARD8 op,
/* Is the composite operation equivalent to a copy? */
if (!mask && !source->alphaMap && !dest->alphaMap
&& source->pDrawable && !source->transform
+ /* CopyArea is only defined with matching depths. */
+ && dest->pDrawable->depth == source->pDrawable->depth
&& ((op == PictOpSrc
&& (source->format == dest->format
|| (PICT_FORMAT_COLOR(dest->format)
commit b87a07567421af05622197eec91a71e4fca4f79e
Author: Eric Anholt <eric at anholt.net>
Date: Tue Sep 20 12:14:36 2016 +0100
glamor: Fix some awful formatting of some fallback debug code.
This was clearly x-indent.sh damage.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index f87bbf3..a06868e 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1712,12 +1712,12 @@ glamor_composite(CARD8 op,
source, source->pDrawable,
source->pDrawable ? source->pDrawable->width : 0,
source->pDrawable ? source->pDrawable->height : 0, mask,
- (!mask) ? NULL : mask->pDrawable, (!mask
- || !mask->pDrawable) ? 0 :
- mask->pDrawable->width, (!mask
- || !mask->pDrawable) ? 0 : mask->
- pDrawable->height, glamor_get_picture_location(source),
- glamor_get_picture_location(mask), dest, dest->pDrawable,
+ (!mask) ? NULL : mask->pDrawable,
+ (!mask || !mask->pDrawable) ? 0 : mask->pDrawable->width,
+ (!mask || !mask->pDrawable) ? 0 : mask->pDrawable->height,
+ glamor_get_picture_location(source),
+ glamor_get_picture_location(mask),
+ dest, dest->pDrawable,
dest->pDrawable->width, dest->pDrawable->height,
glamor_get_picture_location(dest));
More information about the xorg-commit
mailing list