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. 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@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev