diff options
author | Jason Ekstrand <[email protected]> | 2015-11-06 16:49:24 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-11-06 16:49:24 -0800 |
commit | 046563167ca9a608474a1c582087fdaf54bd9083 (patch) | |
tree | b2f1dc391612af4ce76b513c358efb54a7f69848 /src/vulkan | |
parent | 104525c33b154ed31cfedea2100b275abbc7a739 (diff) |
anv/apply_dynamic_offsets: Use the right sized immediate zero
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/anv_nir_apply_dynamic_offsets.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |