glsl: Round struct size up to at least 16 bytes
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Sep 2014 17:54:55 +0000 (10:54 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 26 Sep 2014 14:59:50 +0000 (07:59 -0700)
commit2ab71e1486e76722154b48faef8216ff8173fd30
tree6de3eb2d64e37d7404f71cd3003e0ca531b05137
parent5c75270c344815b15ef73e83421192fd7de35972
glsl: Round struct size up to at least 16 bytes

Per rule #9, the size of the structure is vec4 aligned.  The MAX2 in the
loop ensures that sizes >= 16 bytes are vec4 aligned.  The new MAX2
after the loop ensures that sizes < 16 bytes are vec4 aligned.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82932
Cc: mesa-stable@lists.freedesktop.org
src/glsl/glsl_types.cpp