[Mesa-dev] [PATCH] mesa: fix cubemap depth completeness test

Dave Airlie airlied at gmail.com
Tue Jan 10 08:14:05 PST 2012


From: Dave Airlie <airlied at redhat.com>

This fixes the test to allow cube/depth combinations on GL3
or EXT_gpu_shader4.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/texobj.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 7ee2005..dc6e309 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -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 || 
-- 
1.7.7.4



More information about the mesa-dev mailing list