[Piglit] [PATCH 19/20] Move vbo-buffer-unmap test from bugs to spec dir.
Fabian Bieler
fabianbieler at fastmail.fm
Sat Dec 16 19:21:19 UTC 2017
Moved from opengl 1.1 to opengl 1.0 profile in all.py.
---
tests/all.py | 2 +-
tests/bugs/CMakeLists.gl.txt | 2 -
tests/bugs/vbo-buffer-unmap.c | 94 -------------------------
tests/spec/gl-1.1/CMakeLists.gl.txt | 1 +
tests/spec/gl-1.1/set-vertex-color-after-draw.c | 94 +++++++++++++++++++++++++
5 files changed, 96 insertions(+), 97 deletions(-)
delete mode 100644 tests/bugs/vbo-buffer-unmap.c
create mode 100644 tests/spec/gl-1.1/set-vertex-color-after-draw.c
diff --git a/tests/all.py b/tests/all.py
index 73bcdac..db044f4 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -765,7 +765,7 @@ with profile.test_list.group_manager(
g(['copyteximage', '1D'])
g(['copyteximage', '2D'])
g(['gl-1.1-read-pixels-after-display-list'])
- g(['vbo-buffer-unmap'])
+ g(['gl-1.1-set-vertex-color-after-draw'])
g(['array-stride'])
g(['clear-accum'])
g(['clipflat'])
diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
index ea735b6..a06f2d2 100644
--- a/tests/bugs/CMakeLists.gl.txt
+++ b/tests/bugs/CMakeLists.gl.txt
@@ -10,6 +10,4 @@ link_libraries (
${OPENGL_gl_LIBRARY}
)
-piglit_add_executable (vbo-buffer-unmap vbo-buffer-unmap.c)
-
# vim: ft=cmake:
diff --git a/tests/bugs/vbo-buffer-unmap.c b/tests/bugs/vbo-buffer-unmap.c
deleted file mode 100644
index 674bc94..0000000
--- a/tests/bugs/vbo-buffer-unmap.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2011 VMware, Inc.
- *
- * 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.
- */
-
-/**
- * Test that the VBO's buffers are unmapped before drawing.
- * In particular, test the VMware svga Gallium driver.
- *
- * Brian Paul
- * 18 Feb 2011
- */
-
-
-#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;
- config.khr_no_error_support = PIGLIT_NO_ERRORS;
-
-PIGLIT_GL_TEST_CONFIG_END
-
-enum piglit_result
-piglit_display(void)
-{
- GLubyte image[8][8][4];
- GLuint tex;
-
- memset(image, 0x80, sizeof(image));
-
- glGenTextures(1, &tex);
- glBindTexture(GL_TEXTURE_2D, tex);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, image);
-
- glClear(GL_COLOR_BUFFER_BIT);
-
- glColor3f(0, 1, 0);
-
- glBegin(GL_POINTS);
- glVertex2f(-1, 0);
- glEnd();
- glBegin(GL_POINTS);
- glVertex2f(0, 0);
- glEnd();
- glBegin(GL_POINTS);
- glVertex2f(1, 0);
- glEnd();
-
- glFlush();
-
- /* This call may cause a the internal VBO to be mapped and the
- * glTexImage2D call which may do a DMA transfer may hit a path
- * where we expect all VBOs to be unmapped.
- */
- glColor3f(1, 0, 0);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, image);
-
- piglit_present_results();
-
- return PIGLIT_PASS;
-}
-
-
-void
-piglit_init(int argc, char **argv)
-{
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-2, 2, -2, 2, -1, 1);
-}
diff --git a/tests/spec/gl-1.1/CMakeLists.gl.txt b/tests/spec/gl-1.1/CMakeLists.gl.txt
index 77f3985..a4c9ac0 100644
--- a/tests/spec/gl-1.1/CMakeLists.gl.txt
+++ b/tests/spec/gl-1.1/CMakeLists.gl.txt
@@ -9,6 +9,7 @@ link_libraries (
)
piglit_add_executable (gl-1.1-read-pixels-after-display-list read-pixels-after-display-list.c)
+piglit_add_executable (gl-1.1-set-vertex-color-after-draw set-vertex-color-after-draw.c)
piglit_add_executable (gl-1.1-xor xor.c)
piglit_add_executable (gl-1.1-xor-copypixels xor-copypixels.c)
diff --git a/tests/spec/gl-1.1/set-vertex-color-after-draw.c b/tests/spec/gl-1.1/set-vertex-color-after-draw.c
new file mode 100644
index 0000000..674bc94
--- /dev/null
+++ b/tests/spec/gl-1.1/set-vertex-color-after-draw.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2011 VMware, Inc.
+ *
+ * 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.
+ */
+
+/**
+ * Test that the VBO's buffers are unmapped before drawing.
+ * In particular, test the VMware svga Gallium driver.
+ *
+ * Brian Paul
+ * 18 Feb 2011
+ */
+
+
+#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;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+ GLubyte image[8][8][4];
+ GLuint tex;
+
+ memset(image, 0x80, sizeof(image));
+
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_2D, tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, image);
+
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glColor3f(0, 1, 0);
+
+ glBegin(GL_POINTS);
+ glVertex2f(-1, 0);
+ glEnd();
+ glBegin(GL_POINTS);
+ glVertex2f(0, 0);
+ glEnd();
+ glBegin(GL_POINTS);
+ glVertex2f(1, 0);
+ glEnd();
+
+ glFlush();
+
+ /* This call may cause a the internal VBO to be mapped and the
+ * glTexImage2D call which may do a DMA transfer may hit a path
+ * where we expect all VBOs to be unmapped.
+ */
+ glColor3f(1, 0, 0);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, image);
+
+ piglit_present_results();
+
+ return PIGLIT_PASS;
+}
+
+
+void
+piglit_init(int argc, char **argv)
+{
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-2, 2, -2, 2, -1, 1);
+}
--
2.7.4
More information about the Piglit
mailing list