[PATCH] dri2: Handle PRIME for source buffer as well in radeon_dri2_copy_region2

Alex Deucher alexdeucher at gmail.com
Fri Apr 25 06:30:50 PDT 2014


On Thu, Apr 24, 2014 at 8:18 PM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77810
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/radeon_dri2.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
> index d47b035..9a9918b 100644
> --- a/src/radeon_dri2.c
> +++ b/src/radeon_dri2.c
> @@ -409,7 +409,14 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
>      dst_drawable = &dst_private->pixmap->drawable;
>
>      if (src_private->attachment == DRI2BufferFrontLeft) {
> -        src_drawable = drawable;
> +#ifdef USE_DRI2_PRIME
> +       if (drawable->pScreen != pScreen) {
> +           src_drawable = DRI2UpdatePrime(drawable, src_buffer);
> +           if (!src_drawable)
> +               return;
> +       } else
> +#endif
> +           src_drawable = drawable;
>      }
>      if (dst_private->attachment == DRI2BufferFrontLeft) {
>  #ifdef USE_DRI2_PRIME
> --
> 1.9.2
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list