[mesa/f15/master] pull latest snapshot + 3 post snapshot fixes
Dave Airlie
airlied at fedoraproject.org
Mon Mar 28 20:22:31 UTC 2011
commit 7d1f13d65e41454590101a6a43a198407eac24d2
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Mar 29 06:14:42 2011 +1000
pull latest snapshot + 3 post snapshot fixes
.gitignore | 1 +
mesa-7.10-llvmcore.patch | 41 +-
mesa-7.10-nouveau-classic-libdrm.patch | 33 -
mesa-7.10-nouveau-revert.patch | 114 -
mesa-7.10-nouveau-updates.patch |19963 --------------------------------
mesa-7.11-fixes.patch | 111 +
mesa.spec | 77 +-
sources | 2 +-
8 files changed, 169 insertions(+), 20173 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index afb979c..2e356bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ mesa-20100720.tar.bz2
/mesa-20101216.tar.xz
/mesa-20110107.tar.xz
/MesaLib-7.10.1.tar.bz2
+/mesa-20110327.tar.xz
diff --git a/mesa-7.10-llvmcore.patch b/mesa-7.10-llvmcore.patch
index e1663e3..cdbeea5 100644
--- a/mesa-7.10-llvmcore.patch
+++ b/mesa-7.10-llvmcore.patch
@@ -1,7 +1,8 @@
-diff -up mesa-20110107/configs/autoconf.in.llvmcore mesa-20110107/configs/autoconf.in
---- mesa-20110107/configs/autoconf.in.llvmcore 2011-01-06 19:51:14.000000000 -0500
-+++ mesa-20110107/configs/autoconf.in 2011-01-18 19:34:49.000000000 -0500
-@@ -29,8 +29,8 @@ INTEL_CFLAGS = @INTEL_CFLAGS@
+diff --git a/configs/autoconf.in b/configs/autoconf.in
+index 4e931a3..fec8e42 100644
+--- a/configs/autoconf.in
++++ b/configs/autoconf.in
+@@ -31,8 +31,8 @@ INTEL_CFLAGS = @INTEL_CFLAGS@
X11_LIBS = @X11_LIBS@
X11_CFLAGS = @X11_CFLAGS@
LLVM_CFLAGS = @LLVM_CFLAGS@
@@ -11,25 +12,27 @@ diff -up mesa-20110107/configs/autoconf.in.llvmcore mesa-20110107/configs/autoco
+LLVM_LIBS = -lllvmcore-$(shell llvm-config --version)
GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
-
-diff -up mesa-20110107/configs/linux-llvm.llvmcore mesa-20110107/configs/linux-llvm
---- mesa-20110107/configs/linux-llvm.llvmcore 2011-01-06 19:51:14.000000000 -0500
-+++ mesa-20110107/configs/linux-llvm 2011-01-18 19:19:14.000000000 -0500
+ GLX_TLS = @GLX_TLS@
+diff --git a/configs/linux-llvm b/configs/linux-llvm
+index 359bee2..0de094d 100644
+--- a/configs/linux-llvm
++++ b/configs/linux-llvm
@@ -32,8 +32,8 @@ endif
ifeq ($(MESA_LLVM),1)
LLVM_CFLAGS=`llvm-config --cppflags`
- LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
-- LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
-- LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
+ LLVM_CXXFLAGS=`llvm-config --cxxflags` -Wno-long-long
+- LLVM_LDFLAGS = $(shell llvm-config --ldflags)
+- LLVM_LIBS = $(shell llvm-config --libs)
+ LLVM_LDFLAGS = -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lllvmcore-$(shell llvm-config --version)
+ LLVM_LIBS = -lllvmcore-$(shell llvm-config --version)
MKLIB_OPTIONS=-cplusplus
else
LLVM_CFLAGS=
-diff -up mesa-20110107/configure.ac.llvmcore mesa-20110107/configure.ac
---- mesa-20110107/configure.ac.llvmcore 2011-01-18 19:19:14.000000000 -0500
-+++ mesa-20110107/configure.ac 2011-01-18 20:40:01.000000000 -0500
-@@ -1333,8 +1333,6 @@ if test "x$enable_gallium" = xyes; then
+diff --git a/configure.ac b/configure.ac
+index b510151..e872f2e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1404,8 +1404,6 @@ if test "x$enable_gallium" = xyes; then
fi
AC_SUBST([LLVM_CFLAGS])
@@ -38,11 +41,11 @@ diff -up mesa-20110107/configure.ac.llvmcore mesa-20110107/configure.ac
AC_SUBST([LLVM_VERSION])
dnl
-@@ -1555,7 +1553,6 @@ if test "x$enable_gallium_llvm" = xyes;
+@@ -1649,7 +1647,6 @@ if test "x$enable_gallium_llvm" = xyes; then
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version`
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
-- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen bitwriter` -lstdc++"
+- LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
- if test "x$HAS_UDIS86" != xno; then
- LLVM_LIBS="$LLVM_LIBS -ludis86"
+ LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
diff --git a/mesa-7.11-fixes.patch b/mesa-7.11-fixes.patch
new file mode 100644
index 0000000..6335161
--- /dev/null
+++ b/mesa-7.11-fixes.patch
@@ -0,0 +1,111 @@
+diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
+index e7285d6..6eac1f7 100644
+--- a/src/gallium/drivers/r600/r600_shader.c
++++ b/src/gallium/drivers/r600/r600_shader.c
+@@ -1526,9 +1526,13 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
+ unsigned src_gpr;
+ int r, i;
+ int opcode;
+- boolean src_not_temp =
+- inst->Src[0].Register.File != TGSI_FILE_TEMPORARY &&
+- inst->Src[0].Register.File != TGSI_FILE_INPUT;
++ /* Texture fetch instructions can only use gprs as source.
++ * Also they cannot negate the source or take the absolute value */
++ const boolean src_requires_loading =
++ (inst->Src[0].Register.File != TGSI_FILE_TEMPORARY &&
++ inst->Src[0].Register.File != TGSI_FILE_INPUT) ||
++ ctx->src[0].neg || ctx->src[0].abs;
++ boolean src_loaded = FALSE;
+
+ src_gpr = ctx->file_offset[inst->Src[0].Register.File] + inst->Src[0].Register.Index;
+
+@@ -1570,7 +1574,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
+ r = r600_bc_add_alu(ctx->bc, &alu);
+ if (r)
+ return r;
+- src_not_temp = FALSE;
++ src_loaded = TRUE;
+ src_gpr = ctx->temp_reg;
+ }
+
+@@ -1655,11 +1659,11 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
+ if (r)
+ return r;
+
+- src_not_temp = FALSE;
++ src_loaded = TRUE;
+ src_gpr = ctx->temp_reg;
+ }
+
+- if (src_not_temp) {
++ if (src_requires_loading && !src_loaded) {
+ for (i = 0; i < 4; i++) {
+ memset(&alu, 0, sizeof(struct r600_bc_alu));
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
+@@ -1673,6 +1677,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
+ if (r)
+ return r;
+ }
++ src_loaded = TRUE;
+ src_gpr = ctx->temp_reg;
+ }
+
+@@ -1691,10 +1696,18 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
+ tex.dst_sel_y = (inst->Dst[0].Register.WriteMask & 2) ? 1 : 7;
+ tex.dst_sel_z = (inst->Dst[0].Register.WriteMask & 4) ? 2 : 7;
+ tex.dst_sel_w = (inst->Dst[0].Register.WriteMask & 8) ? 3 : 7;
+- tex.src_sel_x = 0;
+- tex.src_sel_y = 1;
+- tex.src_sel_z = 2;
+- tex.src_sel_w = 3;
++ if (src_loaded) {
++ tex.src_sel_x = 0;
++ tex.src_sel_y = 1;
++ tex.src_sel_z = 2;
++ tex.src_sel_w = 3;
++ } else {
++ tex.src_sel_x = ctx->src[0].swizzle[0];
++ tex.src_sel_y = ctx->src[0].swizzle[1];
++ tex.src_sel_z = ctx->src[0].swizzle[2];
++ tex.src_sel_w = ctx->src[0].swizzle[3];
++ tex.src_rel = ctx->src[0].rel;
++ }
+
+ if (inst->Texture.Texture == TGSI_TEXTURE_CUBE) {
+ tex.src_sel_x = 1;
+@@ -1712,12 +1725,12 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
+
+ if (inst->Texture.Texture == TGSI_TEXTURE_1D_ARRAY) {
+ tex.coord_type_z = 0;
+- tex.src_sel_z = 1;
++ tex.src_sel_z = tex.src_sel_y;
+ } else if (inst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY)
+ tex.coord_type_z = 0;
+
+ if (inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D || inst->Texture.Texture == TGSI_TEXTURE_SHADOW2D)
+- tex.src_sel_w = 2;
++ tex.src_sel_w = tex.src_sel_z;
+
+ r = r600_bc_add_tex(ctx->bc, &tex);
+ if (r)
+diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
+index 6d02a7d..25c95c7 100644
+--- a/src/mesa/state_tracker/st_cb_blit.c
++++ b/src/mesa/state_tracker/st_cb_blit.c
+@@ -39,6 +39,7 @@
+ #include "st_texture.h"
+ #include "st_cb_blit.h"
+ #include "st_cb_fbo.h"
++#include "st_atom.h"
+
+ #include "util/u_blit.h"
+
+@@ -75,6 +76,8 @@ st_BlitFramebuffer(struct gl_context *ctx,
+ struct gl_framebuffer *readFB = ctx->ReadBuffer;
+ struct gl_framebuffer *drawFB = ctx->DrawBuffer;
+
++ st_validate_state(st);
++
+ if (!_mesa_clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1,
+ &dstX0, &dstY0, &dstX1, &dstY1)) {
+ return; /* nothing to draw/blit */
diff --git a/mesa.spec b/mesa.spec
index b33ed88..0898c70 100644
--- a/mesa.spec
+++ b/mesa.spec
@@ -6,28 +6,32 @@
%define with_hardware 1
%endif
+# broken atm, sorry. fix before any f15 merge.
+%define with_llvmcore 1
+
%define _default_patch_fuzz 2
%define manpages gl-manpages-1.0.1
-%define gitdate 20110107
+%define gitdate 20110327
#% define snapshot
Summary: Mesa graphics libraries
Name: mesa
-Version: 7.10.1
-Release: 1%{?dist}
+Version: 7.11
+Release: 0.1.%{gitdate}.0%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
#Source0: http://downloads.sf.net/mesa3d/MesaLib-%{version}.tar.bz2
#Source0: http://www.mesa3d.org/beta/MesaLib-%{version}%{?snapshot}.tar.bz2
-Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2
-#Source0: %{name}-%{gitdate}.tar.xz
+#Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2
+Source0: %{name}-%{gitdate}.tar.xz
Source2: %{manpages}.tar.bz2
Source3: make-git-snapshot.sh
Source4: llvmcore.mk
+Patch1: mesa-7.11-fixes.patch
Patch2: mesa-7.1-nukeglthread-debug.patch
Patch3: mesa-no-mach64.patch
Patch4: legacy-drivers.patch
@@ -38,21 +42,12 @@ Patch8: mesa-7.10-llvmcore.patch
Patch30: mesa-7.6-hush-vblank-warning.patch
Patch31: mesa-7.10-swrastg.patch
-# nouveau patches
-#
-# update nouveau gallium drivers to git as of 20110117, nvc0 support
-Patch50: mesa-7.10-nouveau-updates.patch
-# revert various bits to be compatible with 7.10
-Patch51: mesa-7.10-nouveau-revert.patch
-# fixup classic drivers to new libdrm api
-Patch52: mesa-7.10-nouveau-classic-libdrm.patch
-
BuildRequires: pkgconfig autoconf automake libtool
%if %{with_hardware}
BuildRequires: kernel-headers >= 2.6.27-0.305.rc5.git6
BuildRequires: xorg-x11-server-devel
%endif
-BuildRequires: libdrm-devel >= 2.4.24-0
+BuildRequires: libdrm-devel >= 2.4.24-1
BuildRequires: libXxf86vm-devel
BuildRequires: expat-devel >= 2.0
BuildRequires: xorg-x11-proto-devel >= 7.4-35
@@ -69,6 +64,7 @@ BuildRequires: llvm-static
BuildRequires: libxml2-python
BuildRequires: libudev-devel
BuildRequires: libtalloc-devel
+BuildRequires: bison flex
%description
Mesa
@@ -115,6 +111,7 @@ Group: User Interface/X Hardware Support
%description dri-filesystem
Mesa DRI driver filesystem
+%if %{with_llvmcore}
%package dri-llvmcore
Summary: Mesa common LLVM support
Group: User Interface/X Hardware Support
@@ -123,6 +120,7 @@ Requires: mesa-dri-filesystem%{?_isa}
Common DSO for LLVM support for gallium-based DRI drivers. This package
exists solely as a disk space hack for Mesa. Do not link against this
library if you are not Mesa. You have been warned.
+%endif
%package dri-drivers
Summary: Mesa-based DRI drivers
@@ -215,18 +213,19 @@ Requires: Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires vide
2D driver for VMware SVGA vGPU
%prep
-%setup -q -n Mesa-%{version}%{?snapshot} -b0 -b2
-#setup -q -n mesa-%{gitdate} -b2
+#setup -q -n Mesa-%{version}%{?snapshot} -b0 -b2
+%setup -q -n mesa-%{gitdate} -b2
+%patch1 -p1 -b .upstream
%patch2 -p1 -b .intel-glthread
%patch3 -p1 -b .no-mach64
%patch4 -p1 -b .classic
#patch7 -p1 -b .dricore
-%patch8 -p1 -b .llvmcore
%patch30 -p1 -b .vblank-warning
#patch31 -p1 -b .swrastg
-%patch50 -p1 -b .nv-update
-%patch51 -p1 -b .nv-revert
-%patch52 -p1 -b .nv-libdrm
+
+%if %{with_llvmcore}
+%patch8 -p1 -b .llvmcore
+%endif
%build
@@ -253,27 +252,11 @@ make clean
[ `find . -name \*.o | wc -l` -eq 0 ] || exit 1
# build llvmcore
-
-%ifarch %{sparc}
-# llvm does not have a native/optimized version of JIT for Sparc
-# but we can still use the interpreted version. Slower, but we don't care.
-#
-# This sed forcefully readd jit to llvm-cofing call that is removed by
-# mesa-7.10-llvmcore.patch.
-#
-# linux-llvm.llvmcore is the result of patch -b mesa-7.10-llvmcore.patch
-# changing defaults to accomodate the build and it is used by
-# SOURCE4 directly.
-#
-# Any change to the patch or to SOURCE4 might require a change here.
-#
-# Ideally llvm should grow native JIT support for Sparc....
-sed -i -e 's#engine#& jit#g' configs/linux-llvm.llvmcore
-%endif
-
+%if %{with_llvmcore}
TOP=`pwd` make -f %{SOURCE4} llvmcore
mkdir -p %{_lib}
mv libllvmcore*.so %{_lib}
+%endif
# now build the rest of mesa
%configure %{common_flags} \
@@ -318,7 +301,9 @@ make install DESTDIR=$RPM_BUILD_ROOT DRI_DIRS=
# just the DRI drivers that are sane
install -d $RPM_BUILD_ROOT%{_libdir}/dri
-install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libllvmcore-2.8.so >& /dev/null
+%if %{with_llvmcore}
+install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libllvmcore-2*.so >& /dev/null
+%endif
# use gallium driver iff built
[ -f %{_lib}/gallium/r300_dri.so ] && cp %{_lib}/gallium/r300_dri.so %{_lib}/r300_dri.so
[ -f %{_lib}/gallium/r600_dri.so ] && cp %{_lib}/gallium/r600_dri.so %{_lib}/r600_dri.so
@@ -380,8 +365,6 @@ rm -rf $RPM_BUILD_ROOT
%doc docs/COPYING
%{_libdir}/libEGL.so.1
%{_libdir}/libEGL.so.1.*
-%{_libdir}/egl/egl_glx.so
-%{_libdir}/egl/egl_dri2.so
%files libGLES
%defattr(-,root,root,-)
@@ -390,15 +373,19 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libGLESv1_CM.so.1.*
%{_libdir}/libGLESv2.so.2
%{_libdir}/libGLESv2.so.2.*
+%{_libdir}/libglapi.so.0
+%{_libdir}/libglapi.so.0.*
%files dri-filesystem
%defattr(-,root,root,-)
%doc docs/COPYING
%dir %{_libdir}/dri
+%if %{with_llvmcore}
%files dri-llvmcore
%defattr(-,root,root,-)
-%{_libdir}/dri/libllvmcore-2.8.so
+%{_libdir}/dri/libllvmcore-2.*.so
+%endif
%files dri-drivers
%defattr(-,root,root,-)
@@ -474,6 +461,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/glesv2.pc
%{_libdir}/libGLESv1_CM.so
%{_libdir}/libGLESv2.so
+%{_libdir}/libglapi.so
%files libGLU
%defattr(-,root,root,-)
@@ -499,6 +487,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libOSMesa.so
%changelog
+* Sun Mar 27 2011 Dave Airlie <airlied at redhat.com> 7.11-0.1.20110327.0
+- pull latest snapshot + 3 post snapshot fixes
+
* Wed Mar 23 2011 Adam Jackson <ajax at redhat.com> 7.10.1-1
- mesa 7.10.1
diff --git a/sources b/sources
index 4c1d96e..e8deb48 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2
-efe8da4d80c2a5d32a800770b8ce5dfa MesaLib-7.10.1.tar.bz2
+3ad97eb2b70c9cd1ec8483e826f02b01 mesa-20110327.tar.xz
More information about the scm-commits
mailing list