util: Decouple disk cache from EGL_ANDROID_blob_cache
Just because the user / system-integrater doesn't want shader disk cache, doesn't mean they don't want EGL_ANDROID_blob_cache to work. We've kind of already solved this for the android case, so just generalize that solution. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9520 Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24636>
This commit is contained in:
@@ -154,15 +154,6 @@ test_disk_cache_create(void *mem_ctx, const char *cache_dir_name,
|
||||
struct disk_cache *cache;
|
||||
int err;
|
||||
|
||||
/* Before doing anything else, ensure that with
|
||||
* MESA_SHADER_CACHE_DISABLE set to true, that disk_cache_create returns NULL.
|
||||
*/
|
||||
setenv("MESA_SHADER_CACHE_DISABLE", "true", 1);
|
||||
cache = disk_cache_create("test", driver_id, 0);
|
||||
EXPECT_EQ(cache, nullptr) << "disk_cache_create with MESA_SHADER_CACHE_DISABLE set";
|
||||
|
||||
unsetenv("MESA_SHADER_CACHE_DISABLE");
|
||||
|
||||
#ifdef SHADER_CACHE_DISABLE_BY_DEFAULT
|
||||
/* With SHADER_CACHE_DISABLE_BY_DEFAULT, ensure that with
|
||||
* MESA_SHADER_CACHE_DISABLE set to nothing, disk_cache_create returns NULL.
|
||||
|
||||
Reference in New Issue
Block a user