[Mesa-dev] another newbie project: function renaming in format_(un)pack.c

Ian Romanick idr at freedesktop.org
Fri Feb 28 10:26:31 PST 2014


On 02/28/2014 10:06 AM, Brian Paul wrote:
>
> Since the MESA_FORMAT_ enums were renamed last month, the names of the
> functions in the format_pack.c and format_unpack.c are out of sync.
>
> The idea is the pack/unpack function for MESA_FORMAT_FOO should be
> called pack_FOO() or unpack_FOO().  As an example, unpack_RGBA8888()
> should really be called unpack_A8B8G8R8_UNORM().
>
> It's easy to work out the correct name by looking later in the file for
> code such as:
>
>        table[MESA_FORMAT_A8B8G8R8_UNORM] = unpack_RGBA8888;
>        table[MESA_FORMAT_R8G8B8A8_UNORM] = unpack_RGBA8888_REV;
>        ...
>
> When finished, this should read:
>
>        table[MESA_FORMAT_A8B8G8R8_UNORM] = unpack_A8B8G8R8_UNORM;
>        table[MESA_FORMAT_R8G8B8A8_UNORM] = unpack_R8G8B8A8_UNORM;
>        ...

The MESA_FORMAT_ rename was done as a sed job, so this probably could 
too.  Doing a handful of renames in each patch is a good idea.

> If anyone decides to do this project, please don't do the whole thing in
> one giant patch.  Try to break it up into a handful of patches that can
> be easily bisected if needed.
>
> Thanks.
>
> -Brian
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>



More information about the mesa-dev mailing list