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: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35336>
This commit is contained in:
Erik Faye-Lund 2025-06-04 11:31:03 +02:00 committed by Marge Bot
parent 69b458fdd7
commit cc66651fc1

View file

@ -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, ...) \
{ \