summaryrefslogtreecommitdiff
path: root/tests/shaders/vp-clipdistance-04.c
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-09-28 06:13:10 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-10-09 19:08:31 -0700
commit973db3e1743682c6ac8f58301c5e8f97588f6520 (patch)
tree1cda2236128063df45f52809b4219e41a1e2d7ae /tests/shaders/vp-clipdistance-04.c
parent8ed4af46b76cb7fe74ed6d228302141f66d49dc4 (diff)
util: Convert GL tests to use PIGLIT_GL_CONFIG_BEGIN/END
This patch has two components. 1. In tests/util/piglit-framework-gl.h, replace the definition of PIGLIT_GL_TEST_MAIN with the macro block PIGLIT_GL_CONFIG_BEGIN/END. The macro PIGLIT_GL_TEST_MAIN was very restrictive. It was a fixed-arity macro function that allowed a test to set only set 3 values: window width, height, and visual. It would have been difficult to shoehorn optional test attributes into such a fixed-arity macro function. Allowing optional attributes is an essential feature because a following commit adds optional fields to struct piglit_gl_test_config. The macro block PIGLIT_GL_TEST_CONFIG_BEGIN/END is more flexible. Within it the test is allowed to arbitrarilty modify the piglit_gl_test_config structure. 2. In each GL test source, replace PIGLIT_GL_TEST_MAIN with a PIGLIT_GL_TEST_CONFIG_BEGIN/END block. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'tests/shaders/vp-clipdistance-04.c')
-rw-r--r--tests/shaders/vp-clipdistance-04.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/shaders/vp-clipdistance-04.c b/tests/shaders/vp-clipdistance-04.c
index 04409cf8f..f5c45c50e 100644
--- a/tests/shaders/vp-clipdistance-04.c
+++ b/tests/shaders/vp-clipdistance-04.c
@@ -38,10 +38,13 @@
#define TEST_COLS 6
#define BOX_SIZE 32
-PIGLIT_GL_TEST_MAIN(
- (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/,
- (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/,
- PIGLIT_GL_VISUAL_DOUBLE)
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.window_width = (((BOX_SIZE+1)*TEST_COLS)+1);
+ config.window_height = (((BOX_SIZE+1)*TEST_ROWS)+1);
+ config.window_visual = PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
static const char vertex_source_template[] =
"!!ARBvp1.0\n"