Skip to main content

spirv_cache_key

Function spirv_cache_key 

Source
pub fn spirv_cache_key(spirv: &[u32], build_flags: &str) -> u64
Expand description

64-bit FNV-1a hash over a SPIR-V word stream and its build flags.

FNV-1a is deterministic across runs and platforms (unlike DefaultHasher, whose seed varies), so the same SPIR-V + flags always produce the same key. That stability is what makes an on-disk native-binary cache valid across process invocations.