packages: Mesa/Mesa.spec, Mesa/intel-fix-invalidate-before-initialisation.d...

arekm arekm at pld-linux.org
Sun Aug 29 18:50:19 CEST 2010


Author: arekm                        Date: Sun Aug 29 16:50:19 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; intel segfault fix

---- Files affected:
packages/Mesa:
   Mesa.spec (1.253 -> 1.254) , intel-fix-invalidate-before-initialisation.diff (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/Mesa/Mesa.spec
diff -u packages/Mesa/Mesa.spec:1.253 packages/Mesa/Mesa.spec:1.254
--- packages/Mesa/Mesa.spec:1.253	Fri Aug 27 19:46:30 2010
+++ packages/Mesa/Mesa.spec	Sun Aug 29 18:50:13 2010
@@ -36,7 +36,7 @@
 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
@@ -45,6 +45,7 @@
 # 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
@@ -640,6 +641,7 @@
 %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"
@@ -981,6 +983,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.254  2010/08/29 16:50:13  arekm
+- rel 2; intel segfault fix
+
 Revision 1.253  2010/08/27 17:46:30  qboosh
 - updated dri2proto version
 

================================================================
Index: packages/Mesa/intel-fix-invalidate-before-initialisation.diff
diff -u /dev/null packages/Mesa/intel-fix-invalidate-before-initialisation.diff:1.1
--- /dev/null	Sun Aug 29 18:50:19 2010
+++ packages/Mesa/intel-fix-invalidate-before-initialisation.diff	Sun Aug 29 18:50:13 2010
@@ -0,0 +1,73 @@
+From dd7853f327ad7a286a59c9c5956d4989c31a58fa Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at 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 at 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
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/Mesa/Mesa.spec?r1=1.253&r2=1.254&f=u



More information about the pld-cvs-commit mailing list