mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 16:30:29 +01:00
gallivm: Fix a few uninitialized variable warnings.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10806>
This commit is contained in:
parent
5f1aa5ac38
commit
b778564c76
2 changed files with 5 additions and 0 deletions
|
|
@ -2365,6 +2365,9 @@ lp_build_gather_rgtc(struct gallivm_state *gallivm,
|
|||
lp_build_const_int32(gallivm, 2), "");
|
||||
*green_hi = LLVMBuildExtractElement(builder, elem,
|
||||
lp_build_const_int32(gallivm, 3), "");
|
||||
} else {
|
||||
*green_lo = NULL;
|
||||
*green_hi = NULL;
|
||||
}
|
||||
} else {
|
||||
LLVMValueRef tmp[4];
|
||||
|
|
|
|||
|
|
@ -1053,6 +1053,7 @@ static void visit_load_const(struct lp_build_nir_context *bld_base,
|
|||
struct lp_build_context *int_bld = get_int_bld(bld_base, true, instr->def.bit_size);
|
||||
for (unsigned i = 0; i < instr->def.num_components; i++)
|
||||
result[i] = lp_build_const_int_vec(bld_base->base.gallivm, int_bld->type, instr->def.bit_size == 32 ? instr->value[i].u32 : instr->value[i].u64);
|
||||
memset(&result[instr->def.num_components], 0, NIR_MAX_VEC_COMPONENTS - instr->def.num_components);
|
||||
assign_ssa_dest(bld_base, &instr->def, result);
|
||||
}
|
||||
|
||||
|
|
@ -2120,6 +2121,7 @@ static void visit_ssa_undef(struct lp_build_nir_context *bld_base,
|
|||
struct lp_build_context *undef_bld = get_int_bld(bld_base, true, instr->def.bit_size);
|
||||
for (unsigned i = 0; i < num_components; i++)
|
||||
undef[i] = LLVMGetUndef(undef_bld->vec_type);
|
||||
memset(&undef[num_components], 0, NIR_MAX_VEC_COMPONENTS - num_components);
|
||||
assign_ssa_dest(bld_base, &instr->def, undef);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue