[Mesa-dev] [PATCH 0/8] i965/vec4: Use Vector-float immediates.
Ian Romanick
idr at freedesktop.org
Mon Dec 22 18:30:32 PST 2014
On 12/21/2014 03:23 PM, Matt Turner wrote:
> This series adds support to i965's vec4 backend for using vector-float
> immediates. The shader-db results are pretty nice:
>
> total instructions in shared programs: 5889529 -> 5876617 (-0.22%)
> instructions in affected programs: 465347 -> 452435 (-2.77%)
>
> and there's still room for improvement. It helps 4914 shaders and hurts
> none. 50 Valley and Heaven shaders are cut by 30% and there are a few
> that do
>
> mov(8) g25<1>F [-1.5F, -1.5F, -0.5F, -1.5F]VF
> mov(8) g27<1>F [ 0.5F, -1.5F, 1.5F, -1.5F]VF
> mov(8) g29<1>F [-1.5F, -0.5F, -0.5F, -0.5F]VF
> mov(8) g31<1>F [ 0.5F, -0.5F, 1.5F, -0.5F]VF
> mov(8) g33<1>F [-1.5F, 0.5F, -0.5F, 0.5F]VF
> mov(8) g35<1>F [ 0.5F, 0.5F, 1.5F, 0.5F]VF
> mov(8) g37<1>F [-1.5F, 1.5F, -0.5F, 1.5F]VF
> mov(8) g39<1>F [ 0.5F, 1.5F, 1.5F, 1.5F]VF
>
> before using each register once in a MAD instruction. I'll have to think
> more about a general solution that would optimize that into a single
>
> mov(8) g25<1>F [-1.5F, 1.5F, -0.5F, 0.5F]VF
>
> and then sources it 8 times with different swizzles. Probably something
> like the constant-combining pass I've floated for the FS backend.
There is (was?) code to do a similar thing for program constants in the
assembly shader compiler. Maybe there's something there to borrow?
It's a bit of a long shot...
> On a side note, can someone tell me how to run Heaven or Valley in an
> automated benchmarking mode?
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list