- n_Fixed-build-against-wayland-1.2.1.patch

* required to fix build with wayland on openSUSE 13.1

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=453
This commit is contained in:
Stefan Dirsch 2015-06-23 14:33:29 +00:00 committed by Git OBS Bridge
parent 5431137cd7
commit ab04f3beda
3 changed files with 68 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 23 14:26:17 UTC 2015 - sndirsch@suse.com
- n_Fixed-build-against-wayland-1.2.1.patch
* required to fix build with wayland on openSUSE 13.1
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 15 14:19:06 UTC 2015 - tobias.johannes.klausmann@mni.thm.de Mon Jun 15 14:19:06 UTC 2015 - tobias.johannes.klausmann@mni.thm.de

View File

@ -48,6 +48,8 @@ Source2: baselibs.conf
Source3: README.updates Source3: README.updates
Source4: manual-pages.tar.bz2 Source4: manual-pages.tar.bz2
Source6: %{name}-rpmlintrc Source6: %{name}-rpmlintrc
# required for building against wayland of openSUSE 13.1
Patch0: n_Fixed-build-against-wayland-1.2.1.patch
# to be upstreamed # to be upstreamed
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
# Patch from Fedora, fix 16bpp in llvmpipe # Patch from Fedora, fix 16bpp in llvmpipe
@ -509,6 +511,8 @@ This package contains the VDPAU state tracker for radeonsi.
%setup -q -n %{_name_archive}-%{_version} -b4 %setup -q -n %{_name_archive}-%{_version} -b4
# remove some docs # remove some docs
rm -rf docs/README.{VMS,WIN32,OS2} rm -rf docs/README.{VMS,WIN32,OS2}
# required for building against wayland of openSUSE 13.1
%patch0 -p1
### disabled, but not dropped yet; these still need investigation in ### disabled, but not dropped yet; these still need investigation in
### order to figure out whether the issue is still reproducable and ### order to figure out whether the issue is still reproducable and
### hence a fix is required ### hence a fix is required

View File

@ -0,0 +1,58 @@
From 5d277737eef98b4c5913bb5a29c16776c82c5d7c Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch@suse.de>
Date: Tue, 23 Jun 2015 16:19:51 +0200
Subject: [PATCH] Fixed build against wayland 1.2.1
Wayland 1.2.1 still lacks definition of WL_SHM_FORMAT_RGB565 format.
Signed-off-by: Stefan Dirsch <sndirsch@suse.com>
---
src/egl/drivers/dri2/platform_wayland.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index ea2f9f2..ee2b324 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1236,9 +1236,11 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
static int
dri2_wl_swrast_get_stride_for_format(int format, int w)
{
+#ifdef WL_SHM_FORMAT_RGB565
if (format == WL_SHM_FORMAT_RGB565)
return 2 * w;
else /* ARGB8888 || XRGB8888 */
+#endif
return 4 * w;
}
@@ -1672,9 +1674,13 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
goto cleanup_surf;
+#ifdef WL_SHM_FORMAT_RGB565
if (conf->RedSize == 5)
dri2_surf->format = WL_SHM_FORMAT_RGB565;
else if (conf->AlphaSize == 0)
+#else
+ if (conf->AlphaSize == 0)
+#endif
dri2_surf->format = WL_SHM_FORMAT_XRGB8888;
else
dri2_surf->format = WL_SHM_FORMAT_ARGB8888;
@@ -1728,9 +1734,11 @@ shm_handle_format(void *data, struct wl_shm *shm, uint32_t format)
case WL_SHM_FORMAT_XRGB8888:
dri2_dpy->formats |= HAS_XRGB8888;
break;
+#ifdef WL_SHM_FORMAT_RGB565
case WL_SHM_FORMAT_RGB565:
dri2_dpy->formats |= HAS_RGB565;
break;
+#endif
}
}
--
1.8.4.5