[Piglit] [PATCH 3/3] ARB_explicit_uniform_location: GL_MAX_UNIFORM_LOCATIONS enum test
Tapani Pälli
tapani.palli at intel.com
Wed Mar 12 04:22:28 PDT 2014
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
tests/all.py | 1 +
tests/spec/CMakeLists.txt | 1 +
.../CMakeLists.gl.txt | 12 +++++
.../arb_explicit_uniform_location/CMakeLists.txt | 1 +
tests/spec/arb_explicit_uniform_location/minmax.c | 58 ++++++++++++++++++++++
5 files changed, 73 insertions(+)
create mode 100644 tests/spec/arb_explicit_uniform_location/CMakeLists.gl.txt
create mode 100644 tests/spec/arb_explicit_uniform_location/CMakeLists.txt
create mode 100644 tests/spec/arb_explicit_uniform_location/minmax.c
diff --git a/tests/all.py b/tests/all.py
index 1660d57..79209fe 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1923,6 +1923,7 @@ spec['ARB_explicit_uniform_location'] = arb_explicit_uniform_location
import_glsl_parser_tests(arb_explicit_uniform_location,
os.path.join(testsDir, 'spec', 'arb_explicit_uniform_location'),
[''])
+add_plain_test(arb_explicit_uniform_location, 'arb_explicit_uniform_location-minmax')
arb_texture_buffer_object = Group()
spec['ARB_texture_buffer_object'] = arb_texture_buffer_object
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index 0a513c1..eb3fd51 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -9,6 +9,7 @@ add_subdirectory (khr_debug)
add_subdirectory (arb_depth_clamp)
add_subdirectory (arb_draw_instanced)
add_subdirectory (arb_es2_compatibility)
+add_subdirectory (arb_explicit_uniform_location)
add_subdirectory (arb_framebuffer_object)
add_subdirectory (arb_framebuffer_srgb)
add_subdirectory (arb_geometry_shader4)
diff --git a/tests/spec/arb_explicit_uniform_location/CMakeLists.gl.txt b/tests/spec/arb_explicit_uniform_location/CMakeLists.gl.txt
new file mode 100644
index 0000000..2bac595
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/CMakeLists.gl.txt
@@ -0,0 +1,12 @@
+include_directories(
+ ${GLEXT_INCLUDE_DIR}
+ ${OPENGL_INCLUDE_PATH}
+)
+
+link_libraries (
+ piglitutil_${piglit_target_api}
+ ${OPENGL_gl_LIBRARY}
+ ${OPENGL_glu_LIBRARY}
+)
+
+piglit_add_executable (arb_explicit_uniform_location-minmax minmax.c)
diff --git a/tests/spec/arb_explicit_uniform_location/CMakeLists.txt b/tests/spec/arb_explicit_uniform_location/CMakeLists.txt
new file mode 100644
index 0000000..144a306
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/arb_explicit_uniform_location/minmax.c b/tests/spec/arb_explicit_uniform_location/minmax.c
new file mode 100644
index 0000000..5f117b3
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/minmax.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright © 2014 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.
+ */
+
+/**
+ * \file minmax.c
+ */
+
+#include "piglit-util-gl-common.h"
+#include "minmax-test.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_compat_version = 20;
+ config.window_visual = PIGLIT_GL_VISUAL_RGB;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+ return PIGLIT_FAIL;
+}
+
+void
+piglit_init(int argc, char **argv)
+{
+ bool pass = true;
+ int maxloc;
+
+ piglit_require_extension("GL_ARB_explicit_uniform_location");
+ piglit_print_minmax_header();
+
+ piglit_test_min_int(GL_MAX_UNIFORM_LOCATIONS, 1024);
+
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+ piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
+}
--
1.8.5.3
More information about the Piglit
mailing list