From: Jason Ekstrand Date: Sat, 7 Nov 2015 00:49:24 +0000 (-0800) Subject: anv/apply_dynamic_offsets: Use the right sized immediate zero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=046563167ca9a608474a1c582087fdaf54bd9083;p=mesa.git anv/apply_dynamic_offsets: Use the right sized immediate zero --- diff --git a/src/vulkan/anv_nir_apply_dynamic_offsets.c b/src/vulkan/anv_nir_apply_dynamic_offsets.c index d6c09474da7..dd4f5dfe545 100644 --- a/src/vulkan/anv_nir_apply_dynamic_offsets.c +++ b/src/vulkan/anv_nir_apply_dynamic_offsets.c @@ -187,10 +187,13 @@ apply_dynamic_offsets_block(nir_block *block, void *void_state) exec_list_push_tail(&phi->srcs, &src1->node); b->cursor = nir_after_cf_list(&if_stmt->else_list); + nir_ssa_def *zero = nir_build_imm(b, intrin->num_components, + (nir_const_value) { .u = { 0, 0, 0, 0 } }); + nir_phi_src *src2 = ralloc(phi, nir_phi_src); struct exec_node *enode = exec_list_get_tail(&if_stmt->else_list); src2->pred = exec_node_data(nir_block, enode, cf_node.node); - src2->src = nir_src_for_ssa(nir_imm_int(b, 0)); + src2->src = nir_src_for_ssa(zero); exec_list_push_tail(&phi->srcs, &src2->node); nir_instr_insert_after_cf(&if_stmt->cf_node, &phi->instr);