-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/16/2011 08:28 AM, Dan McCabe wrote: > On 08/16/2011 07:06 AM, vlj wrote: >> From: Vincent Lejeune<v...@ovi.com> >> >> This optimisation pass will look for and pack together float, >> vec2, vec3 varyings in fragment shaders and transform the vertex >> shader accordingly. It might improve performance depending on >> the hardware. > > Do you have any quatitative data on performance improvements you have > actually seen? What sort of perf improvements should we expect?
There are two cases where you could see benefit from this: 1. Shaders that are interpolation bound on architectures where interpolation is not free (e.g., i965). Imagine a vertex shader that passes through 16 float or vec2 values to the fragment shader, and the fragment shader just adds them all together. It's a contrived example, but that should be the best case scenario. It would be interesting to see this measured in some real applications, but, like I said, the benefits would be very hardware dependent. 2. Shaders that try to use more than 16 interpolated values. On i965 we'll reject a shader that uses 18 vec2 varyings, but that shader could run on that hardware by packing to 9 vec4 varyings. We can also encounter this in cases where the driver has to use one or more slots for values that developers won't expect to count against the limit. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk5K4DwACgkQX1gOwKyEAw9tsgCfeKTx1hHIT4xjEiSRRzlTezI+ ULIAoJPdzxv+FEvorDfrhMKajvIDzoL1 =ZLta -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev