From 6ab2a6148a539a9e308ad4e017e5ed6b9658aa4f Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 7 Jan 2014 15:13:52 -0800 Subject: [PATCH] mesa: Make validate_shader_target() non-static. Reviewed-by: Chris Forbes Reviewed-by: Brian Paul --- 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 6042fa896d5..716e65968f3 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 4822e32c270..10f810caf5e 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 } -- 2.30.2