]> git.pld-linux.org Git - packages/Mesa.git/commitdiff
- rel 2; intel segfault fix MESA_7_8 auto/th/Mesa-7_8_2-2 auto/ti/Mesa-7_8_2-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 29 Aug 2010 16:50:13 +0000 (16:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Mesa.spec -> 1.254
    intel-fix-invalidate-before-initialisation.diff -> 1.1

Mesa.spec
intel-fix-invalidate-before-initialisation.diff [new file with mode: 0644]

index 83302bca7f8770fbc6631a7c54c8f9aba3b8b3d8..a38239fbb7c69bcefe39d7bf8bce123dfde9e30a 100644 (file)
--- a/Mesa.spec
+++ b/Mesa.spec
@@ -35,7 +35,7 @@ Summary:      Free OpenGL implementation
 Summary(pl.UTF-8):     Wolnodostępna implementacja standardu OpenGL
 Name:          Mesa
 Version:       7.8.2
-Release:       1%{?with_multigl:.mgl}
+Release:       2%{?with_multigl:.mgl}
 License:       MIT (core), SGI (GLU,libGLw) and others - see license.html file
 Group:         X11/Libraries
 Source0:       ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}Lib-%{version}.tar.bz2
@@ -44,6 +44,7 @@ Source1:      ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}Demos-%{version}.t
 # Source1-md5: 757d9e2e06f48b1a52848be9b0307ced
 Patch0:                %{name}-realclean.patch
 Patch1:                %{name}-tgsi_dump.patch
+Patch2:                intel-fix-invalidate-before-initialisation.diff
 URL:           http://www.mesa3d.org/
 %{?with_demos:BuildRequires:   OpenGL-glut-devel >= 3.8}
 BuildRequires: autoconf
@@ -639,6 +640,7 @@ Sterownik X.org DRI dla VMware.
 %setup -q -b1
 %patch0 -p0
 %patch1 -p1
+%patch2 -p1
 
 # fix demos
 find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/%{name}-%{version}/images/,g"
diff --git a/intel-fix-invalidate-before-initialisation.diff b/intel-fix-invalidate-before-initialisation.diff
new file mode 100644 (file)
index 0000000..3af5eed
--- /dev/null
@@ -0,0 +1,73 @@
+From dd7853f327ad7a286a59c9c5956d4989c31a58fa Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri, 16 Jul 2010 12:24:53 +0100
+Subject: [PATCH] intel: Fix invalidate before initialisation
+
+Fixes:
+
+  Bug 29091 - 1.9RC5 server crash when starting GLX 1.3 app with mesa 7.8
+              Intel dri2 driver.
+  https://bugs.freedesktop.org/show_bug.cgi?id=29091
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+ src/mesa/drivers/dri/common/dri_util.c    |    2 +-
+ src/mesa/drivers/dri/intel/intel_screen.c |   19 +++++++++++++++----
+ 2 files changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
+index 75c9882..9a9bfed 100644
+--- a/src/mesa/drivers/dri/common/dri_util.c
++++ b/src/mesa/drivers/dri/common/dri_util.c
+@@ -432,7 +432,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config,
+      */
+     (void) attrs;
+-    pdp = malloc(sizeof *pdp);
++    pdp = calloc(1, sizeof *pdp);
+     if (!pdp) {
+       return NULL;
+     }
+diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
+index 6e4bb64..083b7bb 100644
+--- a/src/mesa/drivers/dri/intel/intel_screen.c
++++ b/src/mesa/drivers/dri/intel/intel_screen.c
+@@ -102,10 +102,21 @@ static const __DRItexBufferExtension intelTexBufferExtension = {
+    intelSetTexBuffer2,
+ };
++static inline struct intel_context *
++to_intel_context(__DRIdrawable *drawable)
++{
++   if (drawable->driContextPriv == NULL)
++      return NULL;
++
++   return drawable->driContextPriv->driverPrivate;
++}
++
+ static void
+ intelDRI2Flush(__DRIdrawable *drawable)
+ {
+-   struct intel_context *intel = drawable->driContextPriv->driverPrivate;
++   struct intel_context *intel = to_intel_context(drawable);
++   if (!intel)
++      return;
+    if (intel->gen < 4)
+       INTEL_FIREVERTICES(intel);
+@@ -117,9 +128,9 @@ intelDRI2Flush(__DRIdrawable *drawable)
+ static void
+ intelDRI2Invalidate(__DRIdrawable *drawable)
+ {
+-   struct intel_context *intel = drawable->driContextPriv->driverPrivate;
+-
+-   intel->using_dri2_swapbuffers = GL_TRUE;
++   struct intel_context *intel = to_intel_context(drawable);
++   if (intel)
++      intel->using_dri2_swapbuffers = GL_TRUE;
+    dri2InvalidateDrawable(drawable);
+ }
+-- 
+1.7.1
+
This page took 0.047294 seconds and 4 git commands to generate.