Skip to content
  • Sarah Sharp's avatar
    egl/utils: Prepare egl_util_run to be called from piglit subtests. · 850a069d
    Sarah Sharp authored
    
    
    For future EGL tests, I want to be able to use Chad's new piglit EGL
    subtest infrastructure, and use the EGL utilities convenience functions
    to set up a window, surface, and context.
    
    Currently, egl_util_run calls piglit_report_result() after calling
    test.draw.  This means no other subtests get run.  Add a new field in
    egl_test to specify whether piglit_report_result() should be called, and
    another field to store the result returned from test.draw.
    
    Make sure that egl_util_run() tears down the window, surface, and
    context.  Previously it was relying on cleanup being done when the
    process died, which won't work if we want to run a second subtest in the
    same thread.
    
    TODO:
    
    There's still some work that could be done here to ensure the
    initialization steps in egl_util_run aren't done twice (e.g. calling
    XOpenDisplay, eglInitialize, etc.)  However, the tests pass in their
    current state, so there's no reason they shouldn't be merged.
    
    Thanks a bunch to Chad Versace and Rob Bradford, who helped me debug
    this code!
    
    Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
    Reviewed-by: default avatarChad Versace <chad.versace@linux.intel.com>
    Cc: Rob Bradford <rob@linux.intel.com>
    850a069d