Am 10.06.2016 um 03:07 schrieb Dave Airlie: > From: Dave Airlie <airl...@redhat.com> > > This just uses the same form across the fetches. > > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c > b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c > index 8759392..e3a2c4b 100644 > --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c > +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c > @@ -1403,12 +1403,9 @@ emit_fetch_immediate( > res = emit_fetch_64bit(bld_base, stype, res, > bld->immediates[reg->Register.Index][swizzle + 1]); > } > > - if (stype == TGSI_TYPE_UNSIGNED) { > - res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, ""); > - } else if (stype == TGSI_TYPE_SIGNED) { > - res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, ""); > - } else if (stype == TGSI_TYPE_DOUBLE) { > - res = LLVMBuildBitCast(builder, res, bld_base->dbl_bld.vec_type, ""); > + if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED || stype == > TGSI_TYPE_DOUBLE) { > + struct lp_build_context *bld_fetch = stype_to_fetch(bld_base, stype); > + res = LLVMBuildBitCast(builder, res, bld_fetch->vec_type, ""); > } > return res; > } > @@ -1483,12 +1480,9 @@ emit_fetch_input( > > assert(res); > > - if (stype == TGSI_TYPE_UNSIGNED) { > - res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, ""); > - } else if (stype == TGSI_TYPE_SIGNED) { > - res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, ""); > - } else if (stype == TGSI_TYPE_DOUBLE) { > - res = LLVMBuildBitCast(builder, res, bld_base->dbl_bld.vec_type, ""); > + if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED || stype == > TGSI_TYPE_DOUBLE) { > + struct lp_build_context *bld_fetch = stype_to_fetch(bld_base, stype); > + res = LLVMBuildBitCast(builder, res, bld_fetch->vec_type, ""); > } > > return res; >
For 1-3, Reviewed-by: Roland Scheidegger <srol...@vmware.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev