[Mesa-dev] [RFC]Varyings Packing

Vincent Lejeune vljn at ovi.com
Sun Feb 5 10:02:40 PST 2012


I implemented the GLES 2.0 packing algorithm with the following patches.
It work, no regression (on top of 5be55ed426a5f20723a9fd6ca083235363dd6bd5)
and it passes the glsl-max-varying-2 tests (I'm resending this piglit test
with some fixes : I inverted some size there...).

I'd like to customise the packing function with respect to drivers. Currently
it packs none/smooth/flat/noperspective interpoled value in separate ranges of
registers. This is the most conservative approach, because AFAIK r600g does not
support mixed interpolation in a same register. However i965 can mix smooth and
noperspective varying, yielding to more packing opportunity, and scalar hardware
(nouveau or swrast) have no such constraint, so having some kind of "flag" to provide
the linker with the register constraints would be better.

I can implement the horizontal field support for glsl_to_tgsi but it is more difficult
for me to do it for r200 and i915 (I don't own such hardware). I think that r200 does not
support shaders at all, but i915 does.


More information about the mesa-dev mailing list