diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2014-10-24 13:08:06 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-11-10 04:25:40 -0800 |
commit | 9cdf66657a152ad7455db7018f39b7cb5445464d (patch) | |
tree | 311aa5e275fc320160108f03e85441d9c57ff410 /src/glsl/glsl_types.h | |
parent | 3711abd780141b84a33f393446b05a6a385200d4 (diff) | |
download | external_mesa3d-9cdf66657a152ad7455db7018f39b7cb5445464d.zip external_mesa3d-9cdf66657a152ad7455db7018f39b7cb5445464d.tar.gz external_mesa3d-9cdf66657a152ad7455db7018f39b7cb5445464d.tar.bz2 |
glsl: Swap the order of glsl_type::name and ::length
On x86-64 this saves 8 bytes of padding in the structure, and this
reduces the size of the structure to 32 bytes.
v2: Fix constructor so that GCC won't warn about the order of
initialization.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r-- | src/glsl/glsl_types.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 096f546..474b129 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -158,13 +158,6 @@ struct glsl_type { /*@}*/ /** - * Name of the data type - * - * Will never be \c NULL. - */ - const char *name; - - /** * For \c GLSL_TYPE_ARRAY, this is the length of the array. For * \c GLSL_TYPE_STRUCT or \c GLSL_TYPE_INTERFACE, it is the number of * elements in the structure and the number of values pointed to by @@ -173,6 +166,13 @@ struct glsl_type { unsigned length; /** + * Name of the data type + * + * Will never be \c NULL. + */ + const char *name; + + /** * Subtype of composite data types. */ union { |