diff options
author | Brian Paul <brianp@vmware.com> | 2010-12-03 08:34:03 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-12-03 08:34:29 -0700 |
commit | afe0de61ef68bf86244ebf00bb9c0e535f85d421 (patch) | |
tree | c0c5eab3ce50e6b4544055a83ef0ea8cb8af79b9 /tests/bugs | |
parent | 04b3381d6a79981c4395d578e9172d09cdb8331e (diff) |
fdo28551: also query GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
See http://bugs.freedesktop.org/show_bug.cgi?id=31947
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/fdo28551.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/bugs/fdo28551.c b/tests/bugs/fdo28551.c index 524337ddc..f7fc079c6 100644 --- a/tests/bugs/fdo28551.c +++ b/tests/bugs/fdo28551.c @@ -33,6 +33,11 @@ #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 #endif +#ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#endif + + int piglit_width = 100; int piglit_height = 100; int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL; @@ -40,11 +45,21 @@ int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL; enum piglit_result piglit_display(void) { - GLint red_bits; + GLint red_bits, att_type, att_name; GLenum err; glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK_LEFT, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, + &att_type); + + if (att_type != GL_FRAMEBUFFER_DEFAULT) { + printf("Default framebuffer's attachment type is not GL_FRAMEBUFFER_DEFAULT\n"); + return PIGLIT_FAILURE; + } + + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, + GL_BACK_LEFT, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &red_bits); |