Skip to content
  • Luca Barbieri's avatar
    gallium/util: load s3tc on demand · 52e9b990
    Luca Barbieri authored
    This changes the S3TC function pointers to be initialized to stubs
    that load the S3TC library and then delegate to the real functions.
    
    If the S3TC library fails to load, the function pointers are replaced
    with a "nop" function.
    
    The code is also changed to attempt to load the library only one time.c
    
    Note that unlike checking for a flag, this method has no performance
    cost at all.
    
    The use of the "nop" functions also allows to avoid most checks, that
    are only preserved when the function does non-trivial work.
    52e9b990