The formatting is nothing specific about the disk cache.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22527>
#endif
#include "util/disk_cache.h"
+#include "util/hex.h"
#include "util/u_debug.h"
#include "radv_debug.h"
#include "radv_private.h"
* when creating the cache.
*/
char buf[VK_UUID_SIZE * 2 + 1];
- disk_cache_format_hex_id(buf, device->cache_uuid, VK_UUID_SIZE * 2);
+ mesa_bytes_to_hex(buf, device->cache_uuid, VK_UUID_SIZE);
device->vk.disk_cache = disk_cache_create(device->name, buf, 0);
#endif
#include "git_sha1.h"
#include "util/u_debug.h"
#include "util/disk_cache.h"
+#include "util/hex.h"
#include "util/driconf.h"
#include "util/os_misc.h"
#include "vk_shader_module.h"
* when creating the cache.
*/
char buf[VK_UUID_SIZE * 2 + 1];
- disk_cache_format_hex_id(buf, device->cache_uuid, VK_UUID_SIZE * 2);
+ mesa_bytes_to_hex(buf, device->cache_uuid, VK_UUID_SIZE);
device->vk.disk_cache = disk_cache_create(device->name, buf, 0);
device->vk.pipeline_cache_import_ops = cache_import_ops;
#include "gallivm/lp_bld_type.h"
#include "gallivm/lp_bld_nir.h"
#include "util/disk_cache.h"
+#include "util/hex.h"
#include "util/os_misc.h"
#include "util/os_time.h"
#include "util/u_helpers.h"
_mesa_sha1_update(&ctx, &gallivm_perf, sizeof(gallivm_perf));
update_cache_sha1_cpu(&ctx);
_mesa_sha1_final(&ctx, sha1);
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
screen->disk_shader_cache = disk_cache_create("llvmpipe", cache_id, 0);
}
#include "util/format/u_format.h"
#include "util/format/u_format_s3tc.h"
#include "util/u_string.h"
+#include "util/hex.h"
#include "util/os_mman.h"
#include "util/os_time.h"
return;
_mesa_sha1_final(&ctx, sha1);
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
if (screen->prefer_nir)
driver_flags |= NOUVEAU_SHADER_CACHE_FLAGS_IR_NIR;
#include "util/format/u_format_s3tc.h"
#include "util/u_screen.h"
#include "util/u_memory.h"
+#include "util/hex.h"
#include "util/os_time.h"
#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
return;
_mesa_sha1_final(&ctx, sha1);
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
r300screen->disk_shader_cache =
disk_cache_create(r300_get_family_name(r300screen),
#include "util/format/u_format_s3tc.h"
#include "util/u_upload_mgr.h"
#include "util/os_time.h"
+#include "util/hex.h"
#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include "radeon_video.h"
return;
_mesa_sha1_final(&ctx, sha1);
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
/* These flags affect shader compilation. */
uint64_t shader_debug_flags =
#include "ac_shadowed_regs.h"
#include "compiler/nir/nir.h"
#include "util/disk_cache.h"
+#include "util/hex.h"
#include "util/u_cpu_detect.h"
#include "util/u_log.h"
#include "util/u_memory.h"
return;
_mesa_sha1_final(&ctx, sha1);
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
sscreen->disk_shader_cache = disk_cache_create(sscreen->info.name, cache_id,
sscreen->info.address32_hi);
#include "util/u_string.h"
#include "util/perf/u_trace.h"
#include "util/u_transfer_helper.h"
+#include "util/hex.h"
#include "util/xmlconfig.h"
#include "util/u_cpu_detect.h"
_mesa_sha1_final(&ctx, sha1);
char cache_id[20 * 2 + 1];
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
screen->disk_cache = disk_cache_create("zink", cache_id, 0);
#include <compiler/nir/nir_serialize.h>
#include <compiler/spirv/nir_spirv.h>
#include <util/u_math.h>
+#include <util/hex.h>
using namespace clover;
_mesa_sha1_final(&ctx, sha1);
- disk_cache_format_hex_id(cache_id, sha1, 20 * 2);
+ mesa_bytes_to_hex(cache_id, sha1, 20);
return disk_cache_create("clover-clc", cache_id, 0);
}
#include <stdint.h>
#include <stdbool.h>
#include <sys/stat.h>
-#include "util/hex.h"
#include "util/mesa-sha1.h"
#include "util/detect_os.h"
struct disk_cache;
-static inline char *
-disk_cache_format_hex_id(char *buf, const uint8_t *hex_id, unsigned size)
-{
- return mesa_bytes_to_hex(buf, hex_id, size / 2);
-}
-
#ifdef HAVE_DLADDR
static inline bool
disk_cache_get_function_timestamp(void *ptr, uint32_t* timestamp)