LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-12-2013, 03:40 AM   #31
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 503

Original Poster
Rep: Reputation: 38

Quote:
Originally Posted by ReaperX7 View Post
If you plan to have libmesa with vdpau support, remember also, you'll have to build libvdpau twice. Once before you build libmesa to include vdpau support in libmesa, and once afterwards to rebuild it against libmesa.
Actually in my case it worked with just one time.
At least vdpauinfo prints the correct information.
 
Old 11-12-2013, 08:24 AM   #32
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,616
Blog Entries: 2

Rep: Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072
Tried this, works. When testing a 720P HD video (with MPlayer, compiled with --enable-vdpau) I get much lower CPU usage when using vo=vdpau than with vo=xv, so it seems to work fine. I think I will look into using Glamor for 2D acceleration next
.
 
Old 11-12-2013, 11:24 AM   #33
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 500

Rep: Reputation: 83
Quote:
Originally Posted by mlpa View Post
Actually in my case it worked with just one time.
At least vdpauinfo prints the correct information.
Cool, man. I run with this mms.config:
Quote:
# /etc/adobe/mms.cfg
# Adobe player settings
EnableLinuxHWVideoDecode=1
AVHardwareDisable = 0
FullScreenDisable = 0
LocalFileReadDisable = 1
FileDownloadDisable = 1
FileUploadDisable = 1
LocalStorageLimit = 1
ThirdPartyStorage = 1
AssetCacheSize = 10
AutoUpdateDisable = 1
LegacyDomainMatching = 0
LocalFileLegacyAction = 0
AllowUserLocalTrust = 0
#ProtectedMode=0
#OverrideGPUValidation=1
Some information here and some more options you'll find at page 22 in the admin guide for 11.2, assuming you run with Adobe player for Linux.

Again, nice to know you made it

Quote:
Originally Posted by TobiSGD View Post
Tried this, works. When testing a 720P HD video (with MPlayer, compiled with --enable-vdpau) I get much lower CPU usage when using vo=vdpau than with vo=xv, so it seems to work fine. I think I will look into using Glamor for 2D acceleration next
.
Double nice

Last edited by BrZ; 11-12-2013 at 11:29 AM. Reason: Remove direct link to Adobe paper
 
1 members found this post helpful.
Old 07-04-2014, 03:34 AM   #34
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
Quote:
Originally Posted by mlpa View Post
Slackware 14.1 is almost ready.
I send a email to Patrick asking to consider mesa 9.2.2, libva and libvdpau in this upcoming release.
Nowadays linux is gaining attention in the graphics department, and it would be important if Slackware offers these little utilities that help the laptop and desktop user.
What is the current status of radeon driver in Slackware64 14.1/current? I recently discovered (after clean Slackware 14.1 install and upgrade to current) that radeon driver being used "out of the box" has DRI and XV disabled on my PCI-X Radeon HD 7870(Pitcairn/Southern Islands), SW rasterizer is used for OpenGL. Previously(on different Slackware 32 bit installation) I only used proprietary AMD Catalyst driver(fglrx) - now I want to give free radeon a try - I want to use KMS which works now and is not possible if I install fglrx. What is Slackware-current missing? I've already upgraded Mesa to 10.2.2 - no luck, DRI is still not used. Do I have to rebuild my X11 package also(and this includes rebuilding all dependent packages ) ? Must I use glamoregl module to have DRI enabled?(actually tried this - it is loaded but not used by X11/radeon). I'm confused by so many configuration options - there's also some radeonsi driver - should I try to use it - how? Do I have to rebuild radeon_drv.so module also?
 
Old 07-04-2014, 02:51 PM   #35
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 205

Rep: Reputation: 61
The radeon driver on Mesa 10.2.2 uses gallium for 3D features and gallium can IMHO only be compiled with LLVM (with shared libraries).

I have a Radeon 6800 that uses the r600 driver and it works much better than fglrx on the latest Mesa trunk from two days ago. I don't know if it can be built without gallium anymore, but I don't think so.

Look at my signature, you can find SlackBuilds for the latest Mesa there. I tested them for Slackware64 -current, but they should work on 14.1, too.

Last edited by schmatzler; 07-04-2014 at 02:54 PM.
 
Old 07-04-2014, 11:03 PM   #36
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: LFS-7.6, Slackware 14.1, FreeBSD 10.1
Posts: 3,657
Blog Entries: 15

Rep: Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126
Gallium is the new API they are using with Mesa3D through LLVM. Fairly much just about all the modern cards from Nvidia, AMD, and Intel (in a few cases) use Gallium rather than the older Tungsten API.
 
Old 07-05-2014, 08:26 AM   #37
truepatriot76
LQ Newbie
 
Registered: Apr 2014
Distribution: Slackware
Posts: 11

Rep: Reputation: Disabled
Quote:
Originally Posted by dad_ View Post
What is the current status of radeon driver in Slackware64 14.1/current? I recently discovered (after clean Slackware 14.1 install and upgrade to current) that radeon driver being used "out of the box" has DRI and XV disabled on my PCI-X Radeon HD 7870(Pitcairn/Southern Islands), SW rasterizer is used for OpenGL. Previously(on different Slackware 32 bit installation) I only used proprietary AMD Catalyst driver(fglrx) - now I want to give free radeon a try - I want to use KMS which works now and is not possible if I install fglrx. What is Slackware-current missing? I've already upgraded Mesa to 10.2.2 - no luck, DRI is still not used. Do I have to rebuild my X11 package also(and this includes rebuilding all dependent packages ) ? Must I use glamoregl module to have DRI enabled?(actually tried this - it is loaded but not used by X11/radeon). I'm confused by so many configuration options - there's also some radeonsi driver - should I try to use it - how? Do I have to rebuild radeon_drv.so module also?
This is how I went about updating Mesa for my Kaveri APU with the open source drivers. I am currently running kernel 3.14.4/Slackware 14.1_x64 (not current)/mesa 10.2.2

01) build latest libdrm
02) build latest libedit
03) build latest llvm 3.4.2 (note: --enable-shared)
04) build latest libvdpau
05) build latest presentproto
06) build latest xcbproto
07) build latest libxcb
08) build latest libxshmfence
09) build latest dri3proto
10) build latest libclc
11) build latest opencl-headers
12) build latest ocl-icd
13) build latest mesa 10.2.2
14) build latest mesa-demos
15) rebuild libvdpau against current mesa
16) build latest glamor
17) build latest xf86-video-ati (7.4.0)

A few of the slackbuilds can be found here

* Rename /etc/X11/xorg.conf-vesa to something else

* Create /etc/X11/xorg.conf.d/glamor.conf

Here's my glamor.conf
Code:
Section "Module"
    Load "glamoregl"
EndSection
Section "Device"
    Identifier "radeon"
    Driver "radeon"
    Option "AccelMethod" "glamor"
    Option "ColorTiling" "on"
    Option "ColorTiling2D" "on"
EndSection
* Create /etc/modprobe.d/radeon-kms.conf
Code:
options radeon modeset=1
* I pass the following variables to the kernel at boot
Code:
radeon.dpm=1 radeon.gartsize-2048 radeon.fastfb=1 drm.rnodes=1
Here's my llvm.SlackBuild --- sources are here (you need both clang & llvm)
Code:
#!/bin/sh

# Slackware build script for llvm

# Copyright 2008-2013 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2012, 2013, 2014  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PKGNAM=llvm
VERSION=3.4.2
BUILD=${BUILD:-1}

NUMJOBS=${NUMJOBS:-" -j7 "}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-${VERSION}.src $PKGNAM-${VERSION}
tar xvf $CWD/$PKGNAM-$VERSION.src.tar.gz || exit 1

cd $PKGNAM-${VERSION}/tools || cd $PKGNAM-${VERSION}.src/tools || exit 1
  tar xvf $CWD/cfe-$VERSION.src.tar.gz || exit 1
  mv cfe-${VERSION} clang || mv cfe-${VERSION}.src clang || exit 1
cd ../

chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# --mandir doesn't work currently
# need to disable assertions to make llvm thread-safe
# clang resource dir is a relative path based on the location of the clang binary
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib$LIBDIRSUFFIX \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --enable-optimized \
  --enable-shared \
  --disable-assertions \
  --enable-pic \
  --enable-experimental-targets=R600 \
  --with-clang-resource-dir="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
  --build=$ARCH-slackware-linux \
  --host=$ARCH-slackware-linux || exit 1

# Fix hardcoded libdir
sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
  Makefile.config
sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
  tools/clang/lib/Headers/Makefile
sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
  tools/clang/lib/Frontend/CompilerInvocation.cpp
sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
  tools/clang/lib/Driver/Tools.cpp
sed -i "s|ActiveLibDir = ActivePrefix + \"/lib\"|ActiveLibDir = ActivePrefix + \"/lib${LIBDIRSUFFIX}\"|g" \
  tools/llvm-config/llvm-config.cpp

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1

