}
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;
}
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");
}
_mesa_CreateShaderObjectARB(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
- return create_shader(ctx, type);
+ return create_shader(ctx, type, "glCreateShaderObjectARB");
}
{
GET_CURRENT_CONTEXT(ctx);
- const GLuint shader = create_shader(ctx, type);
+ const GLuint shader = create_shader(ctx, type, "glCreateShaderProgramv");
GLuint program = 0;
/*