summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2019-11-18 14:37:08 +0200
committerTapani Pälli <tapani.palli@intel.com>2020-01-02 14:22:44 +0200
commit624a2b57bd4b1e22e66b952b619a008d88c76ff6 (patch)
tree1f494c303154be5dfa74d9cf8303f52670699ac3
parenta24b0dbdbc4df9771d3ab0bc382f7b9c29b5e7b5 (diff)
arb_vertex_type_2_10_10_10_rev: test glNormalPointerarb_vertex_type_2_10_10_10_rev
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r--tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt1
-rw-r--r--tests/spec/arb_vertex_type_2_10_10_10_rev/array_pointer.c50
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt b/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt
index 3ddca754a..95540a9ac 100644
--- a/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt
+++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt
@@ -12,5 +12,6 @@ piglit_add_executable (draw-vertices-2101010 draw-vertices-2101010.c)
piglit_add_executable (gl-3.3-vertex-attrib-p-types vertex-attrib-p-types.c)
piglit_add_executable (gl-3.3-vertex-attrib-pointer-type-size-match vertex-attrib-pointer-type-size-match.c)
piglit_add_executable (arb_vertex_type_2_10_10_10_rev-array_types array_types.c)
+piglit_add_executable (arb_vertex_type_2_10_10_10_rev-array-pointer array_pointer.c)
# vim: ft=cmake:
diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/array_pointer.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/array_pointer.c
new file mode 100644
index 000000000..a56aae48c
--- /dev/null
+++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/array_pointer.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2019 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.
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+ config.supports_gl_compat_version = 20;
+PIGLIT_GL_TEST_CONFIG_END
+
+void
+piglit_init(int argc, char **argv)
+{
+ piglit_require_extension("GL_ARB_vertex_type_2_10_10_10_rev");
+ uint32_t data[3 * 3];
+
+ glEnableClientState(GL_NORMAL_ARRAY);
+
+ glNormalPointer(GL_UNSIGNED_INT_2_10_10_10_REV, 0, data);
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ piglit_report_result(PIGLIT_PASS);
+}
+
+/* dummy */
+enum piglit_result
+piglit_display(void)
+{
+ return PIGLIT_PASS;
+}