vc4: Fix deletion from the program cache.
authorEric Anholt <eric@anholt.net>
Tue, 6 Jan 2015 00:34:58 +0000 (16:34 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 6 Jan 2015 23:41:36 +0000 (15:41 -0800)
They key is, oddly enough, in the key field, not in the data field (which
is the vc4_compiled_shader *).  Fixes regular failures in fp-long-alu.

src/gallium/drivers/vc4/vc4_program.c

index 0d6f0fa..5a5a5e3 100644 (file)
@@ -2490,7 +2490,7 @@ delete_from_cache_if_matches(struct hash_table *ht,
                              struct hash_entry *entry,
                              struct vc4_uncompiled_shader *so)
 {
-        struct vc4_key *key = entry->data;
+        const struct vc4_key *key = entry->key;
 
         if (key->shader_state == so) {
                 struct vc4_compiled_shader *shader = entry->data;