[Mesa-dev] [PATCH 1/4] mesa: consolidate cases in _mesa_components_in_format()

Brian Paul brianp at vmware.com
Mon Nov 14 09:07:30 PST 2011


On 11/14/2011 10:01 AM, Eric Anholt wrote:
> On Sat, 12 Nov 2011 13:26:57 -0700, Brian Paul<brianp at vmware.com>  wrote:
>> and _mesa_sizeof_packed_type()
>> ---
>>   src/mesa/main/image.c |   40 +++++++++++-----------------------------
>>   1 files changed, 11 insertions(+), 29 deletions(-)
>>
>> diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
>> index 7d95dd6..ff536da 100644
>> --- a/src/mesa/main/image.c
>> +++ b/src/mesa/main/image.c
>> @@ -195,38 +195,22 @@ _mesa_sizeof_packed_type( GLenum type )
>>         case GL_FLOAT:
>>   	 return sizeof(GLfloat);
>>         case GL_UNSIGNED_BYTE_3_3_2:
>> -         return sizeof(GLubyte);
>>         case GL_UNSIGNED_BYTE_2_3_3_REV:
>> -         return sizeof(GLubyte);
>>         case MESA_UNSIGNED_BYTE_4_4:
>>            return sizeof(GLubyte);
>>         case GL_UNSIGNED_SHORT_5_6_5:
>> -         return sizeof(GLushort);
>>         case GL_UNSIGNED_SHORT_5_6_5_REV:
>> -         return sizeof(GLushort);
>>         case GL_UNSIGNED_SHORT_4_4_4_4:
>> -         return sizeof(GLushort);
>>         case GL_UNSIGNED_SHORT_4_4_4_4_REV:
>> -         return sizeof(GLushort);
>>         case GL_UNSIGNED_SHORT_5_5_5_1:
>> -         return sizeof(GLushort);
>>         case GL_UNSIGNED_SHORT_1_5_5_5_REV:
>> -         return sizeof(GLushort);
>> +         return sizeof(GLushort);
>
> Let's drop the trailing whitespace if it's going to show up as + in a
> diff.
>
>>         case GL_UNSIGNED_INT_8_8_8_8:
>> -         return sizeof(GLuint);
>>         case GL_UNSIGNED_INT_8_8_8_8_REV:
>> -         return sizeof(GLuint);
>>         case GL_UNSIGNED_INT_10_10_10_2:
>> -         return sizeof(GLuint);
>>         case GL_UNSIGNED_INT_2_10_10_10_REV:
>> -         return sizeof(GLuint);
>> -      case GL_UNSIGNED_SHORT_8_8_MESA:
>> -      case GL_UNSIGNED_SHORT_8_8_REV_MESA:
>
> These lines appear to have been dropped unintentionally.
>
> Other than that,
>
> Reviewed-by: Eric Anholt<eric at anholt.net>

Thanks.  I'll fix those things before committing.

-Brian


More information about the mesa-dev mailing list