SHA256
1
0
forked from pool/Mesa

- updated to latest available version of

* u_mesa-8.0-llvmpipe-shmget.patch
  * u_mesa-8.0.1-fix-16bpp.patch
  and applying it now in the opposite order.

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=325
This commit is contained in:
Stefan Dirsch 2013-09-16 13:16:25 +00:00 committed by Git OBS Bridge
parent ef687dd16a
commit 394bdb02b1
4 changed files with 140 additions and 18 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Sep 16 12:44:53 UTC 2013 - sndirsch@suse.com
- updated to latest available version of
* u_mesa-8.0-llvmpipe-shmget.patch
* u_mesa-8.0.1-fix-16bpp.patch
and applying it now in the opposite order.
-------------------------------------------------------------------
Fri Sep 13 12:53:33 UTC 2013 - duwe@suse.com

View File

@ -528,8 +528,8 @@ poor video quality, choppy videos and artefacts all over.
# remove some docs
rm -rf docs/README.{VMS,WIN32,OS2}
#%patch11 -p1
%patch13 -p1
%patch15 -p1
%patch13 -p1
%if %egl_gallium
%patch16 -p1
%endif

View File

@ -1,3 +1,43 @@
From c617fb498b2315efdccd799b8efb7a18a758fb36 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Thu, 22 Mar 2012 09:29:19 +0000
Subject: [PATCHv4] glx: Use ShmGetImage if possible.
v2: Adam Jackson <ajax@redhat.com>
Fix image pitch bug.
v3: Adam Jackson <ajax@redhat.com>
Rediff for 8.1
v4: Stefan Brüns <stefan.bruens@rwth-aachen.de>
The patch handles failing XShmAttach with a special error handler, but in case
of an error it called XShmDetach unconditionally and unprotected. As there is
no XSync it failed later on the first call to a function causing a XSync.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=917687
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=807205
---
NOTE:
v3 has not been applied on Fedora for a while (since 9.0):
http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?h=f18&id=9058f5a
# this fastpath is:
# - broken with swrast classic
# - broken on 24bpp
# - not a huge win anyway
# - ABI-broken wrt upstream
# - eventually obsoleted by vgem
#
# dear ajax: fix this one way or the other
#patch9 -p1 -b .shmget
#patch12 -p1 -b .16bpp
v4 solves an issue on openSUSE:12.2.
---
src/gallium/state_trackers/dri/sw/drisw.c | 11 ---
src/glx/drisw_glx.c | 114 +++++++++++++++++++++++++++++-
2 files changed, 113 insertions(+), 12 deletions(-)
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 41f66d5..28beb80 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
@ -28,7 +68,7 @@ index 41f66d5..28beb80 100644
}
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 832e964..feac747 100644
index 0583cd1..5643f15 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -24,6 +24,9 @@
@ -45,7 +85,7 @@ index 832e964..feac747 100644
ximage->data = NULL;
}
+static int shm_error;
+static int shm_error = 0;
+
+static int
+shm_handler(Display *d, XErrorEvent *e)
@ -79,7 +119,7 @@ index 832e964..feac747 100644
+ XShmSegmentInfo seg = { 0, -1, (void *)-1, 0 };
+ int (*old_handler)(Display *, XErrorEvent *);
+
+ if (!XShmQueryExtension(dpy))
+ if (shm_error || !XShmQueryExtension(dpy))
+ goto out;
+
+ /* image setup */
@ -126,7 +166,7 @@ index 832e964..feac747 100644
+out:
+ ximage->obdata = NULL;
+ ximage->data = NULL;
+ shm_error = 0;
+ if (shm_error == 0)
+ XShmDetach(dpy, &seg);
+ if (seg.shmaddr != (void *)-1)
+ shmdt(seg.shmaddr);
@ -138,7 +178,7 @@ index 832e964..feac747 100644
static void
swrastGetImage(__DRIdrawable * read,
int x, int y, int w, int h,
@@ -220,11 +313,17 @@ swrastGetImage(__DRIdrawable * read,
@@ -220,13 +313,32 @@ swrastGetImage(__DRIdrawable * read,
readable = pread->xDrawable;
ximage = prp->ximage;
@ -156,4 +196,22 @@ index 832e964..feac747 100644
+
XGetSubImage(dpy, readable, x, y, w, h, ~0L, ZPixmap, ximage, 0, 0);
+ do {
+ int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256);
+ int line;
+
+ if (dst_width != ximage->bytes_per_line) {
+ for (line = ximage->height-1; line; line--) {
+ memmove(&data[dst_width * line],
+ &data[ximage->bytes_per_line * line],
+ dst_width);
+ }
+ }
+ } while (0);
+
ximage->data = NULL;
}
--
1.8.1.4

View File

@ -1,5 +1,57 @@
From 60fe1551667dba2cb9afa085fdff0cbc351a3e73 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Mon, 2 Apr 2012 16:27:19 +0000
Subject: [PATCH 2/2] glx: Fix 16bpp in llvmpipe.
v2: Richard Hughes <richard@hughsie.com>
Rebuild with new git snapshot
- Remove upstreamed patches
v3: Johannes Obermayr <johannesobermayr@gmx.de>
Revert changes made in v2.
---
v2 has not been applied on Fedora for a while (since 9.0):
http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?h=f18&id=9058f5a
# this fastpath is:
# - broken with swrast classic
# - broken on 24bpp
# - not a huge win anyway
# - ABI-broken wrt upstream
# - eventually obsoleted by vgem
#
# dear ajax: fix this one way or the other
#patch9 -p1 -b .shmget
#patch12 -p1 -b .16bpp
This "broken on 24bpp" could be because v2 removed changes which depend on
XShmGetImage patch. I assume Richard didn't notice this dependency and thought
changes were upstreamed:
http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?id=43e76b8
So revert v2 and apply XShmGetImage patch before.
---
src/glx/drisw_glx.c | 4 +++-
src/mesa/state_tracker/st_manager.c | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 08fa1d9..f94fa4b 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -277,7 +277,9 @@ swrastShmGetImage(__DRIdrawable *read, char *data, struct drisw_drawable *prp)
do {
int i;
char *src = ximage->data;
- int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256);
+ int bytes_per_pixel = ((ximage->bits_per_pixel + 7) / 8);
+ int dst_width = align(ximage->width * bytes_per_pixel,
+ 64 * bytes_per_pixel);
for (i = 0; i < ximage->height; i++) {
memcpy(data, src, ximage->bytes_per_line);
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 9c2b4d2..660ab16 100644
index 9c2b4d2..c6a3189 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -512,6 +512,9 @@ st_context_teximage(struct st_context_iface *stctxi,
@ -11,3 +63,7 @@ index 9c2b4d2..660ab16 100644
+ internalFormat = GL_RGB5;
else
internalFormat = GL_RGB;
--
1.8.1.4