On 15/05/15 18:31, Brian Paul wrote:
---
tests/all.py | 1 +
tests/spec/gl-1.0/CMakeLists.gl.txt | 1 +
tests/spec/gl-1.0/push-no-attribs.c | 58 +++++++++++++++++++++++++++++++++++++
3 files changed, 60 insertions(+)
create mode 100644 tests/spec/gl-1.0/push-no-attribs.c
diff --git a/tests/all.py b/tests/all.py
index 5b87410..5c89355 100755
--- a/tests/all.py
+++ b/tests/all.py
@@ -969,6 +969,7 @@ with profile.group_manager(
g(['gl-1.0-front-invalidate-back'], run_concurrent=False)
g(['gl-1.0-swapbuffers-behavior'], run_concurrent=False)
g(['gl-1.0-polygon-line-aa'])
+ g(['gl-1.0-push-no-attribs'])
g(['gl-1.0-blend-func'])
g(['gl-1.0-fpexceptions'])
g(['gl-1.0-ortho-pos'])
diff --git a/tests/spec/gl-1.0/CMakeLists.gl.txt
b/tests/spec/gl-1.0/CMakeLists.gl.txt
index b76d6c3..d04b835 100644
--- a/tests/spec/gl-1.0/CMakeLists.gl.txt
+++ b/tests/spec/gl-1.0/CMakeLists.gl.txt
@@ -23,6 +23,7 @@ piglit_add_executable (gl-1.0-logicop logicop.c)
piglit_add_executable (gl-1.0-long-dlist long-dlist.c)
piglit_add_executable (gl-1.0-ortho-pos orthpos.c)
piglit_add_executable (gl-1.0-polygon-line-aa polygon-line-aa.c)
+piglit_add_executable (gl-1.0-push-no-attribs push-no-attribs.c)
piglit_add_executable (gl-1.0-readpixsanity readpix.c)
piglit_add_executable (gl-1.0-rendermode-feedback rendermode-feedback.c)
piglit_add_executable (gl-1.0-swapbuffers-behavior swapbuffers-behavior.c)
diff --git a/tests/spec/gl-1.0/push-no-attribs.c
b/tests/spec/gl-1.0/push-no-attribs.c
new file mode 100644
index 0000000..9d02ffe
--- /dev/null
+++ b/tests/spec/gl-1.0/push-no-attribs.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2015 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 glPushAttrib(0), glPopAttrib() doesn't generate an error.
+ */
+
+#include "piglit-util-gl.h"
+
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+ config.supports_gl_compat_version = 10;
+PIGLIT_GL_TEST_CONFIG_END
+
+
+enum piglit_result
+piglit_display(void)
+{
+ /* never get here */
+ return PIGLIT_PASS;
+}
+
+
+void
+piglit_init(int argc, char **argv)
+{
+ glPushAttrib(0);
+ if (!piglit_check_gl_error(GL_NO_ERROR)) {
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
+ glPopAttrib();
+ if (!piglit_check_gl_error(GL_NO_ERROR)) {
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
+ piglit_report_result(PIGLIT_PASS);
+}
Reviewed-by: Jose Fonseca <jfons...@vmware.com>
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit