summaryrefslogtreecommitdiff
path: root/tests/fbo/fbo-clear-formats.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-01-10 10:29:20 -0800
committerEric Anholt <eric@anholt.net>2011-01-11 13:29:15 -0800
commit4859c89377975518b7e07487cf992b03723e61ff (patch)
tree258a96fc2a340fa3b1c9d9364a2e4189f2ef8696 /tests/fbo/fbo-clear-formats.c
parent89f6fa0f6e11068f385498b6fc0ae4c61c086e46 (diff)
fbo-*-formats: Don't trigger GL errors in !GLEW_ARB_depth_texture case.
We don't test depth textures in that case, so don't try to check the depth size.
Diffstat (limited to 'tests/fbo/fbo-clear-formats.c')
-rw-r--r--tests/fbo/fbo-clear-formats.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c
index 95477d3dd..c12a50d44 100644
--- a/tests/fbo/fbo-clear-formats.c
+++ b/tests/fbo/fbo-clear-formats.c
@@ -280,8 +280,12 @@ test_mipmap_drawing(int x, int y, int dim, int level, GLuint internalformat)
if (compressed && dim < 8)
return GL_TRUE;
- glGetTexLevelParameteriv(GL_TEXTURE_2D, level,
- GL_TEXTURE_DEPTH_SIZE, &d_size);
+ if (GLEW_ARB_depth_texture) {
+ glGetTexLevelParameteriv(GL_TEXTURE_2D, level,
+ GL_TEXTURE_DEPTH_SIZE, &d_size);
+ } else {
+ d_size = 0;
+ }
glGetTexLevelParameteriv(GL_TEXTURE_2D, level,
GL_TEXTURE_LUMINANCE_SIZE, &l_size);
glGetTexLevelParameteriv(GL_TEXTURE_2D, level,