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; >> ... >> #else >> case PIPE_FORMAT_R8G8B8A8_UNORM: >> return hw_format_for_R8G8B8A8_UNORM; >> #endif >> >> which can be simplified to: >> >> case PIPE_FORMAT_RGBA8888_UNORM: >> return hw_format_for_R8G8B8A8_UNORM; >> >> So that the GPU can see the same formats, but they are different for the CPU. >> >> What do you think? > > That might be an option, but PIPE_FORMAT_R8G8B8A8_UNORM is useful on big > endian hosts as well, e.g. it matches GL_RGBA / GL_UNSIGNED_BYTE > exactly.
I wouldn't worry about such optimizations when we don't even have proper big endian support. I'd rather stick to the simplest solution for the old hardware. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev