llvmpipe: Fix another uninitialized value warning, on init_val.

It's only used in the vote_ieq paths, but gcc doesn't see that.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>
This commit is contained in:
Eric Anholt 2020-01-28 13:04:10 -08:00
parent 81225e1f03
commit 427870abfd
1 changed files with 1 additions and 1 deletions

View File

@ -1413,7 +1413,7 @@ static void emit_vote(struct lp_build_nir_context *bld_base, LLVMValueRef src, n
LLVMValueRef outer_cond = LLVMBuildICmp(builder, LLVMIntNE, exec_mask, bld_base->uint_bld.zero, "");
LLVMValueRef res_store = lp_build_alloca(gallivm, bld_base->int_bld.elem_type, "");
LLVMValueRef init_val;
LLVMValueRef init_val = NULL;
if (instr->intrinsic == nir_intrinsic_vote_ieq) {
/* for equal we unfortunately have to loop and find the first valid one. */
lp_build_loop_begin(&loop_state, gallivm, lp_build_const_int32(gallivm, 0));