mesa: Fix const correctness of API implementation functions.
This patch changes the use of const in the type signatures of _mesa_ShaderSource() and _mesa_TransformFeedbackVaryings(), to match the type signatures in the GL spec. This avoids warnings when building the code-generated api_exec.c file. Note: previously we avoided the build warnings because these functions were being type-checked against ShaderSourceARB and TransformFeedbackVaryingsEXT; those functions are semantically equivalent, but have fewer const qualifiers in their type signatures. Acked-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -1292,7 +1292,7 @@ read_shader(const char *fname)
|
|||||||
*/
|
*/
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_ShaderSource(GLhandleARB shaderObj, GLsizei count,
|
_mesa_ShaderSource(GLhandleARB shaderObj, GLsizei count,
|
||||||
const GLcharARB ** string, const GLint * length)
|
const GLcharARB * const * string, const GLint * length)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
GLint *offsets;
|
GLint *offsets;
|
||||||
|
@@ -112,7 +112,7 @@ extern void GLAPIENTRY
|
|||||||
_mesa_LinkProgram(GLhandleARB programObj);
|
_mesa_LinkProgram(GLhandleARB programObj);
|
||||||
|
|
||||||
extern void GLAPIENTRY
|
extern void GLAPIENTRY
|
||||||
_mesa_ShaderSource(GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
|
_mesa_ShaderSource(GLhandleARB, GLsizei, const GLcharARB* const *, const GLint *);
|
||||||
|
|
||||||
extern void GLAPIENTRY
|
extern void GLAPIENTRY
|
||||||
_mesa_UseProgram(GLhandleARB);
|
_mesa_UseProgram(GLhandleARB);
|
||||||
|
@@ -512,7 +512,8 @@ _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
|
|||||||
*/
|
*/
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
|
_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
|
||||||
const GLchar **varyings, GLenum bufferMode)
|
const GLchar * const *varyings,
|
||||||
|
GLenum bufferMode)
|
||||||
{
|
{
|
||||||
struct gl_shader_program *shProg;
|
struct gl_shader_program *shProg;
|
||||||
GLint i;
|
GLint i;
|
||||||
|
@@ -73,7 +73,8 @@ _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
|
|||||||
|
|
||||||
extern void GLAPIENTRY
|
extern void GLAPIENTRY
|
||||||
_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
|
_mesa_TransformFeedbackVaryings(GLuint program, GLsizei count,
|
||||||
const GLchar **varyings, GLenum bufferMode);
|
const GLchar * const *varyings,
|
||||||
|
GLenum bufferMode);
|
||||||
|
|
||||||
extern void GLAPIENTRY
|
extern void GLAPIENTRY
|
||||||
_mesa_GetTransformFeedbackVarying(GLuint program, GLuint index,
|
_mesa_GetTransformFeedbackVarying(GLuint program, GLuint index,
|
||||||
|
Reference in New Issue
Block a user