From 5d7a2303243a32f47d402e3335b16967b49a1362 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 17 Nov 2024 14:17:36 -0400 Subject: [PATCH] vtn: gather function parameter names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unstripped SPIR-V libraries generated from OpenCL have lots of function parameter names. Gather them. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Marek Olšák Part-of: --- src/compiler/spirv/vtn_cfg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index 3b7712ee9e7..006d7453a25 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -342,6 +342,8 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode, struct vtn_ssa_value *ssa = vtn_create_ssa_value(b, type->type); struct vtn_value *val = vtn_untyped_value(b, w[2]); + b->func->nir_func->params[b->func_param_idx].name = val->name; + vtn_foreach_decoration(b, val, function_parameter_decoration_cb, &arg_info); vtn_ssa_value_load_function_param(b, ssa, type, &arg_info, &b->func_param_idx); vtn_push_ssa_value(b, w[2], ssa);