From: Jason Ekstrand Date: Wed, 20 Jan 2016 19:36:26 +0000 (-0800) Subject: spirv/nir/glsl450: Use vtn_create_ssa_value to create SSA values X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7896d1868a938e00c776e029a42cc4088eab0bb;p=mesa.git spirv/nir/glsl450: Use vtn_create_ssa_value to create SSA values --- diff --git a/src/glsl/nir/spirv/vtn_glsl450.c b/src/glsl/nir/spirv/vtn_glsl450.c index b59411e1f8d..d38e1c73d9d 100644 --- a/src/glsl/nir/spirv/vtn_glsl450.c +++ b/src/glsl/nir/spirv/vtn_glsl450.c @@ -375,9 +375,11 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint, const uint32_t *w, unsigned count) { struct nir_builder *nb = &b->nb; + const struct glsl_type *dest_type = + vtn_value(b, w[1], vtn_value_type_type)->type->type; + struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_ssa); - val->ssa = rzalloc(b, struct vtn_ssa_value); - val->ssa->type = vtn_value(b, w[1], vtn_value_type_type)->type->type; + val->ssa = vtn_create_ssa_value(b, dest_type); /* Collect the various SSA sources */ unsigned num_inputs = count - 5;