[Piglit] [PATCH 01/11] arb_shader_subroutine: Add initial minmax test
Chris Forbes
chrisf at ijw.co.nz
Sun Aug 10 04:06:52 PDT 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
tests/all.py | 9 ++++
tests/spec/CMakeLists.txt | 1 +
tests/spec/arb_shader_subroutine/CMakeLists.gl.txt | 12 +++++
tests/spec/arb_shader_subroutine/CMakeLists.txt | 1 +
tests/spec/arb_shader_subroutine/minmax.c | 61 ++++++++++++++++++++++
5 files changed, 84 insertions(+)
create mode 100644 tests/spec/arb_shader_subroutine/CMakeLists.gl.txt
create mode 100644 tests/spec/arb_shader_subroutine/CMakeLists.txt
create mode 100644 tests/spec/arb_shader_subroutine/minmax.c
diff --git a/tests/all.py b/tests/all.py
index 36436b8..4e59dfb 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1869,6 +1869,15 @@ add_concurrent_test(arb_gpu_shader5, 'arb_gpu_shader5-invocation-id')
add_concurrent_test(arb_gpu_shader5, 'arb_gpu_shader5-invocations_count_too_large')
add_concurrent_test(arb_gpu_shader5, 'arb_gpu_shader5-xfb-streams')
+arb_shader_subroutine = {}
+spec['ARB_shader_subroutine'] = arb_shader_subroutine
+add_shader_test_dir(arb_shader_subroutine,
+ os.path.join(testsDir, 'spec', 'arb_shader_subroutine'),
+ recursive=True)
+import_glsl_parser_tests(arb_shader_subroutine,
+ testsDir + '/spec/arb_shader_subroutine', [''])
+add_concurrent_test(arb_shader_subroutine, 'arb_shader_subroutine-minmax')
+
arb_gpu_shader_fp64 = {}
spec['ARB_gpu_shader_fp64'] = arb_gpu_shader_fp64
add_shader_test_dir(arb_gpu_shader_fp64,
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index c7001f1..5148412 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -34,6 +34,7 @@ add_subdirectory (amd_seamless_cubemap_per_texture)
add_subdirectory (amd_vertex_shader_layer)
add_subdirectory (amd_vertex_shader_viewport_index)
add_subdirectory (arb_separate_shader_objects)
+add_subdirectory (arb_shader_subroutine)
add_subdirectory (arb_shader_texture_lod/execution)
add_subdirectory (arb_shader_atomic_counters)
add_subdirectory (arb_shader_objects)
diff --git a/tests/spec/arb_shader_subroutine/CMakeLists.gl.txt b/tests/spec/arb_shader_subroutine/CMakeLists.gl.txt
new file mode 100644
index 0000000..8e6bd58
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/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_shader_subroutine-minmax minmax.c)
diff --git a/tests/spec/arb_shader_subroutine/CMakeLists.txt b/tests/spec/arb_shader_subroutine/CMakeLists.txt
new file mode 100644
index 0000000..144a306
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/arb_shader_subroutine/minmax.c b/tests/spec/arb_shader_subroutine/minmax.c
new file mode 100644
index 0000000..bd665a2
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/minmax.c
@@ -0,0 +1,61 @@
+/* Copyright (c) 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
+ *
+ * Test for the minimum maximum values in GL_ARB_shader_subroutine.
+ */
+
+#include "piglit-util-gl.h"
+#include "minmax-test.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_core_version = 32;
+ config.supports_gl_compat_version = 32;
+
+ config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+ /* UNREACHED */
+ return PIGLIT_FAIL;
+}
+
+void
+piglit_init(int argc, char **argv)
+{
+ piglit_print_minmax_header();
+
+ piglit_require_extension("GL_ARB_shader_subroutine");
+
+ piglit_test_min_int(GL_MAX_SUBROUTINES, 256);
+ piglit_test_min_int(GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS, 4096);
+
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
+}
--
2.0.4
More information about the Piglit
mailing list