From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- source/x/mesa/get-mesa.sh | 20 ++- source/x/mesa/mesa.SlackBuild | 134 +++++++++++++-------- source/x/mesa/mesa.url | 1 + .../patches/i915_fragment_shader_disable.patch | 26 ++++ .../mesa-7.9-libdrm-2.4.23-nouveau-api.patch | 89 ++++++++++++++ 5 files changed, 214 insertions(+), 56 deletions(-) mode change 100644 => 100755 source/x/mesa/get-mesa.sh create mode 100644 source/x/mesa/patches/i915_fragment_shader_disable.patch create mode 100644 source/x/mesa/patches/mesa-7.9-libdrm-2.4.23-nouveau-api.patch (limited to 'source/x/mesa') diff --git a/source/x/mesa/get-mesa.sh b/source/x/mesa/get-mesa.sh old mode 100644 new mode 100755 index 710043c6..c014d8a1 --- a/source/x/mesa/get-mesa.sh +++ b/source/x/mesa/get-mesa.sh @@ -1,8 +1,20 @@ +# Pull a stable branch + patches +BRANCH=7.9 + rm -rf mesa git clone git://anongit.freedesktop.org/git/mesa/mesa # package the source archive and clean up: -( cd mesa ; find . -type d -name .git -exec rm -rf {} \; 2> /dev/null ) +( cd mesa + git checkout $BRANCH || exit 1 +) +HEADISAT="$(cat mesa/.git/packed-refs | grep "refs/remotes/origin/${BRANCH}$" | cut -b1-7)" +# Cleanup. We're not packing up the whole git repo. +( cd mesa && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null ) DATE=$(date +%Y%m%d) -mv mesa mesa-${DATE}_git -tar cjf mesa-${DATE}_git.tar.bz2 mesa-${DATE}_git -rm -rf mesa-${DATE}_git +mv mesa Mesa-${BRANCH}_${HEADISAT} +tar cf MesaLib-${BRANCH}_${HEADISAT}.tar Mesa-${BRANCH}_${HEADISAT} +xz -9 MesaLib-${BRANCH}_${HEADISAT}.tar +rm -rf MesaLib-${BRANCH}_${HEADISAT} +echo +echo "Mesa branch $BRANCH with HEAD at $HEADISAT packaged as MesaLib-${BRANCH}_${HEADISAT}.tar.xz" +echo diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild index d4579625..7bdc273e 100755 --- a/source/x/mesa/mesa.SlackBuild +++ b/source/x/mesa/mesa.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,26 +21,23 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PKGNAM=mesa -VERSION=${VERSION:-$(echo MesaLib-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +VERSION=7.9.2 +DEMOVERS=8.0.1 BUILD=${BUILD:-1} -PKG_VERSION=${VERSION} +NUMJOBS=${NUMJOBS:--j8} + +# Be sure this list is up-to-date: +DRI_DRIVERS="i810,i915,i965,mach64,mga,nouveau,r128,r200,r300,r600,radeon,savage,sis,tdfx,unichrome,swrast" -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) export ARCH=i486 ;; arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi -# Be sure this list is up-to-date: -DRI_DRIVERS="i810,i915,i965,mach64,mga,r128,r200,r300,r600,radeon,savage,sis,tdfx,unichrome,swrast" - -NUMJOBS=${NUMJOBS:--j8} - CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-mesa @@ -60,9 +57,13 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf Mesa-${VERSION} -tar xvf $CWD/MesaLib-${PKG_VERSION}.tar.?z* || exit 1 -tar xvf $CWD/MesaGLUT-${PKG_VERSION}.tar.?z* || exit 1 -tar xvf $CWD/MesaDemos-${PKG_VERSION}.tar.?z* || exit 1 + +tar xvf $CWD/MesaLib-${VERSION}.tar.?z* || exit 1 +# If MesaLib came from git, we might already have GLUT. +if [ ! -d Mesa-${VERSION}/src/glut/glx ]; then + tar xvf $CWD/MesaGLUT-${VERSION}.tar.?z* || exit 1 +fi + cd Mesa-$VERSION # Make sure ownerships and permissions are sane: @@ -73,6 +74,27 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Apply patches from git (and maybe elsewhere): +# Patches obtained by: +# git checkout origin/7.9 +# git format-patch 67aeab0b77fb6be864088e69ea74a010b6543fa1.. +if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then + for patch in $CWD/patches/*.patch ; do + patch -p1 < $patch || exit 1 ; + done +fi + +# Revert "i915: Enable ARB_fragment_shader by default." +# https://bugzilla.redhat.com/show_bug.cgi?id=643399 +zcat $CWD/patches/i915_fragment_shader_disable.patch.gz | patch -p1 || exit 1 + +# Allow to build against libdrm-2.4.23: +zcat $CWD/patches/mesa-7.9-libdrm-2.4.23-nouveau-api.patch.gz | patch -p1 || exit 1 + +if [ ! -r configure ]; then + autoreconf || exit 1 +fi + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -82,64 +104,72 @@ CFLAGS="$SLKCFLAGS" \ --docdir=/usr/doc/mesa-$VERSION \ --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \ --with-dri-drivers="$DRI_DRIVERS" \ + --enable-xcb \ + --enable-gallium-nouveau \ --build=$ARCH-slackware-linux -# Nobody else is enabling this. Seems like it's asking for trouble. -# --enable-xcb - -# This doesn't seem to build - maybe it needs something else... -# --enable-gallium-nouveau +# --enable-gallium-llvm \ +# --enable-gallium-swrast \ +# --disable-gallium-svga \ +# --disable-gallium-i915 \ +# --disable-gallium-i965 \ +# --disable-gallium-radeon \ +# --disable-gallium-r600 \ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -# Install gears and glinfo: -mkdir -p $PKG/usr/bin -cp -a progs/demos/gears $PKG/usr/bin/gears -cp -a progs/demos/glinfo $PKG/usr/bin/glinfo - -# Install some "demos": -( cd progs/xdemos - cp glthreads glxcontexts glxdemo glxgears glxgears_fbconfig glxheads \ - glxinfo glxpbdemo glxpixmap \ - $PKG/usr/bin +# Now install the demos +( cd $TMP + rm -rf mesa-demos-$DEMOVERS + tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1 + cd mesa-demos-$DEMOVERS + chown -R root:root . + find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + CFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --build=$ARCH-slackware-linux + # Build and install gears and glinfo, as well as a few other demos + make -C src/demos gears glinfo + make -C src/xdemos \ + glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \ + glxheads glxinfo glxpbdemo glxpixmap + mkdir -p $PKG/usr/bin + cp -a src/demos/{gears,glinfo} $PKG/usr/bin + for i in glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \ + glxheads glxinfo glxpbdemo glxpixmap ; do + cp -a src/xdemos/$i $PKG/usr/bin ; + done ) - + # Strip binaries: find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -# Compress and link manpages, if any: -if [ -d $PKG/usr/man ]; then - ( cd $PKG/usr/man - for manpagedir in $(find . -type d -name "man*") ; do - ( cd $manpagedir - for eachpage in $( find . -type l -maxdepth 1) ; do - ln -s $( readlink $eachpage ).gz $eachpage.gz - rm $eachpage - done - gzip -9 *.? - ) - done - ) -fi +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done # Compress info files, if any: if [ -d $PKG/usr/info ]; then - ( cd $PKG/usr/info - rm -f dir - gzip -9 * - ) + rm -f $PKG/usr/info/dir + gzip -9 $PKG/usr/info/* fi -mkdir -p $PKG/usr/doc/Mesa-$PKG_VERSION/html -cp -a COPYING docs/relnotes-$VERSION.html $PKG/usr/doc/Mesa-$PKG_VERSION -rm -f docs/relnotes*.html docs/RELNOTES* -cp -a docs/*.html $PKG/usr/doc/Mesa-$PKG_VERSION/html +mkdir -p $PKG/usr/doc/Mesa-$VERSION/html +cp -a \ + docs/COPYING* docs/relnotes-${VERSION}*.html docs/README* docs/GL* \ + $PKG/usr/doc/Mesa-$VERSION +cp -a docs/*.html $PKG/usr/doc/Mesa-$VERSION/html +rm -f $PKG/usr/doc/Mesa-$VERSION/html/relnotes*.html mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$PKG_VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz diff --git a/source/x/mesa/mesa.url b/source/x/mesa/mesa.url index f4efeae6..3f30cc84 100644 --- a/source/x/mesa/mesa.url +++ b/source/x/mesa/mesa.url @@ -1 +1,2 @@ ftp://ftp.freedesktop.org/pub/mesa/ +ftp://ftp.freedesktop.org/pub/mesa/demos/ diff --git a/source/x/mesa/patches/i915_fragment_shader_disable.patch b/source/x/mesa/patches/i915_fragment_shader_disable.patch new file mode 100644 index 00000000..d2aee8e7 --- /dev/null +++ b/source/x/mesa/patches/i915_fragment_shader_disable.patch @@ -0,0 +1,26 @@ +From e5a4106be7c8b87821f6b5d21fec99a402825740 Mon Sep 17 00:00:00 2001 +From: Robert Hooker +Date: Wed, 8 Sep 2010 12:33:09 -0400 +Subject: [PATCH] Revert "i915: Enable ARB_fragment_shader by default." + +This reverts commit a58514cc9c5cc5867f9140700462c5ac5749550d. +--- + src/mesa/drivers/dri/intel/intel_screen.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c +index 0a542a7..8ae2cd2 100644 +--- a/src/mesa/drivers/dri/intel/intel_screen.c ++++ b/src/mesa/drivers/dri/intel/intel_screen.c +@@ -70,7 +70,7 @@ PUBLIC const char __driConfigOptions[] = + DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 945-only).") + DRI_CONF_OPT_END + +- DRI_CONF_OPT_BEGIN(fragment_shader, bool, true) ++ DRI_CONF_OPT_BEGIN(fragment_shader, bool, false) + DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 915/945.") + DRI_CONF_OPT_END + +-- +1.7.2 + diff --git a/source/x/mesa/patches/mesa-7.9-libdrm-2.4.23-nouveau-api.patch b/source/x/mesa/patches/mesa-7.9-libdrm-2.4.23-nouveau-api.patch new file mode 100644 index 00000000..d0ce04d2 --- /dev/null +++ b/source/x/mesa/patches/mesa-7.9-libdrm-2.4.23-nouveau-api.patch @@ -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, -- cgit v1.2.3