diff options
author | Samuel Pitoiset <[email protected]> | 2017-06-26 12:15:18 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-28 10:25:12 +0200 |
commit | 868c9c244de3402324dc8fac4ca99628ba2de7f6 (patch) | |
tree | 8bfcb5ac5e007c5aaf007ec50fb4cb6851eca31f /src | |
parent | 886399694021d013908106cdccab66fda275ae75 (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')
-rw-r--r-- | src/mesa/main/shaderapi.c | 12 |
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; /* |