From 973db3e1743682c6ac8f58301c5e8f97588f6520 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Fri, 28 Sep 2012 06:13:10 -0700 Subject: 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 Tested-by: Paul Berry Acked-by: Eric Anholt Signed-off-by: Chad Versace --- tests/bugs/crash-cubemap-order.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/bugs/crash-cubemap-order.c') diff --git a/tests/bugs/crash-cubemap-order.c b/tests/bugs/crash-cubemap-order.c index f5c57056..fa72ba43 100644 --- a/tests/bugs/crash-cubemap-order.c +++ b/tests/bugs/crash-cubemap-order.c @@ -8,10 +8,13 @@ #include "piglit-util-gl-common.h" -PIGLIT_GL_TEST_MAIN( - 100 /*window_width*/, - 100 /*window_height*/, - PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA) +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.window_width = 100; + config.window_height = 100; + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; + +PIGLIT_GL_TEST_CONFIG_END enum piglit_result piglit_display(void) -- cgit v1.2.3