radv: Fix driver UUID SHA1 init.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 20 Sep 2018 17:15:58 +0000 (19:15 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 20 Sep 2018 21:38:38 +0000 (23:38 +0200)
Was missing the init, found by Emil.

Fixes: d17443a4593 "radv: Use build ID if available for cache UUID."
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_device.c

index 7e46a57fb57d7024f512718adc725e7123896b93..31d9bb59637bfe9410dd5edac1223d4f0e0a9a17 100644 (file)
@@ -77,7 +77,9 @@ radv_device_get_cache_uuid(enum radeon_family family, void *uuid)
        struct mesa_sha1 ctx;
        unsigned char sha1[20];
        unsigned ptr_size = sizeof(void*);
+
        memset(uuid, 0, VK_UUID_SIZE);
+       _mesa_sha1_init(&ctx);
 
        if (!radv_get_build_id(radv_device_get_cache_uuid, &ctx) ||
            !radv_get_build_id(LLVMInitializeAMDGPUTargetInfo, &ctx))