Skip to content
  • Lina Versace's avatar
    util: Convert GL tests to use PIGLIT_GL_CONFIG_BEGIN/END · 973db3e1
    Lina Versace authored
    
    
    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: default avatarJordan Justen <jordan.l.justen@intel.com>
    Tested-by: default avatarPaul Berry <stereotype441@gmail.com>
    Acked-by: default avatarEric Anholt <eric@anholt.net>
    Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
    973db3e1