Wrong colors with Mesa 20.2.3 on PPC64 FreeBSD
I'm having some issues with Mesa on a PowerPC64 machine (Talos II), running FreeBSD 13.0-CURRENT.
When I run some simple programs that use Mesa, such as glxdemo or glxgears, wrong colors are displayed. For instance, glxgears should display red, green and blue cogs, but instead cyan, purple and blue cogs are displayed (see attached screenshot).
The issue looks similar to #477, as the colors appear to be swapped, being displayed as ARGB instead of BGRA, but I'm not sure if it is the same issue, as I'm using swrast with llvmpipe, with a more recent version of Mesa and another OS and machine. But this is also a big-endian PowerPC64 system, with a built-in VGA card that has a little-endian framebuffer. In fact, if I use a (still experimental) little-endian FreeBSD on this same machine, then the colors are correct.
I also tried Mesa from git master but the problem persists.
Best regards, Leandro
GPU: (Note: lspci and lshw were unavailable)
pciconf -l | grep vga: vgapci0@pci10:2:0:0: class=0x030000 rev=0x41 hdr=0x00 vendor=0x1a03 device=0x2000 subvendor=0x1a03 subdevice=0x2000 dmesg: vgapci0: <VGA-compatible display> mem 0x80000000-0x80ffffff,0x81000000-0x8101ffff irq 1030136 at device 0.0 numa-domain 0 on pci12
FreeBSD talos2 13.0-CURRENT FreeBSD 13.0-CURRENT #1 luporl-fix-ofwfb-c255612-gd4ec37d69b5: Tue Jan 5 16:43:24 -03 2021 luporl@talos2:/usr/obj/usr/home/luporl/git/main/powerpc.powerpc64/sys/MYKERNEL powerpc
OpenGL version string: 3.1 Mesa 20.2.3
X.Org X Server 1.20.9 X Protocol Version 11, Revision 0 Build Operating System: FreeBSD 13.0-CURRENT powerpc Current Operating System: FreeBSD talos2 13.0-CURRENT FreeBSD 13.0-CURRENT #1 luporl-fix-ofwfb-c255612-gd4ec37d69b5: Tue Jan 5 16:43:24 -03 2021 luporl@talos2:/usr/obj/usr/home/luporl/git/main/powerpc.powerpc64/sys/MYKERNEL powerpc Build Date: 13 January 2021 02:06:48PM Current version of pixman: 0.40.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version.
Desktop manager and compositor: Xfce 4.16
Machine: Talos II - https://www.raptorcs.com/content/TL2DS1/intro.html