From 281d0fd3a9cd2b4e97cdb58eb7854f9f90220fc7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 23 Mar 2012 08:16:32 -0600 Subject: [PATCH] mesa: set numFaces=6 for cube maps in _mesa_test_texobj_completeness() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: José Fonseca --- src/mesa/main/texobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index cfaac64bfd6..97bef3543c8 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -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"); -- 2.30.2