From 06f466a770fcb84a5a3671d27bffb456ded90739 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 9 Nov 2015 16:29:05 -0800 Subject: [PATCH] anv/nir: Fix codegen in lower_push_constants --- src/vulkan/anv_nir_lower_push_constants.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vulkan/anv_nir_lower_push_constants.c b/src/vulkan/anv_nir_lower_push_constants.c index af48470522a..4917bdc5954 100644 --- a/src/vulkan/anv_nir_lower_push_constants.c +++ b/src/vulkan/anv_nir_lower_push_constants.c @@ -70,7 +70,7 @@ lower_push_constants_block(nir_block *block, void *void_state) for (unsigned i = 0; i < intrin->num_components; i++) mov->src[0].swizzle[i] = i + shift; mov->dest.write_mask = (1 << intrin->num_components) - 1; - nir_ssa_dest_init(&intrin->instr, &intrin->dest, + nir_ssa_dest_init(&mov->instr, &mov->dest.dest, intrin->num_components, NULL); nir_ssa_def_rewrite_uses(&intrin->dest.ssa, @@ -79,6 +79,7 @@ lower_push_constants_block(nir_block *block, void *void_state) /* Stomp the number of components to 4 */ intrin->num_components = 4; + intrin->dest.ssa.num_components = 4; } } } -- 2.30.2