[Mesa-dev] [PATCH] vbo: move code after declarations to fix MSVC errors

Ian Romanick idr at freedesktop.org
Wed Nov 28 14:14:07 PST 2012


On 11/27/2012 06:57 PM, Kenneth Graunke wrote:
> On 11/27/2012 12:58 PM, Brian Paul wrote:
>> ---
>>   src/mesa/vbo/vbo_attrib_tmp.h |   14 +++++++-------
>>   1 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/src/mesa/vbo/vbo_attrib_tmp.h
>> b/src/mesa/vbo/vbo_attrib_tmp.h
>> index de1b451..adb22d7 100644
>> --- a/src/mesa/vbo/vbo_attrib_tmp.h
>> +++ b/src/mesa/vbo/vbo_attrib_tmp.h
>> @@ -957,8 +957,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP1ui)(GLenum target, GLenum type, GLuint coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP1ui");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP1ui");
>>      ATTR_UI(ctx, 1, type, 0, attr, coords);
>>   }
>>
>> @@ -966,8 +966,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP1uiv)(GLenum target, GLenum type, const GLuint
>> *coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP1uiv");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP1uiv");
>>      ATTR_UI(ctx, 1, type, 0, attr, coords[0]);
>>   }
>>
>> @@ -975,8 +975,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP2ui)(GLenum target, GLenum type, GLuint coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP2ui");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP2ui");
>>      ATTR_UI(ctx, 2, type, 0, attr, coords);
>>   }
>>
>> @@ -984,8 +984,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP2uiv)(GLenum target, GLenum type, const GLuint
>> *coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP2uiv");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP2uiv");
>>      ATTR_UI(ctx, 2, type, 0, attr, coords[0]);
>>   }
>>
>> @@ -993,8 +993,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP3ui)(GLenum target, GLenum type, GLuint coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP3ui");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP3ui");
>>      ATTR_UI(ctx, 3, type, 0, attr, coords);
>>   }
>>
>> @@ -1002,8 +1002,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP3uiv)(GLenum target, GLenum type, const GLuint
>> *coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP3uiv");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP3uiv");
>>      ATTR_UI(ctx, 3, type, 0, attr, coords[0]);
>>   }
>>
>> @@ -1011,8 +1011,8 @@ static void GLAPIENTRY
>>   TAG(MultiTexCoordP4ui)(GLenum target, GLenum type, GLuint coords)
>>   {
>>      GET_CURRENT_CONTEXT(ctx);
>> -   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP4ui");
>>      GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
>> +   ERROR_IF_NOT_PACKED_TYPE(ctx, type, "glMultiTexCoordP4ui");
>>      ATTR_UI(ctx, 4, type, 0, attr, coords);
>>   }
>
> Sorry for the breakage, Brian.  I always forget about this...I guess I'm
> too used to C99 and C++.

It seems like something got lost in autotooling.  I'd swear that core 
Mesa was compiled with flags that made this an error.

> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> _______________________________________________
> 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