Mesa for Linux PPC

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

Mesa for Linux PPC

Post by xeno74 »

gears.png
gears.png (3.39 KiB) Viewed 20121 times
Hi all,

I've tried Mesa 9.2.2-1 and 10.0.0-1 on Debian Sid. Unfortunately both have the wrong colour issue. Mesa 8.0.5-4 works very well and fast without the colour problem.

Installation of Mesa 8.0.X on new Debian and Ubuntu distributions

If you like to play games without the colour problem on your new Debian (Sid) and Lubuntu (13.10) distributions, then install the old Mesa 8.0.X with "Force Version" with the Synaptic package manager.

You have to reinstall 2 packages:
  • libgl1-mesa-dri
  • libgl1-mesa-glx
Enjoy the games without any problems on your new distributions. :-)

Rgds,
Christian
Last edited by xeno74 on Thu Aug 20, 2015 9:21 am, edited 1 time in total.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

I've created a bug report on freedesktop.org.

Bug report 72877:

https://bugs.freedesktop.org/show_bug.cgi?id=72877
http://lists.freedesktop.org/archives/m ... 50363.html

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

Running Linux on AmigaONEs can require some tinkering.

User avatar
tommysammy
Posts: 946
Joined: Mon Dec 20, 2010 9:03 pm
Location: Isselburg,Germany
Contact:

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by tommysammy »

xeno74 wrote:I've created a bug report on freedesktop.org.

Bug report 72877:

https://bugs.freedesktop.org/show_bug.cgi?id=72877
http://lists.freedesktop.org/archives/m ... 50363.html

Rgds,
Christian
Well done Christian
AmigaOne X1000 Betatester A1-X1090
AmigaOne X1000/4GB Ram/Saphire Radeon 7850 1GB/256GB SSD HD/2GB CF Card/RTL8169Network

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

Just for info: This bug report is important for the Cyrus boards, too.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

Mesa 10.0.3 successfully hacked :-D

I've figured out that the following line in "src/gallium/drivers/r600/evergreen_state.c" the problem is. :-)

Code: Select all

case V_028C70_COLOR_8_8_8_8:
When I comment out this case then the colors are to 99% right.

But if I comment out the following lines then all colors are correct.

Code: Select all

/* 32-bit buffers. */
        //case PIPE_FORMAT_A8B8G8R8_SRGB:
        //case PIPE_FORMAT_A8B8G8R8_UNORM:
        case PIPE_FORMAT_A8R8G8B8_UNORM:
        //case PIPE_FORMAT_B8G8R8A8_SRGB:
        //case PIPE_FORMAT_B8G8R8A8_UNORM:
        //case PIPE_FORMAT_B8G8R8X8_UNORM:
        //case PIPE_FORMAT_R8G8B8A8_SNORM:
        //case PIPE_FORMAT_R8G8B8A8_UNORM:
        //case PIPE_FORMAT_R8G8B8X8_UNORM:
        //case PIPE_FORMAT_R8G8B8X8_SNORM:
        //case PIPE_FORMAT_R8G8B8X8_SRGB:
        //case PIPE_FORMAT_R8G8B8X8_UINT:
        //case PIPE_FORMAT_R8G8B8X8_SINT:
        //case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
        //case PIPE_FORMAT_X8B8G8R8_UNORM:
        //case PIPE_FORMAT_X8R8G8B8_UNORM:
        //case PIPE_FORMAT_R8G8B8_UNORM:
        //case PIPE_FORMAT_R8G8B8A8_SINT:
        //case PIPE_FORMAT_R8G8B8A8_UINT:
                return V_028C70_COLOR_8_8_8_8; 
Neverball, Glxgears, and SuperTuxKart works fine with the right colors.
A1-X1000_Mesa_10.0.3.png
(673.26 KiB) Downloaded 462 times
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

Hi All,

The unofficial Mesa 10.0.3 works well on Debian Sid and on Lubuntu 14.04. I've uploaded it.

Download: MesaLib-10.0.3-powerpc-unofficial.tar.bz2

Note: If you use (L)Ubuntu 12.04.4 or Debian 7 with Mesa 8.X or 9.1.X, you don't need the new Mesa. Mesa 10.0.3 is not faster than Mesa 8.X or 9.1.X. ;-) It's only for new distributions like Debian Sid and Lubuntu 14.04.

Install instructions:
  1. Unpack the archive MesaLib-10.0.3-powerpc-unofficial.tar.bz2
  2. Copy it as root to the directory /usr/local/

    Code: Select all

    sudo cp -R mesa10 /usr/local/
    
  3. Set up the new library path

    Code: Select all

    export LD_LIBRARY_PATH=/usr/local/mesa10/lib
    
  4. Test it with glxgears. When you see the correct colors then you use the new version of Mesa. After that you can start some games for example Neverball.
SuperTuxKart needs a special run_game.sh for the new Mesa:

Code: Select all

LD_LIBRARY_PATH=./bin/:/usr/local/mesa10/lib bin/supertuxkart
Have a lot of fun with the new Mesa. :-)
Mesa_10.0.3_Lubuntu_14.04_kernel_3.14-rc4_A1-X1000.jpg
(227.34 KiB) Downloaded 424 times
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

A new version is available. :-)

Download: MesaLib-10.1.0-powerpc-unofficial.tar.bz2
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

Hi All,

I have figured out that the following definitions are not necessary for big-endian systems in the file "src/gallium/include/pipe/p_format.h":

Code: Select all

#if defined(PIPE_ARCH_LITTLE_ENDIAN)
#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
#elif defined(PIPE_ARCH_BIG_ENDIAN)
#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
#endif 
These definitions for big-endian systems are responsible for the wrong colors problem. I have commented out the big-endian definitions.

Code: Select all

//#if defined(PIPE_ARCH_LITTLE_ENDIAN)
#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
//#elif defined(PIPE_ARCH_BIG_ENDIAN)
//#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
//#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
//#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
//#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
//#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
//#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
//#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
//#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
//#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
//#endif 
And Mesa 10.1.0 works with the right colors on my PPC Linux system. I have uploaded it.

Download: MesaLib-10.1.0-2-powerpc-unofficial.tar.bz2

Regards,

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

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

Mesa unofficial 10.0.4 is available.

Download: MesaLib-10.0.4-powerpc-unofficial.tar.bz2
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

User avatar
xeno74
Posts: 6079
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa 9.2.2-1 and 10.0.0-1

Post by xeno74 »

Tommysammy has created an OS4.1 icon for our Mesa versions. :-)

Image
X1000Mesa.info.lha
(16.3 KiB) Downloaded 563 times
Thanks a lot to Tommysammy. :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.

Post Reply