[Mesa-dev] [PATCH 00/10] i965: Silly vec4 un/packing optimizations
currojerez at riseup.net
Fri Oct 24 01:45:42 PDT 2014
Matt Turner <mattst88 at gmail.com> writes:
> When I implemented these built-ins couple of years ago, I thought there
> must be a neat way to optimize them. I tried a couple of things with the
> different vector immediates i965 provides, but the V/UV types are too
> small to represent the appropriate shift values, and shift instructions
> can't shift by a floating-point source (if using the vector float imm).
> Curro pointed out that I could actually load the integer shift values
> with VF immediate just by doing a type converting move. How simple.
> So anyway, these optimizations are of pretty negligible value, except
> for maybe demonstrating that VF works. I've had them sitting on a branch
> for months, so time for them to live somewhere else. At least we can
> disassemble VF immediates now.
> I hope to have some more uses of VF immediates soon too.
a different approach I had in mind was to write an optimization pass
that would vectorize immediate moves by using VF where the original
arguments can be represented exactly as an 8-bit float. That would
probably help in many more cases than hand-optimizing a couple of
built-in operations -- That said, I guess it doesn't hurt to do this for
the time being until we have such an optimization pass.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 212 bytes
Desc: not available
More information about the mesa-dev