[Mesa-dev] [PATCH 04/20] mesa: Make get_uniform available outside compilation unit

Ian Romanick idr at freedesktop.org
Fri Oct 28 10:42:31 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

Also rename to _mesa_get_uniform.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/uniforms.c |   14 +++++++-------
 src/mesa/main/uniforms.h |    4 ++++
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index da8702a..89560a8 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -369,9 +369,9 @@ split_location_offset(GLint *location, GLint *offset)
 /**
  * Called via glGetUniform[fiui]v() to get the current value of a uniform.
  */
-static void
-get_uniform(struct gl_context *ctx, GLuint program, GLint location,
-            GLsizei bufSize, GLenum returnType, GLvoid *paramsOut)
+void
+_mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
+		  GLsizei bufSize, GLenum returnType, GLvoid *paramsOut)
 {
    struct gl_shader_program *shProg =
       _mesa_lookup_shader_program_err(ctx, program, "glGetUniformfv");
@@ -1343,7 +1343,7 @@ _mesa_GetnUniformfvARB(GLhandleARB program, GLint location,
                        GLsizei bufSize, GLfloat *params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   get_uniform(ctx, program, location, bufSize, GL_FLOAT, params);
+   _mesa_get_uniform(ctx, program, location, bufSize, GL_FLOAT, params);
 }
 
 void GLAPIENTRY
@@ -1358,7 +1358,7 @@ _mesa_GetnUniformivARB(GLhandleARB program, GLint location,
                        GLsizei bufSize, GLint *params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   get_uniform(ctx, program, location, bufSize, GL_INT, params);
+   _mesa_get_uniform(ctx, program, location, bufSize, GL_INT, params);
 }
 
 void GLAPIENTRY
@@ -1374,7 +1374,7 @@ _mesa_GetnUniformuivARB(GLhandleARB program, GLint location,
                         GLsizei bufSize, GLuint *params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   get_uniform(ctx, program, location, bufSize, GL_UNSIGNED_INT, params);
+   _mesa_get_uniform(ctx, program, location, bufSize, GL_UNSIGNED_INT, params);
 }
 
 void GLAPIENTRY
@@ -1397,7 +1397,7 @@ _mesa_GetnUniformdvARB(GLhandleARB program, GLint location,
    (void) params;
 
    /*
-   get_uniform(ctx, program, location, bufSize, GL_DOUBLE, params);
+   _mesa_get_uniform(ctx, program, location, bufSize, GL_DOUBLE, params);
    */
    _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformdvARB"
                "(GL_ARB_gpu_shader_fp64 not implemented)");
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index 77f55d4..5c1dded 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -184,6 +184,10 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
                      GLint location, GLsizei count,
                      GLboolean transpose, const GLfloat *values);
 
+void
+_mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
+		  GLsizei bufSize, GLenum returnType, GLvoid *paramsOut);
+
 extern void
 _mesa_update_shader_textures_used(struct gl_program *prog);
 
-- 
1.7.6.4



More information about the mesa-dev mailing list