Hello community,

here is the log from the commit of package Mesa.1592 for openSUSE:12.3:Update 
checked in at 2013-04-23 15:35:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/Mesa.1592 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.Mesa.1592.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "Mesa.1592", Maintainer is ""

Changes:
--------
New Changes file:

--- /dev/null   2013-04-05 00:01:41.916011506 +0200
+++ /work/SRC/openSUSE:12.3:Update/.Mesa.1592.new/Mesa.changes  2013-04-23 
15:35:21.000000000 +0200
@@ -0,0 +1,1803 @@
+-------------------------------------------------------------------
+Fri Apr 12 16:55:17 UTC 2013 - [email protected]
+
+- Add mesa-i965-render-between-hiz-flushes.patch: i965: Make sure
+  we do render between two hiz flushes (fdo#62141, bnc#814947)
+
+-------------------------------------------------------------------
+Thu Jan 24 14:48:18 UTC 2013 - [email protected]
+
+- update to Mesa 9.0.2: a bugfix release
+ * [KMS] mesa demo spectex broken on rv280 (fdo#22576)
+ * KMS/R200: Bad shading in NWN since Mesa rewrite (fdo#26809)
+ * [bisected regression] Oglc fbo(negative.invalidParams3)
+   Segmentation fault (fdo#45877)
+ * st_glsl_to_tgsi.cpp:4006:dst_register: Assertion 
+   `index < VERT_RESULT_MAX' failed (fdo#54402)
+ * Memoryleak with glPopAttrib only on Intel GM45 (fdo#55175)
+ * glcpp accepts junk after #else/#elif/#endif tokens (fdo#56442)
+ * EGL sets error to EGL_SUCCESS when DRI driver fails to create
+   context (fdo#56706)
+ * Webgl conformance shader-with-non-reserved-words crash. (fdo#57622)
+ * r200: Culling is broken when rendering to an FBO (fdo#57842)
+ * r300g: blend sfactor=GL_DST_COLOR fails with FBOs (fdo#57984)
+ * [llvmpipe] src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c:75:analyse_src: 
Assertion `src->Index < (sizeof(ctx->imm)/sizeof((ctx->imm)[0]))' failed. 
(fdo#58545)
+ * src/glsl/tests/Makefile.am missing $(top_srcdir)/include (fdo#59383)
+
+-------------------------------------------------------------------
+Wed Jan 23 11:55:36 UTC 2013 - [email protected]
+
+- reverted removing Libs.private/Requires.private in pkgconfig
+  files
+
+-------------------------------------------------------------------
+Sat Jan 19 14:32:46 UTC 2013 - [email protected]
+
+- enable llvm backend also for ARM
+
+-------------------------------------------------------------------
+Fri Jan 18 17:04:12 UTC 2013 - [email protected]
+- Add requires for Mesa to Mesa-libGL1 in baselibs.conf
+ * Mesa required for many applications in wine
+ * wine-32bit pulls through Mesa-libGL1-32bit without Mesa-32bit
+
+-------------------------------------------------------------------
+Sat Jan  5 15:28:51 UTC 2013 - [email protected]
+
+- Remove Requires.private and Libs.private from *.pc files
+ * Both are needed only for static linking
+ * This package provides only shared libraries
+ * the rpm pkgconfig dependency generator considers "Requires.private"
+   a valid dependency even though there are no static libraries in the 
+   packages
+ * This cause bloat and hides broken "buildRequires" in other packages.
+
+-------------------------------------------------------------------
+Fri Dec 14 11:00:21 UTC 2012 - [email protected]
+
+- Remove unrecognized configure option "--disable-glu"
+
+-------------------------------------------------------------------
+Mon Dec 10 13:22:01 UTC 2012 - [email protected]
+
+- Update to Version 9.0.1
+  * bug fix release
+
+-------------------------------------------------------------------
+Tue Oct 16 18:09:16 UTC 2012 - [email protected]
+
+- improved packages descriptions 
+
+-------------------------------------------------------------------
+Mon Oct  8 23:36:24 UTC 2012 - [email protected]
+
+- Update to version 9.0:
+  Mesa 9.0 has been released.  Mesa 9.0 is a feature release.
+  "The" big feature is the availability of OpenGL 3.1 on some
+  supported hardware.
+  + Remove the Git Commit ID
+
+-------------------------------------------------------------------
+Tue Sep 25 15:28:52 UTC 2012 - [email protected]
+
+- Update the Mesa 9.0 Git Snapshot
+  + Add the Git CommitID to the buildscript
+  + Minor cleanup of the buildscript
+
+-------------------------------------------------------------------
+Mon Sep 24 17:04:35 UTC 2012 - [email protected]
+
+- removed any .la file
+- moved libglapi.so from Mesa-devel to Mesa-libglapi-devel package;
+  Mesa-devel requires Mesa-libglapi-devel package anyway
+
+-------------------------------------------------------------------
+Fri Sep 21 08:28:28 UTC 2012 - [email protected]
+
+- fixed libOSMesa packaging (only a dangling symlink has been
+  packaged) 
+
+-------------------------------------------------------------------
+Fri Sep 21 07:08:05 UTC 2012 - [email protected]
+
+- fix baselibs.conf after package split
+
+-------------------------------------------------------------------
+Thu Sep 20 13:05:15 UTC 2012 - [email protected]
+
+- instead of using "make install" for installing libIndirectGL/
+  libOSMesa, do install these libs manually, so we no longer end
+  up with linking *everything* against libIndirectGL (instead of
+  having it correctly linked against GL!)
+
+-------------------------------------------------------------------
+Fri Aug 24 22:22:28 UTC 2012 - [email protected]
+
+- Update to 8.1 prerelease:
+  + Added radeonsi to the dri drivers for x86/x86_64
+  + Rewrite the configuration parts of the spec file
+  + Changed u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
+    to apply!
+  + Changed u_remove-os-abi-tag.patch to apply! (Removed parts of it)
+  + Changed u_mesa-8.0.1-fix-16bpp.patch to apply! (Removed parts of it)
+  + Remove upstreamed patches: (double checked)
+    - upstream-llvm-patch.diff
+    - U_i965-gen7-Reduce-GT1-WM-thread-count-according-to-up.patch
+
+-------------------------------------------------------------------
+Thu Aug 23 15:29:34 UTC 2012 - [email protected]
+
+- Add u_mesa-8.0-llvmpipe-shmget.patch (Fedora): use shmget under
+  llvmpipe, if available (bnc#766498).
+- Update u_mesa-8.0.1-fix-16bpp.patch to work with shmget patch.
+
+-------------------------------------------------------------------
+Wed Aug  8 15:43:20 CEST 2012 - [email protected]
+
+- U_i965-gen7-Reduce-GT1-WM-thread-count-according-to-up.patch
+  * Fix GPU hang with IVB GT1 desktop (bnc#775048)
+
+-------------------------------------------------------------------
+Tue Jul 10 23:42:04 UTC 2012 - [email protected]
+
+- Update to Version 8.0.4 (minor bugfix release)
+- Back to bz2 tarballs
+
+-------------------------------------------------------------------
+Sat Jun 16 09:58:59 UTC 2012 - [email protected]
+
+- remove buildrequire on vim, it creates a pretty big cycle for
+  no (obvious) benefit
+
+-------------------------------------------------------------------
+Tue Jun 12 15:53:50 UTC 2012 - [email protected]
+
+- enabled build of XvMC/VDPAU state trackers for Nouveau, R300,
+  R600, Softpipe (Software implementation)
+
+-------------------------------------------------------------------
+Tue Jun 12 10:19:01 UTC 2012 - [email protected]
+
+- u_remove-os-abi-tag.patch 
+  * Remove OS ABI tag from libGL, so it is no longer preferred over
+    libGLs without OS ABI tag (bnc#765294, fdo#26663)
+
+-------------------------------------------------------------------
+Fri Jun  8 14:05:30 UTC 2012 - [email protected]
+
+- let libGL1-Mesa require Mesa, since that package includes the DRI
+  drivers (including the "swrast" DRI driver for software rendering)
+  (bnc#765241)
+
+-------------------------------------------------------------------
+Wed May 30 16:56:11 UTC 2012 - [email protected]
+
+- Add u_mesa-8.0.1-fix-16bpp.patch (Fedora): fix 16bpp mode under
+  llvmpipe.
+
+-------------------------------------------------------------------
+Sat May 26 22:29:41 UTC 2012 - [email protected]
+
+- added configure options "--enable-gbm --enable-glx-tls" (required
+  for glamor support)
+
+-------------------------------------------------------------------
+Fri May 25 15:57:25 UTC 2012 - [email protected]
+
+- libxatracker is also not built on ppc*.
+
+-------------------------------------------------------------------
+Mon May 21 12:32:23 UTC 2012 - [email protected]
+
+- Trivial change to Version 8.0.3; tarball from here:
+  http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-8.0.3.tar.gz 
+
+-------------------------------------------------------------------
+Wed May 16 10:28:30 UTC 2012 - [email protected]
+
++++ 1606 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.Mesa.1592.new/Mesa.changes

New:
----
  Mesa-nodate.diff
  Mesa-rpmlintrc
  Mesa.changes
  Mesa.spec
  MesaLib-9.0.2.tar.bz2
  README.updates
  baselibs.conf
  drirc
  manual-pages.tar.bz2
  mesa-i965-render-between-hiz-flushes.patch
  u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
  u_mesa-8.0-llvmpipe-shmget.patch
  u_mesa-8.0.1-fix-16bpp.patch
  u_remove-os-abi-tag.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ Mesa.spec ++++++
++++ 794 lines (skipped)

++++++ Mesa-nodate.diff ++++++
>From da91936f74e4195fbb3ed4da0eaecb9f1ec66972 Mon Sep 17 00:00:00 2001
From: Tobias Johannes Klausmann <[email protected]>
Date: Fri, 20 Apr 2012 14:09:50 +0200
Subject: [PATCH] PATCH-FIX-OPENSUSE do not put dates in sources to fix
 build-compare

---
 src/mesa/main/es_generator.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
index cad3dea..0dde6f7 100644
--- a/src/mesa/main/es_generator.py
+++ b/src/mesa/main/es_generator.py
@@ -182,9 +182,8 @@ print """/* DO NOT EDIT 
*************************************************
  * THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT
  * API specification file:   %s
  * GLES version:             %s
- * date:                     %s
  */
-""" % (program, functionList, version, time.strftime("%Y-%m-%d %H:%M:%S"))
+""" % (program, functionList, version)
 
 # The headers we choose are version-specific.
 print """
-- 
1.7.7

++++++ Mesa-rpmlintrc ++++++
# Want to allow for multiple vendors
addFilter("shlib-policy-name-error")
++++++ README.updates ++++++
DRI Driver update mechanism
---------------------------

If any corresponding DRI driver is found in "/usr/lib/dri/updates/"
it will be favored over the one in "/usr/lib/dri/" and will be used
for 32/64 bit applications.

On 32/64 bit biarch platforms additionally a corresponding DRI driver
in "/usr/lib64/dri/updates/" will be favored over the one in 
"/usr/lib64/dri/" and will be used for 64bit applications.
++++++ baselibs.conf ++++++
Mesa
        +/usr/X11R6/lib(64)?/modules/dri/updates/README.updates
        obsoletes "XFree86-Mesa-<targettype> xorg-x11-Mesa-<targettype>"
        provides  "XFree86-Mesa-<targettype> xorg-x11-Mesa-<targettype>"
Mesa-devel
        #We need Mesa-<targettype>!, do not put requires -Mesa-<targettype>.
        requires "Mesa-libEGL-devel-<targettype> = <version>"
        requires "Mesa-libGL-devel-<targettype> = <version>"
        requires "Mesa-libGLESv1_CM-devel-<targettype> = <version>"
        requires "Mesa-libGLESv2-devel-<targettype> = <version>"
        requires "Mesa-libIndirectGL1-<targettype> = <version>"
        requires "Mesa-libIndirectGL-devel-<targettype> = <version>"
        requires "libOSMesa9-<targettype> = <version>"
        requires "libOSMesa-devel-<targettype> = <version>"
        requires "libgbm-devel-<targettype>"
        requires "Mesa-libglapi0-<targettype> = <version>"
        requires "Mesa-libglapi-devel-<targettype> = <version>"
        obsoletes "XFree86-Mesa-devel-<targettype> 
xorg-x11-Mesa-devel-<targettype>"
        provides  "XFree86-Mesa-devel-<targettype> 
xorg-x11-Mesa-devel-<targettype>"
Mesa-libEGL1
Mesa-libEGL-devel
        requires -Mesa-libEGL-<targettype>
        requires "Mesa-libEGL1-<targettype> = <version>"
Mesa-libGL1
        requires "Mesa-<targettype>"
Mesa-libGL-devel
        requires -Mesa-libGL-<targettype>
        requires "Mesa-libGL1-<targettype> = <version>"
Mesa-libGLESv1_CM1
Mesa-libGLESv1_CM-devel
        requires -Mesa-libGLESv1_CM-<targettype>
        requires "Mesa-libGLESv1_CM1-<targettype> = <version>"
Mesa-libGLESv2-2
Mesa-libGLESv2-devel
        requires -Mesa-libGLESv2-<targettype>
        requires "Mesa-libGLESv2-2-<targettype> = <version>"
Mesa-libIndirectGL1
Mesa-libIndirectGL-devel
        requires -Mesa-libIndirectGL-<targettype>
        requires "Mesa-libIndirectGL1-<targettype> = <version>"
libOSMesa9
libOSMesa-devel
        requires -libOSMesa-<targettype>
        requires "libOSMesa9-<targettype> = <version>"
libgbm1
libgbm-devel
        requires -libgbm-<targettype>
        requires "libgbm1-<targettype> = <version>"
Mesa-libglapi0
Mesa-libglapi-devel
        requires -Mesa-libglapi-<targettype>
        requires "Mesa-libglapi0-<targettype> = <version>"
libXvMC_nouveau
libXvMC_r300
libXvMC_r600
libXvMC_softpipe
libvdpau_nouveau
libvdpau_r300
libvdpau_r600
libvdpau_radeonsi
libvdpau_softpipe
++++++ drirc ++++++
<driconf>
    <device screen="0" driver="i915">
        <application name="Default">
            <option name="vblank_mode" value="0" />
        </application>
    </device>
    <device screen="0" driver="i965">
        <application name="Default">
            <option name="vblank_mode" value="0" />
        </application>
    </device>
    <device screen="0" driver="r300">
        <application name="Default">
            <option name="vblank_mode" value="0" />
            <option name="force_s3tc_enable" value="false" />
            <option name="disable_lowimpact_fallback" value="true" />
        </application>
    </device>
</driconf>
++++++ mesa-i965-render-between-hiz-flushes.patch ++++++
>From 1547bb37e97c8d7069d5be4e8b9b0d34ac28f7e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= <[email protected]>
Date: Tue, 17 Apr 2012 18:17:35 -0700
Subject: [PATCH 2/2] i965: Make sure we do render between two hiz flushes

Hiz flushes touch the URB allocation, which doesn't work if you don't
draw in between. This includes on startup where the GPU hasn't been
used and we lockup. To avoid this situation make sure that some
primitives get rendered before every hiz flush.
---
 src/mesa/drivers/dri/i965/brw_context.c |    1 +
 src/mesa/drivers/dri/i965/brw_context.h |    1 +
 src/mesa/drivers/dri/i965/brw_draw.c    |   12 +++++++++---
 3 files changed, 11 insertions(+), 3 deletions(-)

Index: Mesa-9.0.2/src/mesa/drivers/dri/i965/brw_context.c
===================================================================
--- Mesa-9.0.2.orig/src/mesa/drivers/dri/i965/brw_context.c
+++ Mesa-9.0.2/src/mesa/drivers/dri/i965/brw_context.c
@@ -325,6 +325,7 @@ brwCreateContext(int api,
         brw->urb.max_gs_entries = 256;
       }
       brw->urb.gen6_gs_previously_active = false;
+      brw->urb.prims_since_last_flush = 0;
    } else if (intel->gen == 5) {
       brw->urb.size = 1024;
       brw->max_vs_threads = 72;
Index: Mesa-9.0.2/src/mesa/drivers/dri/i965/brw_context.h
===================================================================
--- Mesa-9.0.2.orig/src/mesa/drivers/dri/i965/brw_context.h
+++ Mesa-9.0.2/src/mesa/drivers/dri/i965/brw_context.h
@@ -849,6 +849,7 @@ struct brw_context
        * URB space for the GS.
        */
       bool gen6_gs_previously_active;
+      int prims_since_last_flush;
    } urb;
 
    
Index: Mesa-9.0.2/src/mesa/drivers/dri/i965/brw_draw.c
===================================================================
--- Mesa-9.0.2.orig/src/mesa/drivers/dri/i965/brw_draw.c
+++ Mesa-9.0.2/src/mesa/drivers/dri/i965/brw_draw.c
@@ -293,10 +293,14 @@ static void brw_merge_inputs( struct brw
  * Resolve the depth buffer's HiZ buffer and resolve the depth buffer of each
  * enabled depth texture.
  *
+ * We don't resolve the depth buffer's HiZ if no primitives have been drawn
+ * since the last flush. This avoids a case where we lockup the GPU on boot
+ * when this is the first thing we do.
+ *
  * (In the future, this will also perform MSAA resolves).
  */
 static void
-brw_predraw_resolve_buffers(struct brw_context *brw)
+brw_predraw_resolve_buffers(struct brw_context *brw, int nr_prims)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct intel_context *intel = &brw->intel;
@@ -305,9 +309,11 @@ brw_predraw_resolve_buffers(struct brw_c
 
    /* Resolve the depth buffer's HiZ buffer. */
    depth_irb = intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_DEPTH);
-   if (depth_irb)
+   if (depth_irb && brw->urb.prims_since_last_flush > 0 )
       intel_renderbuffer_resolve_hiz(intel, depth_irb);
 
+   brw->urb.prims_since_last_flush = nr_prims;
+
    /* Resolve depth buffer of each enabled depth texture. */
    for (int i = 0; i < BRW_MAX_TEX_UNIT; i++) {
       if (!ctx->Texture.Unit[i]._ReallyEnabled)
@@ -438,7 +444,7 @@ static bool brw_try_draw_prims( struct g
     * and finalizing textures but before setting up any hardware state for
     * this draw call.
     */
-   brw_predraw_resolve_buffers(brw);
+   brw_predraw_resolve_buffers(brw, nr_prims);
 
    /* Bind all inputs, derive varying and size information:
     */
++++++ u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch ++++++
>From 26de08de6f27a5fe5fc6aaeee0ebedf40626ab04 Mon Sep 17 00:00:00 2001
From: Tobias Johannes Klausmann <[email protected]>
Date: Fri, 20 Apr 2012 11:52:31 +0200
Subject: [PATCH] When glXBindTexImageEXT is called and SWrast is used there
 will be a crash when sPriv->swrast_loader->getImage() is
 called from swrastSetTexBuffer2(). Reason: no memory has
 been allocated for the destination thus texImage->Data is
 NULL. Call ctx->Driver.TexImage2D() to initialize this. If
 memory has been allocated in a previous call free it first.

Signed-off-by: Egbert Eich <[email protected]>

for 8.0.1

Ported to 8.0.2
Ported to 8.1
---
 src/mesa/drivers/dri/swrast/swrast.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/swrast/swrast.c 
b/src/mesa/drivers/dri/swrast/swrast.c
index d18dd09..dd7d0c0 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -66,6 +66,7 @@
 static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
                                GLint texture_format, __DRIdrawable *dPriv)
 {
+    GET_CURRENT_CONTEXT(ctx);
     struct dri_context *dri_ctx;
     int x, y, w, h;
     __DRIscreen *sPriv = dPriv->driScreenPriv;
@@ -96,6 +97,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint 
target,
 
     _mesa_init_teximage_fields(&dri_ctx->Base, texImage,
                               w, h, 1, 0, internalFormat, texFormat);
+    
+    if (texImage->Data)
+       ctx->Driver.FreeTexImageData(ctx, texImage);
+    
+    ctx->Driver.TexImage2D(ctx, target, 0, internalFormat,
+                          w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
+                          NULL, &ctx->Unpack, texObj, texImage);
 
     sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)swImage->Buffer,
                                   dPriv->loaderPrivate);
-- 
1.7.7

++++++ u_mesa-8.0-llvmpipe-shmget.patch ++++++
diff -up mesa-20120424/src/gallium/state_trackers/dri/sw/drisw.c.jx 
mesa-20120424/src/gallium/state_trackers/dri/sw/drisw.c
--- mesa-20120424/src/gallium/state_trackers/dri/sw/drisw.c.jx  2012-04-24 
07:37:03.000000000 -0400
+++ mesa-20120424/src/gallium/state_trackers/dri/sw/drisw.c     2012-05-16 
13:30:36.596312047 -0400
@@ -252,8 +252,6 @@ drisw_update_tex_buffer(struct dri_drawa
    struct pipe_transfer *transfer;
    char *map;
    int x, y, w, h;
-   int ximage_stride, line;
-   int cpp = util_format_get_blocksize(res->format);
 
    get_drawable_info(dPriv, &x, &y, &w, &h);
 
@@ -266,14 +264,6 @@ drisw_update_tex_buffer(struct dri_drawa
    /* Copy the Drawable content to the mapped texture buffer */
    get_image(dPriv, x, y, w, h, map);
 
-   /* The pipe transfer has a pitch rounded up to the nearest 64 pixels. */
-   ximage_stride = w * cpp;
-   for (line = h-1; line; --line) {
-      memmove(&map[line * transfer->stride],
-              &map[line * ximage_stride],
-              ximage_stride);
-   }
-
    pipe_transfer_unmap(pipe, transfer);
    pipe_transfer_destroy(pipe, transfer);
 }
diff -up mesa-20120424/src/glx/drisw_glx.c.jx mesa-20120424/src/glx/drisw_glx.c
--- mesa-20120424/src/glx/drisw_glx.c.jx        2012-04-24 07:37:03.000000000 
-0400
+++ mesa-20120424/src/glx/drisw_glx.c   2012-05-16 13:29:25.087965268 -0400
@@ -24,6 +24,9 @@
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 
 #include <X11/Xlib.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
 #include "glxclient.h"
 #include <dlfcn.h>
 #include "dri_common.h"
@@ -206,6 +209,96 @@ swrastPutImage(__DRIdrawable * draw, int
    ximage->data = NULL;
 }
 
+static int shm_error;
+
+static int
+shm_handler(Display *d, XErrorEvent *e)
+{
+    shm_error = 1;
+    return 0;
+}
+
+static int
+align(int value, int alignment)
+{
+   return (value + alignment - 1) & ~(alignment - 1);
+}
+
+/*
+ * Slight fast path.  Short of changing how texture memory is allocated, we
+ * have two options for getting the pixels out.  GetImage is clamped by the
+ * server's write buffer size, so you end up doing lots of relatively small
+ * requests (128k each or so), with two memcpys: down into the kernel, and
+ * then back up.  ShmGetImage is one big blit into the shm segment (which
+ * could be GPU DMA, in principle) and then another one here.
+ */
+static Bool
+swrastShmGetImage(__DRIdrawable *read, char *data, struct drisw_drawable *prp)
+{
+    __GLXDRIdrawable *pread = &(prp->base);
+    Display *dpy = pread->psc->dpy;
+    XImage *ximage = prp->ximage;
+    unsigned long image_size = ximage->height * ximage->bytes_per_line;
+    Bool ret = 0;
+    XShmSegmentInfo seg = { 0, -1, (void *)-1, 0 };
+    int (*old_handler)(Display *, XErrorEvent *);
+
+    if (!XShmQueryExtension(dpy))
+       goto out;
+
+    /* image setup */
+    seg.shmid = shmget(IPC_PRIVATE, image_size, IPC_CREAT | 0777);
+    if (seg.shmid < 0)
+       goto out;
+
+    seg.shmaddr = shmat(seg.shmid, NULL, 0);
+    if (seg.shmaddr == (void *)-1)
+       goto out;
+
+    XSync(dpy, 0);
+    old_handler = XSetErrorHandler(shm_handler);
+    XShmAttach(dpy, &seg);
+    XSync(dpy, 0);
+    XSetErrorHandler(old_handler);
+    if (shm_error)
+       goto out;
+
+    ximage->data = seg.shmaddr;
+    ximage->obdata = &seg;
+    if (!XShmGetImage(dpy, pread->xDrawable, ximage, 0, 0, -1))
+       goto out;
+
+    /*
+     * ShmGetImage doesn't actually pay attention to ->bytes_per_line.
+     * We have to compensate for this somewhere since llvmpipe's natural
+     * tile width is 64.  Do it here so we don't have to undo it with a
+     * bunch of memmove in the driver.
+     */
+    do {
+       int i;
+       char *src = ximage->data;
+       int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256);
+
+       for (i = 0; i < ximage->height; i++) {
+           memcpy(data, src, ximage->bytes_per_line);
+           data += dst_width;
+           src += ximage->bytes_per_line;
+       }
+    } while (0);
+    ret = 1;
+
+out:
+    ximage->obdata = NULL;
+    ximage->data = NULL;
+    shm_error = 0;
+    XShmDetach(dpy, &seg);
+    if (seg.shmaddr != (void *)-1)
+       shmdt(seg.shmaddr);
+    if (seg.shmid > -1)
+       shmctl(seg.shmid, IPC_RMID, NULL);
+    return ret;
+}
+
 static void
 swrastGetImage(__DRIdrawable * read,
                int x, int y, int w, int h,
@@ -220,11 +313,17 @@ swrastGetImage(__DRIdrawable * read,
    readable = pread->xDrawable;
 
    ximage = prp->ximage;
-   ximage->data = data;
    ximage->width = w;
    ximage->height = h;
    ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32);
 
+   /* XXX check dimensions, if any caller ever sub-images */
+   if (swrastShmGetImage(read, data, prp))
+      return;
+
+   /* shm failed, fall back to protocol */
+   ximage->data = data;
+
    XGetSubImage(dpy, readable, x, y, w, h, ~0L, ZPixmap, ximage, 0, 0);
 
    ximage->data = NULL;
++++++ u_mesa-8.0.1-fix-16bpp.patch ++++++
diff -up Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx 
Mesa-8.0.1/src/mesa/state_tracker/st_manager.c
--- Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx   2012-02-14 
18:44:00.000000000 -0500
+++ Mesa-8.0.1/src/mesa/state_tracker/st_manager.c      2012-04-02 
12:02:14.613964417 -0400
@@ -528,6 +528,9 @@ st_context_teximage(struct st_context_if
       if (util_format_get_component_bits(internal_format,
                UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
          internalFormat = GL_RGBA;
+      else if (util_format_get_component_bits(internal_format,
+                 UTIL_FORMAT_COLORSPACE_RGB, 0) == 5)
+         internalFormat = GL_RGB5;
       else
          internalFormat = GL_RGB;
 
++++++ u_remove-os-abi-tag.patch ++++++
Author: Stefan Dirsch <[email protected]>
Subject: Remove OS ABI tag from libGL, so it is no longer preferred over libGLs 
without OS ABI tag
References: bnc#765294, fdo#26663

diff -u -r -p mesa-8.0.3.orig//src/mapi/glapi/gen/gl_x86-64_asm.py 
mesa-8.0.3/src/mapi/glapi/gen/gl_x86-64_asm.py
--- mesa-8.0.3.orig//src/mapi/glapi/gen/gl_x86-64_asm.py        2012-06-12 
12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/glapi/gen/gl_x86-64_asm.py      2012-06-12 
12:09:17.000000000 +0200
@@ -181,7 +181,7 @@ class PrintGenericStubs(gl_XML.gl_print_
 
        def printRealFooter(self):
                print ''
-               print '#if defined(GLX_USE_TLS) && defined(__linux__)'
+               print '#if 0 && defined(__linux__)'
                print ' .section ".note.ABI-tag", "a"'
                print ' .p2align 2'
                print ' .long   1f - 0f   /* name length */'
diff -u -r -p mesa-8.0.3.orig//src/mapi/glapi/gen/gl_x86_asm.py 
mesa-8.0.3/src/mapi/glapi/gen/gl_x86_asm.py
--- mesa-8.0.3.orig//src/mapi/glapi/gen/gl_x86_asm.py   2012-06-12 
12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/glapi/gen/gl_x86_asm.py 2012-06-12 12:09:29.000000000 
+0200
@@ -189,7 +189,7 @@ class PrintGenericStubs(gl_XML.gl_print_
                print '\t\tALIGNTEXT16'
                print 'GLNAME(gl_dispatch_functions_end):'
                print ''
-               print '#if defined(GLX_USE_TLS) && defined(__linux__)'
+               print '#if 0 && defined(__linux__)'
                print ' .section ".note.ABI-tag", "a"'
                print ' .p2align 2'
                print ' .long   1f - 0f   /* name length */'
diff -u -r -p mesa-8.0.3.orig//src/mapi/mapi/entry_x86-64_tls.h 
mesa-8.0.3/src/mapi/mapi/entry_x86-64_tls.h
--- mesa-8.0.3.orig//src/mapi/mapi/entry_x86-64_tls.h   2012-06-12 
12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/mapi/entry_x86-64_tls.h 2012-06-12 12:10:20.000000000 
+0200
@@ -28,7 +28,7 @@
 
 #include "u_macros.h"
 
-#ifdef __linux__
+#if 0
 __asm__(".section .note.ABI-tag, \"a\"\n\t"
         ".p2align 2\n\t"
         ".long 1f - 0f\n\t"      /* name length */
diff -u -r -p mesa-8.0.3.orig//src/mapi/mapi/entry_x86_tls.h 
mesa-8.0.3/src/mapi/mapi/entry_x86_tls.h
--- mesa-8.0.3.orig//src/mapi/mapi/entry_x86_tls.h      2012-06-12 
12:07:39.000000000 +0200
+++ mesa-8.0.3/src/mapi/mapi/entry_x86_tls.h    2012-06-12 12:10:32.000000000 
+0200
@@ -29,7 +29,7 @@
 #include <string.h>
 #include "u_macros.h"
 
-#ifdef __linux__
+#if 0
 __asm__(".section .note.ABI-tag, \"a\"\n\t"
         ".p2align 2\n\t"
         ".long 1f - 0f\n\t"      /* name length */
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to