diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-06-15 13:26:25 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-06-15 13:26:50 -0400 |
commit | dacc16ce680faee283a0041944e13486c2fd46f6 (patch) | |
tree | a74f19811d6d338f2131cd9c6f0c3ca4d0afc16d | |
parent | f974b320791e1481dbd2992babd09d65a6e7f6ea (diff) |
Add test case for fdo28551 (glGetFramebufferAttachmentParameteriv)
-rw-r--r-- | tests/all.tests | 1 | ||||
-rw-r--r-- | tests/bugs/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/bugs/fdo28551.c | 56 |
3 files changed, 58 insertions, 0 deletions
diff --git a/tests/all.tests b/tests/all.tests index 0d194a5a7..8d89c511a 100644 --- a/tests/all.tests +++ b/tests/all.tests @@ -337,6 +337,7 @@ add_plain_test(bugs, 'fdo23670-depth_test') add_plain_test(bugs, 'fdo23670-drawpix_stencil') add_plain_test(bugs, 'fdo24066') add_plain_test(bugs, 'fdo25614-genmipmap') +add_plain_test(bugs, 'fdo28551') glx = Group() add_plain_test(glx, 'glx-multithread') diff --git a/tests/bugs/CMakeLists.txt b/tests/bugs/CMakeLists.txt index 3a72a9613..0089450a7 100644 --- a/tests/bugs/CMakeLists.txt +++ b/tests/bugs/CMakeLists.txt @@ -35,3 +35,4 @@ add_executable (fdo23670-depth_test fdo23670-depth_test.c) add_executable (fdo23670-drawpix_stencil fdo23670-drawpix_stencil.c) add_executable (fdo24066 fdo24066.c) add_executable (fdo25614-genmipmap fdo25614-genmipmap.c) +add_executable (fdo28551 fdo28551.c) diff --git a/tests/bugs/fdo28551.c b/tests/bugs/fdo28551.c new file mode 100644 index 000000000..26b044391 --- /dev/null +++ b/tests/bugs/fdo28551.c @@ -0,0 +1,56 @@ +/* + * Copyright © 2010 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + * Kristian Høgsberg <krh@bitplanet.net> + */ + +#include "piglit-util.h" + +int piglit_width = 100; +int piglit_height = 100; +int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL; + +enum piglit_result +piglit_display(void) +{ + GLint red_bits; + + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, + GL_BACK_LEFT, + GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, + &red_bits); + + printf("Red bits: %d\n", red_bits); + + if (glGetError()) + return PIGLIT_FAILURE; + + return PIGLIT_SUCCESS; +} + +void piglit_init(int argc, char **argv) +{ + piglit_ortho_projection(1.0, 1.0, GL_FALSE); + + piglit_automatic = GL_TRUE; +} |