Skip to content
  • John Bates's avatar
    disk_cache: build option for disabled-by-default · 5de56937
    John Bates authored
    
    
    On some systems it is problematic to have the shader cache enabled
    by default. This adds a build option to support the disk cache but
    keep it disabled unless the environment variable
    MESA_GLSL_CACHE_DISABLE=false.
    
    For example, on Chrome OS, Chrome already has it's own shader
    disk cache implementation so it disables the mesa feature. Tests
    do not want the shader disk cache enabled because it can cause
    inconsistent performance results and the default 1GB for the
    disk cache could lead to problems that require more effort to
    work around. The Mesa shader disk cache is useful for VMs though,
    where it is easy to configure the feature with environment
    variables. With the current version of Mesa, Chrome OS would need
    to have a system-wide environment variable to disable the disk
    cache everywhere except where needed. More elegant to just build
    Mesa with the cache feature disabled by default.
    
    Reviewed-by: default avatarRob Clark <robdclark@chromium.org>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    Part-of: <mesa!6967>
    5de56937