[Mesa-dev] [PATCH 0/8] util: big-endian fixes for format generator
rsandifo at linux.vnet.ibm.com
Wed Jun 12 07:06:38 PDT 2013
This series is a replacement for the util part of:
It doesn't include any of the controversial format name parts of
those patches (although of course they're still needed in some form).
The original version took the endianness from the build system and
only produced output for that endianness. This version instead
generates both big- and little-endian code, with preprocessor
guards to choose the right version.
The x8y8z8w8 formats could be handled by adding separate big- and
little-endian shift amounts to u_format_parse.Channel. The patches
go a bit further and separate the entire channel and swizzle lists.
That is, u_format_parse.Format now has separate channel and swizzle
lists for each endianness.
The reason for this is that (AFAICT) depth-and-stencil formats are
universally treated as uint32_t-based or (float x uint32_t)-based.
E.g. PIPE_FORMAT_Z24_UNORM_S8_UINT is always a 32-bit int with the depth
in the lower 24 bits and the stencil in the upper 8 bits. (This is
called S8_Z24 in mesa and elsewhere.) The easiest way of dealing with
that seemed to be to add the big-endian form directly to u_format.csv,
as with the attached patch. No other changes seem to be needed to support
these particular formats on big-endian.
I'm not submitting the patch below yet because it doesn't make sense
without the other endianness changes. When applied on top of those
changes though, it fixes glxgears on System z. It also fixes many
No piglit regressions on x86_64.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4265 bytes
Desc: not available
More information about the mesa-dev