# Add symlinks for $ARCH-slackware-linux-{clang,clang++}:
( cd $PKG/usr/bin
  ln -sf clang $ARCH-slackware-linux-clang
  ln -sf clang++ $ARCH-slackware-linux-clang++
)

# install clang-static-analyzer
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer
cp -pr tools/clang/tools/scan-{build,view} \
  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/ || exit 1
for i in scan-{build,view}; do
  ln -s /usr/lib$LIBDIRSUFFIX/clang-analyzer/$i/$i \
    $PKG/usr/bin/$i || exit 1
done
for i in ccc c++; do
  ln -s /usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/$i-analyzer \
    $PKG/usr/bin/$i-analyzer || exit 1
done

# Fix paths in scan-build
sed -i "s|\$RealBin/bin|/usr/bin|" \
  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
sed -i "s|\$RealBin/sorttable.js|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/sorttable.js|" \
  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
sed -i "s|\$RealBin/scanview.css|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/scanview.css|" \
  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build

# Remove example libraries
rm -f $PKG/usr/lib$LIBDIRSUFFIX/LLVMHello*

# Move man page directory:
mv $PKG/usr/share/man $PKG/usr/
# Try to remove /usr/share, which should be empty now.  If it's not, fine.
rmdir $PKG/usr/share

# Move scan-build man-page into place
mv $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build.1 \
  $PKG/usr/man/man1/

# Strip binaries:
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)

# Compress manual pages:
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

mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/clang
cp -a CREDITS* LICENSE* README* $PKG/usr/doc/$PKGNAM-$VERSION
cp -a tools/clang/{INSTALL,LICENSE,NOTES,README}* \
  $PKG/usr/doc/$PKGNAM-$VERSION/clang
