Rebased ref, commits from common ancestor: commit 5770a77af0c4eb2995694282ceacbd60038a63c4 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 18:18:21 2012 +0300
rules: Update the clean target. diff --git a/debian/changelog b/debian/changelog index 7526706..4b29352 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low * rules, libosmesa*: Build only the 32bit OSMesa library. * control: Bump libdrm build-dep to 2.4.38. * control: Bump libwayland-dev build-dep to 0.95. + * rules: Update the clean target. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/rules b/debian/rules index cd6a179..bc4bf8d 100755 --- a/debian/rules +++ b/debian/rules @@ -207,12 +207,16 @@ clean: unpatch rm -f conftest* */conftest* rm -rf autom4te.cache */autom4te.cache rm -rf build - rm -rf configure config.guess config.sub config.h.in + rm -rf configure bin/config.guess bin/config.sub config.h.in rm -rf $$(find -name Makefile.in) - rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh + rm -rf aclocal.m4 bin/missing bin/depcomp install-sh bin/ltmain.sh + rm -f bin/ar-lib bin/compile bin/ylwrap rm -rf $(STAMP_DIR) for file in debian/*.in; do rm -f $${file%%.in}; done ln -sf minstall bin/install-sh + rm -f src/glsl/builtins/tools/texture_builtins.pyc + rm -f src/mapi/glapi/gen/*.pyc + rm -f src/mesa/main/*.pyc dh_clean commit ad90cee1b6e0195b91e7e048fef6e5a91ff6564c Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 17:18:21 2012 +0300 control: Bump libwayland-dev build-dep to 0.95. diff --git a/debian/changelog b/debian/changelog index 8701aa5..7526706 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low * rules: Drop special handling of config.{guess,sub}, not needed anymore. * rules, libosmesa*: Build only the 32bit OSMesa library. * control: Bump libdrm build-dep to 2.4.38. + * control: Bump libwayland-dev build-dep to 0.95. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/control b/debian/control index 1f3e637..1a342fb 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,7 @@ Build-Depends: flex, bison, llvm-3.1-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386], - libwayland-dev (>= 0.85.0) [linux-any], + libwayland-dev (>= 0.95.0) [linux-any], Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git Homepage: http://mesa3d.sourceforge.net/ commit 7f9cb41a86ddc4e1db7143406c99d349e36e90ae Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 16:53:57 2012 +0300 control: Bump libdrm build-dep to 2.4.38. diff --git a/debian/changelog b/debian/changelog index a6386b5..8701aa5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low autoconf, automake from Depends. * rules: Drop special handling of config.{guess,sub}, not needed anymore. * rules, libosmesa*: Build only the 32bit OSMesa library. + * control: Bump libdrm build-dep to 2.4.38. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/control b/debian/control index 34515b1..1f3e637 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Build-Depends: debhelper (>= 8.1.3), quilt (>= 0.40), pkg-config, - libdrm-dev (>= 2.4.30) [!hurd-any], + libdrm-dev (>= 2.4.38) [!hurd-any], libx11-dev, xutils-dev, x11proto-gl-dev (>= 1.4.14), commit 9f238f5dcfcb291b6ed5448281d7e6df6c3fc46d Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 16:17:08 2012 +0300 rules, libosmesa*: Build only the 32bit OSMesa library. diff --git a/debian/changelog b/debian/changelog index 611e2b6..a6386b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low * control: Depend on dh-autoreconf, which pulls in libtool. Drop autoconf, automake from Depends. * rules: Drop special handling of config.{guess,sub}, not needed anymore. + * rules, libosmesa*: Build only the 32bit OSMesa library. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/libosmesa6-dev.install.in b/debian/libosmesa6-dev.install.in index 8453da0..bd7a488 100644 --- a/debian/libosmesa6-dev.install.in +++ b/debian/libosmesa6-dev.install.in @@ -1,8 +1,3 @@ usr/include/GL/osmesa.h -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa.a usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa.so -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa16.a -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa16.so -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa32.a -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa32.so usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/osmesa.pc diff --git a/debian/libosmesa6.install.in b/debian/libosmesa6.install.in index 5bfc5a3..1ada4d5 100644 --- a/debian/libosmesa6.install.in +++ b/debian/libosmesa6.install.in @@ -1,3 +1 @@ usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa.so.* -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa16.so.* -usr/lib/${DEB_HOST_MULTIARCH}/libOSMesa32.so.* diff --git a/debian/libosmesa6.shlibs b/debian/libosmesa6.shlibs index 3c9ae1a..f9315f6 100644 --- a/debian/libosmesa6.shlibs +++ b/debian/libosmesa6.shlibs @@ -1,3 +1 @@ libOSMesa 6 libosmesa6 (>= 6.5.2-1) | libgl1-mesa-glide3 -libOSMesa16 6 libosmesa6 (>= 6.5.2-1) -libOSMesa32 6 libosmesa6 (>= 6.5.2-1) diff --git a/debian/rules b/debian/rules index 64a50e3..cd6a179 100755 --- a/debian/rules +++ b/debian/rules @@ -39,13 +39,7 @@ include debian/not-installed # build the following configurations by default CONFIGS = swx11+glu \ swx11+glu-static \ - dri \ - osmesa \ - osmesa-static \ - osmesa16 \ - osmesa16-static \ - osmesa32 \ - osmesa32-static + dri ifeq ($(DEB_HOST_ARCH_CPU), i386) CONFIGS += swx11+glu-i386-i686 @@ -116,6 +110,7 @@ confflags-dri = \ --with-dri-drivers="$(DRI_DRIVERS)" \ --with-dri-driverdir=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \ --with-dri-searchpath='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri' \ + --enable-gl-osmesa \ --enable-glx-tls \ --enable-shared-glapi \ --enable-texture-float \ @@ -127,49 +122,6 @@ confflags-dri = \ $(confflags_OPENVG) \ $(confflags-common) -confflags-osmesa = \ - --disable-egl \ - --with-gallium-drivers= \ - --with-driver=osmesa \ - $(confflags-common) - -confflags-osmesa-static = \ - --disable-egl \ - --with-gallium-drivers= \ - --with-driver=osmesa \ - --enable-static \ - $(confflags-common) - -confflags-osmesa16 = \ - --disable-egl \ - --with-gallium-drivers= \ - --with-driver=osmesa \ - --with-osmesa-bits=16 \ - $(confflags-common) - -confflags-osmesa16-static = \ - --disable-egl \ - --with-gallium-drivers= \ - --with-driver=osmesa \ - --with-osmesa-bits=16 \ - --enable-static \ - $(confflags-common) - -confflags-osmesa32 = \ - --disable-egl \ - --with-gallium-drivers= \ - --with-driver=osmesa \ - --with-osmesa-bits=32 \ - $(confflags-common) - -confflags-osmesa32-static = \ - --disable-egl \ - --with-gallium-drivers= \ - --with-driver=osmesa \ - --with-osmesa-bits=32 \ - --enable-static \ - $(confflags-common) - confflags-swx11+glu = \ --disable-egl \ --with-gallium-drivers= \ commit 0ac62b32fcea35193a9d64e3fd1fb252e533bfa2 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 16:00:57 2012 +0300 rules: Drop special handling of config.{guess,sub}, not needed anymore. diff --git a/debian/changelog b/debian/changelog index b42597e..611e2b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low - switch to llvm-3.1. * control: Depend on dh-autoreconf, which pulls in libtool. Drop autoconf, automake from Depends. + * rules: Drop special handling of config.{guess,sub}, not needed anymore. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/rules b/debian/rules index 551cb75..64a50e3 100755 --- a/debian/rules +++ b/debian/rules @@ -196,10 +196,7 @@ confflags-swx11+glu-i386-i686 = \ CFLAGS="$(CFLAGS) -march=i686" \ CXXFLAGS="$(CXXFLAGS) -march=i686" -autotools_files = bin/config.guess bin/config.sub - configure: $(QUILT_STAMPFN) configure.ac - for file in $(autotools_files); do cp $$file $$file.pristine; done autoreconf -vfi # list the configurations that will built @@ -263,8 +260,6 @@ clean: unpatch rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh rm -rf $(STAMP_DIR) for file in debian/*.in; do rm -f $${file%%.in}; done - # Those are auto-updated, grr: - for file in $(autotools_files); do if [ -f $$file.pristine ]; then mv -f $$file.pristine $$file; fi; done ln -sf minstall bin/install-sh dh_clean commit fe09dc911688042f479a962a37140364de2282c8 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 15:56:36 2012 +0300 control: Depend on dh-autoreconf, which pulls in libtool. Drop autoconf, automake from Depends. diff --git a/debian/changelog b/debian/changelog index a1f921e..b42597e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low * Refresh patches - disable 05_kfreebsd-egl-x11.diff for now. - switch to llvm-3.1. + * control: Depend on dh-autoreconf, which pulls in libtool. Drop + autoconf, automake from Depends. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/control b/debian/control index 925d3e4..34515b1 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Maintainer: Debian X Strike Force <debian-x@lists.debian.org> Uploaders: Cyril Brulebois <k...@debian.org> Standards-Version: 3.8.4 Build-Depends: + dh-autoreconf, debhelper (>= 8.1.3), quilt (>= 0.40), pkg-config, @@ -18,8 +19,6 @@ Build-Depends: libxfixes-dev, libxdamage-dev, libxext-dev, - autoconf, - automake, x11proto-dri2-dev (>= 2.6), linux-libc-dev (>= 2.6.31) [linux-any], libx11-xcb-dev, commit fbf5bba7e7fea6fce78fffa0c87613fe7ecb085a Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 12:21:03 2012 +0300 bump the llvm-dev build-dep to 3.1 diff --git a/debian/control b/debian/control index ec59840..925d3e4 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,7 @@ Build-Depends: libudev-dev [linux-any], flex, bison, - llvm-2.9-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386], + llvm-3.1-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386], libwayland-dev (>= 0.85.0) [linux-any], Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git commit 5fb75fcbb57b105ab356c869d16657779445888b Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 11:40:49 2012 +0300 Refresh patches, disable 05_kfreebsd-egl-x11.diff for now. diff --git a/debian/changelog b/debian/changelog index 892ca08..a1f921e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low [ Timo Aaltonen ] * New upstream git snapshot. + * Refresh patches + - disable 05_kfreebsd-egl-x11.diff for now. + - switch to llvm-3.1. -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 diff --git a/debian/patches/04_osmesa_version.diff b/debian/patches/04_osmesa_version.diff index 19bd568..bf21c2c 100644 --- a/debian/patches/04_osmesa_version.diff +++ b/debian/patches/04_osmesa_version.diff @@ -2,16 +2,14 @@ src/mesa/drivers/osmesa/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: mesa/src/mesa/drivers/osmesa/Makefile -=================================================================== ---- mesa.orig/src/mesa/drivers/osmesa/Makefile -+++ mesa/src/mesa/drivers/osmesa/Makefile -@@ -37,7 +37,7 @@ - # -DCHAN_BITS=16/32. - $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA) - $(MKLIB) -o $(OSMESA_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ -- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ -+ -major 6 -minor 5 -patch 3 \ - -install $(TOP)/$(LIB_DIR) -cplusplus $(MKLIB_OPTIONS) \ - -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \ - $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA) +--- a/src/mesa/drivers/osmesa/Makefile.am ++++ b/src/mesa/drivers/osmesa/Makefile.am +@@ -35,7 +35,7 @@ + + lib@OSMESA_LIB@_la_SOURCES = osmesa.c + +-lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ -shared -no-undefined ++lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number 6.5.3 -shared -no-undefined + lib@OSMESA_LIB@_la_LIBADD = \ + $(top_builddir)/src/mesa/libmesa.la \ + $(top_builddir)/src/mapi/glapi/libglapi.la diff --git a/debian/patches/06_kfreebsd-ftbfs.diff b/debian/patches/06_kfreebsd-ftbfs.diff index e8a2881..cab24ed 100644 --- a/debian/patches/06_kfreebsd-ftbfs.diff +++ b/debian/patches/06_kfreebsd-ftbfs.diff @@ -5,11 +5,9 @@ mesa fails to build on GNU/kFreeBSD, since some parts are not enabled. Debian bug: http://bugs.debian.org/524690 -Index: mesa/configure.ac -=================================================================== ---- mesa.orig/configure.ac 2012-05-21 18:19:36.835922738 -0400 -+++ mesa/configure.ac 2012-05-21 18:19:43.047922906 -0400 -@@ -1215,7 +1215,7 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1160,7 +1160,7 @@ ;; esac ;; diff --git a/debian/patches/10-hurd-configure-tweaks.diff b/debian/patches/10-hurd-configure-tweaks.diff index 1bfe694..9a01f9f 100644 --- a/debian/patches/10-hurd-configure-tweaks.diff +++ b/debian/patches/10-hurd-configure-tweaks.diff @@ -1,11 +1,9 @@ Enable x86 assembler on Hurd. Thanks to Pino Toscano. -Index: mesa/configure.ac -=================================================================== ---- mesa.orig/configure.ac 2012-05-21 18:19:43.047922906 -0400 -+++ mesa/configure.ac 2012-05-21 18:19:43.639922922 -0400 -@@ -470,7 +470,7 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -454,7 +454,7 @@ case "$host_cpu" in i?86) case "$host_os" in diff --git a/debian/patches/13-llvm-config-pick-a-version.diff b/debian/patches/13-llvm-config-pick-a-version.diff index 432d2a9..4a60c1e 100644 --- a/debian/patches/13-llvm-config-pick-a-version.diff +++ b/debian/patches/13-llvm-config-pick-a-version.diff @@ -1,16 +1,18 @@ Several versions of llvm can coexist in the archive (at the time of this -writing, 2.8 and 2.9), so pick a version. Let's assume the last version -receives bug fixes quickly, so pick 2.9 for now. -Index: mesa/configure.ac -=================================================================== ---- mesa.orig/configure.ac 2012-05-21 18:19:43.639922922 -0400 -+++ mesa/configure.ac 2012-05-21 18:19:43.947922933 -0400 -@@ -1762,7 +1762,7 @@ - esac +writing, 2.9, 3.0 and 3.1), so pick a version. Let's assume the last version +receives bug fixes quickly, so pick 3.1 for now. + +--- a/configure.ac ++++ b/configure.ac +@@ -1822,9 +1822,9 @@ fi if test "x$enable_gallium_llvm" = xyes; then -- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) -+ AC_PATH_PROG([LLVM_CONFIG], [llvm-config-2.9], [no]) + if test "x$llvm_prefix" != x; then +- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"]) ++ AC_PATH_PROG([LLVM_CONFIG], [llvm-config-3.1], [no], ["$llvm_prefix/bin"]) + else +- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) ++ AC_PATH_PROG([LLVM_CONFIG], [llvm-config-3.1], [no]) + fi if test "x$LLVM_CONFIG" != xno; then - LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'` diff --git a/debian/patches/series b/debian/patches/series index 5746454..5bdf237 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,6 @@ 02_use-ieee-fp-on-s390-and-m68k.patch 04_osmesa_version.diff -05_kfreebsd-egl-x11.diff +#05_kfreebsd-egl-x11.diff 06_kfreebsd-ftbfs.diff 08-kfreebsd-gallium.diff 10-hurd-configure-tweaks.diff commit 5ff24b88a3e9fefab7c2821accdd640c7d8e6429 Author: Timo Aaltonen <tjaal...@ubuntu.com> Date: Thu Aug 16 10:47:06 2012 +0300 bump the version diff --git a/debian/changelog b/debian/changelog index e2b6c5d..892ca08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,11 @@ -mesa (8.0.4-2) UNRELEASED; urgency=low +mesa (8.1~git20120816.1597176f-1) UNRELEASED; urgency=low + [ Julien Cristau ] * Use xz for all binary packages not just *-dbg. + [ Timo Aaltonen ] + * New upstream git snapshot. + -- Julien Cristau <jcris...@debian.org> Fri, 03 Aug 2012 23:17:16 +0200 mesa (8.0.4-1) unstable; urgency=low commit 1597176f7090eea73f41b3114ae2a02a50ac7a12 Author: Vinson Lee <v...@freedesktop.org> Date: Sun Aug 12 00:20:21 2012 -0700 llvmpipe: Silence Coverity incorrect sizeof expression defect. Signed-off-by: Vinson Lee <v...@freedesktop.org> Reviewed-by: José Fonseca <jfons...@vmware.com> diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c index 1d5e50b..469a459 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c @@ -585,7 +585,7 @@ set_noalias(LLVMBuilderRef builder, int nr_args) { int i; - for(i = 0; i < Elements(arg_types); ++i) + for(i = 0; i < nr_args; ++i) if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind) LLVMAddAttribute(LLVMGetParam(function, i), LLVMNoAliasAttribute); commit 3d6892c4793ae1fd1ef82d40e4af8004393b0480 Author: Vinson Lee <v...@freedesktop.org> Date: Sun Aug 12 00:02:32 2012 -0700 scons: Add option to enable floating-point textures. Signed-off-by: Vinson Lee <v...@freedesktop.org> Reviewed-by: José Fonseca <jfons...@vmware.com> diff --git a/common.py b/common.py index 6121a41..6ff9608 100644 --- a/common.py +++ b/common.py @@ -98,5 +98,6 @@ def AddOptions(opts): opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes')) opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no')) opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes')) + opts.Add(BoolOption('texture_float', 'enable floating-point textures and renderbuffers', 'no')) if host_platform == 'windows': opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0'))) diff --git a/scons/gallium.py b/scons/gallium.py index f4776d8..8fc17b3 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -298,6 +298,10 @@ def generate(env): cppdefines += ['BEOS_THREADS'] if env['embedded']: cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED'] + if env['texture_float']: + print 'warning: Floating-point textures enabled.' + print 'warning: Please consult docs/patents.txt with your lawyer before building Mesa.' + cppdefines += ['TEXTURE_FLOAT_ENABLED'] env.Append(CPPDEFINES = cppdefines) # C compiler options commit 6a3ac03f2b80c80655d66b31c0218754f70156de Author: Dave Airlie <airl...@redhat.com> Date: Fri Mar 12 16:09:23 2010 +1000 glx/dri2: add dri2 prime support. This adds support for having libGL pick a different driver for prime support. DRI_PRIME env var is set to the value retrieved from the server randr provider calls, by the calling process. (generally DRI_PRIME=1 will be the right answer). Signed-off-by: Dave Airlie <airl...@redhat.com> diff --git a/src/glx/dri2.c b/src/glx/dri2.c index b1b5013..d6b99db 100644 --- a/src/glx/dri2.c +++ b/src/glx/dri2.c @@ -269,6 +269,7 @@ DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName) XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2ConnectReply rep; xDRI2ConnectReq *req; + char *prime; XextCheckExtension(dpy, info, dri2ExtensionName, False); @@ -277,7 +278,19 @@ DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName) req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2Connect; req->window = window; + req->driverType = DRI2DriverDRI; +#ifdef DRI2DriverPrimeShift + prime = getenv("DRI_PRIME"); + if (prime) { + uint32_t primeid; + errno = 0; + primeid = strtoul(prime, NULL, 0); + if (errno == 0) + req->driverType |= ((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift); + } +#endif + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); commit 565a4e2a8625c79bde0eacf674a4f633151eeb0e Author: Vincent Lejeune <v...@ovi.com> Date: Wed Aug 1 22:49:44 2012 +0200 radeon/llvm: Enable if-cvt Signed-off-by: Tom Stellard <thomas.stell...@amd.com> diff --git a/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp b/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp index 6b50128..b97c0fe 100644 --- a/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp +++ b/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp @@ -29,6 +29,7 @@ #include "llvm/Support/raw_os_ostream.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" +#include <llvm/CodeGen/Passes.h> using namespace llvm; @@ -148,6 +149,8 @@ bool AMDGPUPassConfig::addPostRegAlloc() { } bool AMDGPUPassConfig::addPreSched2() { + + addPass(IfConverterID); return false; } commit a614979286f8d329af318c1e9fb067e17cab4315 Author: Vincent Lejeune <v...@ovi.com> Date: Wed Aug 1 22:49:43 2012 +0200 radeon/llvm: Add callbacks needed by if-cvt Signed-off-by: Tom Stellard <thomas.stell...@amd.com> diff --git a/src/gallium/drivers/radeon/R600InstrInfo.cpp b/src/gallium/drivers/radeon/R600InstrInfo.cpp index 4a396ef..7a8a58e 100644 --- a/src/gallium/drivers/radeon/R600InstrInfo.cpp +++ b/src/gallium/drivers/radeon/R600InstrInfo.cpp @@ -17,7 +17,6 @@ #include "R600RegisterInfo.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "AMDILUtilityFunctions.h" -#include "AMDGPUUtil.h" #define GET_INSTRINFO_CTOR #include "AMDGPUGenDFAPacketizer.inc" @@ -391,7 +390,6 @@ R600InstrInfo::isPredicated(const MachineInstr *MI) const if (idx < 0) return false; - MI->dump(); unsigned Reg = MI->getOperand(idx).getReg(); switch (Reg) { default: return false; @@ -407,3 +405,117 @@ R600InstrInfo::isPredicable(MachineInstr *MI) const { return AMDGPUInstrInfo::isPredicable(MI); } + + +bool +R600InstrInfo::isProfitableToIfCvt(MachineBasicBlock &MBB, + unsigned NumCyles, + unsigned ExtraPredCycles, + const BranchProbability &Probability) const{ + return true; +} + +bool +R600InstrInfo::isProfitableToIfCvt(MachineBasicBlock &TMBB, + unsigned NumTCycles, + unsigned ExtraTCycles, + MachineBasicBlock &FMBB, + unsigned NumFCycles, + unsigned ExtraFCycles, + const BranchProbability &Probability) const +{ + return true; +} + +bool +R600InstrInfo::isProfitableToDupForIfCvt(MachineBasicBlock &MBB, + unsigned NumCyles, + const BranchProbability &Probability) + const +{ + return true; +} + +bool +R600InstrInfo::isProfitableToUnpredicate(MachineBasicBlock &TMBB, + MachineBasicBlock &FMBB) const +{ + return false; +} + + +bool +R600InstrInfo::ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const +{ + MachineOperand &MO = Cond[1]; + switch (MO.getImm()) { + case OPCODE_IS_ZERO_INT: + MO.setImm(OPCODE_IS_NOT_ZERO_INT); + break; + case OPCODE_IS_NOT_ZERO_INT: + MO.setImm(OPCODE_IS_ZERO_INT); + break; + case OPCODE_IS_ZERO: + MO.setImm(OPCODE_IS_NOT_ZERO); + break; + case OPCODE_IS_NOT_ZERO: + MO.setImm(OPCODE_IS_ZERO); + break; + default: + return true; + } + + MachineOperand &MO2 = Cond[2]; + switch (MO2.getReg()) { + case AMDGPU::PRED_SEL_ZERO: + MO2.setReg(AMDGPU::PRED_SEL_ONE); + break; + case AMDGPU::PRED_SEL_ONE: + MO2.setReg(AMDGPU::PRED_SEL_ZERO); + break; + default: + return true; + } + return false; +} + +bool +R600InstrInfo::DefinesPredicate(MachineInstr *MI, + std::vector<MachineOperand> &Pred) const +{ + return isPredicateSetter(MI->getOpcode()); +} + + +bool +R600InstrInfo::SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1, + const SmallVectorImpl<MachineOperand> &Pred2) const +{ + return false; +} + + +bool +R600InstrInfo::PredicateInstruction(MachineInstr *MI, + const SmallVectorImpl<MachineOperand> &Pred) const +{ + int PIdx = MI->findFirstPredOperandIdx(); + + if (PIdx != -1) { + MachineOperand &PMO = MI->getOperand(PIdx); + PMO.setReg(Pred[2].getReg()); + MachineInstrBuilder(MI).addReg(AMDGPU::PREDICATE_BIT, RegState::Implicit); + return true; + } + + return false; +} + +int R600InstrInfo::getInstrLatency(const InstrItineraryData *ItinData, + const MachineInstr *MI, + unsigned *PredCost) const +{ + if (PredCost) + *PredCost = 2; + return 2; +} diff --git a/src/gallium/drivers/radeon/R600InstrInfo.h b/src/gallium/drivers/radeon/R600InstrInfo.h index 2819b0b..6e184cc 100644 --- a/src/gallium/drivers/radeon/R600InstrInfo.h +++ b/src/gallium/drivers/radeon/R600InstrInfo.h @@ -64,6 +64,9 @@ namespace llvm { DFAPacketizer *CreateTargetScheduleState(const TargetMachine *TM, const ScheduleDAG *DAG) const; + + bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const; + bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl<MachineOperand> &Cond, bool AllowModify) const; @@ -74,6 +77,40 @@ namespace llvm { bool isPredicated(const MachineInstr *MI) const; bool isPredicable(MachineInstr *MI) const; + + bool + isProfitableToDupForIfCvt(MachineBasicBlock &MBB, unsigned NumCyles, + const BranchProbability &Probability) const; + + bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCyles, + unsigned ExtraPredCycles, + const BranchProbability &Probability) const ; + + bool + isProfitableToIfCvt(MachineBasicBlock &TMBB, + unsigned NumTCycles, unsigned ExtraTCycles, + MachineBasicBlock &FMBB, + unsigned NumFCycles, unsigned ExtraFCycles, + const BranchProbability &Probability) const; + + bool DefinesPredicate(MachineInstr *MI, + std::vector<MachineOperand> &Pred) const; + + bool SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1, + const SmallVectorImpl<MachineOperand> &Pred2) const; + + bool isProfitableToUnpredicate(MachineBasicBlock &TMBB, + MachineBasicBlock &FMBB) const; + + bool PredicateInstruction(MachineInstr *MI, + const SmallVectorImpl<MachineOperand> &Pred) const; + + int getInstrLatency(const InstrItineraryData *ItinData, + const MachineInstr *MI, + unsigned *PredCost = 0) const; + + virtual int getInstrLatency(const InstrItineraryData *ItinData, + SDNode *Node) const { return 1;} }; } // End llvm namespace commit 0eca5fd919b0a31ea926b5f5072e5e56f7a55269 Author: Vincent Lejeune <v...@ovi.com> Date: Wed Aug 1 22:49:42 2012 +0200 radeon/llvm: Lower branch/branch_cond into predicated jump Signed-off-by: Tom Stellard <thomas.stell...@amd.com> diff --git a/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp b/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp index 2af0367..03a647e 100644 --- a/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp +++ b/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp @@ -97,124 +97,6 @@ bool AMDGPUInstrInfo::getNextBranchInstr(MachineBasicBlock::iterator &iter, return false; } -bool AMDGPUInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, - MachineBasicBlock *&TBB, - MachineBasicBlock *&FBB, - SmallVectorImpl<MachineOperand> &Cond, - bool AllowModify) const { - bool retVal = true; - return retVal; - MachineBasicBlock::iterator iter = MBB.begin(); - if (!getNextBranchInstr(iter, MBB)) { - retVal = false; - } else { - MachineInstr *firstBranch = iter; - if (!getNextBranchInstr(++iter, MBB)) { - if (firstBranch->getOpcode() == AMDGPU::BRANCH) { - TBB = firstBranch->getOperand(0).getMBB(); - firstBranch->eraseFromParent(); - retVal = false; - } else { - TBB = firstBranch->getOperand(0).getMBB(); - FBB = *(++MBB.succ_begin()); - if (FBB == TBB) { - FBB = *(MBB.succ_begin()); - } - Cond.push_back(firstBranch->getOperand(1)); - retVal = false; - } - } else { - MachineInstr *secondBranch = iter; - if (!getNextBranchInstr(++iter, MBB)) { - if (secondBranch->getOpcode() == AMDGPU::BRANCH) { - TBB = firstBranch->getOperand(0).getMBB(); - Cond.push_back(firstBranch->getOperand(1)); - FBB = secondBranch->getOperand(0).getMBB(); - secondBranch->eraseFromParent(); - retVal = false; - } else { - assert(0 && "Should not have two consecutive conditional branches"); - } - } else { - MBB.getParent()->viewCFG(); - assert(0 && "Should not have three branch instructions in" - " a single basic block"); - retVal = false; - } - } - } - return retVal; -} - -unsigned int AMDGPUInstrInfo::getBranchInstr(const MachineOperand &op) const { - const MachineInstr *MI = op.getParent(); - - switch (MI->getDesc().OpInfo->RegClass) { - default: // FIXME: fallthrough?? - case AMDGPU::GPRI32RegClassID: return AMDGPU::BRANCH_COND_i32; - case AMDGPU::GPRF32RegClassID: return AMDGPU::BRANCH_COND_f32; - }; -} - -unsigned int -AMDGPUInstrInfo::InsertBranch(MachineBasicBlock &MBB, - MachineBasicBlock *TBB, - MachineBasicBlock *FBB, - const SmallVectorImpl<MachineOperand> &Cond, - DebugLoc DL) const -{ - assert(TBB && "InsertBranch must not be told to insert a fallthrough"); - for (unsigned int x = 0; x < Cond.size(); ++x) { - Cond[x].getParent()->dump(); - } - if (FBB == 0) { - if (Cond.empty()) { - BuildMI(&MBB, DL, get(AMDGPU::BRANCH)).addMBB(TBB); - } else { - BuildMI(&MBB, DL, get(getBranchInstr(Cond[0]))) - .addMBB(TBB).addReg(Cond[0].getReg()); - } - return 1; - } else { - BuildMI(&MBB, DL, get(getBranchInstr(Cond[0]))) - .addMBB(TBB).addReg(Cond[0].getReg()); - BuildMI(&MBB, DL, get(AMDGPU::BRANCH)).addMBB(FBB); - } - assert(0 && "Inserting two branches not supported"); - return 0; -} - -unsigned int AMDGPUInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { - MachineBasicBlock::iterator I = MBB.end(); - if (I == MBB.begin()) { - return 0; - } - --I; - switch (I->getOpcode()) { - default: - return 0; - ExpandCaseToAllScalarTypes(AMDGPU::BRANCH_COND); - case AMDGPU::BRANCH: - I->eraseFromParent(); - break; - } - I = MBB.end(); - - if (I == MBB.begin()) { - return 1; - } - --I; - switch (I->getOpcode()) { - // FIXME: only one case?? - default: - return 1; - ExpandCaseToAllScalarTypes(AMDGPU::BRANCH_COND); - I->eraseFromParent(); - break; - } - return 2; -} - MachineBasicBlock::iterator skipFlowControl(MachineBasicBlock *MBB) { MachineBasicBlock::iterator tmp = MBB->end(); if (!MBB->size()) { diff --git a/src/gallium/drivers/radeon/AMDGPUInstrInfo.h b/src/gallium/drivers/radeon/AMDGPUInstrInfo.h index 28952cf..31400a7 100644 --- a/src/gallium/drivers/radeon/AMDGPUInstrInfo.h +++ b/src/gallium/drivers/radeon/AMDGPUInstrInfo.h @@ -49,8 +49,6 @@ private: TargetMachine &TM; bool getNextBranchInstr(MachineBasicBlock::iterator &iter, MachineBasicBlock &MBB) const; - unsigned int getBranchInstr(const MachineOperand &op) const; - public: explicit AMDGPUInstrInfo(TargetMachine &tm); @@ -77,18 +75,6 @@ public: MachineBasicBlock::iterator &MBBI, LiveVariables *LV) const; - bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, - MachineBasicBlock *&FBB, - SmallVectorImpl<MachineOperand> &Cond, - bool AllowModify) const; - - unsigned RemoveBranch(MachineBasicBlock &MBB) const; - - unsigned - InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, - MachineBasicBlock *FBB, - const SmallVectorImpl<MachineOperand> &Cond, -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1t21sm-00077t...@vasks.debian.org