mesa: add KHR_no_error support for glDepthRangeIndexed()
[mesa.git] / src / mesa / main / texgetimage.c
index c0c50b0518bf71544a43d2b51e77109627724964..715bc249be12182954d90ba108bdc42493844d3c 100644 (file)
@@ -1459,10 +1459,9 @@ _mesa_GetTextureSubImage(GLuint texture, GLint level,
    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;
    }
 
@@ -1774,11 +1773,10 @@ _mesa_GetCompressedTextureSubImage(GLuint texture, GLint level,
 {
    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;
    }