rpms/mesa/devel mesa-7.1-fbconfig-fix.patch, NONE, 1.1 mesa-7.1-visual-crash.patch, NONE, 1.1 mesa.spec, 1.175, 1.176

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Wed Apr 9 14:17:53 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/mesa/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17022

Modified Files:
	mesa.spec 
Added Files:
	mesa-7.1-fbconfig-fix.patch mesa-7.1-visual-crash.patch 
Log Message:
* Wed Apr 09 2008 Adam Jackson <ajax at redhat.com> 7.1-0.22
- mesa-7.1-visual-crash.patch: Fix a segfault if DRI unavailable.
- mesa-7.1-fbconfig-fix.patch: Fix fbconfig comparisons.


mesa-7.1-fbconfig-fix.patch:

--- NEW FILE mesa-7.1-fbconfig-fix.patch ---
>From 2771862adcbc163c0a3f3eaaf4b58c658e72f680 Mon Sep 17 00:00:00 2001
From: Jie Luo <clotho67 at gmail.com>
Date: Tue, 08  Apr  2008  23:17:06  +0000
Subject: Handle fbconfig comparison correctly for attributes the X server didn't send.

---
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index fd10047..70873c2 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -520,13 +520,13 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
 static int
 scalarEqual(__GLcontextModes *mode, unsigned int attrib, unsigned int value)
 {
-    unsigned int driValue;
+    unsigned int glxValue;
     int i;
 
     for (i = 0; i < ARRAY_SIZE(attribMap); i++)
 	if (attribMap[i].attrib == attrib) {
-	    driValue = *(unsigned int *) ((char *) mode + attribMap[i].offset);
-	    return driValue == value;
+	    glxValue = *(unsigned int *) ((char *) mode + attribMap[i].offset);
+	    return glxValue == GLX_DONT_CARE || glxValue == value;
 	}
 
     return GL_TRUE; /* Is a non-existing attribute equal to value? */
@@ -572,7 +572,8 @@ driConfigEqual(const __DRIcoreExtension *core,
 		glxValue |= GLX_TEXTURE_2D_BIT_EXT;
 	    if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT)
 		glxValue |= GLX_TEXTURE_RECTANGLE_BIT_EXT;
-	    if (glxValue != modes->bindToTextureTargets)
+	    if (modes->bindToTextureTargets != GLX_DONT_CARE &&
+		glxValue != modes->bindToTextureTargets)
 		return GL_FALSE;
 	    break;	
 
diff --git a/src/glx/x11/glcontextmodes.c b/src/glx/x11/glcontextmodes.c
index 58c548a..2a8e48d 100644
--- a/src/glx/x11/glcontextmodes.c
+++ b/src/glx/x11/glcontextmodes.c
@@ -415,7 +415,7 @@ _gl_context_modes_create( unsigned count, size_t minimum_size )
       (*next)->bindToTextureRgb = GLX_DONT_CARE;
       (*next)->bindToTextureRgba = GLX_DONT_CARE;
       (*next)->bindToMipmapTexture = GLX_DONT_CARE;
-      (*next)->bindToTextureTargets = 0;
+      (*next)->bindToTextureTargets = GLX_DONT_CARE;
       (*next)->yInverted = GLX_DONT_CARE;
 
       next = & ((*next)->next);
--
cgit v0.7.2-37-g538c

mesa-7.1-visual-crash.patch:

--- NEW FILE mesa-7.1-visual-crash.patch ---
>From c016f329abb3d638442bf0b0f27d8f34ebf54f86 Mon Sep 17 00:00:00 2001
From: Kristian Høgsberg <krh at redhat.com>
Date: Tue, 08  Apr  2008  22:26:24  +0000
Subject: Only convert configs if screen creation was successful.

Thanks to Adam Jackson for pointing it out.
---
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index 456bd4a..01b76ad 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -13,7 +13,7 @@ OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
 
 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
 
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lX11  -lXi -lXmu
 
 PROGS = \
 	arbfplight \
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index 004af0b..fd10047 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -786,14 +786,16 @@ CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc,
 							     & driver_configs,
 							     psc);
 
-				    psc->configs =
-					driConvertConfigs(psc->core,
-							  psc->configs,
-							  driver_configs);
-				    psc->visuals =
-					driConvertConfigs(psc->core,
-							  psc->visuals,
-							  driver_configs);
+				    if (psp) {
+					psc->configs =
+					    driConvertConfigs(psc->core,
+							      psc->configs,
+							      driver_configs);
+					psc->visuals =
+					    driConvertConfigs(psc->core,
+							      psc->visuals,
+							      driver_configs);
+				    }
 				}
 			    }
 			}
--
cgit v0.7.2-37-g538c


Index: mesa.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mesa/devel/mesa.spec,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -r1.175 -r1.176
--- mesa.spec	1 Apr 2008 18:07:48 -0000	1.175
+++ mesa.spec	9 Apr 2008 14:16:57 -0000	1.176
@@ -15,7 +15,7 @@
 Summary: Mesa graphics libraries
 Name: mesa
 Version: 7.1
-Release: 0.21%{?dist}
+Release: 0.22%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://www.mesa3d.org
@@ -33,6 +33,9 @@
 # This doesn't work, disable for now.
 Patch3: disable-tex-offset.patch
 
+Patch4: mesa-7.1-visual-crash.patch
+Patch5: mesa-7.1-fbconfig-fix.patch
+
 BuildRequires: pkgconfig autoconf automake
 %if %{with_dri}
 BuildRequires: libdrm-devel >= 2.4.0-0.5
@@ -155,6 +158,8 @@
 %patch0 -p1 -b .osmesa
 %patch2 -p1 -b .intel-glthread
 %patch3 -p1 -b .disable-tex-offset
+%patch4 -p1 -b .visual-crash
+%patch5 -p1 -b .fbconfig
 
 # WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
 # license and are not open source/free software, so we remove them.
@@ -397,6 +402,10 @@
 %{_libdir}/mesa-demos-data
 
 %changelog
+* Wed Apr 09 2008 Adam Jackson <ajax at redhat.com> 7.1-0.22
+- mesa-7.1-visual-crash.patch: Fix a segfault if DRI unavailable.
+- mesa-7.1-fbconfig-fix.patch: Fix fbconfig comparisons.
+
 * Mon Mar 31 2008 Kristian Høgsberg <krh at redhat.com> - 7.1-0.21
 - Update git snapshot to pull in DRI2 direct rendering.
 - Add conflicts for xservers that don't understand the new DRI driver




More information about the scm-commits mailing list