summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texgetimage.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index cf316a865a9..190f53d62fe 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -981,21 +981,6 @@ dimensions_error_check(struct gl_context *ctx,
"%s(zoffset + depth = %d)", caller, zoffset + depth);
return true;
}
- /* According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"):
- *
- * "An INVALID_OPERATION error is generated by GetTextureImage if the
- * effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY ,
- * and the texture object is not cube complete or cube array complete,
- * respectively."
- *
- * This applies also to GetTextureSubImage, GetCompressedTexImage,
- * GetCompressedTextureImage, and GetnCompressedTexImage.
- */
- if (!_mesa_cube_complete(texObj)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(cube incomplete)", caller);
- return true;
- }
break;
default:
; /* nothing */
@@ -1242,6 +1227,22 @@ common_error_check(struct gl_context *ctx,
return true;
}
+ /* According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"):
+ *
+ * "An INVALID_OPERATION error is generated by GetTextureImage if the
+ * effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY ,
+ * and the texture object is not cube complete or cube array complete,
+ * respectively."
+ *
+ * This applies also to GetTextureSubImage, GetCompressedTexImage,
+ * GetCompressedTextureImage, and GetnCompressedTexImage.
+ */
+ if (target == GL_TEXTURE_CUBE_MAP && !_mesa_cube_complete(texObj)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(cube incomplete)", caller);
+ return true;
+ }
+
return false;
}