[PATCH xserver] glamor: Cannot use copies when accessing outside of composite source

Hans de Goede hdegoede at redhat.com
Thu May 26 12:55:45 UTC 2016


Hi,

On 26-05-16 12:04, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Commit b64108fa ("glamor: Check for composite operations which are
> equivalent to copies") failed to copy conditions from exaComposite which
> ensure that the composite operation doesn't access outside of the source
> picture.
>
> This fixes rendercheck regressions from the commit above.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

I was hoping that this fixed the thunderbird regressions I was seeing
after commit b64108fa, but unfortunately it does not.

> Apologies for jumping the gun on the previous patch by submitting it
> without appropriate testing with rendercheck.
>
> There is one regression left with this patch (blend test on a8), that
> one is fixed by https://patchwork.freedesktop.org/patch/87222/ .

I've added that one to my local master clone too, still not fixed.

The problem is that thunderbird and any thunderbird dialogs simply
show up as completely gray windows without anything in them.

Reproducing is as simple as starting thunderbird.

I'm seeing this on a skylake system using the igpu with modesetting +
glamor.

For now I'm running xserver-master with b64108fa reverted, let me know
if you need to me test any potential fixes for this.

Regards,

Hans



>
>  glamor/glamor_render.c | 27 +++++++++++++++------------
>  1 file changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
> index 9c5cca6..f1bfe03 100644
> --- a/glamor/glamor_render.c
> +++ b/glamor/glamor_render.c
> @@ -1424,18 +1424,21 @@ glamor_composite_clipped_region(CARD8 op,
>      if (!mask && !source->alphaMap && !dest->alphaMap
>          && source->pDrawable && !source->transform
>          && ((op == PictOpSrc
> -             && ((source->format == dest->format
> -                  || (PICT_FORMAT_COLOR(dest->format)
> -                      && PICT_FORMAT_COLOR(source->format)
> -                      && dest->format == PICT_FORMAT(PICT_FORMAT_BPP(source->format),
> -                                                     PICT_FORMAT_TYPE(source->format),
> -                                                     0,
> -                                                     PICT_FORMAT_R(source->format),
> -                                                     PICT_FORMAT_G(source->format),
> -                                                     PICT_FORMAT_B(source->format))))
> -                 || (op == PictOpOver
> -                     && source->format == dest->format
> -                     && !PICT_FORMAT_A(source->format)))))) {
> +             && (source->format == dest->format
> +                 || (PICT_FORMAT_COLOR(dest->format)
> +                     && PICT_FORMAT_COLOR(source->format)
> +                     && dest->format == PICT_FORMAT(PICT_FORMAT_BPP(source->format),
> +                                                    PICT_FORMAT_TYPE(source->format),
> +                                                    0,
> +                                                    PICT_FORMAT_R(source->format),
> +                                                    PICT_FORMAT_G(source->format),
> +                                                    PICT_FORMAT_B(source->format)))))
> +            || (op == PictOpOver
> +                && source->format == dest->format
> +                && !PICT_FORMAT_A(source->format)))
> +        && x_source >= 0 && y_source >= 0
> +        && (x_source + width) <= source->pDrawable->width
> +        && (y_source + height) <= source->pDrawable->height) {
>          glamor_copy(source->pDrawable, dest->pDrawable, NULL,
>                      box, nbox, x_source - x_dest,
>                      y_source - y_dest, FALSE, FALSE, 0, NULL);
>


More information about the xorg-devel mailing list