[Mesa-dev] [PATCH] llvmpipe: Implement TXQ.

Olivier Galibert galibert at pobox.com
Thu May 17 07:41:53 PDT 2012


On Thu, May 17, 2012 at 04:34:31PM +0200, Roland Scheidegger wrote:
> > +   bld_int_vec.zero = lp_build_zero(gallivm, bld_int_vec.type);
> > +   bld_int_vec.one  = lp_build_one (gallivm, bld_int_vec.type);
> This is unnecessary. build_context_init() will take care of initializing
> the zero/one values.

Missed that, cool.

> Though this always will use a vector, even for 1d case. I guess though
> this is ok, if llvm is smart enough it could make it scalar itself.

The shl in minify blows up in your face if you don't have a
full-length vector anyway.

> > +      sizes_out[i] = lp_build_broadcast_scalar(&bld_int_vec,
> > +                                               LLVMBuildExtractElement(gallivm->builder, slot,
> > +                                                                       lp_build_const_int32(gallivm, i), ""));
> I think you could use the lp_build_extract_broadcast() helper instead
> for even better readability.

Nice helper, lemme try it.

Best,

  OG.


More information about the mesa-dev mailing list