[Piglit] [PATCH 16/20] Move fdo28551 test from bugs to spec dir.
Fabian Bieler
fabianbieler at fastmail.fm
Sat Dec 16 19:21:16 UTC 2017
Now it's called "get-attachment-parameter-default-framebuffer".
---
tests/all.py | 2 +-
tests/bugs/CMakeLists.gl.txt | 1 -
tests/bugs/fdo28551.c | 81 --------------------
.../spec/arb_framebuffer_object/CMakeLists.gl.txt | 1 +
.../get-attachment-parameter-default-framebuffer.c | 89 ++++++++++++++++++++++
5 files changed, 91 insertions(+), 83 deletions(-)
delete mode 100644 tests/bugs/fdo28551.c
create mode 100644 tests/spec/arb_framebuffer_object/get-attachment-parameter-default-framebuffer.c
diff --git a/tests/all.py b/tests/all.py
index 47b8786..9a90fe9 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1898,7 +1898,7 @@ with profile.test_list.group_manager(
grouptools.join('spec', 'ARB_framebuffer_object')) as g:
g(['same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT'])
g(['same-attachment-glFramebufferRenderbuffer-GL_DEPTH_STENCIL_ATTACHMENT'])
- g(['fdo28551'], run_concurrent=False)
+ g(['arb_framebuffer_object-get-attachment-parameter-default-framebuffer'], run_concurrent=False)
g(['fbo-alpha'])
g(['fbo-blit-stretch'], run_concurrent=False)
g(['fbo-blit-scaled-linear'])
diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
index a7a14ce..faf0dbf 100644
--- a/tests/bugs/CMakeLists.gl.txt
+++ b/tests/bugs/CMakeLists.gl.txt
@@ -10,7 +10,6 @@ link_libraries (
${OPENGL_gl_LIBRARY}
)
-piglit_add_executable (fdo28551 fdo28551.c)
piglit_add_executable (fdo31934 fdo31934.c)
piglit_add_executable (tri-tex-crash tri-tex-crash.c)
piglit_add_executable (vbo-buffer-unmap vbo-buffer-unmap.c)
diff --git a/tests/bugs/fdo28551.c b/tests/bugs/fdo28551.c
deleted file mode 100644
index 99f0dda..0000000
--- a/tests/bugs/fdo28551.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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 at bitplanet.net>
- */
-
-#include "piglit-util-gl.h"
-
-PIGLIT_GL_TEST_CONFIG_BEGIN
-
- config.supports_gl_compat_version = 10;
-
- config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
- config.khr_no_error_support = PIGLIT_NO_ERRORS;
-
-PIGLIT_GL_TEST_CONFIG_END
-
-enum piglit_result
-piglit_display(void)
-{
- GLint red_bits, att_type;
- 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");
- while (glGetError());
- return PIGLIT_FAIL;
- }
-
- glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
- GL_BACK_LEFT,
- GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE,
- &red_bits);
-
- printf("Red bits: %d\n", red_bits);
-
- err = glGetError();
- if (err) {
- printf("glGetFramebufferAttachmentParameteriv GL error: 0x%x\n", err);
- return PIGLIT_FAIL;
- }
-
- return PIGLIT_PASS;
-}
-
-void piglit_init(int argc, char **argv)
-{
- (void) argc;
- (void) argv;
-
- piglit_require_extension("GL_ARB_framebuffer_object");
-
- piglit_ortho_projection(1.0, 1.0, GL_FALSE);
-
- piglit_automatic = GL_TRUE;
-}
diff --git a/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt b/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt
index 731f838..3a268cf 100644
--- a/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt
@@ -11,6 +11,7 @@ link_libraries (
piglit_add_executable(framebuffer-blit-levels framebuffer-blit-levels.c)
piglit_add_executable(get-renderbuffer-internalformat get-renderbuffer-internalformat.c)
+piglit_add_executable(arb_framebuffer_object-get-attachment-parameter-default-framebuffer get-attachment-parameter-default-framebuffer.c)
piglit_add_executable(arb_framebuffer_object-mixed-buffer-sizes mixed-buffer-sizes.c)
piglit_add_executable(arb_framebuffer_object-negative-readpixels-no-rb negative-readpixels-no-rb.c)
piglit_add_executable(same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.c)
diff --git a/tests/spec/arb_framebuffer_object/get-attachment-parameter-default-framebuffer.c b/tests/spec/arb_framebuffer_object/get-attachment-parameter-default-framebuffer.c
new file mode 100644
index 0000000..0415243
--- /dev/null
+++ b/tests/spec/arb_framebuffer_object/get-attachment-parameter-default-framebuffer.c
@@ -0,0 +1,89 @@
+/*
+ * 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 at bitplanet.net>
+ *
+ * Test glGetFramebufferAttachmentParameter on onscreen (default) framebuffer.
+ *
+ * https://bugs.freedesktop.org/show_bug.cgi?id=28551
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_compat_version = 10;
+
+ config.window_visual = PIGLIT_GL_VISUAL_DOUBLE |
+ PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DEPTH |
+ PIGLIT_GL_VISUAL_STENCIL;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+ GLint red_bits, att_type;
+ 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");
+ while (glGetError());
+ return PIGLIT_FAIL;
+ }
+
+ glGetFramebufferAttachmentParameteriv(
+ GL_FRAMEBUFFER, GL_BACK_LEFT,
+ GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &red_bits);
+
+ printf("Red bits: %d\n", red_bits);
+
+ err = glGetError();
+ if (err) {
+ printf("glGetFramebufferAttachmentParameteriv GL error: "
+ "0x%x\n",
+ err);
+ return PIGLIT_FAIL;
+ }
+
+ return PIGLIT_PASS;
+}
+
+void piglit_init(int argc, char **argv)
+{
+ (void) argc;
+ (void) argv;
+
+ piglit_require_extension("GL_ARB_framebuffer_object");
+
+ piglit_ortho_projection(1.0, 1.0, GL_FALSE);
+
+ piglit_automatic = GL_TRUE;
+}
--
2.7.4
More information about the Piglit
mailing list