mesa: Changes to 'ubuntu'
debian/changelog | 14 ++
debian/patches/core-fix-EXT_texture_format_BGRA8888.patch | 71 +++++++++++++
debian/patches/egl-platform-mir.patch | 72 +++++++++-----
debian/patches/series | 1
4 files changed, 133 insertions(+), 25 deletions(-)
New commits:
commit 6c5e9baf8026ea4bc67cda2e0f6d20011fa9a191
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Fri Oct 9 14:53:40 2015 +1100
Fold in -1ubuntu3 upload from the archive
diff --git a/debian/changelog b/debian/changelog
index 62904a5..deffbf7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mesa (11.0.2-1ubuntu3) wily; urgency=medium
+mesa (11.0.2-1ubuntu4) wily; urgency=medium
* core-fix-EXT_texture_format_BGRA8888.patch: Cherry pick upstream commit
fixing incorrectly-strict error handling in format code. Fixes black
@@ -6,6 +6,12 @@ mesa (11.0.2-1ubuntu3) wily; urgency=medium
-- Christopher James Halse Rogers <raof@ubuntu.com> Fri, 09 Oct 2015 14:45:54 +1100
+mesa (11.0.2-1ubuntu3) wily; urgency=medium
+
+ * d/patches/egl-platform-mir.patch: add mirclient dependency (LP: #1503450)
+
+ -- Tiago Stürmer Daitx <tiago.daitx@canonical.com> Tue, 06 Oct 2015 22:05:12 +0000
+
mesa (11.0.2-1ubuntu2) wily; urgency=medium
* control, rules: Disable LLVM on ppc64el again, until unity tests
diff --git a/debian/patches/egl-platform-mir.patch b/debian/patches/egl-platform-mir.patch
index 0333455..1222c9f 100644
--- a/debian/patches/egl-platform-mir.patch
+++ b/debian/patches/egl-platform-mir.patch
@@ -1,17 +1,19 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1772,7 +1772,9 @@ for plat in $egl_platforms; do
+Index: mesa-11.0.2/configure.ac
+===================================================================
+--- mesa-11.0.2.orig/configure.ac
++++ mesa-11.0.2/configure.ac
+@@ -1647,7 +1647,9 @@ for plat in $egl_platforms; do
test "x$have_libdrm" != xyes &&
AC_MSG_ERROR([EGL platform surfaceless requires libdrm >= $LIBDRM_REQUIRED])
;;
-
+ mir)
-+ PKG_CHECK_MODULES([MIR], [mir-client-platform-mesa-dev])
++ PKG_CHECK_MODULES([MIR], [mirclient mir-client-platform-mesa-dev])
+ ;;
*)
AC_MSG_ERROR([EGL platform '$plat' does not exist])
;;
-@@ -1798,6 +1800,7 @@ AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND
+@@ -1673,6 +1675,7 @@ AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND
AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep -q 'drm')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_NULL, echo "$egl_platforms" | grep -q 'null')
@@ -19,8 +21,10 @@
AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
---- a/include/EGL/eglplatform.h
-+++ b/include/EGL/eglplatform.h
+Index: mesa-11.0.2/include/EGL/eglplatform.h
+===================================================================
+--- mesa-11.0.2.orig/include/EGL/eglplatform.h
++++ mesa-11.0.2/include/EGL/eglplatform.h
@@ -105,6 +105,13 @@ typedef struct ANativeWindow*
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
@@ -35,8 +39,10 @@
#elif defined(__unix__) || defined(__APPLE__)
#if defined(MESA_EGL_NO_X11_HEADERS)
---- a/include/GL/internal/dri_interface.h
-+++ b/include/GL/internal/dri_interface.h
+Index: mesa-11.0.2/include/GL/internal/dri_interface.h
+===================================================================
+--- mesa-11.0.2.orig/include/GL/internal/dri_interface.h
++++ mesa-11.0.2/include/GL/internal/dri_interface.h
@@ -886,10 +886,12 @@ struct __DRIbufferRec {
unsigned int pitch;
unsigned int cpp;
@@ -51,8 +57,10 @@
struct __DRIdri2LoaderExtensionRec {
__DRIextension base;
---- a/src/egl/drivers/dri2/egl_dri2.c
-+++ b/src/egl/drivers/dri2/egl_dri2.c
+Index: mesa-11.0.2/src/egl/drivers/dri2/egl_dri2.c
+===================================================================
+--- mesa-11.0.2.orig/src/egl/drivers/dri2/egl_dri2.c
++++ mesa-11.0.2/src/egl/drivers/dri2/egl_dri2.c
@@ -757,6 +757,12 @@ dri2_initialize(_EGLDriver *drv, _EGLDis
return EGL_TRUE;
return dri2_initialize_wayland(drv, disp);
@@ -90,8 +98,10 @@
for (i = 0; dri2_dpy->driver_configs[i]; i++)
free((__DRIconfig *) dri2_dpy->driver_configs[i]);
free(dri2_dpy->driver_configs);
---- a/src/egl/drivers/dri2/egl_dri2.h
-+++ b/src/egl/drivers/dri2/egl_dri2.h
+Index: mesa-11.0.2/src/egl/drivers/dri2/egl_dri2.h
+===================================================================
+--- mesa-11.0.2.orig/src/egl/drivers/dri2/egl_dri2.h
++++ mesa-11.0.2/src/egl/drivers/dri2/egl_dri2.h
@@ -66,6 +66,10 @@
#endif /* HAVE_ANDROID_PLATFORM */
@@ -156,8 +166,10 @@
+dri2_initialize_mir(_EGLDriver *drv, _EGLDisplay *disp);
+
#endif /* EGL_DRI2_INCLUDED */
+Index: mesa-11.0.2/src/egl/drivers/dri2/platform_mir.c
+===================================================================
--- /dev/null
-+++ b/src/egl/drivers/dri2/platform_mir.c
++++ mesa-11.0.2/src/egl/drivers/dri2/platform_mir.c
@@ -0,0 +1,617 @@
+/*
+ * Copyright © 2012 Canonical, Inc
@@ -776,8 +788,10 @@
+
+ return EGL_FALSE;
+}
---- a/src/egl/main/egldisplay.c
-+++ b/src/egl/main/egldisplay.c
+Index: mesa-11.0.2/src/egl/main/egldisplay.c
+===================================================================
+--- mesa-11.0.2.orig/src/egl/main/egldisplay.c
++++ mesa-11.0.2/src/egl/main/egldisplay.c
@@ -56,7 +56,10 @@
#ifdef HAVE_DRM_PLATFORM
#include <gbm.h>
@@ -867,8 +881,10 @@
char *detection_method = NULL;
if (native_platform == _EGL_INVALID_PLATFORM) {
---- a/src/egl/main/egldisplay.h
-+++ b/src/egl/main/egldisplay.h
+Index: mesa-11.0.2/src/egl/main/egldisplay.h
+===================================================================
+--- mesa-11.0.2.orig/src/egl/main/egldisplay.h
++++ mesa-11.0.2/src/egl/main/egldisplay.h
@@ -50,6 +50,7 @@ enum _egl_platform_type {
_EGL_PLATFORM_ANDROID,
_EGL_PLATFORM_HAIKU,
@@ -877,8 +893,10 @@
_EGL_NUM_PLATFORMS,
_EGL_INVALID_PLATFORM = -1
---- a/src/gallium/state_trackers/dri/dri2.c
-+++ b/src/gallium/state_trackers/dri/dri2.c
+Index: mesa-11.0.2/src/gallium/state_trackers/dri/dri2.c
+===================================================================
+--- mesa-11.0.2.orig/src/gallium/state_trackers/dri/dri2.c
++++ mesa-11.0.2/src/gallium/state_trackers/dri/dri2.c
@@ -531,12 +531,20 @@ dri2_allocate_textures(struct dri_contex
templ.height0 = dri_drawable->h;
templ.format = format;
@@ -904,8 +922,10 @@
drawable->textures[statt] =
screen->base.screen->resource_from_handle(screen->base.screen,
&templ, &whandle);
---- a/src/gbm/backends/dri/gbm_dri.c
-+++ b/src/gbm/backends/dri/gbm_dri.c
+Index: mesa-11.0.2/src/gbm/backends/dri/gbm_dri.c
+===================================================================
+--- mesa-11.0.2.orig/src/gbm/backends/dri/gbm_dri.c
++++ mesa-11.0.2/src/gbm/backends/dri/gbm_dri.c
@@ -202,7 +202,7 @@ static const __DRIimageLookupExtension i
};
@@ -979,7 +999,7 @@
static struct gbm_bo *
gbm_dri_bo_import(struct gbm_device *gbm,
uint32_t type, void *buffer, uint32_t usage)
-@@ -836,31 +876,7 @@ gbm_dri_bo_create(struct gbm_device *gbm
+@@ -852,31 +892,7 @@ gbm_dri_bo_create(struct gbm_device *gbm
bo->base.base.height = height;
bo->base.base.format = format;
@@ -1012,8 +1032,10 @@
if (usage & GBM_BO_USE_SCANOUT)
dri_use |= __DRI_IMAGE_USE_SCANOUT;
---- a/src/egl/Makefile.am
-+++ b/src/egl/Makefile.am
+Index: mesa-11.0.2/src/egl/Makefile.am
+===================================================================
+--- mesa-11.0.2.orig/src/egl/Makefile.am
++++ mesa-11.0.2/src/egl/Makefile.am
@@ -75,6 +75,12 @@ AM_CFLAGS += -DHAVE_SURFACELESS_PLATFORM
dri2_backend_FILES += drivers/dri2/platform_surfaceless.c
endif
commit 06817e1192c6b8b4d2324e642b2bbc79c8882c25
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date: Fri Oct 9 14:48:34 2015 +1100
Cherry-pick 6ad9ebb0 to fix black window bug
diff --git a/debian/changelog b/debian/changelog
index fb0b97c..62904a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mesa (11.0.2-1ubuntu3) wily; urgency=medium
+
+ * core-fix-EXT_texture_format_BGRA8888.patch: Cherry pick upstream commit
+ fixing incorrectly-strict error handling in format code. Fixes black
+ windows in Weston and Mir (LP: #1504387)
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Fri, 09 Oct 2015 14:45:54 +1100
+
mesa (11.0.2-1ubuntu2) wily; urgency=medium
* control, rules: Disable LLVM on ppc64el again, until unity tests
diff --git a/debian/patches/core-fix-EXT_texture_format_BGRA8888.patch b/debian/patches/core-fix-EXT_texture_format_BGRA8888.patch
new file mode 100644
index 0000000..190df83
--- /dev/null
+++ b/debian/patches/core-fix-EXT_texture_format_BGRA8888.patch
@@ -0,0 +1,71 @@
+commit 6ad9ebb073fc4ed245ef8e9db4479a52e818cb92
+Author: Jason Ekstrand <jason.ekstrand@intel.com>
+Date: Wed Oct 7 15:52:09 2015 -0700
+
+ mesa: Correctly handle GL_BGRA_EXT in ES3 format_and_type checks
+
+ The EXT_texture_format_BGRA8888 extension (which mesa supports
+ unconditionally) adds a new format and internal format called GL_BGRA_EXT.
+ Previously, this was not really handled at all in
+ _mesa_ex3_error_check_format_and_type. When the checks were tightened in
+ commit f15a7f3c, we accidentally tightened things too far and GL_BGRA_EXT
+ would always cause an error to be thrown.
+
+ There were two primary issues here. First, is that
+ _mesa_es3_effective_internal_format_for_format_and_type didn't handle the
+ GL_BGRA_EXT format. Second is that it blindly uses _mesa_base_tex_format
+ which returns GL_RGBA for GL_BGRA_EXT. This commit fixes both of these
+ issues as well as adds explicit checks that GL_BGRA_EXT is only ever used
+ with GL_BGRA_EXT and GL_UNSIGNED_BYTE.
+
+ Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92265
+ Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+ Cc: "11.0" <mesa-stable@lists.freedesktop.org>
+
+diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
+index 7dab33c..faa6382 100644
+--- a/src/mesa/main/glformats.c
++++ b/src/mesa/main/glformats.c
+@@ -2678,6 +2678,7 @@ _mesa_es3_effective_internal_format_for_format_and_type(GLenum format,
+ * internal formats, they do not correspond to GL constants, so the base
+ * format is returned instead.
+ */
++ case GL_BGRA_EXT:
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE:
+ case GL_ALPHA:
+@@ -2797,8 +2798,19 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
+ if (effectiveInternalFormat == GL_NONE)
+ return GL_INVALID_OPERATION;
+
+- GLenum baseInternalFormat =
+- _mesa_base_tex_format(ctx, effectiveInternalFormat);
++ GLenum baseInternalFormat;
++ if (internalFormat == GL_BGRA_EXT) {
++ /* Unfortunately, _mesa_base_tex_format returns a base format of
++ * GL_RGBA for GL_BGRA_EXT. This makes perfect sense if you're
++ * asking the question, "what channels does this format have?"
++ * However, if we're trying to determine if two internal formats
++ * match in the ES3 sense, we actually want GL_BGRA.
++ */
++ baseInternalFormat = GL_BGRA_EXT;
++ } else {
++ baseInternalFormat =
++ _mesa_base_tex_format(ctx, effectiveInternalFormat);
++ }
+
+ if (internalFormat != baseInternalFormat)
+ return GL_INVALID_OPERATION;
+@@ -2807,6 +2819,11 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx,
+ }
+
+ switch (format) {
++ case GL_BGRA_EXT:
++ if (type != GL_UNSIGNED_BYTE || internalFormat != GL_BGRA)
++ return GL_INVALID_OPERATION;
++ break;
++
+ case GL_RGBA:
+ switch (type) {
+ case GL_UNSIGNED_BYTE:
diff --git a/debian/patches/series b/debian/patches/series
index f590a99..85f3841 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
egl-platform-mir.patch
i915-dont-default-to-2.1.patch
i965-remove-early-release-of-dri2-miptree.patch
+core-fix-EXT_texture_format_BGRA8888.patch
Reply to: