summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/shaderapi.c8
-rw-r--r--src/mesa/main/shaderapi.h3
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
}