util/disk_cache: hash pointer size and gpu name into cache keys
This allows to get rid of the arch and gpu name directories.
v2: (Timothy Arceri) don't use an opaque data type to store
pointer size and gpu name.
v3: (Timothy Arceri) use blob to store driver keys just make sure
to store null terminator for strings, and make sure blob is
defined by disk_cache and not it's users.
v4: (Timothy Arceri) fix typo, and make ptr_size a uint8_t.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
committed by
Timothy Arceri
parent
feb716239e
commit
5136c09e70
@@ -43,23 +43,6 @@ typedef uint8_t cache_key[CACHE_KEY_SIZE];
|
||||
|
||||
struct disk_cache;
|
||||
|
||||
static inline const char *
|
||||
get_arch_bitness_str(void)
|
||||
{
|
||||
if (sizeof(void *) == 4)
|
||||
#ifdef __ILP32__
|
||||
return "ilp-32";
|
||||
#else
|
||||
return "32";
|
||||
#endif
|
||||
if (sizeof(void *) == 8)
|
||||
return "64";
|
||||
|
||||
/* paranoia check which will be dropped by the optimiser */
|
||||
assert(!"unknown_arch");
|
||||
return "unknown_arch";
|
||||
}
|
||||
|
||||
static inline bool
|
||||
disk_cache_get_function_timestamp(void *ptr, uint32_t* timestamp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user