Skip to content
  • Ian Romanick's avatar
    glsl: Add program to test all shader built-in constants · 95dbcc3c
    Ian Romanick authored
    
    
    Using a simple text file, all shader built-in constants can be tested.
    This has several advantages over the previous methodology.
    
    1. All of the built-in constants and their expected values are kept in
    one place per GLSL version.
    
    2. The tests use the array-size idiom of many piglit tests which
    guarantees that the values being tested are actually contants.
    
    3. Since the tests are not execution tests, they run much faster.  The
    single top-level test can also run concurrently with other tests.  The
    speed difference is trivial most of the time, but in simlation
    environments, each pixel drawn takes a very long time.  You're welcome,
    Chad.
    
    v2: Use required_gl_version_from_glsl_version, use string_match for
    "gl_Max" comparison, and fix some whitespace issues (all suggested by
    Eric).  Also use strcpy_to_space to simplify a bit of error handling
    code.
    
    Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    95dbcc3c