[Mesa-dev] [PATCH] mesa: more const qualifiers to match the latest glext.h
Brian Paul
brianp at vmware.com
Wed Jun 27 10:02:04 PDT 2012
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 | 2 +-
.../glapi/gen/ARB_draw_elements_base_vertex.xml | 2 +-
src/mapi/glapi/gen/ARB_uniform_buffer_object.xml | 2 +-
src/mapi/glapi/gen/GL3x.xml | 2 +-
src/mapi/glapi/gen/gl_API.xml | 2 +-
src/mesa/main/dd.h | 2 +-
src/mesa/main/errors.c | 4 ++--
src/mesa/vbo/vbo_exec_array.c | 5 +++--
src/mesa/vbo/vbo_noop.c | 2 +-
src/mesa/vbo/vbo_save_api.c | 4 ++--
10 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/mapi/glapi/gen/ARB_debug_output.xml b/src/mapi/glapi/gen/ARB_debug_output.xml
index f2877a4..11f268d 100644
--- a/src/mapi/glapi/gen/ARB_debug_output.xml
+++ b/src/mapi/glapi/gen/ARB_debug_output.xml
@@ -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">
diff --git a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
index a697ea5..851f1fa 100644
--- a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
+++ b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
@@ -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>
diff --git a/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml b/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml
index cbcd339..80541a8 100644
--- a/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml
+++ b/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml
@@ -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>
diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml
index f3d782c..d287ac2 100644
--- a/src/mapi/glapi/gen/GL3x.xml
+++ b/src/mapi/glapi/gen/GL3x.xml
@@ -231,7 +231,7 @@
<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>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 2140a40..af74c90 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -4677,7 +4677,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"/>
</function>
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 5bcf36b..687a38f 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -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,
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index ef78a0b..8b96319 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -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
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index ebf0085..6f6a298 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -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)
{
diff --git a/src/mesa/vbo/vbo_noop.c b/src/mesa/vbo/vbo_noop.c
index 4300112..2f472c2 100644
--- a/src/mesa/vbo/vbo_noop.c
+++ b/src/mesa/vbo/vbo_noop.c
@@ -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)
{
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index b2c9dd5..d275258 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -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)
{
--
1.7.3.4
More information about the mesa-dev
mailing list