[Mesa-dev] [PATCH 2/3] radv: Use library mtime for cache UUID.
Emil Velikov
emil.l.velikov at gmail.com
Tue Nov 22 13:31:48 UTC 2016
On 22 November 2016 at 01:19, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
> We want to also invalidate the cache when LLVM gets changed. As the
> specific LLVM revision is not fixed at build time, we will need to
> check at runtime. Computing a checksum for LLVM is going to be very
> expensive, so just use the mtime.
Good catch Bas ! Also - woohoo, no more RADV_TIMESTAMP.
> +static int
> radv_device_get_cache_uuid(void *uuid)
> {
> + uint32_t mesa_timestamp, llvm_timestamp;
> memset(uuid, 0, VK_UUID_SIZE);
> - snprintf(uuid, VK_UUID_SIZE, "radv-%s", RADV_TIMESTAMP);
> + if (radv_get_function_timestamp(radv_device_get_cache_uuid, &mesa_timestamp) ||
> + radv_get_function_timestamp(LLVMInitializeAMDGPUTargetInfo, &llvm_timestamp))
Can you please double-check that this works correctly with static LLVM ?
> + return -1;
> +
> + memcpy(uuid, &mesa_timestamp, 4);
> + memcpy((char*)uuid + 4, &llvm_timestamp, 4);
> + snprintf((char*)uuid + 8, VK_UUID_SIZE - 8, "radv");
Since radv_timestamp.h and RADV_TIMESTAMP are no longer used can I ask
you to remove the machinery which sets up ? And/Or update ANV?
With follow-up patch(es) of course.
Thanks
Emil
More information about the mesa-dev
mailing list