[Mesa-dev] [PATCH 02/30] mesa: Make validate_shader_target() non-static.

Paul Berry stereotype441 at gmail.com
Thu Jan 9 18:19:03 PST 2014


---
 src/mesa/main/shaderapi.c | 8 ++++----
 src/mesa/main/shaderapi.h | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 6042fa8..716e659 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -171,8 +171,8 @@ _mesa_copy_string(GLchar *dst, GLsizei maxLength,
  * \param type  Shader target
  *
  */
-static bool
-validate_shader_target(const struct gl_context *ctx, GLenum type)
+bool
+_mesa_validate_shader_target(const struct gl_context *ctx, GLenum type)
 {
    switch (type) {
    case GL_FRAGMENT_SHADER:
@@ -273,7 +273,7 @@ create_shader(struct gl_context *ctx, GLenum type)
    struct gl_shader *sh;
    GLuint name;
 
-   if (!validate_shader_target(ctx, type)) {
+   if (!_mesa_validate_shader_target(ctx, type)) {
       _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)");
       return 0;
    }
@@ -1739,7 +1739,7 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program)
    GET_CURRENT_CONTEXT(ctx);
    struct gl_shader_program *shProg = NULL;
 
-   if (!validate_shader_target(ctx, type)) {
+   if (!_mesa_validate_shader_target(ctx, type)) {
       _mesa_error(ctx, GL_INVALID_ENUM, "glUseShaderProgramEXT(type)");
       return;
    }
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index 4822e32..10f810c 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -215,6 +215,9 @@ _mesa_copy_linked_program_data(gl_shader_stage type,
                                const struct gl_shader_program *src,
                                struct gl_program *dst);
 
+extern bool
+_mesa_validate_shader_target(const struct gl_context *ctx, GLenum type);
+
 
 #ifdef __cplusplus
 }
-- 
1.8.5.2



More information about the mesa-dev mailing list