mv $PKG/usr/docs/llvm/* $PKG/usr/doc/$PKGNAM-$VERSION
rm -rf $PKG/usr/docs

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
Here's the modified mesa.Slackbuild I use for 10.2.2 (needs automake 1.14)
Code:
#!/bin/sh
#-- mesa for Slackware --
# Build script by Phantom X <megaphantomx at bol.com.br> **modified**!!
# Suggested usage: $ mesa.SlackBuild 2>&1 | tee build.log
#-- 
# Copyright 2008-2014 Phantom X, Goiania, Brazil.
# Copyright 2006 Martijn Dekker, Groningen, Netherlands.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# http://www.mesa3d.org/

PACKAGER_ID=${PACKAGER_ID:-$USER}
PACKAGER=${PACKAGER:-$USER@$HOSTNAME}

# Set YES for native build with gcc >= 4.2
SB_NATIVE=${SB_NATIVE:-NO}

# Set to YES to replicate slackbuild and patches
SB_REP=${SB_REP:-YES}

CWD=$(pwd)
TMP=${TMP:-/tmp}
if [ ! -d ${TMP} ]; then
  mkdir -p ${TMP}
fi

PNAME=Mesa
NAME=mesa
PKG=${PKG:-${TMP}/package-${NAME}}

VERSION=${VERSION:-10.2.2}
if [ "$( echo ${VERSION} | cut -d . -f 3 )" -eq 0 ] ;then
  SVER=$(echo ${VERSION} | cut -d- -f1 | cut -d . -f 1-2 )
else
  SVER=$(echo ${VERSION} | cut -d- -f1 )
fi
if [ "${SB_NATIVE}" = "YES" ] ;then
  ARCH=${ARCH:-$(uname -m)}
else
  ARCH=${ARCH:-x86_64}
fi
if [ "${ARCH}" = "x86_64" ] ;then
  SLKTARGET=${SLKTARGET:-x86_64}
else
  SLKTARGET=${SLKTARGET:-i486}
fi
SLKDTARGET=${SLKDTARGET:-slackware}
BUILD=${BUILD:-1}
NJOBS=${NJOBS:-$(( $(getconf _NPROCESSORS_ONLN) + 1 ))}
DOCDIR=${PKG}/usr/doc/${NAME}-${VERSION}
SBDIR=${PKG}/usr/src/slackbuilds/${NAME}
PKGDEST=${PKGDEST:-${CWD}}
PKGFORMAT=${PKGFORMAT:-txz}
PKGNAME=${NAME}-$(echo ${VERSION} | tr - . )-${ARCH}-${BUILD}${PACKAGER_ID}

DATE=$(LC_ALL=C date +%d-%b-%Y)

SRCDIR=${PNAME}-${VERSION}
SRCARCHIVE=${PNAME}Lib-${VERSION}.tar.bz2
SRCARCHIVE2=${PNAME}GLUT-${VERSION}.tar.bz2
ESRCARCHIVE=nouveau_class.h.xz

DL_PROG=${DL_PROG:-wget}
DL_TO=${DL_TO:-5}
DL_OPTS=${DL_OPTS:-"--timeout=${DL_TO}"}
MIRROR_SF=${MIRROR_SF:-http://prdownloads.sourceforge.net}
DL_URL="ftp://ftp.freedesktop.org/pub/mesa/${SVER}"
DL_URL2="${MIRROR_SF}/mesa3d"
DL_URLB="http://www.mesa3d.org/beta"
DL_URLB2="ftp://ftp.freedesktop.org/pub/mesa/beta"
EDL_URL="http://cloud.github.com/downloads/PhantomX/slackbuilds/${ESRCARCHIVE}"

# if source is not present, download in source rootdir if possible
test -r ${CWD}/${SRCARCHIVE} || ${DL_PROG} ${DL_OPTS} ${DL_URLB}/${SRCARCHIVE} || ${DL_PROG} ${DL_OPTS} ${DL_URLB2}/${SRCARCHIVE}
test -r ${CWD}/${SRCARCHIVE} || ${DL_PROG} ${DL_OPTS} ${DL_URL}/${SRCARCHIVE} || ${DL_PROG} ${DL_OPTS} ${DL_URL2}/${SRCARCHIVE} || exit 1

if [ "${SB_GLUT}" = "YES" ] ; then
  test -r ${CWD}/${SRCARCHIVE2} || \
    ${DL_PROG} ${DL_OPTS} ${DL_URLB}/${SRCARCHIVE2} || ${DL_PROG} ${DL_OPTS} ${DL_URLB2}/${SRCARCHIVE2}
  test -r ${CWD}/${SRCARCHIVE2} || \
    ${DL_PROG} ${DL_OPTS} ${DL_URL}/${SRCARCHIVE2} || ${DL_PROG} ${DL_OPTS} ${DL_URL2}/${SRCARCHIVE2} || exit 1
fi
#test -r ${CWD}/${ESRCARCHIVE} || ${DL_PROG} ${DL_OPTS} ${HDL_URL}/${ESRCARCHIVE} || exit 1

if [ "${SB_NATIVE}" = "YES" ] ;then
  SLKCFLAGS="-O2 -march=native -mtune=native -pipe"
  [ "${SB_ECFLAGS}" ] && SLKCFLAGS="${SLKCFLAGS} ${SB_ECFLAGS}"
else
  case "${ARCH}" in
    i[3-6]86)    SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
                 ;;
    x86_64)      SLKCFLAGS="-O2 -fPIC"
                 ;;
    s390|*)      SLKCFLAGS="-O2"
                 ;;
  esac
fi
if [ "${ARCH}" = "x86_64" ] ;then
  LIBDIRSUFFIX="64"
  SLKCFLAGS="${SLKCFLAGS} -fPIC"
else
  LIBDIRSUFFIX=""
fi

if [ -d ${PKG} ]; then
  # Clean up a previous build
  rm -rf ${PKG}
fi
mkdir -p ${PKG}

cd ${TMP}
rm -rf ${SRCDIR}
tar -xvf ${CWD}/${SRCARCHIVE} || exit 1
if [ "${SB_GLUT}" = "YES" ] ; then
  tar -xvf ${CWD}/${SRCARCHIVE2} || exit 1
fi
cd ${SRCDIR} || exit 1

chmod -R u+w,go+r-w,a-s .

unset SB_AUTOGEN
if [ -r ${CWD}/apply-patches.sh ]; then
  . ${CWD}/apply-patches.sh
fi

# radeonsi - needs llvm 3.2 with R600 target
SB_GALLIUMDRV="r300,r600,nouveau,radeonsi,svga,swrast"

if [ "${SB_AUTOGEN}" = "YES" ] ;then
  autoreconf -ivf || exit $?
fi

CPPFLAGS="-I/usr/include/libelf" \
CFLAGS="${SLKCFLAGS}" \
CXXFLAGS="${SLKCFLAGS}" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var/lib \
  --infodir=/usr/info \
  --mandir=/usr/man \
  --docdir=/usr/doc/${NAME}-${VERSION} \
  --disable-silent-rules \
  --with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
  --enable-glx-tls \
  --enable-texture-float=yes \
  --enable-egl \
  --with-egl-platforms=x11,drm \
  --enable-gles1 \
  --enable-gles2 \
  --enable-shared-glapi \
  --enable-gbm \
  --with-gallium-drivers=${SB_GALLIUMDRV} \
  --enable-gallium-llvm \
  --enable-vdpau \
  --enable-openvg \
  --enable-gallium-egl \
  --enable-opencl \
  --enable-opencl-icd \
  --with-clang-libdir=/usr/lib${LIBDIRSUFFIX} \
  --enable-osmesa \
  --enable-xa \
  --build=${SLKTARGET}-${SLKDTARGET}-linux || exit 1

# Build and install:
make clean
make -j${NJOBS} || make || exit 1
make install DESTDIR=${PKG} DRI_DIRS= || exit $?

# find ${PKG} -name '*.la' -delete

mkdir -p ${PKG}/usr/include/KHR
install -m 0644 include/KHR/*.h ${PKG}/usr/include/KHR/ || exit 1

# just the DRI drivers that are sane
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri

for f in i810 i915 i965 mach64 mga r128 r300 r600 radeonsi savage sis swrast tdfx unichrome nouveau gallium/vmwgfx ; do
  so=lib${LIBDIRSUFFIX}/${f}_dri.so
  test -e ${so} && echo ${so}
done | xargs install -m 0755 -t ${PKG}/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri/ >& /dev/null

# Hack to not conflicting with nvidia-glx
mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/mesa

for libname in libEGL libGL libGLESv2 ;do
  mv ${PKG}/usr/lib${LIBDIRSUFFIX}/${libname}.so.* \
     ${PKG}/usr/lib${LIBDIRSUFFIX}/mesa/ || exit 1
  reldir=mesa
  oldlink=$(readlink ${PKG}/usr/lib${LIBDIRSUFFIX}/${libname}.so)
  ln -sf ${reldir}/$(basename ${oldlink}) ${PKG}/usr/lib${LIBDIRSUFFIX}/${libname}.so || exit 1
done

# ld.so.conf 
mkdir -p ${PKG}/etc/ld.so.conf.d
echo "/usr/lib${LIBDIRSUFFIX}/mesa" \
  > ${PKG}/etc/ld.so.conf.d/98-mesa-${ARCH}.conf || exit 1

rm -f ${PKG}/usr/include/GL/{glew,glxew,wglew,glf*,glut*}.h
rm -f ${PKG}/usr/include/GL/[a-fh-np-wyz]*.h

find ${PKG} | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

mv ${PKG}/etc/drirc ${PKG}/etc/drirc.new || exit 1

# Add a documentation directory:
mkdir -p ${DOCDIR}
cp -a \
  docs/* ${CWD}/ChangeLog.SB \
  ${DOCDIR}/
rm -f ${DOCDIR}/{RELNOTES,relnotes}*
cp -a docs/{RELNOTES-${VERSION},relnotes-${VERSION}.html,relnotes.html} \
      ${DOCDIR}/
find ${DOCDIR}/ -type d -print0 | xargs -0 chmod 0755
find ${DOCDIR}/ -type f -print0 | xargs -0 chmod 0644

# Compress and link manpages, if any:
if [ -d ${PKG}/usr/share/man ]; then
  mv ${PKG}/usr/share/man ${PKG}/usr/man
  rmdir ${PKG}/usr/share
fi
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 *.?
        # Prevent errors
        rm -f *.gz.gz
      )
    done
  )
fi

mkdir -p ${PKG}/install
cat ${CWD}/slack-desc > ${PKG}/install/slack-desc
cat ${CWD}/slack-required > ${PKG}/install/slack-required

cat > ${PKG}/install/doinst.sh <<EOF
#!/bin/sh
config() {
  NEW="\$1"
  OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
  # If there's no config file by that name, mv it over:
  if [ ! -r \$OLD ]; then
    mv \$NEW \$OLD
  elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
    # toss the redundant copy
    rm \$NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}
## List of conf files to check.  The conf files in your package should end in .new
EOF

( cd ${PKG}
  find etc/ -name '*.new' -exec echo config {} ';' | sort >> ${PKG}/install/doinst.sh
  find etc/ -name '*.new' -a -size 0 -exec echo rm -f {} ';' | sort >> ${PKG}/install/doinst.sh
  echo >> ${PKG}/install/doinst.sh
)

cat >> ${PKG}/install/doinst.sh <<'EOF'
# Add ld.so.conf.d directory to /etc/ld.so.conf:
if fgrep ld.so.conf.d etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
  true
else
  echo 'include /etc/ld.so.conf.d/*.conf' >> etc/ld.so.conf
fi
EOF

sed -i "s|_PACKAGER|${PACKAGER}|g; s|_BUILD_DATE|${DATE}|g" \
       ${PKG}/install/slack-desc

if [ "${SB_REP}" = "YES" ] ;then
  # Replicate slackbuild and patches
  mkdir -p ${SBDIR}/patches
  install -m0644 ${CWD}/slack-desc ${CWD}/slack-required ${CWD}/ChangeLog.SB \
                 ${CWD}/apply-patches.sh ${SBDIR}/
  install -m0755 ${CWD}/${NAME}.SlackBuild \
                 ${SBDIR}/${NAME}.SlackBuild
  install -m0644 ${CWD}/patches/*.* \
                 ${SBDIR}/patches/
  rmdir ${SBDIR}/patches
fi

# Build package:
set +o xtrace        # no longer print commands upon execution

ROOTCOMMANDS="set -o errexit -o xtrace ; cd ${PKG} ;
  /bin/chown --recursive root:root .  ;"

ROOTCOMMANDS="${ROOTCOMMANDS}
  /sbin/makepkg --linkadd y --chown n ${PKGDEST}/${PKGNAME}.${PKGFORMAT} "

if test ${UID} = 0; then
  eval ${ROOTCOMMANDS}
  set +o xtrace
elif test "$(type -t fakeroot)" = 'file'; then
  echo -e "\e[1mEntering fakeroot environment.\e[0m"
  echo ${ROOTCOMMANDS} | fakeroot
else
  echo -e "\e[1mPlease enter your root password.\e[0m (Consider installing fakeroot.)"
  /bin/su -c "${ROOTCOMMANDS}"
fi

# Clean up the extra stuff:
if [ "$1" = "--cleanup" ]; then
  echo "Cleaning..."
  if [ -d ${TMP}/${SRCDIR} ]; then
    rm -rf ${TMP}/${SRCDIR} && echo "${TMP}/${SRCDIR} cleanup completed"
  fi
  if [ -d ${PKG} ]; then
    rm -rf ${PKG} && echo "${PKG} cleanup completed"
  fi
  rmdir ${TMP} && echo "${TMP} cleanup completed"
fi
exit 0
So far I'm pretty pleased with the rock solid stability of the open source drivers

Code:
glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD KAVERI
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.2.2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.2.2
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
I ran some openGL benchmarks and found that my system compares favorably with others running a similar setup on openbenchmarking.org.

So, you have kernel modesetting, libvdpau, glamor, & openGL version 3.3 if all goes well. Good luck.
 
1 members found this post helpful.
Old 07-06-2014, 02:55 AM   #38
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
So this has to do with LLVM?

Quote:
Originally Posted by schmatzler View Post
The radeon driver on Mesa 10.2.2 uses gallium for 3D features and gallium can IMHO only be compiled with LLVM (with shared libraries).

...
When I compiled MESA, I disabled shared llvm(don't want to mess with building llvm), but built gallium driver radeonsi - and it was built successfully, I also disabled DRI3:


Code:
--disable-dri3 --disable-llvm-shared-libs --with-gallium-drivers="nouveau,r300,r600,radeonsi,svga"
So gallium and radeonsi is not used if I use static(not shared) llvm?

PS: Thanks for links to your slackbuilds, I'll check 'em.
 
Old 07-06-2014, 07:52 AM   #39
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
So much?

Quote:
Originally Posted by truepatriot76 View Post
This is how I went about updating Mesa for my Kaveri APU with the open source drivers. I am currently running kernel 3.14.4/Slackware 14.1_x64 (not current)/mesa 10.2.2

01) build latest libdrm
02) build latest libedit
03) build latest llvm 3.4.2 (note: --enable-shared)
...
15) rebuild libvdpau against current mesa
16) build latest glamor
17) build latest xf86-video-ati (7.4.0)
....
So are all of the above 17 points REQUIRED? For example DRI3 proto? If yes, then slackware-current is far from being "ready" for the latest Mesa

Quote:
Originally Posted by truepatriot76 View Post
So, you have kernel modesetting, libvdpau, glamor, & openGL version 3.3 if all goes well. Good luck.
For me kernel modesetting is working out of the box, that's why I'm considering free/opensource radeon, not proprietary AMD fglrx. Libvdpau is for hardware video(h264) acceleration and is optional, but of course I need it, only later, not everything at once Glamor seems to be required for HD 7000+(AMD GCN hardware), not the case with HD 6000, but I have it. So it seems the only required thing I'm missing is llvm shared lib and maybe some mesa configure options related to it? The rebuild of 2D driver radeon_drv.so(from package xf86-video-ati?) is also necessary?
 
Old 07-06-2014, 03:17 PM   #40
truepatriot76
LQ Newbie
 
Registered: Apr 2014
Distribution: Slackware
Posts: 11

Rep: Reputation: Disabled
Quote:
Originally Posted by dad_ View Post
So are all of the above 17 points REQUIRED? For example DRI3 proto? If yes, then slackware-current is far from being "ready" for the latest Mesa



For me kernel modesetting is working out of the box, that's why I'm considering free/opensource radeon, not proprietary AMD fglrx. Libvdpau is for hardware video(h264) acceleration and is optional, but of course I need it, only later, not everything at once Glamor seems to be required for HD 7000+(AMD GCN hardware), not the case with HD 6000, but I have it. So it seems the only required thing I'm missing is llvm shared lib and maybe some mesa configure options related to it? The rebuild of 2D driver radeon_drv.so(from package xf86-video-ati?) is also necessary?
dri3proto is not required, I just detailed the steps and order I took. The one thing I see in current is that it uses llvm-3.4 and there are some benefits to going to llvm-3.4.2 for geometry shader support and openGL 3.3. Let us know if you can build/use llvm without --enable-shared. Slackware current also ships xf86-video-ati-7.2.0. There are some updates here that were applicable to my hardware (Kaveri only shows up in xf86-video-ati-7.3.0 and later). I believe you have a Pitcairn card, so you may be fine with what is in Slackware current. You be the judge ---> xf86-video-ati logs
 
Old 07-06-2014, 04:25 PM   #41
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
Quote:
Originally Posted by truepatriot76 View Post
dri3proto is not required, I just detailed the steps and order I took. The one thing I see in current is that it uses llvm-3.4 and there are some benefits to going to llvm-3.4.2 for geometry shader support and openGL 3.3. Let us know if you can build/use llvm without --enable-shared. Slackware current also ships xf86-video-ati-7.2.0. There are some updates here that were applicable to my hardware (Kaveri only shows up in xf86-video-ati-7.3.0 and later). I believe you have a Pitcairn card, so you may be fine with what is in Slackware current. You be the judge ---> xf86-video-ati logs
Today I've tried some more steps and ... I have working DRI at last (not the case with XV). It seems the key to my problem was rebuilding xf86-video-ati with --enable-glamor configure option - non-trivial because of the "modular" structure of the X11 slackbuild. It turned out there's only one slackbuild script for all the X11 packages, including drivers, such as xf86-video-ati. I also have rebuilt llvm and mesa with --enable-shared(used your slackbuilds for both), but I don't know if I could omit this step - positive result showed up only after ati(radeon) driver rebuild - to check it I have to revert my mesa build to --disable-llvm-shared-libs. So it seems for me the following subset of your steps worked out:

01) build latest libdrm
02) build latest libedit - skipped
03) build latest llvm 3.4.2 (note: --enable-shared) - maybe is not required?
04) build latest libvdpau - is optional - omitted for the first time, but is necessary to have vdpau support
Steps 05-09 are probably required by DRI3 proto - excluded if add --disable-dri3
10) build latest libclc - is required if mesa opencl is enabled
11,12) - skipped so far, but maybe required for building opencl apps?
13) build latest mesa 10.2.2 - did this, but maybe could use older version (rebuilt with proper options)
14) build latest mesa-demos - optional, necessary just to check opengl setup
15) rebuild libvdpau against current mesa - skipped, but is required in case of step 04 is done
16) build latest glamor - required for Radeon HD 7000+ (GCN) hardware, optional in case of older AMD/ATI boards
17) build latest xf86-video-ati (7.4.0) - for my hardware(PITCAIRN chipset) just the rebuild of stock 7.2.0 did the job, but the essential part here is adding --enable-glamor to x/x11/configure/configure file: without it all the previous steps are useless.

So, only 7 steps out of 17, but without vdpau and probably openCL build support. Here the ugly slackbuild system shows itself - all the dependencies have to be configured and built manually fglrx setup is still much more simple and gives up to 2-3 times the performance in 3D (not checked yet, but there are reports) BTW, no xorg.conf.d changes are required - correct xorg modules are loaded automatically.
 
Old 07-06-2014, 05:37 PM   #42
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: LFS-7.6, Slackware 14.1, FreeBSD 10.1
Posts: 3,657
Blog Entries: 15

Rep: Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126Reputation: 1126
LLVM is required if you want 3D acceleration for Radeon drivers, as it's a required package, as is elfutils and GlamorEGL. If you do not have the required dependencies resolved it will not build the Gallium drivers and you will have the standard 2D driver only and the software rasterizer driver for Tungsten Graphics.

Yes LLVM takes a good hour or so to build, but it's required if you want proper 3D acceleration.
 
Old 07-06-2014, 11:12 PM   #43
truepatriot76
LQ Newbie
 
Registered: Apr 2014
Distribution: Slackware
Posts: 11

Rep: Reputation: Disabled
Quote:
Originally Posted by dad_ View Post
So, only 7 steps out of 17, but without vdpau and probably openCL build support. Here the ugly slackbuild system shows itself - all the dependencies have to be configured and built manually fglrx setup is still much more simple and gives up to 2-3 times the performance in 3D (not checked yet, but there are reports) BTW, no xorg.conf.d changes are required - correct xorg modules are loaded automatically.
Glad you're paring it down, will try a reduced set based on your recommendations on the next upgrade. The gallium drivers have closed the gap substantially the past few months on fglxr. They still have a ways to go in some respects. When llvm3.5 is released, the gallium drivers are expected to achieve openGL 4.X compliance.

As far as performance on my hardware - I am able to exceed the fglxr diver in certain instances (on comparable rigs), fall short in others. Benches are ---> here
 
Old 07-07-2014, 01:21 AM   #44
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
Quote:
Originally Posted by ReaperX7 View Post
...
Yes LLVM takes a good hour or so to build, but it's required if you want proper 3D acceleration.
LLVM 3.3 is already pre-built if you have just clean Slackware 14.1 installation (and 3.4 is in slackware64-current), so the dependency itself is present. But it has only static libs, so the question is - do you have to rebuild it with --enable-shared or you can do with static? BTW on my machine the build takes around 10-15 min, not an hour.

PS. And to enable XV it seems I have to rebuild glamor with --enable-xv...

Last edited by dad_; 07-07-2014 at 05:42 AM.
 
Old 07-07-2014, 10:26 AM   #45
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 186

Rep: Reputation: 23
This is what I do to make it work using git pulls (it works for me with Kaveri, Brazos and Kabini APUs, I don't use discreet cards, but it should work the same) :

1/ First of all, make sure you have the proper firmware for your card in /lib/firmware/radeon, particularly if you have a new card or APU. Since I compile my own kernel, I compile the firmware in the kernel itsellf.
2/ Compile dri3proto-1.0
3/ Compile presentproto-1.0
4/ Compile libdrm git, using the following configure specific options : --enable-udev --enable-libkms
5/ Compile glamor git, using the following configure specific options : --enable-glamor-dri3
6/ Compile mesa git, using the following configure specific options : --with-gallium-drivers="r300,r600,radeonsi,svga,swrast" --enable-gles2 --enable-texture-float --enable-dri3=enabled --with-egl-platforms="x11,drm" --enable-glx-tls --enable-gbm
--enable-vdpau --disable-llvm-shared-libs
7/ Compile mesa-glu git
8/ Compile freeglut-2.8.1
9/ Compile mesa-demos git
10/ Compile xf86-video-ati git
11/ Compile libvdpau-0.8
12/ Compile vdpauinfo-0.1

I don't use any specific glamor or xorg.conf settings, since most settings are now default in git.
Works like a charm, though I've not compiled opencl support. Thanks for the tips in this thread, I'll try to add it to my workflow.
I suspect compiling git is actually easier than older releases, as the radeon support improves regularly and many things are now turn on by default.
As for performance, especially using git and a recent kernel, it has improved quite a lot recently. So frglx is no longer 3 times as fast as Mesa radeon but more like 30-40% faster.
I have scripted the whole build and it's easier in my opinion than downloading new drivers.

Last edited by rvdboom; 07-07-2014 at 10:28 AM.
 
  


Reply

Tags
ati driver, drm, gallium3d, kernel, mesa


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Open-Source ATI R600/700 Mesa 3D Performance LXer Syndicated Linux News 0 02-09-2010 12:30 PM
LXer: Power Management: ATI Catalyst vs. Open-Source ATI Driver LXer Syndicated Linux News 0 03-06-2009 04:12 PM
Trying to install latest open source ATI drivers. Failing (specifically dri) GushpinBob Slackware 22 07-13-2008 10:34 PM
ATI Open Source Driver a16b03 Linux - General 1 02-12-2008 09:13 PM


All times are GMT -5. The time now is 11:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration