From c7896d1868a938e00c776e029a42cc4088eab0bb Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 20 Jan 2016 11:36:26 -0800 Subject: [PATCH] spirv/nir/glsl450: Use vtn_create_ssa_value to create SSA values --- src/glsl/nir/spirv/vtn_glsl450.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.30.2