"%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 */
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;
}