static void
texturestorage(GLuint dims, GLuint texture, GLsizei levels,
GLenum internalformat, GLsizei width, GLsizei height,
- GLsizei depth)
+ GLsizei depth, const char *caller)
{
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
- _mesa_debug(ctx, "glTextureStorage%uD %d %d %s %d %d %d\n",
- dims, texture, levels,
+ _mesa_debug(ctx, "%s %d %d %s %d %d %d\n",
+ caller, texture, 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,
- "glTextureStorage%uD(internalformat = %s)", dims,
+ "%s(internalformat = %s)", caller,
_mesa_enum_to_string(internalformat));
return;
}
texObj = _mesa_lookup_texture(ctx, texture);
if (!texObj) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTextureStorage%uD(texture = %d)", dims, texture);
+ "%s(texture = %d)", caller, texture);
return;
}
*/
if (!legal_texobj_target(ctx, dims, texObj->Target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glTextureStorage%uD(illegal target=%s)",
- dims, _mesa_enum_to_string(texObj->Target));
+ "%s(illegal target=%s)", caller,
+ _mesa_enum_to_string(texObj->Target));
return;
}
_mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat,
GLsizei width)
{
- texturestorage(1, texture, levels, internalformat, width, 1, 1);
+ texturestorage(1, texture, levels, internalformat, width, 1, 1,
+ "glTextureStorage1D");
}
GLenum internalformat,
GLsizei width, GLsizei height)
{
- texturestorage(2, texture, levels, internalformat, width, height, 1);
+ texturestorage(2, texture, levels, internalformat, width, height, 1,
+ "glTextureStorage2D");
}
_mesa_TextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat,
GLsizei width, GLsizei height, GLsizei depth)
{
- texturestorage(3, texture, levels, internalformat, width, height, depth);
+ texturestorage(3, texture, levels, internalformat, width, height, depth,
+ "glTextureStorage3D");
}