Mesa (staging/20.0): radv: fix regression with builtin cache

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 21:38:29 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: bd4c699f935924b0145ea74045c8d1dc9247e660
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd4c699f935924b0145ea74045c8d1dc9247e660

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Fri May 29 17:02:24 2020 +1000

radv: fix regression with builtin cache

If the ~/.cache dir already exists continue on without failing.

Fixes: cd61f5234d2c ("radv: Handle failing to create .cache dir.")

Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5249>
(cherry picked from commit e843303d6f18d56d7c412e6c879134f7b79372ac)

---

 .pick_status.json          | 2 +-
 src/amd/vulkan/radv_meta.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 3efd61b02d2..14bb6435620 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -355,7 +355,7 @@
         "description": "radv: fix regression with builtin cache",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "cd61f5234d2c275b21c249fc2effc058a74ecf0a"
     },
diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index de2f85148a6..cb39c92e903 100644
--- a/src/amd/vulkan/radv_meta.c
+++ b/src/amd/vulkan/radv_meta.c
@@ -262,7 +262,7 @@ radv_builtin_cache_path(char *path)
 
 	strcpy(path, pwd.pw_dir);
 	strcat(path, "/.cache");
-	if (mkdir(path, 0755))
+	if (mkdir(path, 0755) && errno != EEXIST)
 		return false;
 
 	ret = snprintf(path, PATH_MAX + 1, "%s%s%zd",



More information about the mesa-commit mailing list