mesa: set numFaces=6 for cube maps in _mesa_test_texobj_completeness()
authorBrian Paul <brianp@vmware.com>
Fri, 23 Mar 2012 14:16:32 +0000 (08:16 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 23 Mar 2012 16:08:49 +0000 (10:08 -0600)
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/main/texobj.c

index cfaac64bfd679541b0455edc5178246a9ac60bf5..97bef3543c8a11fc3add629fbb5695c6c607773b 100644 (file)
@@ -567,7 +567,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
       GLint i;
       const GLint minLevel = baseLevel;
       const GLint maxLevel = t->_MaxLevel;
-      GLuint width, height, depth, face, numFaces = 1;
+      const GLuint numFaces = t->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+      GLuint width, height, depth, face;
 
       if (minLevel > maxLevel) {
          incomplete(t, BASE, "minLevel > maxLevel");