mesa: more const qualifiers to match the latest glext.h
authorBrian Paul <brianp@vmware.com>
Wed, 27 Jun 2012 16:52:55 +0000 (10:52 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 27 Jun 2012 21:37:10 +0000 (15:37 -0600)
For some reason regular gcc on Linux didn't catch these but the mingw
compiler did (generated errors, not warnings).

v2: include the changes in src/mapi/ too

src/mapi/glapi/gen/ARB_debug_output.xml
src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
src/mapi/glapi/gen/ARB_uniform_buffer_object.xml
src/mapi/glapi/gen/GL3x.xml
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/dd.h
src/mesa/main/errors.c
src/mesa/vbo/vbo_exec_array.c
src/mesa/vbo/vbo_noop.c
src/mesa/vbo/vbo_save_api.c

index f2877a4f7d3494f71a940ed5784abbfd8dc5a976..11f268dc6405b0e9b0b32ac287cefc145de66117 100644 (file)
@@ -72,7 +72,7 @@
 
     <function name="DebugMessageCallbackARB" offset="assign">
         <param name="callback" type="GLDEBUGPROCARB"/>
-        <param name="userParam" type="GLvoid *"/>
+        <param name="userParam" type="const GLvoid *"/>
     </function>
 
     <function name="GetDebugMessageLogARB" offset="assign">
index a697ea509c23db4b72cb4237f2239412c0fb7e57..851f1faec819d96436a87ad591e2a7bb61d7641a 100644 (file)
@@ -30,7 +30,7 @@
         <param name="mode" type="GLenum"/>
         <param name="count" type="const GLsizei *"/>
         <param name="type" type="GLenum"/>
-        <param name="indices" type="const GLvoid **"/>
+        <param name="indices" type="const GLvoid * const *"/>
         <param name="primcount" type="GLsizei"/>
         <param name="basevertex" type="const GLint *"/>
     </function>
index cbcd339e732877e46daf50be224cb937e8c720da..80541a8217e57a802a5ce7a0f34d86b08ab97397 100644 (file)
@@ -42,7 +42,7 @@
 <function name="GetUniformIndices" offset="assign">
     <param name="program" type="GLuint" />
     <param name="uniformCount" type="GLsizei" />
-    <param name="uniformNames" type="const GLchar **" />
+    <param name="uniformNames" type="const GLchar * const *" />
     <param name="uniformIndices" type="GLuint *" />
 </function>
 
index f3d782ca40328585fa5a607885b2a308b5918772..d287ac2b0f4c8131e0075ae0e4634ed481608d67 100644 (file)
   <function name="TransformFeedbackVaryings" alias="TransformFeedbackVaryingsEXT">
     <param name="program" type="GLuint"/>
     <param name="count" type="GLsizei"/>
-    <param name="varyings" type="const GLchar* *"/>
+    <param name="varyings" type="const GLchar * const *"/>
     <param name="bufferMode" type="GLenum"/>
   </function>
 
index 2140a40833c889c708d670157bb0565f60d8d445..af74c909b27f314c624e8807d76e1cbf6aaf46bb 100644 (file)
         <param name="mode" type="GLenum"/>
         <param name="count" type="const GLsizei *"/>
         <param name="type" type="GLenum"/>
-        <param name="indices" type="const GLvoid **"/>
+        <param name="indices" type="const GLvoid * const *"/>
         <param name="primcount" type="GLsizei"/>
     </function>
 
index 5bcf36bfa71d0e2519e79a6c9950e97b579aab17..687a38f44873ed858cc0ff1712cd31cfa4f8c29f 100644 (file)
@@ -1024,7 +1024,7 @@ typedef struct {
    void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
                                                   const GLsizei *count,
                                                   GLenum type,
-                                                  const GLvoid **indices,
+                                                  const GLvoid * const *indices,
                                                   GLsizei primcount,
                                                   const GLint *basevertex);
    void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first,
index ef78a0bca46301f0c390d4eed01ca3a10cf601cc..8b96319ce43018971b20f196c1f5d9f30d77f649 100644 (file)
@@ -718,11 +718,11 @@ _mesa_DebugMessageControlARB(GLenum source, GLenum type, GLenum severity,
 }
 
 static void GLAPIENTRY
-_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, GLvoid *userParam)
+_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, const GLvoid *userParam)
 {
    GET_CURRENT_CONTEXT(ctx);
    ctx->Debug.Callback = callback;
-   ctx->Debug.CallbackData = userParam;
+   ctx->Debug.CallbackData = (void *) userParam;
 }
 
 void
index ebf008536218d6e82c1c09e7b3d26b2014f79a84..6f6a2983aedf27a205e6aa20e5f4531374e82ce0 100644 (file)
@@ -1149,7 +1149,8 @@ vbo_exec_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count,
 static void
 vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
                                const GLsizei *count, GLenum type,
-                               const GLvoid **indices, GLsizei primcount,
+                               const GLvoid * const *indices,
+                               GLsizei primcount,
                                const GLint *basevertex)
 {
    struct vbo_context *vbo = vbo_context(ctx);
@@ -1290,7 +1291,7 @@ vbo_exec_MultiDrawElements(GLenum mode,
 static void GLAPIENTRY
 vbo_exec_MultiDrawElementsBaseVertex(GLenum mode,
                                     const GLsizei *count, GLenum type,
-                                    const GLvoid **indices,
+                                    const GLvoid * const *indices,
                                     GLsizei primcount,
                                     const GLsizei *basevertex)
 {
index 430011207847080ff847986328e0c7c7b0f726b5..2f472c21c2e49105a519ef939e0b4cc96decce36 100644 (file)
@@ -404,7 +404,7 @@ _mesa_noop_DrawRangeElementsBaseVertex(GLenum mode,
 static void GLAPIENTRY
 _mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei * count,
                                        GLenum type,
-                                       const GLvoid *indices,
+                                       const GLvoid * const *indices,
                                        GLsizei primcount,
                                        const GLint * basevertex)
 {
index b2c9dd5f027b6f9a03898422effe9b4b9ee06503..d275258122a0b7f7f11784db5091eb194b38905c 100644 (file)
@@ -1042,7 +1042,7 @@ _save_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
 
 static void GLAPIENTRY
 _save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
-                                  GLenum type, const GLvoid **indices,
+                                  GLenum type, const GLvoid * const *indices,
                                   GLsizei primcount, const GLint *basevertex)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -1255,7 +1255,7 @@ _save_OBE_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
 static void GLAPIENTRY
 _save_OBE_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
                                       GLenum type,
-                                      const GLvoid **indices,
+                                      const GLvoid * const *indices,
                                       GLsizei primcount,
                                       const GLint *basevertex)
 {