util/disk_cache: create timestamp and gpu_id dirs when MESA_GLSL_CACHE_DIR is used
The make check test is also updated to make sure these dirs are created. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -225,8 +225,14 @@ disk_cache_create(const char *gpu_name, const char *timestamp)
|
||||
* <pwd.pw_dir>/.cache/mesa
|
||||
*/
|
||||
path = getenv("MESA_GLSL_CACHE_DIR");
|
||||
if (path && mkdir_if_needed(path) == -1) {
|
||||
goto fail;
|
||||
if (path) {
|
||||
if (mkdir_if_needed(path) == -1)
|
||||
goto fail;
|
||||
|
||||
path = create_mesa_cache_dir(local, path, timestamp,
|
||||
gpu_name);
|
||||
if (path == NULL)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (path == NULL) {
|
||||
|
Reference in New Issue
Block a user