packages: Mesa/Mesa.spec, Mesa/Mesa-nouveau.patch (NEW) - rel 8; fix nouvea...

arekm arekm at pld-linux.org
Sun Dec 12 17:58:01 CET 2010


Author: arekm                        Date: Sun Dec 12 16:58:01 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 8; fix nouveau segfaults with libdrm 2.4.23 (from gentoo)

---- Files affected:
packages/Mesa:
   Mesa.spec (1.263 -> 1.264) , Mesa-nouveau.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/Mesa/Mesa.spec
diff -u packages/Mesa/Mesa.spec:1.263 packages/Mesa/Mesa.spec:1.264
--- packages/Mesa/Mesa.spec:1.263	Tue Dec  7 19:49:10 2010
+++ packages/Mesa/Mesa.spec	Sun Dec 12 17:57:55 2010
@@ -30,7 +30,7 @@
 Summary(pl.UTF-8):	Wolnodostępna implementacja standardu OpenGL
 Name:		Mesa
 Version:	7.9
-Release:	7%{?with_multigl:.mgl}
+Release:	8%{?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
@@ -38,6 +38,7 @@
 Patch0:		%{name}-realclean.patch
 Patch1:		%{name}-selinux.patch
 Patch2:		%{name}-git.patch
+Patch3:		%{name}-nouveau.patch
 URL:		http://www.mesa3d.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -665,6 +666,7 @@
 %patch0 -p0
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__aclocal}
@@ -1007,6 +1009,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.264  2010/12/12 16:57:55  arekm
+- rel 8; fix nouveau segfaults with libdrm 2.4.23 (from gentoo)
+
 Revision 1.263  2010/12/07 18:49:10  arekm
 - rel 7; branch diff updated
 

================================================================
Index: packages/Mesa/Mesa-nouveau.patch
diff -u /dev/null packages/Mesa/Mesa-nouveau.patch:1.1
--- /dev/null	Sun Dec 12 17:58:01 2010
+++ packages/Mesa/Mesa-nouveau.patch	Sun Dec 12 17:57:55 2010
@@ -0,0 +1,89 @@
+diff -ur a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
+--- a/src/gallium/drivers/nouveau/nouveau_screen.c	2010-10-02 00:51:28.000000000 +0200
++++ b/src/gallium/drivers/nouveau/nouveau_screen.c	2010-12-11 18:18:20.527000045 +0100
+@@ -236,7 +236,7 @@
+ 	int ret;
+ 
+ 	ret = nouveau_channel_alloc(dev, 0xbeef0201, 0xbeef0202,
+-				    &screen->channel);
++				    512*1024, &screen->channel);
+ 	if (ret)
+ 		return ret;
+ 	screen->device = dev;
+diff -ur a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
+--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c	2010-10-05 03:58:00.000000000 +0200
++++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c	2010-12-11 18:18:20.528000045 +0100
+@@ -129,7 +129,7 @@
+ 
+ 	/* Allocate a hardware channel. */
+ 	ret = nouveau_channel_alloc(context_dev(ctx), 0xbeef0201, 0xbeef0202,
+-				    &nctx->hw.chan);
++				    512*1024, &nctx->hw.chan);
+ 	if (ret) {
+ 		nouveau_error("Error initializing the FIFO.\n");
+ 		return GL_FALSE;
+Nur in b/src/mesa/drivers/dri/nouveau: nouveau_context.c.orig.
+diff -ur a/src/mesa/drivers/dri/nouveau/nouveau_surface.c b/src/mesa/drivers/dri/nouveau/nouveau_surface.c
+--- a/src/mesa/drivers/dri/nouveau/nouveau_surface.c	2010-04-27 23:41:21.000000000 +0200
++++ b/src/mesa/drivers/dri/nouveau/nouveau_surface.c	2010-12-11 18:09:19.750000046 +0100
+@@ -34,8 +34,8 @@
+ 		      unsigned flags, unsigned format,
+ 		      unsigned width, unsigned height)
+ {
+-	unsigned tile_mode, cpp = _mesa_get_format_bytes(format);
+-	int ret;
++	unsigned tile_mode = 0, tile_flags = 0;
++	int ret, cpp = _mesa_get_format_bytes(format);
+ 
+ 	nouveau_bo_ref(NULL, &s->bo);
+ 
+@@ -51,13 +51,21 @@
+ 	if (layout == TILED) {
+ 		s->pitch = align(s->pitch, 256);
+ 		tile_mode = s->pitch;
++
++		if (cpp == 4)
++			tile_flags = NOUVEAU_BO_TILE_32BPP;
++		else if (cpp == 2)
++			tile_flags = NOUVEAU_BO_TILE_16BPP;
++
++		if (_mesa_get_format_bits(format, GL_DEPTH_BITS))
++			tile_flags |= NOUVEAU_BO_TILE_ZETA;
++
+ 	} else {
+ 		s->pitch = align(s->pitch, 64);
+-		tile_mode = 0;
+ 	}
+ 
+ 	ret = nouveau_bo_new_tile(context_dev(ctx), flags, 0, s->pitch * height,
+-				  tile_mode, 0, &s->bo);
++				  tile_mode, tile_flags, &s->bo);
+ 	assert(!ret);
+ }
+ 
+diff -ur a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c	2010-10-05 03:58:00.000000000 +0200
++++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c	2010-12-11 18:18:20.528000045 +0100
+@@ -32,7 +32,7 @@
+ 
+ /* Arbitrary pushbuf length we can assume we can get with a single
+  * WAIT_RING. */
+-#define PUSHBUF_DWORDS 2048
++#define PUSHBUF_DWORDS 65536
+ 
+ /* Functions to set up struct nouveau_array_state from something like
+  * a GL array or index buffer. */
+diff -ur a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c	2010-10-05 03:58:00.000000000 +0200
++++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c	2010-12-11 18:15:17.756000046 +0100
+@@ -64,8 +64,8 @@
+ 
+ 	if (!nfb->lma_bo || nfb->lma_bo->size != size) {
+ 		nouveau_bo_ref(NULL, &nfb->lma_bo);
+-		nouveau_bo_new(context_dev(ctx), NOUVEAU_BO_VRAM, 0, size,
+-			       &nfb->lma_bo);
++		nouveau_bo_new_tile(context_dev(ctx), NOUVEAU_BO_VRAM, 0, size,
++				    0, NOUVEAU_BO_TILE_ZETA, &nfb->lma_bo);
+ 	}
+ 
+ 	nouveau_bo_markl(bctx, celsius, NV17TCL_LMA_DEPTH_BUFFER_OFFSET,
================================================================

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



More information about the pld-cvs-commit mailing list