Ilia Mirkin <imir...@alum.mit.edu> writes: > On Fri, May 8, 2015 at 6:36 AM, Kenneth Graunke <kenn...@whitecape.org> wrote: >> + # Multiplication by 4 comes up fairly often in indirect offset >> calculations. >> + # Some GPUs have weird integer multiplication limitations, but shifts >> should work >> + # equally well everywhere. >> + (('imul', 4, a), ('ishl', a, 2)), > > Not sure what the cost of doing it this way, but really you want all > powers of 2... and also udiv -> shr. Since this is python, should be > easy enough to append onto that list. AFAIK all GPU's prefer a shift > over a mul. Adreno doen't have 32-bit imul in the first place (and no > idiv either).
I can confirm that I'd love shifts instead of imul/udiv on vc4.
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev