aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/texobj.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index b107a8f8678..9ce7b4c4754 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -769,7 +769,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
}
if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
- /* Make sure that all six cube map level 0 images are the same size.
+ /* Make sure that all six cube map level 0 images are the same size and
+ * format.
* Note: we know that the image's width==height (we enforce that
* at glTexImage time) so we only need to test the width here.
*/
@@ -784,6 +785,15 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
incomplete(t, BASE, "Cube face missing or mismatched size");
return;
}
+ if (t->Image[face][baseLevel]->InternalFormat !=
+ baseImage->InternalFormat) {
+ incomplete(t, BASE, "Cube face format mismatch");
+ return;
+ }
+ if (t->Image[face][baseLevel]->Border != baseImage->Border) {
+ incomplete(t, BASE, "Cube face border size mismatch");
+ return;
+ }
}
}