diff options
author | Timothy Arceri <[email protected]> | 2018-09-19 11:07:22 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-10-03 09:49:21 +1000 |
commit | 2169acbf34e99842b6234ee8181e1908aafcf120 (patch) | |
tree | 551a15a62bea66f3189d6c0aba1d34a2d336b748 /src | |
parent | 83ea8dd99bb16e5d9bb880e64cd2047abc536b70 (diff) |
radeonsi: use build-id when available for disk cache
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index aa5340668f9..69f649faed9 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -769,17 +769,14 @@ static void si_disk_cache_create(struct si_screen *sscreen) if (sscreen->debug_flags & DBG_ALL_SHADERS) return; - uint32_t mesa_timestamp; - if (disk_cache_get_function_timestamp(si_disk_cache_create, - &mesa_timestamp)) { - char *timestamp_str; + uint32_t mesa_id; + if (disk_cache_get_function_identifier(si_disk_cache_create, &mesa_id)) { + char *driver_id_str; int res = -1; - uint32_t llvm_timestamp; - - if (disk_cache_get_function_timestamp(LLVMInitializeAMDGPUTargetInfo, - &llvm_timestamp)) { - res = asprintf(×tamp_str, "%u_%u", - mesa_timestamp, llvm_timestamp); + uint32_t llvm_id; + if (disk_cache_get_function_identifier(LLVMInitializeAMDGPUTargetInfo, + &llvm_id)) { + res = asprintf(&driver_id_str, "%u_%u", mesa_id, llvm_id); } if (res != -1) { @@ -800,9 +797,9 @@ static void si_disk_cache_create(struct si_screen *sscreen) sscreen->disk_shader_cache = disk_cache_create(sscreen->info.name, - timestamp_str, + driver_id_str, shader_debug_flags); - free(timestamp_str); + free(driver_id_str); } } } |