broadcom/vc4: Fix aliasing issue

This was causing Android clang version 3.8.256229 to miscompile,
presumably due to strict aliasing.

Fixes: 14dc281c13 ("vc4: Enforce one-uniform-per-instruction after optimization.")
This commit is contained in:
Stefan Schake
2017-10-20 16:16:44 +02:00
committed by Eric Anholt
parent 035ec7a2bb
commit e5fea0d621

View File

@@ -66,7 +66,7 @@ remove_uniform(struct hash_table *ht, struct qreg reg)
entry = _mesa_hash_table_search(ht, key);
assert(entry);
entry->data--;
entry->data = (void *)(((uintptr_t) entry->data) - 1);
if (entry->data == NULL)
_mesa_hash_table_remove(ht, entry);
}