zink: copy shader name when copying shader info

this needs a separate allocation

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28723>
(cherry picked from commit 4b2fe347b1)
This commit is contained in:
Mike Blumenkrantz 2024-04-12 11:41:32 -04:00 committed by Eric Engestrom
parent e4cac5d357
commit 1b584ada4b
2 changed files with 2 additions and 1 deletions

View file

@ -374,7 +374,7 @@
"description": "zink: copy shader name when copying shader info",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -5659,6 +5659,7 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir)
}
zink_shader_serialize_blob(nir, &ret->blob);
memcpy(&ret->info, &nir->info, sizeof(nir->info));
ret->info.name = ralloc_strdup(ret, nir->info.name);
ret->can_inline = true;