[Mesa-dev] [V3 PATCH 1/8] mesa: 's/\bgl_format\b/mesa_format/g'. Use better name for Mesa Formats enum

Kenneth Graunke kenneth at whitecape.org
Wed Jan 22 15:12:46 PST 2014


On 01/17/2014 08:58 AM, Brian Paul wrote:
> On 01/16/2014 10:13 PM, Mark Mueller wrote:
>> This series encompases the much discussed specification and renaming
>> of MESA_FORMATs,
>> which now is packed into 8 patches
>>
>> Signed-off-by: Mark Mueller <MarkKMueller at gmail.com>
>> ---
> 
> Well, our other enum typedefs (and structs) all use the gl_ prefix.  But
> the other enum values don't use MESA_ prefixes so gl_formats are weird
> that way.  I'm kind on the fence about this change.
> 
> -Brian

The formats are particularly confusing, though:

There's code all over the place that deals with format information via
GL enumeration values: GL_RGBA, GL_RGB10_A2UI, and so on.  There's also
a ton of code that deals with MESA_FORMATs.

When discussing new texture related code, the question "Are you using
GL_* formats or gl_formats?" comes up in conversation a fair bit.  When
said out loud, it sounds like a stupid question.  There are lots of
variations, too: "Are you using GL formats?"  "Yes."  "Oh, you should
use Mesa formats."  "But I am."  "What?"

In contrast, if you say "Mesa formats", everybody immediately knows you
mean MESA_FORMAT_*.  It's much clearer.

The glformats.c file also deals with GL_* formats, not gl_format, which
suggests that "GL formats" mean "GL API formats" or "GL enumeration
values pertaining to formats".

I think calling the MESA_FORMAT_* enums 'mesa_format' would clarify the
situation considerably.

I guess it is technically inconsistent, but I've never had a problem
with gl_api, gl_transform_feedback_object, or the like.

--Ken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140122/25dd09cf/attachment.pgp>


More information about the mesa-dev mailing list