summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-01-10 16:11:58 +0000
committerDave Airlie <[email protected]>2012-01-11 07:02:32 +0000
commit863554168ef34ecb7b72650ced78cc9aed923691 (patch)
treeeb3356a18b1cfd14bbb703415d95a193c701cbea /src
parent916e206ef0cbcc5fa6c4026135e92079e1d73ec2 (diff)
mesa: fix cubemap depth completeness test
This fixes the test to allow cube/depth combinations on GL3 or EXT_gpu_shader4. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texobj.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 7ee200585c4..dc6e309865c 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 ||