nir: add names to function parameters
SPIR-V has this information. We should try to preserve it. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
This commit is contained in:
committed by
Marge Bot
parent
61862b209e
commit
3da8444be5
@@ -708,6 +708,11 @@ nir_function_clone(nir_shader *ns, const nir_function *fxn)
|
||||
if (fxn->num_params) {
|
||||
nfxn->params = ralloc_array(ns, nir_parameter, fxn->num_params);
|
||||
memcpy(nfxn->params, fxn->params, sizeof(nir_parameter) * fxn->num_params);
|
||||
|
||||
for (unsigned i = 0; i < fxn->num_params; ++i) {
|
||||
if (fxn->params[i].name)
|
||||
nfxn->params[i].name = ralloc_strdup(ns, fxn->params[i].name);
|
||||
}
|
||||
}
|
||||
nfxn->is_entrypoint = fxn->is_entrypoint;
|
||||
nfxn->is_preamble = fxn->is_preamble;
|
||||
|
||||
Reference in New Issue
Block a user