[Mesa-dev] [PATCH 1/2] mesa: fix comments for RG formats

Eric Anholt eric at anholt.net
Mon Nov 28 17:41:35 PST 2011


On Mon, 28 Nov 2011 15:16:58 -0700, Brian Paul <brianp at vmware.com> wrote:
> On 11/28/2011 12:24 PM, Eric Anholt wrote:
> > On Mon, 28 Nov 2011 11:14:17 -0700, Brian Paul<brianp at vmware.com>  wrote:
> >> The position of the red and green bits was misstated in the comments.
> >> Arguably, the names of these formats should be changed to "GR" to reflect
> >> the component ordering and to be consistent with other formats.
> >
> > Actually, could we get consistency in that naming?  Or at least a
> > comment for now here and in _mesa_format_matches_format_and_type(),
> > where it's likely to get screwed up?
> 
> I'm happy to rename the formats later but I'm going to push the fixed 
> comment for the short term.
> 
> Looking at _mesa_format_matches_format_and_type() for RG88:
> 
>     case MESA_FORMAT_RG88:
>        return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE 
> && littleEndian;
> 
> I think that's wrong.  Is GL_LUMINANCE_ALPHA somehow compatible with 
> GL_RG?  I think the code should read:
> 
> case MESA_FORMAT_RG88:
>        return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian;

That's what I thought too when rereading it.  Too much copy and paste
From texstore.c I think.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111128/b1bb21b3/attachment.pgp>


More information about the mesa-dev mailing list