Mesa for Linux PPC

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Hi All,

We need your help. All applications and desktops which use opengles and opengles2 have wrong colors. (pink or blue color)

Luigi has created a bug report on freedesktop.org. Please run the the following demo in your Firefox web browser and if you have the same problem, please report it.

Link to the demo: https://playcanv.as/p/SA7hVBLt/

Link to the bug report: Bug 99638

I have the same problem. I added my system to Luigi's bug report today.

Thanks in advance,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

We are looking for someone who has a SI Radeon installed and can debug Xorg. We want to solve the problem with the 3D hardware acceleration with Radeon SI graphics cards (Radeon HD7xxx and higher). Please help us.
tlosmx wrote:Here is the thread for the RadeonSi https://bugs.freedesktop.org/show_bug.cgi?id=99859
Michael Danze form Amd ask me to made some actions but im not able to debug the xorg.
There are the instruction How to do it . in case guys please reply there your issue and in case what he need for fix the error.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Hi All,

Mesa 17.0.1 is available for ubuntu MATE 17.04 PowerPC.

Image

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

I was able to compile Mesa with DRI3 support today.

First, I had to upgrade libdrm2.

Code: Select all

apt-get install -t experimental libdrm2
# dpkg -l libdrm2

Code: Select all

||/ Name                              Version               Architecture          Description
+++-=================================-=====================-=====================-========================================================================
ii  libdrm2:powerpc                   2.4.80-1              powerpc               Userspace interface to kernel DRM services -- runtime
Download of the latest Mesa Git version:

Code: Select all

git clone git://anongit.freedesktop.org/mesa/mesa mesa-test
Configure Mesa with DRI3 support:

Code: Select all

./autogen.sh --prefix /usr/local/mesa-test --with-gallium-drivers="r600,swrast" --enable-texture-float --enable-dri3

Code: Select all

make

Code: Select all

# make install

Code: Select all

export LD_LIBRARY_PATH=/usr/local/mesa-test/lib/

Code: Select all

glxinfo | grep -i opengl

Code: Select all

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD BARTS (DRM 2.48.0 / 4.9.25_A-EON_AmigaOne_X1000_Nemo)
OpenGL core profile version string: 3.2 (Core Profile) Mesa 17.2.0-devel (git-f466683)
OpenGL core profile shading language version string: 1.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.2.0-devel (git-f466683)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

Code: Select all

LIBGL_DEBUG=verbose vblank_mode=0 glxgears

Code: Select all

libGL: OpenDriver: trying /usr/local/mesa-test/lib/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/local/mesa-test/lib/dri/r600_dri.so
libGL: Can't open configuration file /home/christian/.drirc: No such file or directory.
ATTENTION: default value of option vblank_mode overridden by environment.
libGL: Can't open configuration file /home/christian/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
6368 frames in 5.0 seconds = 1273.189 FPS
6378 frames in 5.0 seconds = 1275.582 FPS
6461 frames in 5.0 seconds = 1292.181 FPS
6455 frames in 5.0 seconds = 1290.977 FPS
5928 frames in 5.0 seconds = 1185.576 FPS
6460 frames in 5.0 seconds = 1291.991 FPS
6424 frames in 5.0 seconds = 1284.782 FPS
6092 frames in 5.0 seconds = 1218.376 FPS
Installation without set up a LD_LIBRARY_PATH (Debian Sid):

Code: Select all

# mv /usr/lib/powerpc-linux-gnu/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/r600_dri.so.bak

Code: Select all

# cp /usr/local/mesa-test/lib/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/

Code: Select all

# mv /usr/lib/powerpc-linux-gnu/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/libGL.so.1.2.0.bak

Code: Select all

# cp /usr/local/mesa-test/lib/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/
I was able to install the new Mesa on the MATE PowerPC Remix 2017 with the following commands:

Code: Select all

# mv /usr/lib/powerpc-linux-gnu/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/r600_dri.so.bak

Code: Select all

# cp /usr/local/mesa-test/lib/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/

Code: Select all

# mv /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1.2.0.bak

Code: Select all

# cp /usr/local/mesa-test/lib/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/mesa/
I enabled DRI3 with Option "DRI3" "1" in the xorg.conf on the MATE PowerPC Remix 2017.

DRI3 works:

Code: Select all

libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: pci id for fd 4: 1002:6738, driver r600
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
ATTENTION: default value of option vblank_mode overridden by environment.
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Using DRI3 for screen 0
7862 frames in 5.0 seconds = 1572.252 FPS
8424 frames in 5.0 seconds = 1684.748 FPS
8345 frames in 5.0 seconds = 1668.881 FPS
8318 frames in 5.0 seconds = 1663.539 FPS
8280 frames in 5.0 seconds = 1655.854 FPS
8382 frames in 5.0 seconds = 1676.256 FPS
8308 frames in 5.0 seconds = 1661.529 FPS
For comparison DRI2:

Code: Select all

libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
ATTENTION: default value of option vblank_mode overridden by environment.
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
6109 frames in 5.0 seconds = 1221.763 FPS
5931 frames in 5.0 seconds = 1186.059 FPS
6170 frames in 5.0 seconds = 1233.948 FPS
6278 frames in 5.0 seconds = 1255.512 FPS
6224 frames in 5.0 seconds = 1244.689 FPS
5913 frames in 5.0 seconds = 1182.437 FPS
6218 frames in 5.0 seconds = 1243.513 FPS
6229 frames in 5.0 seconds = 1245.722 FPS
Conclusion: DRI3 is faster than DRI2.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Image

Hi All,

I uploaded the new Mesa 17.2.0-devel with DRI3 support to my webspace today.

Download: Mesa_17.2.0-devel_git-f466683_powerpc.tar.gz

Installation instructions for Debian Sid/experimental:
  1. Extract the package and copy the directory mesa-test to /usr/local:

    Code: Select all

    # cp -R mesa-test /usr/local
  2. Code: Select all

    # mv /usr/lib/powerpc-linux-gnu/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/r600_dri.so.bak
  3. Code: Select all

    # cp /usr/local/mesa-test/lib/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/
  4. Code: Select all

    # mv /usr/lib/powerpc-linux-gnu/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/libGL.so.1.2.0.bak
  5. Code: Select all

    # cp /usr/local/mesa-test/lib/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/
Installation instructions for the MATE PowerPC Remix 2017:
  1. Extract the package and copy the directory mesa-test to /usr/local:

    Code: Select all

    # cp -R mesa-test /usr/local
  2. Code: Select all

    # mv /usr/lib/powerpc-linux-gnu/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/r600_dri.so.bak
  3. Code: Select all

    # cp /usr/local/mesa-test/lib/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/
  4. Code: Select all

    # mv /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/mesa/libGL.so.1.2.0.bak
  5. Code: Select all

    # cp /usr/local/mesa-test/lib/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/mesa/
Enabling DRI3:

Please add the line Option "DRI3" "1" to the Device section in the xorg.conf.

You can test the hardware 3D acceleration with the following commands:

Code: Select all

glxinfo | grep -i opengl

Code: Select all

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD BARTS (DRM 2.48.0 / 4.9.25_A-EON_AmigaOne_X1000_Nemo)
OpenGL core profile version string: 3.2 (Core Profile) Mesa 17.2.0-devel (git-f466683)
OpenGL core profile shading language version string: 1.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.2.0-devel (git-f466683)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

Code: Select all

LIBGL_DEBUG=verbose vblank_mode=0 glxgears

Code: Select all

libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: pci id for fd 4: 1002:6738, driver r600
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/r600_dri.so
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
ATTENTION: default value of option vblank_mode overridden by environment.
libGL: Can't open configuration file /home/amigaone/.drirc: No such file or directory.
libGL: Using DRI3 for screen 0
7862 frames in 5.0 seconds = 1572.252 FPS
8424 frames in 5.0 seconds = 1684.748 FPS
8345 frames in 5.0 seconds = 1668.881 FPS
8318 frames in 5.0 seconds = 1663.539 FPS
8280 frames in 5.0 seconds = 1655.854 FPS
8382 frames in 5.0 seconds = 1676.256 FPS
8308 frames in 5.0 seconds = 1661.529 FPS
Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

FYI:
Alex Perez via Facebook wrote: SI GFX is likely to never be supported by libMesa on Big Endian. Even if funds could be raised to pay someone competent to actually do the work, it's estimated at "hundreds of man-hours" by someone competent, who has previously contributed to Mesa, with specific knowledge and familiarity of Radeon and Big Endian hardware.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Hi All,

If you install the latest libgl1-mesa-glx_17.2.1-1_powerpc.deb on Debian Sid you will notice that the hardware 3D acceleration doesn't work. The problem is, the files libGL.so.1 and libGL.so.1.2.0 are missing in the package libgl1-mesa-glx.

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

FYI:
John Paul Adrian Glaubitz wrote: That's because this package has been deprecated, it's just a dummy package:

libgl1-mesa-glx_17.2.1-1_powerpc.deb
────────────────────────────────────

new debian package, version 2.0.
size 42042 bytes: control archive=558 bytes.
374 bytes, 13 lines control
301 bytes, 4 lines md5sums
Package: libgl1-mesa-glx
Source: mesa
Version: 17.2.1-1
Architecture: powerpc
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Installed-Size: 55
Depends: libgl1, libglx-mesa0
Section: oldlibs
Priority: extra
Multi-Arch: same
Homepage: https://mesa3d.org/
Description: transitional dummy package
This is a transitional dummy package, it can be safely removed.

