summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-04-14 10:48:11 +0200
committerQuanxian Wang <quanxian.wang@intel.com>2014-09-24 10:59:56 +0800
commit7e2ed3413c9b04b4b5c60d4912df709bc4538b50 (patch)
treef6c175e413e625794e777a56aef31f830faac9a8
parenta07066859f74a99eabcbe9826722d5c888ea65d5 (diff)
downloadmesa-7e2ed3413c9b04b4b5c60d4912df709bc4538b50.tar.gz
mesa-7e2ed3413c9b04b4b5c60d4912df709bc4538b50.tar.bz2
mesa-7e2ed3413c9b04b4b5c60d4912df709bc4538b50.zip
Allow EGL software rendering by building the EGL Gallium driver
We now build the EGL Gallium driver, which allows software rendering (for usages like EFL applications with wayland_egl engine on Weston e.g.). We patch the source to allow building with latest Wayland. We change the discovery order to make sure the hardware driver (egl_dri2) will still be used automatically, and the software driver as a fallback only. Change-Id: I98d7caebbfbacc845e23b384765fc7a1adfc0a07 Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-rw-r--r--packaging/mesa.spec25
-rw-r--r--src/egl/main/egldriver.c2
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c3
3 files changed, 25 insertions, 5 deletions
diff --git a/packaging/mesa.spec b/packaging/mesa.spec
index d86f6e4236e..0f87bcf7ead 100644
--- a/packaging/mesa.spec
+++ b/packaging/mesa.spec
@@ -136,6 +136,13 @@ OpenGL|ES and OpenVG.
This package provides the development environment for compiling
programs against the EGL library.
+%package -n mesa-gallium-pipe
+# Kudos to Debian for the descriptions
+Summary: Free implementation of Gallium-pipe API
+
+%description -n mesa-gallium-pipe
+Gallium
+
%if %{with x}
%package -n mesa-libGL
Summary: The GL/GLX runtime of the Mesa 3D graphics library
@@ -359,10 +366,10 @@ autoreconf -fi
--enable-gles2 \
%if %{with wayland}
%if !%{with x}
- --with-egl-platforms=drm,wayland \
+ --with-egl-platforms=wayland,drm \
--disable-glx \
%else
- --with-egl-platforms=x11,drm,wayland \
+ --with-egl-platforms=wayland,drm,x11 \
%endif
%else
--with-egl-platforms=x11,drm \
@@ -380,9 +387,10 @@ autoreconf -fi
%endif
--with-dri-searchpath=/usr/%{_lib}/dri/updates:/usr/%{_lib}/dri \
%ifarch %ix86 x86_64
+ --enable-gallium-egl \
--enable-gallium-llvm \
--with-dri-drivers=i915,i965,swrast \
- --with-gallium-drivers="swrast,svga" \
+ --with-gallium-drivers="i915,svga,swrast" \
%if %{with x}
--enable-xvmc \
%endif
@@ -442,6 +450,10 @@ install -m 644 $RPM_SOURCE_DIR/drirc %{buildroot}/etc
%postun -n mesa-libEGL -p /sbin/ldconfig
+%post -n mesa-gallium-pipe -p /sbin/ldconfig
+
+%postun -n mesa-gallium-pipe -p /sbin/ldconfig
+
%post -n mesa-libGLESv1_CM -p /sbin/ldconfig
%postun -n mesa-libGLESv1_CM -p /sbin/ldconfig
@@ -498,6 +510,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc %{buildroot}/etc
%manifest %{name}.manifest
%defattr(-,root,root)
%{_libdir}/libEGL.so.1*
+%{_libdir}/egl/egl_gallium.so
%files -n mesa-libEGL-devel
%manifest %{name}.manifest
@@ -507,7 +520,10 @@ install -m 644 $RPM_SOURCE_DIR/drirc %{buildroot}/etc
%{_libdir}/libEGL.so
%{_libdir}/pkgconfig/egl.pc
-
+%files -n mesa-gallium-pipe
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/gallium-pipe/*
%if %{with x}
%files -n mesa-libGL
@@ -603,6 +619,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc %{buildroot}/etc
%manifest %{name}.manifest
%defattr(-,root,root)
%{_libdir}/libgbm.so.1*
+%{_libdir}/gbm/gbm_gallium_drm.so
%files -n libgbm-devel
%manifest %{name}.manifest
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 78d81309265..a80540b75b7 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -562,8 +562,8 @@ _eglAddDrivers(void)
* Add other drivers only when EGL_DRIVER is not set. The order here
* decides the priorities.
*/
- _eglAddGalliumDriver();
_eglAddBuiltInDrivers();
+ _eglAddGalliumDriver();
}
return (_eglModules != NULL);
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index b1b1ca61f7b..8ed0c6233f9 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -37,6 +37,9 @@
#endif
#include "target-helpers/inline_sw_helper.h"
#include "state_tracker/drisw_api.h"
+#ifdef HAVE_WINSYS_XLIB
+#include "state_tracker/xlib_sw_winsys.h"
+#endif
struct pipe_loader_sw_device {
struct pipe_loader_device base;