summaryrefslogtreecommitdiffstats
path: root/meta-ivi/recipes-graphics/mesa/mesa/revert-c46c551c56f78c6bf9e63524c89478695fc4f525.patch
blob: b417249f38ca3f4519d2ddb605cc4b78ec29102e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
diff -urN Mesa-10.4.4.orig/configure.ac Mesa-10.4.4/configure.ac
--- Mesa-10.4.4.orig/configure.ac	2015-09-26 10:15:23.382322385 +0900
+++ Mesa-10.4.4/configure.ac	2015-09-26 10:15:49.578323045 +0900
@@ -720,6 +720,20 @@
         [make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
     [enable_xlib_glx="$enableval"],
     [enable_xlib_glx=no])
+AC_ARG_ENABLE([gallium-egl],
+    [AS_HELP_STRING([--enable-gallium-egl],
+        [enable optional EGL state tracker (not required
+         for EGL support in Gallium with OpenGL and OpenGL ES)
+         @<:@default=disabled@:>@])],
+    [enable_gallium_egl="$enableval"],
+    [enable_gallium_egl=no])
+AC_ARG_ENABLE([gallium-gbm],
+    [AS_HELP_STRING([--enable-gallium-gbm],
+        [enable optional gbm state tracker (not required for
+         gbm support in Gallium)
+         @<:@default=auto@:>@])],
+    [enable_gallium_gbm="$enableval"],
+    [enable_gallium_gbm=auto])
 
 AC_ARG_ENABLE([r600-llvm-compiler],
     [AS_HELP_STRING([--enable-r600-llvm-compiler],
@@ -1324,6 +1338,51 @@
 AC_SUBST([EGL_LIB_DEPS])
 
 dnl
+dnl EGL Gallium configuration
+dnl
+if test "x$enable_gallium_egl" = xyes; then
+    if test -z "$with_gallium_drivers"; then
+        AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
+    fi
+    if test "x$enable_egl" = xno; then
+        AC_MSG_ERROR([cannot enable egl_gallium without EGL])
+    fi
+    if test "x$have_libdrm" != xyes; then
+        AC_MSG_ERROR([egl_gallium requires libdrm >= $LIBDRM_REQUIRED])
+    fi
+# XXX: Uncomment once converted to use static/shared pipe-drivers
+#    enable_gallium_loader=$enable_shared_pipe_drivers
+fi
+AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
+
+dnl
+dnl gbm Gallium configuration
+dnl
+if test "x$enable_gallium_gbm" = xauto; then
+    case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
+        yesyesyes*drm*)
+            enable_gallium_gbm=yes ;;
+         *)
+            enable_gallium_gbm=no ;;
+    esac
+fi
+if test "x$enable_gallium_gbm" = xyes; then
+    if test -z "$with_gallium_drivers"; then
+        AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
+    fi
+    if test "x$enable_gbm" = xno; then
+        AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
+    fi
+
+    if test "x$enable_gallium_egl" != xyes; then
+        AC_MSG_ERROR([gbm_gallium is only used by egl_gallium])
+    fi
+
+    enable_gallium_loader=$enable_shared_pipe_drivers
+fi
+AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
+
+dnl
 dnl XA configuration
 dnl
 if test "x$enable_xa" = xyes; then
@@ -1351,9 +1410,9 @@
     if test -z "$with_gallium_drivers"; then
         AC_MSG_ERROR([cannot enable OpenVG without Gallium])
     fi
-
-    AC_MSG_ERROR([Cannot enable OpenVG, because egl_gallium has been removed and
-                  OpenVG hasn't been integrated into standard libEGL yet])
+    if test "x$enable_gallium_egl" = xno; then
+        AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
+    fi
 
     EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
     VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
@@ -2165,6 +2224,8 @@
 		src/gallium/drivers/vc4/kernel/Makefile
 		src/gallium/state_trackers/clover/Makefile
 		src/gallium/state_trackers/dri/Makefile
+		src/gallium/state_trackers/egl/Makefile
+		src/gallium/state_trackers/gbm/Makefile
 		src/gallium/state_trackers/glx/xlib/Makefile
 		src/gallium/state_trackers/nine/Makefile
 		src/gallium/state_trackers/omx/Makefile
@@ -2303,7 +2364,12 @@
         egl_drivers="$egl_drivers builtin:egl_dri2"
     fi
 
-    echo "        EGL drivers:    $egl_drivers"
+    if test "x$enable_gallium_egl" = xyes; then
+        echo "        EGL drivers:    ${egl_drivers} egl_gallium"
+        echo "        EGL Gallium STs:$EGL_CLIENT_APIS"
+    else
+        echo "        EGL drivers:    $egl_drivers"
+    fi
 fi
 
 echo ""
diff -urN Mesa-10.4.4.orig/docs/egl.html Mesa-10.4.4/docs/egl.html
--- Mesa-10.4.4.orig/docs/egl.html	2015-09-26 10:15:23.386322385 +0900
+++ Mesa-10.4.4/docs/egl.html	2015-09-26 10:15:49.578323045 +0900
@@ -77,6 +77,13 @@
 
 </dd>
 
+<dt><code>--enable-gallium-egl</code></dt>
+<dd>
+
+<p>Enable the optional <code>egl_gallium</code> driver.</p>
+
+</dd>
+
 <dt><code>--with-egl-platforms</code></dt>
 <dd>
 
diff -urN Mesa-10.4.4.orig/src/gallium/Makefile.am Mesa-10.4.4/src/gallium/Makefile.am
--- Mesa-10.4.4.orig/src/gallium/Makefile.am	2015-09-26 10:15:23.386322385 +0900
+++ Mesa-10.4.4/src/gallium/Makefile.am	2015-09-26 10:15:49.578323045 +0900
@@ -138,6 +138,14 @@
 SUBDIRS += state_trackers/vega
 endif
 
+if HAVE_GALLIUM_EGL
+SUBDIRS += state_trackers/egl targets/egl-static
+endif
+
+if HAVE_GALLIUM_GBM
+SUBDIRS += state_trackers/gbm targets/gbm
+endif
+
 if HAVE_X11_DRIVER
 SUBDIRS += state_trackers/glx/xlib targets/libgl-xlib
 endif