Mesa (master): vc4: Fix deletion from the program cache.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jan 7 01:25:18 UTC 2015


Module: Mesa
Branch: master
Commit: 49b5c901e88810946dcbf1a596fbe79c507c3214
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=49b5c901e88810946dcbf1a596fbe79c507c3214

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan  5 16:34:58 2015 -0800

vc4: Fix deletion from the program cache.

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 0d6f0fa..5a5a5e3 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -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;




More information about the mesa-commit mailing list