extra/mesa to 9.0-1

This commit is contained in:
Kevin Mihelich 2012-10-14 16:42:59 +00:00
parent 6da6bcd992
commit 2533a00e95
3 changed files with 211 additions and 185 deletions

View file

@ -17,16 +17,17 @@ if [ "${_git}" = "true" ]; then
pkgver=7.10.99.git20110709
#pkgver=7.11
else
pkgver=8.0.4
pkgver=9.0
fi
pkgrel=3.1
pkgrel=1
arch=('i686' 'x86_64')
makedepends=('glproto>=1.4.15' 'libdrm>=2.4.30' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.99.1' 'libxt>=1.1.1'
'gcc-libs>=4.7.1-5' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'llvm' 'systemd-tools')
makedepends=('glproto>=1.4.16' 'libdrm>=2.4.39' 'libxxf86vm>=1.1.2' 'libxdamage>=1.1.3' 'expat>=2.1.0' 'libx11>=1.5.0' 'libxt>=1.1.3'
'gcc-libs>=4.7.1-6' 'dri2proto>=2.8' 'python2' 'libxml2' 'imake' 'llvm' 'systemd' 'libvdpau>=0.5')
url="http://mesa3d.sourceforge.net"
license=('custom')
options=('!libtool')
source=(LICENSE
mesa-8.0.3-llvm-3.1-fixes.patch)
git_fixes.diff)
if [ "${_git}" = "true" ]; then
# mesa git shot from 7.11 branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.11&id=1ae00c5960af83bea9545a18a1754bad83d5cbd0
#source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-1ae00c5960af83bea9545a18a1754bad83d5cbd0.tar.bz2')
@ -38,42 +39,18 @@ if [ "${_git}" = "true" ]; then
)
fi
md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
'c452ed3392468170726c004c2f4e02ca'
'd546f988adfdf986cff45b1efa2d8a46')
'2ebce12196dbb7b69bdf7ef53b8afdee'
'60e557ce407be3732711da484ab3db6c')
build() {
cd ${srcdir}/?esa-*
patch -Np1 -i "${srcdir}/mesa-8.0.3-llvm-3.1-fixes.patch"
[ "${CARCH}" = "armv7h" ] && CFLAGS=`echo $CFLAGS | sed -e 's/-O2/-O1/'` && CXXFLAGS="$CFLAGS"
if [ "${_git}" = "true" ]; then
autoreconf -vfi
./autogen.sh --prefix=/usr \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-gallium-drivers=swrast \
--enable-gallium-llvm \
--enable-egl \
--enable-gallium-egl \
--with-egl-platforms=x11,drm \
--enable-shared-glapi \
--enable-gbm \
--enable-glx-tls \
--enable-dri \
--enable-glx \
--enable-osmesa \
--enable-gles1 \
--enable-gles2 \
--enable-texture-float \
--enable-xa \
--enable-shared-dricore
patch -Np1 -i ${srcdir}/git_fixes.diff
# --enable-gallium-svga \
else
autoreconf -vfi
./configure --prefix=/usr \
COMMONOPTS="--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-dri-drivers=swrast \
--with-gallium-drivers=swrast \
@ -90,155 +67,155 @@ if [ "${_git}" = "true" ]; then
--enable-gles1 \
--enable-gles2 \
--enable-texture-float \
--enable-xa \
--enable-shared-dricore
fi
--enable-xa "
if [ "${_git}" = "true" ]; then
./autogen.sh \
$COMMONOPTS
else
autoreconf -vfi
./configure \
$COMMONOPTS
fi
make
}
package_libgl() {
depends=('libdrm>=2.4.31' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libglapi' 'gcc-libs')
pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
#replaces=('unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri')
cd ${srcdir}/?esa-*
install -m755 -d "${pkgdir}/usr/lib"
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
bin/minstall lib/libdricore.so* "${pkgdir}/usr/lib/"
bin/minstall lib/libglsl.so* "${pkgdir}/usr/lib/"
cd src/mesa/drivers/dri
make -C ${srcdir}/?esa-*/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
}
package_osmesa() {
depends=('mesa')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
pkgdesc="Mesa 3D off-screen rendering library"
make -C ${srcdir}/?esa-*/src/mesa DESTDIR="${pkgdir}" install-osmesa
}
package_libglapi() {
depends=('glibc')
pkgdesc="free implementation of the GL API -- shared library. The Mesa GL API module is responsible for dispatching all the gl* functions"
cd ${srcdir}/?esa-*
install -m755 -d "${pkgdir}/usr/lib"
bin/minstall lib/libglapi.so* "${pkgdir}/usr/lib/"
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/licenses/libglapi"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libglapi/"
}
package_libgl() {
depends=('libdrm>=2.4.39' 'libxxf86vm>=1.1.2' 'libxdamage>=1.1.3' 'expat>=2.1.0' 'libglapi' 'gcc-libs')
pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
# libGL & libdricore
make -C ${srcdir}/?esa-*/src/glx DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mesa/libdricore DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
make -C ${srcdir}/?esa-*/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
# See FS#26284
install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
}
package_mesa() {
# check also gl.pc
depends=('libgl' 'libx11>=1.5.0' 'libxext>=1.3.1' 'libxdamage' 'libxfixes' 'libxcb' 'libxxf86vm')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
pkgdesc="Mesa 3-D graphics libraries and include files"
make -C ${srcdir}/?esa-*/src/mesa DESTDIR="${pkgdir}" install-glHEADERS
make -C ${srcdir}/?esa-*/src/mesa/drivers/dri DESTDIR="${pkgdir}" install-driincludeHEADERS
make -C ${srcdir}/?esa-*/src/mesa DESTDIR="${pkgdir}" install-pkgconfigDATA
make -C ${srcdir}/?esa-*/src/mesa/drivers/dri DESTDIR="${pkgdir}" install-pkgconfigDATA
make -C ${srcdir}/?esa-*/src/mesa/drivers/dri/common DESTDIR="${pkgdir}" install-sysconfDATA
make -C ${srcdir}/?esa-*/src/gallium/targets/xa-vmwgfx DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}
package_osmesa() {
depends=('libglapi' 'gcc-libs')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
pkgdesc="Mesa 3D off-screen rendering library"
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mesa/drivers/osmesa DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
install -m755 -d "${pkgdir}/usr/share/licenses/osmesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/osmesa/"
}
package_libgbm() {
depends=('systemd-tools')
depends=('systemd' 'libglapi' 'libdrm')
pkgdesc="Mesa gbm library"
cd ${srcdir}/?esa-*
install -m755 -d ${pkgdir}/usr/{include,lib/gbm}
bin/minstall lib/libgbm.so* "${pkgdir}/usr/lib/"
bin/minstall src/gbm/main/gbm.h "${pkgdir}/usr/include/"
bin/minstall lib/libgbm.so* "${pkgdir}/usr/lib/"
bin/minstall lib/gbm/gbm_gallium_drm.so* "${pkgdir}/usr/lib/gbm/"
install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
bin/minstall src/gbm/main/gbm.pc "${pkgdir}/usr/lib/pkgconfig/"
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/gbm DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
install -m755 -d "${pkgdir}/usr/share/licenses/libgbm"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgbm/"
}
package_libgles() {
depends=('libglapi' 'khrplatform-devel')
depends=('libglapi' 'libdrm' 'khrplatform-devel')
pkgdesc="Mesa GLES libraries and headers"
cd ${srcdir}/?esa-*
install -m755 -d "${pkgdir}/usr/lib"
install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
install -m755 -d "${pkgdir}/usr/include"
install -m755 -d "${pkgdir}/usr/include/GLES"
install -m755 -d "${pkgdir}/usr/include/GLES2"
bin/minstall lib/libGLESv* "${pkgdir}/usr/lib/"
bin/minstall src/mapi/es1api/glesv1_cm.pc "${pkgdir}/usr/lib/pkgconfig/"
bin/minstall src/mapi/es2api/glesv2.pc "${pkgdir}/usr/lib/pkgconfig/"
bin/minstall include/GLES/* "${pkgdir}/usr/include/GLES/"
bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mapi/es1api DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/mapi/es2api DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
install -m755 -d "${pkgdir}/usr/share/licenses/libgles"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles/"
}
package_libegl() {
depends=('libglapi' 'libdrm' 'libxext' 'libxfixes' 'libgbm' 'khrplatform-devel')
# check also egl.pc
depends=('libx11' 'libxext' 'libxdamage' 'libxfixes' 'libxxf86vm' 'libxcb' 'libgbm' 'khrplatform-devel')
pkgdesc="Mesa EGL libraries and headers"
cd ${srcdir}/?esa-*
make -C src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/lib"
install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
install -m755 -d "${pkgdir}/usr/include"
install -m755 -d "${pkgdir}/usr/include/"
install -m755 -d "${pkgdir}/usr/include/EGL"
install -m755 -d "${pkgdir}/usr/share"
install -m755 -d "${pkgdir}/usr/share/doc"
make -C ${srcdir}/?esa-*/src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/doc/libegl"
bin/minstall lib/libEGL.so* "${pkgdir}/usr/lib/"
install -m755 -d "${pkgdir}/usr/lib/egl"
bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
bin/minstall src/egl/main/egl.pc "${pkgdir}/usr/lib/pkgconfig/"
bin/minstall include/EGL/* "${pkgdir}/usr/include/EGL/"
bin/minstall docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
install -m644 ${srcdir}/?esa-*/docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
# fix linking because of splitted package
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/gbm DESTDIR="${pkgdir}" install
make -C ${srcdir}/?esa-*/src/egl DESTDIR="${pkgdir}" install
# fix linking because of splitted package - cleanup
make -C ${srcdir}/?esa-*/src/gbm DESTDIR="${pkgdir}" uninstall
make -C ${srcdir}/?esa-*/src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall
install -m755 -d "${pkgdir}/usr/share/licenses/libegl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl/"
# fix file conflicts
rm -rf ${pkgdir}/usr/include/KHR
}
package_khrplatform-devel() {
#depends=('')
pkgdesc="Khronos platform development package"
cd ${srcdir}/?esa-*
install -m755 -d "${pkgdir}/usr/include/KHR"
bin/minstall include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
install -m644 ${srcdir}/?esa-*/include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
install -m755 -d "${pkgdir}/usr/share/licenses/khrplatform-devel"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/khrplatform-devel/"
}
package_mesa() {
depends=('libgl' 'libx11>=1.4.3' 'libxt>=1.1.1' 'gcc-libs>=4.6' 'dri2proto>=2.6' 'glproto>=1.4.14') #dri2proto + glproto needed for gl.pc
optdepends=('opengl-man-pages: for the OpenGL API man pages')
pkgdesc="Mesa 3-D graphics libraries and include files"
cd ${srcdir}/?esa-*
make DESTDIR="${pkgdir}" install
rm -f "${pkgdir}/usr/lib/libGL.so"*
rm -f "${pkgdir}/usr/lib/libglapi.so"*
rm -f "${pkgdir}/usr/lib/libgbm.so"*
rm -f "${pkgdir}/usr/lib/libGLESv"*
rm -f "${pkgdir}/usr/lib/libEGL"*
rm -rf "${pkgdir}/usr/lib/egl"
rm -f "${pkgdir}/usr/lib/libOSMesa"*
rm -rf "${pkgdir}/usr/lib/gbm"
rm -f ${pkgdir}/usr/lib/pkgconfig/{glesv1_cm.pc,glesv2.pc,egl.pc,osmesa.pc,gbm.pc}
rm -rf "${pkgdir}/usr/lib/xorg"
rm -f "${pkgdir}/usr/include/GL/glew.h"
rm -f "${pkgdir}/usr/include/GL/glxew.h"
rm -f "${pkgdir}/usr/include/GL/wglew.h"
rm -f "${pkgdir}/usr/include/GL/glut.h"
rm -f "${pkgdir}/usr/include/gbm.h"
rm -rf ${pkgdir}/usr/include/{GLES,GLES2,EGL,KHR}
install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}

93
extra/mesa/git_fixes.diff Normal file
View file

@ -0,0 +1,93 @@
From 161aababc659e23c4a8523366a31f63b3d14e280 Mon Sep 17 00:00:00 2001
From: Ian Romanick <ian.d.romanick@intel.com>
Date: Mon, 08 Oct 2012 22:07:10 +0000
Subject: docs: Add 9.0 release md5sums
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
---
diff --git a/docs/relnotes-9.0.html b/docs/relnotes-9.0.html
index d72c5bb..02b7324 100644
--- a/docs/relnotes-9.0.html
+++ b/docs/relnotes-9.0.html
@@ -26,7 +26,9 @@ because GL_ARB_compatibility is not supported.
<h2>MD5 checksums</h2>
<pre>
-tbd
+be4cd34c6599a7cb9d254b05c48bdb1f MesaLib-9.0.tar.gz
+60e557ce407be3732711da484ab3db6c MesaLib-9.0.tar.bz2
+16b128544cd3f7e237927bb9f8aab7ce MesaLib-9.0.zip
</pre>
--
cgit v0.9.0.2-2-gbebe
From 32faf7ab0de8b88bb15a2cb262a73c411dce9d0d Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Fri, 05 Oct 2012 22:47:40 +0000
Subject: mesa: don't call TexImage driver hooks for zero-sized images
This simply avoids some failed assertions but there's no reason to
call the driver hooks for storing a tex image if its size is zero.
Note: This is a candidate for the stable branches.
(cherry picked from commit 91d84096497ff538f55591f7e6bb0b563726db8d)
---
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 21646cc..8004876 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3034,13 +3034,15 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
border, internalFormat, texFormat);
/* Give the texture to the driver. <pixels> may be null. */
- if (compressed) {
- ctx->Driver.CompressedTexImage(ctx, dims, texImage,
- imageSize, pixels);
- }
- else {
- ctx->Driver.TexImage(ctx, dims, texImage, format,
- type, pixels, unpack);
+ if (width > 0 && height > 0 && depth > 0) {
+ if (compressed) {
+ ctx->Driver.CompressedTexImage(ctx, dims, texImage,
+ imageSize, pixels);
+ }
+ else {
+ ctx->Driver.TexImage(ctx, dims, texImage, format,
+ type, pixels, unpack);
+ }
}
check_gen_mipmap(ctx, target, texObj, level);
--
cgit v0.9.0.2-2-gbebe
From e75051d1967350ceff0209dde24ae42696b13b5c Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Fri, 05 Oct 2012 22:59:27 +0000
Subject: mesa: fix error check for zero-sized compressed subtexture
For glCompressedTexSubImage, width or height = 0 is legal.
Fixes a failure in piglit's s3tc-errors test.
This is for the 9.0 and 8.0 branches. Already fixed on master.
---
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8004876..38fa9fa 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3598,10 +3598,10 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions,
if (!_mesa_is_compressed_format(ctx, format))
return GL_INVALID_ENUM;
- if (width < 1 || width > maxTextureSize)
+ if (width < 0 || width > maxTextureSize)
return GL_INVALID_VALUE;
- if ((height < 1 || height > maxTextureSize)
+ if ((height < 0 || height > maxTextureSize)
&& dimensions > 1)
return GL_INVALID_VALUE;
--
cgit v0.9.0.2-2-gbebe

View file

@ -1,44 +0,0 @@
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index a50a51d..f1bb4d9 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -235,7 +235,24 @@ lp_disassemble(const void* func)
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
#endif
-#if HAVE_LLVM >= 0x0300
+#if HAVE_LLVM >= 0x0301
+ OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
+ if (!MRI) {
+ debug_printf("error: no register info for target %s\n", Triple.c_str());
+ return;
+ }
+
+ OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo());
+ if (!MII) {
+ debug_printf("error: no instruction info for target %s\n", Triple.c_str());
+ return;
+ }
+#endif
+
+#if HAVE_LLVM >= 0x0301
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
+#elif HAVE_LLVM == 0x0300
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
#elif HAVE_LLVM >= 0x0208
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index fe7616b..68f8808 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -62,7 +62,11 @@
extern "C" void
lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
{
+#if HAVE_LLVM >= 0x0301
+ llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
+#else
llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener());
+#endif
}