*/
static void
texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat,
- GLsizei width, GLsizei height, GLsizei depth)
+ GLsizei width, GLsizei height, GLsizei depth, const char *caller)
{
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
*/
if (!legal_texobj_target(ctx, dims, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTexStorage%uD(illegal target=%s)",
- dims, _mesa_enum_to_string(target));
+ "%s(illegal target=%s)",
+ caller, _mesa_enum_to_string(target));
return;
}
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
- _mesa_debug(ctx, "glTexStorage%uD %s %d %s %d %d %d\n",
- dims,
+ _mesa_debug(ctx, "%s %s %d %s %d %d %d\n", caller,
_mesa_enum_to_string(target), levels,
_mesa_enum_to_string(internalformat),
width, height, depth);
/* Check the format to make sure it is sized. */
if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTexStorage%uD(internalformat = %s)", dims,
+ "%s(internalformat = %s)", caller,
_mesa_enum_to_string(internalformat));
return;
}
_mesa_TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat,
GLsizei width)
{
- texstorage(1, target, levels, internalformat, width, 1, 1);
+ texstorage(1, target, levels, internalformat, width, 1, 1,
+ "glTexStorage1D");
}
_mesa_TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat,
GLsizei width, GLsizei height)
{
- texstorage(2, target, levels, internalformat, width, height, 1);
+ texstorage(2, target, levels, internalformat, width, height, 1,
+ "glTexStorage2D");
}
_mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat,
GLsizei width, GLsizei height, GLsizei depth)
{
- texstorage(3, target, levels, internalformat, width, height, depth);
+ texstorage(3, target, levels, internalformat, width, height, depth,
+ "glTexStorage3D");
}