From: Marek Olšák <marek.ol...@amd.com> --- configure.ac | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac index 12c8165..17dfafd 100644 --- a/configure.ac +++ b/configure.ac @@ -2296,35 +2296,52 @@ dnl Gallium helper functions dnl gallium_require_llvm() { if test "x$MESA_LLVM" = x0; then case "$host" in *gnux32) return;; esac case "$host_cpu" in i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);; esac fi } -dnl This is for Glamor. Skip this if OpenGL is disabled. -require_egl_drm() { +dnl If EGL/X11 or GLX is enabled, make sure they are usable. +check_glamor_requirements() { if test "x$enable_opengl" = xno; then return 0 fi + need_glamor=no + + if test "x$enable_glx" = xdri; then + need_glamor=yes + fi + case "$with_egl_platforms" in - *drm*) - ;; - *) - AC_MSG_ERROR([--with-egl-platforms=drm is required to build the $1 driver.]) + *x11*) + need_glamor=yes ;; esac - if test "x$enable_gbm" != xyes; then - AC_MSG_ERROR([--enable-gbm is required to build the $1 driver.]) + + if test "x$need_glamor" = xyes; then + suffix="is required for X acceleration with the $1 driver." + + if test "x$enable_gbm" != xyes; then + AC_MSG_ERROR([--enable-gbm $suffix]) + fi + + case "$with_egl_platforms" in + *drm*) + ;; + *) + AC_MSG_ERROR([--with-egl-platforms=x11,drm $suffix]) + ;; + esac fi } radeon_llvm_check() { if test ${LLVM_VERSION_INT} -lt 307; then amdgpu_llvm_target_name='r600' else amdgpu_llvm_target_name='amdgpu' fi llvm_check_version_for $2 $3 $4 $1 @@ -2427,21 +2444,21 @@ if test -n "$with_gallium_drivers"; then radeon_gallium_llvm_check "r600g" "3" "6" "0" LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser" fi ;; xradeonsi) HAVE_GALLIUM_RADEONSI=yes PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) require_libdrm "radeonsi" radeon_gallium_llvm_check "radeonsi" "3" "6" "0" - require_egl_drm "radeonsi" + check_glamor_requirements "radeonsi" ;; xnouveau) HAVE_GALLIUM_NOUVEAU=yes PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED]) require_libdrm "nouveau" ;; xfreedreno) HAVE_GALLIUM_FREEDRENO=yes PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED]) require_libdrm "freedreno" @@ -2478,21 +2495,21 @@ if test -n "$with_gallium_drivers"; then require_libdrm "vc4" PKG_CHECK_MODULES([SIMPENROSE], [simpenrose], [USE_VC4_SIMULATOR=yes; DEFINES="$DEFINES -DUSE_VC4_SIMULATOR"], [USE_VC4_SIMULATOR=no]) ;; xvirgl) HAVE_GALLIUM_VIRGL=yes require_libdrm "virgl" - require_egl_drm "virgl" + check_glamor_requirements "virgl" ;; *) AC_MSG_ERROR([Unknown Gallium driver: $driver]) ;; esac done fi if test "x$HAVE_RADEON_VULKAN" = "xyes"; then radeon_llvm_check "radv" "3" "9" "0" -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev