spirv: avoid shadowing local variable

v2: rename s/eval/elem_val/ (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13030>
This commit is contained in:
Lionel Landwerlin 2021-09-24 15:16:44 +03:00 committed by Marge Bot
parent 1f880a2ea8
commit a17928639d
1 changed files with 5 additions and 5 deletions

View File

@ -1965,16 +1965,16 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
nir_constant **elems = ralloc_array(b, nir_constant *, elem_count);
for (unsigned i = 0; i < elem_count; i++) {
struct vtn_value *val = vtn_untyped_value(b, w[i + 3]);
struct vtn_value *elem_val = vtn_untyped_value(b, w[i + 3]);
if (val->value_type == vtn_value_type_constant) {
elems[i] = val->constant;
if (elem_val->value_type == vtn_value_type_constant) {
elems[i] = elem_val->constant;
} else {
vtn_fail_if(val->value_type != vtn_value_type_undef,
vtn_fail_if(elem_val->value_type != vtn_value_type_undef,
"only constants or undefs allowed for "
"SpvOpConstantComposite");
/* to make it easier, just insert a NULL constant for now */
elems[i] = vtn_null_constant(b, val->type);
elems[i] = vtn_null_constant(b, elem_val->type);
}
}