[Piglit] [PATCH 05/20] Move fdo14575 test from bugs to spec dir.
Fabian Bieler
fabianbieler at fastmail.fm
Sat Dec 16 19:21:05 UTC 2017
Now it's called "delete-mapped-buffer".
---
tests/all.py | 2 +-
tests/bugs/CMakeLists.gl.txt | 1 -
tests/bugs/fdo14575.c | 89 ---------------------
.../arb_vertex_buffer_object/CMakeLists.gl.txt | 1 +
.../delete-mapped-buffer.c | 91 ++++++++++++++++++++++
5 files changed, 93 insertions(+), 91 deletions(-)
delete mode 100644 tests/bugs/fdo14575.c
create mode 100644 tests/spec/arb_vertex_buffer_object/delete-mapped-buffer.c
diff --git a/tests/all.py b/tests/all.py
index 35f0182..b7756b8 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2724,7 +2724,7 @@ with profile.test_list.group_manager(
'elements-negative-offset')
g(['arb_vertex_buffer_object-mixed-immediate-and-vbo'],
'mixed-immediate-and-vbo')
- g(['fdo14575'])
+ g(['arb_vertex_buffer_object-delete-mapped-buffer'])
g(['fdo22540'])
g(['fdo31934'])
g(['arb_vertex_buffer_object-ib-data-sync'], 'ib-data-sync')
diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
index aa3b24d..5a50248 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 (fdo14575 fdo14575.c)
piglit_add_executable (r300-readcache r300-readcache.c)
piglit_add_executable (tex1d-2dborder tex1d-2dborder.c)
piglit_add_executable (fdo20701 fdo20701.c)
diff --git a/tests/bugs/fdo14575.c b/tests/bugs/fdo14575.c
deleted file mode 100644
index 3215942..0000000
--- a/tests/bugs/fdo14575.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright © 2007 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:
- * Eric Anholt <eric at anholt.net>
- *
- */
-
-/**
- * @file fdo14575.c
- *
- * Tests that the driver doesn't fail when deleting a mapped buffer object.
- */
-#include "piglit-util-gl.h"
-
-PIGLIT_GL_TEST_CONFIG_BEGIN
-
- config.supports_gl_compat_version = 10;
-
- config.window_visual = PIGLIT_GL_VISUAL_RGB;
- config.khr_no_error_support = PIGLIT_NO_ERRORS;
-
-PIGLIT_GL_TEST_CONFIG_END
-
-void
-piglit_init(int argc, char**argv)
-{
- GLfloat data = 1.0;
- GLfloat *v;
- GLuint buf;
-
- piglit_require_extension("GL_ARB_vertex_buffer_object");
-
- glGenBuffersARB(1, &buf);
-
- /* First, do a normal buffer create/data/delete */
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, &data, GL_STATIC_DRAW_ARB);
- glDeleteBuffersARB(1, &buf);
- if (!piglit_check_gl_error(GL_NO_ERROR))
- piglit_report_result(PIGLIT_FAIL);
-
- /* Then, another normal path: create, map, write, unmap, delete */
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL, GL_STATIC_DRAW_ARB);
- v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
- *v = data;
- glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
- glDeleteBuffersARB(1, &buf);
- if (!piglit_check_gl_error(GL_NO_ERROR))
- piglit_report_result(PIGLIT_FAIL);
-
- /* Then, do the failing path: create, map, delete */
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL, GL_STATIC_DRAW_ARB);
- v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
- *v = data;
- glDeleteBuffersARB(1, &buf);
- if (!piglit_check_gl_error(GL_NO_ERROR))
- piglit_report_result(PIGLIT_FAIL);
-
- piglit_report_result(PIGLIT_PASS);
-}
-
-enum piglit_result
-piglit_display(void)
-{
- /* Should never be reached */
- return PIGLIT_FAIL;
-}
diff --git a/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt b/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
index fb58666..8b6f3b2 100644
--- a/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
@@ -9,6 +9,7 @@ link_libraries (
)
piglit_add_executable (arb_vertex_buffer_object-combined-vertex-index combined-vertex-index.c)
+piglit_add_executable (arb_vertex_buffer_object-delete-mapped-buffer delete-mapped-buffer.c)
piglit_add_executable (arb_vertex_buffer_object-elements-negative-offset elements-negative-offset.c)
piglit_add_executable (arb_vertex_buffer_object-mixed-immediate-and-vbo mixed-immediate-and-vbo.c)
piglit_add_executable (arb_vertex_buffer_object-ib-data-sync ib-data-sync.c)
diff --git a/tests/spec/arb_vertex_buffer_object/delete-mapped-buffer.c b/tests/spec/arb_vertex_buffer_object/delete-mapped-buffer.c
new file mode 100644
index 0000000..c2ef807
--- /dev/null
+++ b/tests/spec/arb_vertex_buffer_object/delete-mapped-buffer.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright © 2007 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:
+ * Eric Anholt <eric at anholt.net>
+ *
+ */
+
+/**
+ * @file delete-mapped-buffer.c
+ *
+ * Tests that the driver doesn't fail when deleting a mapped buffer object.
+ *
+ * https://bugs.freedesktop.org/show_bug.cgi?id=14575
+ */
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_compat_version = 10;
+
+ config.window_visual = PIGLIT_GL_VISUAL_RGB;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+void
+piglit_init(int argc, char**argv)
+{
+ GLfloat data = 1.0;
+ GLfloat *v;
+ GLuint buf;
+
+ piglit_require_extension("GL_ARB_vertex_buffer_object");
+
+ glGenBuffersARB(1, &buf);
+
+ /* First, do a normal buffer create/data/delete */
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, &data, GL_STATIC_DRAW_ARB);
+ glDeleteBuffersARB(1, &buf);
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ /* Then, another normal path: create, map, write, unmap, delete */
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL, GL_STATIC_DRAW_ARB);
+ v = (GLfloat *)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ *v = data;
+ glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
+ glDeleteBuffersARB(1, &buf);
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ /* Then, do the failing path: create, map, delete */
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL, GL_STATIC_DRAW_ARB);
+ v = (GLfloat *)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ *v = data;
+ glDeleteBuffersARB(1, &buf);
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ piglit_report_result(PIGLIT_PASS);
+}
+
+enum piglit_result
+piglit_display(void)
+{
+ /* Should never be reached */
+ return PIGLIT_FAIL;
+}
--
2.7.4
More information about the Piglit
mailing list