static uint32_t
hash_deref(const void *void_deref)
{
- uint32_t hash = _mesa_fnv32_1a_offset_bias;
+ uint32_t hash = 0;
for (const nir_deref_instr *deref = void_deref; deref;
deref = nir_deref_instr_parent(deref)) {
switch (deref->deref_type) {
case nir_deref_type_var:
- return _mesa_fnv32_1a_accumulate(hash, deref->var);
+ return XXH32(&deref->var, sizeof(deref->var), hash);
case nir_deref_type_array:
continue; /* Do nothing */
case nir_deref_type_struct:
- hash = _mesa_fnv32_1a_accumulate(hash, deref->strct.index);
+ hash = XXH32(&deref->strct.index, sizeof(deref->strct.index), hash);
continue;
default: