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>
(cherry picked from commit cc66651fc1)
This commit is contained in:
Erik Faye-Lund 2025-06-04 11:31:03 +02:00 committed by Eric Engestrom
parent 6d69a8eb9a
commit 48c977115c
2 changed files with 1 additions and 2 deletions

View file

@ -5894,7 +5894,7 @@
"description": "panfrost: do not double-insert shader into hash-table",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "ae3fb3089f50a5f7bc42f209656b783ac98ec509",
"notes": null

View file

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