diff options
author | Emil Velikov <[email protected]> | 2016-06-21 17:43:35 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-07-05 12:15:23 +0100 |
commit | addb099ce83c9b9909966a5cd364b85cedef1ee1 (patch) | |
tree | 07e6d1cfca0b14da7bb0e90288f5cd2146c2cbb5 /src/intel/vulkan/anv_device.c | |
parent | f98530b73960af1cb17da80159350fbe51352fea (diff) |
anv: use cache uuid based on the build timestamp.
Do not rely on the git sha1:
- its current truncated form makes it less unique
- it does not attribute for local (Vulkand or otherwise) changes
Use a timestamp produced at the time of build. It's perfectly unique,
unless someone explicitly thinkers with their system clock. Even then
chances of producing the exact same one are very small, if not zero.
v2: Remove .tmp rule. Its not needed since we want for the header to be
regenerated on each time we call make (Eric).
v3:
- Honour SOURCE_DATE_EPOCH, to make the build reproducible (Michel)
- Replace the generated header with a define, to prevent needless
builds on consecutive `make' and/or `make install' calls. (Dave)
v4:
- Keep the timestamp generation at make time. (Jason)
v5:
- Ensure that file is regenerated on incremental builds.
Cc: Michel Dänzer <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: [email protected]
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index ea8e875ad1e..dd941b6afeb 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -28,7 +28,7 @@ #include <fcntl.h> #include "anv_private.h" -#include "git_sha1.h" +#include "anv_timestamp.h" #include "util/strtod.h" #include "util/debug.h" @@ -426,7 +426,7 @@ void anv_device_get_cache_uuid(void *uuid) { memset(uuid, 0, VK_UUID_SIZE); - snprintf(uuid, VK_UUID_SIZE, "anv-%s", MESA_GIT_SHA1 + 4); + snprintf(uuid, VK_UUID_SIZE, "anv-%s", ANV_TIMESTAMP); } void anv_GetPhysicalDeviceProperties( |