drwxr-xr-x root/root 0 2017-09-18 11:33 ./
drwxr-xr-x root/root 0 2017-09-18 11:33 ./usr/
drwxr-xr-x root/root 0 2017-09-18 11:33 ./usr/share/
drwxr-xr-x root/root 0 2017-09-18 11:33 ./usr/share/bug/
drwxr-xr-x root/root 0 2017-09-18 11:33 ./usr/share/bug/libgl1-mesa-glx/
-rw-r--r-- root/root 44 2017-09-18 11:33 ./usr/share/bug/libgl1-mesa-glx/control
-rwxr-xr-x root/root 448 2017-09-18 11:33 ./usr/share/bug/libgl1-mesa-glx/script
drwxr-xr-x root/root 0 2017-09-18 11:33 ./usr/share/doc/
drwxr-xr-x root/root 0 2017-09-18 11:33 ./usr/share/doc/libgl1-mesa-glx/
-rw-r--r-- root/root 37794 2017-09-18 11:33 ./usr/share/doc/libgl1-mesa-glx/changelog.Debian.gz
-rw-r--r-- root/root 7403 2017-09-18 11:33 ./usr/share/doc/libgl1-mesa-glx/copyright
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Hi All,

I compiled Mesa 17.2.1 for Debian Sid today.

Code: Select all

./autogen.sh --prefix /usr/local/mesa-17.2.1 --with-gallium-drivers="r600,swrast" --enable-texture-float --enable-dri3 --enable-llvm --with-llvm-prefix=/usr/lib/llvm-5.0
Output:

Code: Select all

prefix:          /usr/local/mesa-17.2.1
        exec_prefix:     ${prefix}
        libdir:          ${exec_prefix}/lib
        includedir:      ${prefix}/include

        OpenGL:          yes (ES1: yes ES2: yes)

        OSMesa:          no

        DRI platform:    drm
        DRI drivers:     r200 radeon swrast 
        DRI driver dir:  ${libdir}/dri
        GLX:             DRI-based

        EGL:             yes
        EGL drivers:     builtin:egl_dri2 builtin:egl_dri3
        GBM:             yes
        EGL/Vulkan/VL platforms:   x11 surfaceless drm

        Vulkan drivers:  no

        llvm:            yes
        llvm-config:     /usr/lib/llvm-5.0/bin/llvm-config
        llvm-version:    5.0.0

        Gallium drivers: r600 swrast
        Gallium st:      mesa xvmc va

        HUD extra stats: no
        HUD lmsensors:   no


        Shared libs:     yes
        Static libs:     no
        Shared-glapi:    yes

        CFLAGS:          -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math
        CXXFLAGS:        -g -O2 -Wall -fno-math-errno -fno-trapping-math
        LDFLAGS:         
        Macros:          -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DMISSING_64BIT_ATOMICS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_STRTOD_L -DHAVE_DLOPEN -DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_DRI3 -DENABLE_SHADER_CACHE -DHAVE_MINCORE -DHAVE_LLVM=0x0500 -DMESA_LLVM_VERSION_PATCH=0

        LLVM_CFLAGS:     -I/usr/lib/llvm-5.0/include   -DLLVM_BUILD_GLOBAL_ISEL -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
        LLVM_CXXFLAGS:   -I/usr/lib/llvm-5.0/include -std=c++0x -std=c++11 -DLLVM_BUILD_GLOBAL_ISEL -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
        LLVM_CPPFLAGS:   -I/usr/lib/llvm-5.0/include   -DLLVM_BUILD_GLOBAL_ISEL -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
        LLVM_LDFLAGS:    -L/usr/lib/llvm-5.0/lib 

        PYTHON2:         python2.7

        Run 'make' to build Mesa
Download: MesaLib-17.2.1-1-powerpc-unofficial.tar.bz2

Installation instructions for Debian Sid/experimental:
  1. Install the package llvm-5.0:

    Code: Select all

    # apt-get install llvm-5.0
  2. Extract the package and copy the directory mesa-17.2.1 to /usr/local:

    Code: Select all

    # cp -R mesa-17.2.1 /usr/local
  3. Code: Select all

    # mv /usr/lib/powerpc-linux-gnu/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/r600_dri.so.bak
  4. Code: Select all

    # cp /usr/local/mesa-17.2.1/lib/dri/r600_dri.so /usr/lib/powerpc-linux-gnu/dri/
  5. Code: Select all

    # mv /usr/lib/powerpc-linux-gnu/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/libGL.so.1.2.0.bak
  6. Code: Select all

    # cp /usr/local/mesa-17.2.1/lib/libGL.so.1.2.0 /usr/lib/powerpc-linux-gnu/
Enabling DRI3:

Please add the line Option "DRI3" "1" to the Device section in the xorg.conf.

You can test the hardware 3D acceleration with the following commands:

Code: Select all

glxinfo | grep -i opengl
X1000:

Code: Select all

OpenGL vendor string: X.Org
OpenGL renderer string: AMD BARTS (DRM 2.49.0 / 4.9.49_A-EON_AmigaOne_X1000_Nemo, LLVM 5.0.0)
OpenGL core profile version string: 3.2 (Core Profile) Mesa 17.2.1
OpenGL core profile shading language version string: 1.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.2.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

Code: Select all

LIBGL_DEBUG=verbose vblank_mode=0 glxgears
Debian Sid MATE PowerPC with Mesa 17.2.1:

Image

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply