[PATCH xf86-video-amdgpu] glamor: Use glamor_finish when available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 8, 2017 at 3:58 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

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

> ---
>  configure.ac        | 9 +++++++--
>  src/amdgpu_glamor.c | 7 +++++++
>  2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 00249a599..591c2b9f6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -138,9 +138,14 @@ if test "x$GLAMOR" != "xno"; then
>                                          [Have glamor_egl_destroy_textured_pixmap API])], [],
>                               [#include "xorg-server.h"
>                                #include "glamor.h"])
> -       fi
>
> -       PKG_CHECK_MODULES(LIBGL, [gl])
> +               AC_CHECK_DECL(glamor_finish,
> +                             [AC_DEFINE(HAVE_GLAMOR_FINISH, 1,
> +                                        [Have glamor_finish API])],
> +                                        [PKG_CHECK_MODULES(LIBGL, [gl])],
> +                             [#include "xorg-server.h"
> +                              #include "glamor.h"])
> +       fi
>
>         if test "x$GLAMOR_XSERVER" != xyes; then
>                 PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0])
> diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
> index d29b096f4..1c5dfc2d1 100644
> --- a/src/amdgpu_glamor.c
> +++ b/src/amdgpu_glamor.c
> @@ -36,7 +36,9 @@
>
>  #include <gbm.h>
>
> +#ifndef HAVE_GLAMOR_FINISH
>  #include <GL/gl.h>
> +#endif
>
>  DevPrivateKeyRec amdgpu_pixmap_index;
>
> @@ -470,8 +472,13 @@ void amdgpu_glamor_finish(ScrnInfoPtr pScrn)
>         AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
>
>         if (info->use_glamor) {
> +#if HAVE_GLAMOR_FINISH
> +               glamor_finish(pScrn->pScreen);
> +               info->gpu_flushed++;
> +#else
>                 amdgpu_glamor_flush(pScrn);
>                 glFinish();
> +#endif
>         }
>  }
>
> --
> 2.11.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux