glamor: Use GBM for BO allocation when possible

Inspired by amdgpu. This avoids various issues due to a GEM handle
lifetime conflict between us and Mesa with current glamor.

Bugzilla: https://bugs.freedesktop.org/105381
Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2018-06-29 17:57:03 +02:00
committed by Michel Dänzer
parent b85b7b11f5
commit 3c4c0213c1
11 changed files with 267 additions and 68 deletions

View File

@@ -138,12 +138,22 @@ if test "x$GLAMOR" != "xno"; then
[Have glamor_egl_destroy_textured_pixmap API])], [],
[#include "xorg-server.h"
#include "glamor.h"])
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])
PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
fi
PKG_CHECK_MODULES(GBM, [gbm >= 10.6])
AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
else
AC_MSG_RESULT([$GLAMOR])