mesa: fix cubemap depth completeness test
authorDave Airlie <airlied@redhat.com>
Tue, 10 Jan 2012 16:11:58 +0000 (16:11 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 11 Jan 2012 07:02:32 +0000 (07:02 +0000)
This fixes the test to allow cube/depth combinations on GL3
or EXT_gpu_shader4.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/texobj.c

index 7ee200585c42e7ec47959015aa3229f3314fbbf1..dc6e309865c01c769cd83864d6f769e92354ef39 100644 (file)
@@ -672,9 +672,11 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
                     return;
                  }
                  /* Don't support GL_DEPTH_COMPONENT for cube maps */
-                 if (t->Image[face][i]->_BaseFormat == GL_DEPTH_COMPONENT) {
-                    incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
-                    return;
+                  if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_gpu_shader4) {
+                     if (t->Image[face][i]->_BaseFormat == GL_DEPTH_COMPONENT) {
+                        incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
+                        return;
+                     }
                  }
                  /* check that all six images have same size */
                   if (t->Image[face][i]->Width2 != width ||