Commit 623eff34 authored by Carlo Landmeter's avatar Carlo Landmeter

main/mesa: upgrade to 7.8.2

parent f937d6b5
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mesa
pkgver=7.7.1
pkgrel=2
pkgver=7.8.2
pkgrel=0
pkgdesc="Mesa DRI OpenGL library"
url="http://www.mesa3d.org"
license="LGPL"
depends=
subpackages="$pkgname-dev
$pkgname-dri-ati:ati $pkgname-dri-ffb:ffb $pkgname-dri-intel:intel
$pkgname-dri-mach64:mach64 $pkgname-dri-mga:mga $pkgname-dri-r128:r128
$pkgname-dri-savage:savage $pkgname-dri-sis:sis
$pkgname-dri-tdfx:tdfx $pkgname-dri-unichrome:unichrome
$pkgname-dri-intel:intel
$pkgname-dri-mach64:mach64
$pkgname-dri-mga:mga
$pkgname-dri-r128:r128
$pkgname-dri-savage:savage
$pkgname-dri-sis:sis
$pkgname-dri-tdfx:tdfx
$pkgname-dri-unichrome:unichrome
$pkgname-dri-ati:ati
$pkgname-dri-swrast:swrast
"
makedepends="pkgconfig libdrm-dev libxxf86vm-dev libxdamage-dev expat-dev
dri2proto xextproto libx11-dev glproto python"
dri2proto xextproto libx11-dev glproto python libxt-dev"
source="ftp://ftp.freedesktop.org/pub/mesa/$pkgver/MesaLib-$pkgver.tar.bz2
mesa-7.7-link-shared.patch
intel-revert-vbl.patch
mesa-7.4-parallel.patch
mesa-7.6.1-ldflags.patch
mesa-7.6.1-uclibc.patch"
mesa-7.6.1-uclibc.patch
mesa-7.8-git.patch"
depends_dev="libdrm-dev dri2proto libx11-dev libxext-dev libxxf86vm-dev
libxdamage-dev libxfixes-dev libxcb-dev"
_dri_driverdir=/usr/lib/xorg/modules/dri
_builddir="$srcdir/Mesa-$pkgver"
prepare() {
cd "$srcdir"/Mesa-$pkgver
cd "$_builddir"
for i in ../*.patch; do
msg "Applying $i..."
patch -p1 -i $i || return 1
......@@ -36,7 +41,7 @@ prepare() {
}
build() {
cd "$srcdir"/Mesa-$pkgver
cd "$_builddir"
export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
./configure --prefix=/usr \
--with-dri-driverdir=$_dri_driverdir \
......@@ -49,13 +54,14 @@ build() {
--disable-glw || return 1
make || return 1
# check so we dont have any bind NOW
scanelf -Rb . | grep NOW && return 1
return 0
}
package() {
cd "$srcdir"/Mesa-$pkgver
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install || return 1
}
......@@ -63,7 +69,7 @@ package() {
_mv_dri() {
pkgdesc="Mesa DRI driver for $@"
install -d "$subpkgdir"/$_dri_driverdir
while [ $# -gt 0 ]; do
mv "$pkgdir"/$_dri_driverdir/${1}.so \
"$subpkgdir"/$_dri_driverdir/ || return 1
......@@ -72,21 +78,16 @@ _mv_dri() {
}
ati() { _mv_dri radeon_dri r200_dri r300_dri r600_dri; }
ffb() { _mv_dri ffb_dri; }
intel() { _mv_dri i810_dri i915_dri i965_dri; }
mach64() { _mv_dri mach64_dri; }
mga() { _mv_dri mga_dri; }
r128() { _mv_dri r128_dri; }
s3v() { _mv_dri s3v_dri; }
savage() { _mv_dri savage_dri; }
sis() { _mv_dri sis_dri; }
tdfx() { _mv_dri tdfx_dri; }
trident() { _mv_dri trident_dri; }
unichrome() { _mv_dri unichrome_dri; }
swrast() { _mv_dri swrast_dri; }
md5sums="46664d99e03f1e3ac078a7fea02af115 MesaLib-7.7.1.tar.bz2
a966f459b6430dbe87a57c5f28f19816 mesa-7.7-link-shared.patch
a111f4dc82e894f8801bc3fa129af7af intel-revert-vbl.patch
75e1bb69f384e9d60544fa03c15cc0ec mesa-7.4-parallel.patch
eb6bb53bb1643782aa572edc40d28629 mesa-7.6.1-ldflags.patch
8d98e15310e0f2e1520beb9e6cb6ab41 mesa-7.6.1-uclibc.patch"
md5sums="6be2d343a0089bfd395ce02aaf8adb57 MesaLib-7.8.2.tar.bz2
8d98e15310e0f2e1520beb9e6cb6ab41 mesa-7.6.1-uclibc.patch
397c1249edcf03227697fef3f7129fe4 mesa-7.8-git.patch"
From 8f13c69e7658df3a97e388f210dae175639d6d8d Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@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@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
commit 532d2051245a1d8afe7ca236f1d966d555bb121a
Author: Dave Airlie <airlied@linux.ie>
Date: Fri Sep 12 17:21:25 2008 +1000
Revert "intel: sync to vblank by default"
This reverts commit e9bf3e4cc9a7e4bcd4c45bd707541d26ecdf0409.
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index c193830..f02192d 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -55,7 +55,7 @@ PUBLIC const char __driConfigOptions[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_FTHROTTLE_MODE(DRI_CONF_FTHROTTLE_IRQS)
- DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_ALWAYS_SYNC)
+ DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_0)
/* Options correspond to DRI_CONF_BO_REUSE_DISABLED,
* DRI_CONF_BO_REUSE_ALL
*/
diff -ru Mesa-7.4.orig/src/mesa/drivers/dri/Makefile Mesa-7.4/src/mesa/drivers/dri/Makefile
--- Mesa-7.4.orig/src/mesa/drivers/dri/Makefile 2009-04-11 18:08:41.000000000 +0000
+++ Mesa-7.4/src/mesa/drivers/dri/Makefile 2009-04-11 18:10:09.000000000 +0000
@@ -18,7 +18,7 @@
$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
$(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
-subdirs:
+subdirs: $(TOP)/$(LIB_DIR)/libdricore.so
@for dir in $(DRI_DIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
diff --git a/src/gallium/winsys/drm/Makefile.template b/src/gallium/winsys/drm/Makefile.template
index 9635c3c..88e02c0 100644
--- a/src/gallium/winsys/drm/Makefile.template
+++ b/src/gallium/winsys/drm/Makefile.template
@@ -83,6 +83,7 @@ default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
$(MKLIB) -noprefix -o $@ \
+ -ldflags "$(LDFLAGS)" \
$(OBJECTS) $(PIPE_DRIVERS) \
-Wl,--start-group $(MESA_MODULES) -Wl,--end-group \
$(WINOBJ) $(DRI_LIB_DEPS) $(DRIVER_EXTRAS)
@@ -90,6 +91,7 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)
$(LIBNAME_EGL): $(WINSYS_OBJECTS) $(LIBS)
$(MKLIB) -o $(LIBNAME_EGL) \
-linker "$(CC)" \
+ -ldflags "$(LDFLAGS)" \
-noprefix \
$(OBJECTS) $(MKLIB_OPTIONS) $(WINSYS_OBJECTS) $(PIPE_DRIVERS) $(WINOBJ) $(DRI_LIB_DEPS) \
--whole-archive $(LIBS) $(GALLIUM_AUXILIARIES) --no-whole-archive $(DRIVER_EXTRAS)
diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.da mesa-20091221/src/mesa/drivers/dri/Makefile
--- mesa-20091221/src/mesa/drivers/dri/Makefile.da 2009-12-21 08:09:11.000000000 +1000
+++ mesa-20091221/src/mesa/drivers/dri/Makefile 2009-12-21 08:43:03.000000000 +1000
@@ -6,12 +6,17 @@ include $(TOP)/configs/current
-default: $(TOP)/$(LIB_DIR) subdirs dri.pc
+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs dri.pc
$(TOP)/$(LIB_DIR):
-mkdir $(TOP)/$(LIB_DIR)
+libdricore.so:
+ gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive $(LDFLAGS) -lm -lpthread -lc
+
+$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
subdirs:
@for dir in $(DRI_DIRS) ; do \
@@ -32,12 +37,14 @@ dri.pc: dri.pc.in
$(pcedit) $< > $@
-install: dri.pc
+install: dri.pc $(TOP)/$(LIB_DIR)/libdricore.so
@for dir in $(DRI_DIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) install) || exit 1 ; \
fi \
done
+ $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(INSTALL) -m 755 $(TOP)/$(LIB_DIR)/libdricore.so $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
$(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
$(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
@@ -51,5 +58,6 @@ clean:
(cd $$dir && $(MAKE) clean) ; \
fi \
done
+ -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so
-rm -f common/*.o
-rm -f *.pc
diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.template.da mesa-20091221/src/mesa/drivers/dri/Makefile.template
--- mesa-20091221/src/mesa/drivers/dri/Makefile.template.da 2009-12-21 08:09:11.000000000 +1000
+++ mesa-20091221/src/mesa/drivers/dri/Makefile.template 2009-12-21 08:43:40.000000000 +1000
@@ -1,6 +1,6 @@
# -*-makefile-*-
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+MESA_MODULES = $(TOP)/$(LIB_DIR)/libdricore.so
COMMON_GALLIUM_SOURCES = \
../common/utils.c \
@@ -70,7 +70,8 @@ lib: symlinks subdirs depend
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) Makefile \
$(TOP)/src/mesa/drivers/dri/Makefile.template
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) \
+ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
+ $(OBJECTS) $(EXTRA_MODULES) $(WINOBJ) \
$(DRI_LIB_DEPS)
diff -up mesa-20091221/src/mesa/x86/read_rgba_span_x86.S.da mesa-20091221/src/mesa/x86/read_rgba_span_x86.S
--- mesa-20091221/src/mesa/x86/read_rgba_span_x86.S.da 2009-12-21 08:09:11.000000000 +1000
+++ mesa-20091221/src/mesa/x86/read_rgba_span_x86.S 2009-12-21 08:43:03.000000000 +1000
@@ -77,7 +77,6 @@
*/
.globl _generic_read_RGBA_span_BGRA8888_REV_MMX
-.hidden _generic_read_RGBA_span_BGRA8888_REV_MMX
.type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
_generic_read_RGBA_span_BGRA8888_REV_MMX:
pushl %ebx
@@ -172,7 +171,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX
*/
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE
-.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE
.type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
_generic_read_RGBA_span_BGRA8888_REV_SSE:
pushl %esi
@@ -335,7 +333,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
.text
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE2
-.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2
.type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
_generic_read_RGBA_span_BGRA8888_REV_SSE2:
pushl %esi
@@ -494,7 +491,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
.text
.globl _generic_read_RGBA_span_RGB565_MMX
- .hidden _generic_read_RGBA_span_RGB565_MMX
.type _generic_read_RGBA_span_RGB565_MMX, @function
_generic_read_RGBA_span_RGB565_MMX:
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment