aboutsummaryrefslogtreecommitdiff
path: root/tests/fbo
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2012-12-09 12:14:06 +0000
committerJosé Fonseca <jose.r.fonseca@gmail.com>2012-12-09 12:17:16 +0000
commit45d06f050d8fff5dda042ca14d0bab8d4cda04af (patch)
tree63d6165f3673332824c543d3ad567c6fe91adfa5 /tests/fbo
parent38a148e16e90d0f6f4bdd0c7272b1863b369f42c (diff)
fbo-blending-formats: Only query GL_TEXTURE_xxx_TYPE when GL_EXT_texture_snorm is supported
Otherwise the test will fail due to GL_INVALID_ENUM errors. Fixes fdo bug 71136. Tested-by: Vinson Lee <vlee@freedesktop.org>
Diffstat (limited to 'tests/fbo')
-rw-r--r--tests/fbo/fbo-blending-formats.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c
index 78002ab7..3dffa0e8 100644
--- a/tests/fbo/fbo-blending-formats.c
+++ b/tests/fbo/fbo-blending-formats.c
@@ -70,10 +70,12 @@ get_texture_bits(GLenum target, GLenum size_enum, GLenum type_enum)
if (!size) {
return size;
}
- glGetTexLevelParameteriv(target, 0, type_enum, &type);
- if (type == GL_SIGNED_NORMALIZED) {
- /* One bit is lost for the sign */
- size -= 1;
+ if (piglit_is_extension_supported("GL_EXT_texture_snorm")) {
+ glGetTexLevelParameteriv(target, 0, type_enum, &type);
+ if (type == GL_SIGNED_NORMALIZED) {
+ /* One bit is lost for the sign */
+ size -= 1;
+ }
}
return size;
}