- rewritten bogus patch 'n_Fixed-build-against-wayland-1.2.1.patch"

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=454
This commit is contained in:
Stefan Dirsch 2015-06-23 14:56:59 +00:00 committed by Git OBS Bridge
parent ab04f3beda
commit 1241ae63ad
2 changed files with 19 additions and 27 deletions

View File

@ -511,8 +511,10 @@ This package contains the VDPAU state tracker for radeonsi.
%setup -q -n %{_name_archive}-%{_version} -b4
# remove some docs
rm -rf docs/README.{VMS,WIN32,OS2}
%if 0%{?suse_version} < 1320
# required for building against wayland of openSUSE 13.1
%patch0 -p1
%endif
### disabled, but not dropped yet; these still need investigation in
### order to figure out whether the issue is still reproducable and
### hence a fix is required

View File

@ -1,55 +1,45 @@
From 5d277737eef98b4c5913bb5a29c16776c82c5d7c Mon Sep 17 00:00:00 2001
From 968a11158031d5d51e63f18cf4cddea7ae23177f Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch@suse.de>
Date: Tue, 23 Jun 2015 16:19:51 +0200
Date: Tue, 23 Jun 2015 16:43: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(+)
src/egl/drivers/dri2/platform_wayland.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index ea2f9f2..ee2b324 100644
index ea2f9f2..4351e08 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)
@@ -1236,9 +1236,6 @@ 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
- if (format == WL_SHM_FORMAT_RGB565)
- return 2 * w;
- else /* ARGB8888 || XRGB8888 */
return 4 * w;
}
@@ -1672,9 +1674,13 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
@@ -1672,9 +1669,7 @@ 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->RedSize == 5)
- dri2_surf->format = WL_SHM_FORMAT_RGB565;
- else if (conf->AlphaSize == 0)
+ 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)
@@ -1728,9 +1723,6 @@ 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
- case WL_SHM_FORMAT_RGB565:
- dri2_dpy->formats |= HAS_RGB565;
- break;
}
}