[Mesa-dev] Wrong colors in 3D apps on big-endian systems

Christian Zigotzky chzigotzky at xenosoft.de
Thu Mar 13 02:38:14 PDT 2014


On 12.03.2014 05:35, Michel Dänzer wrote:
> On Die, 2014-03-11 at 17:51 +0100, Christian Zigotzky wrote:
>> On 11.03.2014 16:25, Richard Sandiford wrote:
>>> I just mean changing instances of things like PIPE_FORMAT_A8R8G8B8_UNORM
>>> to PIPE_FORMAT_ARGB8888_UNORM in the relevant parts of the r600 support
>>> (which is I think what Michel also meant -- like I say, I'm not really
>>> adding anything new here).  PIPE_FORMAT_ARGB8888_UNORM always has the
>>> alpha channel in the low bits of a 32-bit int according to host endianness,
>>> whereas PIPE_FORMAT_A8R8G8B8_UNORM always has the alpha channel in the
>>> first byte of memory.
>>>
>>> I can't say for sure which the "revelavant parts" are because I don't
>>> know the r600 code.
>>>
>>> Thanks,
>>> Richard
>>>
>>>
>> I have replaced PIPE_FORMAT_A8R8G8B8_UNORM with
>> PIPE_FORMAT_ARGB8888_UNORM in the files r600_state.c and
>> evergreen_state.c.
> That's not really a good idea, as the hardware supports both variants of
> formats.
>
>
> Do the attached patches help?
>
>
Hi Michel,

Thank you very much for your effort. I've patched the latest git version 
with your patches. Mesa works with the right colors but it doesn't have 
3D acceleration. Mesa 10.1.0 and 10.0.3 works with 3D acceleration.

My system: Nemo board with a 1.8GHz dual core PA6T processer and an AMD 
Radeon HD 6870 graphics card.

Mesa/standard (mesa-git-20140313):

glxinfo | grep OpenGL

libGL error: failed to load driver: r600
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on softpipe
OpenGL version string: 2.1 Mesa 10.2.0-devel (git-551d459)
OpenGL shading language version string: 1.30
OpenGL extensions:

Glxgears works with the right colors without 3D acceleration.

Mesa/llvmpipe (mesa-git-20140313):

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 bits)
OpenGL version string: 2.1 Mesa 10.2.0-devel (git-551d459)
OpenGL shading language version string: 1.30
OpenGL extensions:

Glxgears doesn't work with the following error messages:

LLVM ERROR: Do not know how to split the result of this operator!

Mesa/standard 10.1.0 with my changes

glxinfo | grep OpenGL

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD BARTS
OpenGL version string: 2.1 Mesa 10.1.0
OpenGL shading language version string: 1.30
OpenGL extensions:

Glxgears, Neverball, and SuperTuxKart work with the right colors and 3D 
acceleration.


Michel, do you have any tips for me, please? Thanks a lot for your help.

All the best,

Christian



More information about the mesa-dev mailing list