summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-26 12:15:18 +0200
committerSamuel Pitoiset <[email protected]>2017-06-28 10:25:12 +0200
commit868c9c244de3402324dc8fac4ca99628ba2de7f6 (patch)
tree8bfcb5ac5e007c5aaf007ec50fb4cb6851eca31f /src/mesa
parent886399694021d013908106cdccab66fda275ae75 (diff)
mesa: pass the 'caller' function to create_shader()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shaderapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 16d9f1e6486..c2b371cce0c 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -323,14 +323,14 @@ attach_shader_no_error(struct gl_context *ctx, GLuint program, GLuint shader)
}
static GLuint
-create_shader(struct gl_context *ctx, GLenum type)
+create_shader(struct gl_context *ctx, GLenum type, const char *caller)
{
struct gl_shader *sh;
GLuint name;
if (!_mesa_validate_shader_target(ctx, type)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(%s)",
- _mesa_enum_to_string(type));
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(%s)",
+ caller, _mesa_enum_to_string(type));
return 0;
}
@@ -1394,7 +1394,7 @@ _mesa_CreateShader(GLenum type)
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glCreateShader %s\n", _mesa_enum_to_string(type));
- return create_shader(ctx, type);
+ return create_shader(ctx, type, "glCreateShader");
}
@@ -1402,7 +1402,7 @@ GLhandleARB GLAPIENTRY
_mesa_CreateShaderObjectARB(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
- return create_shader(ctx, type);
+ return create_shader(ctx, type, "glCreateShaderObjectARB");
}
@@ -2268,7 +2268,7 @@ _mesa_CreateShaderProgramv(GLenum type, GLsizei count,
{
GET_CURRENT_CONTEXT(ctx);
- const GLuint shader = create_shader(ctx, type);
+ const GLuint shader = create_shader(ctx, type, "glCreateShaderProgramv");
GLuint program = 0;
/*