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

Author: Grazvydas Ignotas <[email protected]>
Date:   Tue Aug 21 00:08:54 2018 +0300

radv: place pointer length into cache uuid

Thanks to reproducible builds, binary file timestamps may be identical
for both 32bit and 64bit packages when built from the same source.
This means radv will use the same cache for both 32 and 64 bit
processes, which leads to crashes.

Conveniently there is a spare byte in cache_uuid, let's place the
pointer size there.

Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
CC: 18.1 18.2 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107601
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105904
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
(cherry picked from commit 356f6673d695eb98c42d80f3c2b30fad746cdbba)

---

 src/amd/vulkan/radv_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 2f6746d6bf..aced3eee39 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -60,7 +60,7 @@ radv_device_get_cache_uuid(enum radeon_family family, void 
*uuid)
        memcpy(uuid, &mesa_timestamp, 4);
        memcpy((char*)uuid + 4, &llvm_timestamp, 4);
        memcpy((char*)uuid + 8, &f, 2);
-       snprintf((char*)uuid + 10, VK_UUID_SIZE - 10, "radv");
+       snprintf((char*)uuid + 10, VK_UUID_SIZE - 10, "radv%zd", sizeof(void 
*));
        return 0;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to