From 7bb193d28c4195b5c3dd7897e6c9f5b0df2749cb Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Wed, 24 Feb 2016 20:56:38 -0600 Subject: mesa/build: add OpenSWR to build Tested on Linux (centos, ubuntu, and suse variants) Reviewed-by: Emil Velikov Acked-by: Jose Fonseca --- configure.ac | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d4ce99a813b..3b7703088fb 100644 --- a/configure.ac +++ b/configure.ac @@ -2191,6 +2191,16 @@ radeon_llvm_check() { fi } +swr_llvm_check() { + gallium_require_llvm $1 + if test ${LLVM_VERSION_INT} -lt 306; then + AC_MSG_ERROR([LLVM version 3.6 or later required when building $1]) + fi + if test "x$enable_gallium_llvm" != "xyes"; then + AC_MSG_ERROR([--enable-gallium-llvm is required when building $1]) + fi +} + dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block if test -n "$with_gallium_drivers"; then gallium_drivers=`IFS=', '; echo $with_gallium_drivers` @@ -2263,6 +2273,30 @@ if test -n "$with_gallium_drivers"; then HAVE_GALLIUM_LLVMPIPE=yes fi ;; + xswr) + AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) + swr_llvm_check "swr" + + AC_MSG_CHECKING([whether $CXX supports AVX/AVX2]) + AVX_CXXFLAGS="-march=core-avx-i" + AVX2_CXXFLAGS="-march=core-avx2" + + AC_LANG_PUSH([C++]) + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$AVX_CXXFLAGS $CXXFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[], + [AC_MSG_ERROR([AVX compiler support not detected])]) + CXXFLAGS="$save_CXXFLAGS" + + save_CFLAGS="$CXXFLAGS" + CXXFLAGS="$AVX2_CXXFLAGS $CXXFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[], + [AC_MSG_ERROR([AVX2 compiler support not detected])]) + CXXFLAGS="$save_CXXFLAGS" + AC_LANG_POP([C++]) + + HAVE_GALLIUM_SWR=yes + ;; xvc4) HAVE_GALLIUM_VC4=yes gallium_require_drm "vc4" @@ -2352,6 +2386,7 @@ AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes) +AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_VIRGL, test "x$HAVE_GALLIUM_VIRGL" = xyes) @@ -2461,6 +2496,9 @@ AC_CONFIG_FILES([Makefile src/gallium/drivers/rbug/Makefile src/gallium/drivers/softpipe/Makefile src/gallium/drivers/svga/Makefile + src/gallium/drivers/swr/Makefile + src/gallium/drivers/swr/avx/Makefile + src/gallium/drivers/swr/avx2/Makefile src/gallium/drivers/trace/Makefile src/gallium/drivers/vc4/Makefile src/gallium/drivers/virgl/Makefile -- cgit v1.2.3 From 37402aa4c6216eec5f60ebef8a8f24fcbd61f646 Mon Sep 17 00:00:00 2001 From: Christian König Date: Wed, 20 Jan 2016 16:19:08 +0100 Subject: st/mesa: conditionally enable GL_NV_vdpau_interop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only enable it when we compile the state tracker as well. Signed-off-by: Christian König Reviewed-by: Ilia Mirkin --- configure.ac | 1 + src/mesa/state_tracker/st_extensions.c | 2 ++ src/mesa/state_tracker/st_vdpau.c | 6 ++++++ 3 files changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3b7703088fb..49be14709df 100644 --- a/configure.ac +++ b/configure.ac @@ -1735,6 +1735,7 @@ AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes) if test "x$enable_vdpau" = xyes; then PKG_CHECK_MODULES([VDPAU], [vdpau >= $VDPAU_REQUIRED]) gallium_st="$gallium_st vdpau" + DEFINES="$DEFINES -DHAVE_ST_VDPAU" fi AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 063daaec688..42d347c6600 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -1067,12 +1067,14 @@ void st_init_extensions(struct pipe_screen *screen, extensions->ARB_ES3_compatibility = GL_TRUE; } +#ifdef HAVE_ST_VDPAU if (screen->get_video_param && screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_SUPPORTS_INTERLACED)) { extensions->NV_vdpau_interop = GL_TRUE; } +#endif if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_DOUBLES) && diff --git a/src/mesa/state_tracker/st_vdpau.c b/src/mesa/state_tracker/st_vdpau.c index 63af1196af1..71dd15bc4fe 100644 --- a/src/mesa/state_tracker/st_vdpau.c +++ b/src/mesa/state_tracker/st_vdpau.c @@ -49,6 +49,8 @@ #include "st_format.h" #include "st_cb_flush.h" +#ifdef HAVE_ST_VDPAU + static void st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access, GLboolean output, struct gl_texture_object *texObj, @@ -180,9 +182,13 @@ st_vdpau_unmap_surface(struct gl_context *ctx, GLenum target, GLenum access, st_flush(st, NULL, 0); } +#endif + void st_init_vdpau_functions(struct dd_function_table *functions) { +#ifdef HAVE_ST_VDPAU functions->VDPAUMapSurface = st_vdpau_map_surface; functions->VDPAUUnmapSurface = st_vdpau_unmap_surface; +#endif } -- cgit v1.2.3 From 7a2333e4efbaefe6bd6db87b9b2443737c89f01e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 14 Mar 2016 16:41:54 +0100 Subject: configure.ac: require libdrm 2.4.66 for drmGetDevice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since 737b6ed13e8f813987b5566004f0f45e9c55f1e8 src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c no longer compiles: error: unknown type name ‘drmDevicePtr’ --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 49be14709df..31703b58301 100644 --- a/configure.ac +++ b/configure.ac @@ -68,7 +68,7 @@ OPENCL_VERSION=1 AC_SUBST([OPENCL_VERSION]) dnl Versions for external dependencies -LIBDRM_REQUIRED=2.4.60 +LIBDRM_REQUIRED=2.4.66 LIBDRM_RADEON_REQUIRED=2.4.56 LIBDRM_AMDGPU_REQUIRED=2.4.63 LIBDRM_INTEL_REQUIRED=2.4.61 -- cgit v1.2.3