GET_CURRENT_CONTEXT(ctx);
static const char *caller = "glGetTextureSubImage";
struct gl_texture_object *texObj =
- _mesa_lookup_texture(ctx, texture);
+ _mesa_lookup_texture_err(ctx, texture, caller);
if (!texObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "%s(texture)", caller);
return;
}
{
GET_CURRENT_CONTEXT(ctx);
static const char *caller = "glGetCompressedTextureImage";
- struct gl_texture_object *texObj;
+ struct gl_texture_object *texObj = NULL;
- texObj = _mesa_lookup_texture(ctx, texture);
+ texObj = _mesa_lookup_texture_err(ctx, texture, caller);
if (!texObj) {
- _mesa_error(ctx, GL_INVALID_VALUE, "%s(texture)", caller);
return;
}