From cc66651fc1ea4ca7dd4a67ee32f21190031f792a Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 4 Jun 2025 11:31:03 +0200 Subject: [PATCH] panfrost: do not double-insert shader into hash-table We were inserting twice here, once without holding the lock before compiling the shaders, and once after while holding it. Let's remove the insert without the lock. Fixes: ae3fb3089f5 ("panfrost: Add infrastructure for internal AFBC compute shaders") Reviewed-by: Boris Brezillon Reviewed-by: Mary Guillemard Part-of: --- src/gallium/drivers/panfrost/pan_mod_conv_cso.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_mod_conv_cso.c b/src/gallium/drivers/panfrost/pan_mod_conv_cso.c index 9f055cede3c..ddd62250fb3 100644 --- a/src/gallium/drivers/panfrost/pan_mod_conv_cso.c +++ b/src/gallium/drivers/panfrost/pan_mod_conv_cso.c @@ -467,7 +467,6 @@ panfrost_get_mod_convert_shaders(struct panfrost_context *ctx, shader = rzalloc(ctx->mod_convert_shaders.shaders, struct pan_mod_convert_shader_data); shader->key = key; - _mesa_hash_table_insert(ctx->mod_convert_shaders.shaders, &shader->key, shader); #define COMPILE_SHADER(name, ...) \ { \