mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
asahi: Put meta shader keys into the meta shader itself
The hash table needs a key pointer with at least the lifetime of the hash entry, which the key pointer we get does not have (since it is stack-allocated by agx_build_meta). Copy it into the shader struct itself and use that for the hash table. Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20365>
This commit is contained in:
parent
c12153cd89
commit
9fc2c0f341
2 changed files with 3 additions and 1 deletions
|
|
@ -150,7 +150,8 @@ agx_get_meta_shader(struct agx_meta_cache *cache, struct agx_meta_key *key)
|
|||
if (!ret)
|
||||
ret = agx_build_background_shader(cache, key);
|
||||
|
||||
_mesa_hash_table_insert(cache->ht, key, ret);
|
||||
ret->key = *key;
|
||||
_mesa_hash_table_insert(cache->ht, &ret->key, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ struct agx_meta_key {
|
|||
};
|
||||
|
||||
struct agx_meta_shader {
|
||||
struct agx_meta_key key;
|
||||
struct agx_shader_info info;
|
||||
struct agx_bo *bo;
|
||||
uint32_t ptr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue