Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-16 Thread Marek Olšák
On Thu, Jan 16, 2014 at 8:43 AM, Michel Dänzer mic...@daenzer.net wrote: On Mit, 2014-01-15 at 14:27 +0100, Marek Olšák wrote: On Wed, Jan 15, 2014 at 7:07 AM, Michel Dänzer mic...@daenzer.net wrote: On Die, 2014-01-14 at 00:22 +0100, Marek Olšák wrote: I think the format conversion

Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-15 Thread Erik Faye-Lund
On Wed, Jan 15, 2014 at 7:07 AM, Michel Dänzer mic...@daenzer.net wrote: On Die, 2014-01-14 at 00:22 +0100, Marek Olšák wrote: I think the format conversion functions should look like: #ifdef BIG_ENDIAN case PIPE_FORMAT_A8B8G8R8_UNORM: return hw_format_for_R8G8B8A8_UNORM; ...

Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-15 Thread Marek Olšák
On Wed, Jan 15, 2014 at 7:07 AM, Michel Dänzer mic...@daenzer.net wrote: On Die, 2014-01-14 at 00:22 +0100, Marek Olšák wrote: I think the format conversion functions should look like: #ifdef BIG_ENDIAN case PIPE_FORMAT_A8B8G8R8_UNORM: return hw_format_for_R8G8B8A8_UNORM; ...

Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-15 Thread Michel Dänzer
On Mit, 2014-01-15 at 14:27 +0100, Marek Olšák wrote: On Wed, Jan 15, 2014 at 7:07 AM, Michel Dänzer mic...@daenzer.net wrote: On Die, 2014-01-14 at 00:22 +0100, Marek Olšák wrote: I think the format conversion functions should look like: #ifdef BIG_ENDIAN case

Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-14 Thread Michel Dänzer
On Die, 2014-01-14 at 00:22 +0100, Marek Olšák wrote: I think the format conversion functions should look like: #ifdef BIG_ENDIAN case PIPE_FORMAT_A8B8G8R8_UNORM: return hw_format_for_R8G8B8A8_UNORM; ... #else case PIPE_FORMAT_R8G8B8A8_UNORM: return

Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-13 Thread Marek Olšák
I think the format conversion functions should look like: #ifdef BIG_ENDIAN case PIPE_FORMAT_A8B8G8R8_UNORM: return hw_format_for_R8G8B8A8_UNORM; ... #else case PIPE_FORMAT_R8G8B8A8_UNORM: return hw_format_for_R8G8B8A8_UNORM; #endif which can be simplified to: case

Re: [Mesa-dev] gallium endianness and hw drivers

2014-01-06 Thread Michel Dänzer
On Fre, 2013-12-27 at 19:41 +0100, Marek Olšák wrote: Okay. Using Axxx for transfers only is a good idea, just please make sure the formats are not advertised to the state tracker. Advertising the format to the state tracker is the whole point :), as it's the format that matches the X11

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-27 Thread Marek Olšák
Okay. Using Axxx for transfers only is a good idea, just please make sure the formats are not advertised to the state tracker. Also, resource_copy_region doesn't (it sometimes does, but shouldn't) do format conversions, so pipe-blit must be used instead. You can fork r600_copy_region_with_blit

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-25 Thread Marek Olšák
Some comments about the r300g patch. The hardware doesn't support Axxx texture formats for blending and alpha-test. Only xxxA formats are supported. The driver already supports all formats it can support and no other formats can be added (except for those where the component ordering matches

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-25 Thread Michel Dänzer
On Mit, 2013-12-25 at 15:57 +0100, Marek Olšák wrote: Some comments about the r300g patch. The hardware doesn't support Axxx texture formats for blending and alpha-test. Only xxxA formats are supported. I know, the idea is to only actually use the Axxx layout for transfers but to use xxxA

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-16 Thread Michel Dänzer
On Mon, 2013-12-16 at 17:05 +1000, Dave Airlie wrote: So the llvmpipe endian work broke the nouveau nv40 support for the nv43 in the ppc G5 a few people have, Same for r300g: https://bugs.freedesktop.org/show_bug.cgi?id=71789 Now I'm not really sure how this is supposed to be fixed, the

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-16 Thread Marek Olšák
Wouldn't it be easier to just revert the gallium endianness rework? If it breaks all hw drivers on big endian machines, it's apparently not done right. Marek On Mon, Dec 16, 2013 at 8:05 AM, Dave Airlie airl...@gmail.com wrote: So the llvmpipe endian work broke the nouveau nv40 support for the

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-16 Thread Benjamin Herrenschmidt
On Mon, 2013-12-16 at 13:30 +0100, Marek Olšák wrote: Wouldn't it be easier to just revert the gallium endianness rework? If it breaks all hw drivers on big endian machines, it's apparently not done right. It also makes llvmpipe work on P7 and P8 and enables r600 ... which some people rely on

Re: [Mesa-dev] gallium endianness and hw drivers

2013-12-16 Thread Michel Dänzer
On Mon, 2013-12-16 at 13:30 +0100, Marek Olšák wrote: Wouldn't it be easier to just revert the gallium endianness rework? That would be putting our heads in the sand. If it breaks all hw drivers on big endian machines, it's apparently not done right. The HW drivers were already broken

[Mesa-dev] gallium endianness and hw drivers

2013-12-15 Thread Dave Airlie
So the llvmpipe endian work broke the nouveau nv40 support for the nv43 in the ppc G5 a few people have, Now I'm not really sure how this is supposed to be fixed, the gallium driver exports the formats it supports, which doesn't include the translated formats for PIPE_FORMAT_BGRA and