Mesa (master): gallivm: handle non-32 bit undefined

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 27 03:43:16 UTC 2019


Module: Mesa
Branch: master
Commit: 0a73eafdbeb68bafa8f0d26da4490358420fe40c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a73eafdbeb68bafa8f0d26da4490358420fe40c

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Dec 12 12:42:25 2019 +1000

gallivm: handle non-32 bit undefined

other sized undefs caused llvm asserts

Acked-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_nir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
index a150473b2a6..f2fb76aeba2 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
@@ -1615,8 +1615,9 @@ static void visit_ssa_undef(struct lp_build_nir_context *bld_base,
 {
    unsigned num_components = instr->def.num_components;
    LLVMValueRef undef[NIR_MAX_VEC_COMPONENTS];
+   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(bld_base->base.vec_type);
+      undef[i] = LLVMGetUndef(undef_bld->vec_type);
    assign_ssa_dest(bld_base, &instr->def, undef);
 }
 




More information about the mesa-commit mailing list