panfrost: Don't leak the blend CSO hash table
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 15 Jul 2019 18:37:42 +0000 (11:37 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 15 Jul 2019 23:12:55 +0000 (16:12 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_blend_cso.c

index cf26d7366eeb9534e258645cd943adcc31e7cafa..f2dafe062cecd61740a9c7536339cb82be40d5df 100644 (file)
@@ -124,7 +124,7 @@ panfrost_create_blend_state(struct pipe_context *pipe,
                 /* Regardless if that works, we also need to initialize
                  * the blend shaders */
 
-                rt->shaders = _mesa_hash_table_u64_create(NULL);
+                rt->shaders = _mesa_hash_table_u64_create(so);
         }
 
         return so;
@@ -152,8 +152,7 @@ static void
 panfrost_delete_blend_state(struct pipe_context *pipe,
                             void *blend)
 {
-        /* TODO: leaks internally? */
-
+        /* TODO: Free shader binary? */
         ralloc_free(blend);
 }