[Mesa-dev] [PATCH] gallivm: Fix indirect immediate registers.
Zack Rusin
zackr at vmware.com
Mon Jul 1 14:16:42 PDT 2013
> Am 01.07.2013 21:54, schrieb jfonseca at vmware.com:
> > From: José Fonseca <jfonseca at vmware.com>
> >
> > If reg->Register.Indirect then the immediate is not truly a constant
> > expression.
> >
> > There is no performance regression -- LLVMBuildBitCast will fallback to
> > LLVMConstBitCast internally when the argument is a constant.
> > ---
> > src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
> > b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
> > index 0bbc408..f641859 100644
> > --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
> > +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
> > @@ -1026,9 +1026,9 @@ emit_fetch_immediate(
> > }
> >
> > if (stype == TGSI_TYPE_UNSIGNED) {
> > - res = LLVMConstBitCast(res, bld_base->uint_bld.vec_type);
> > + res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type,
> > "");
> > } else if (stype == TGSI_TYPE_SIGNED) {
> > - res = LLVMConstBitCast(res, bld_base->int_bld.vec_type);
> > + res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type,
> > "");
> > }
> > return res;
> > }
> >
>
> Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Reviewed-by: Zack Rusin <zackr at vmware.com>
More information about the mesa-dev
mailing list