Types are fly-weights, so there aren't that many of them allocated... maybe a couple hundred, tops. Have you measured the memory savings?
On 05/27/2014 10:09 PM, Tapani Pälli wrote: > Signed-off-by: Tapani Pälli <[email protected]> > --- > src/glsl/glsl_types.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h > index dca5492..e6aae26a 100644 > --- a/src/glsl/glsl_types.h > +++ b/src/glsl/glsl_types.h > @@ -29,6 +29,7 @@ > #include <string.h> > #include <assert.h> > #include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are > broken */ > +#include "main/compiler.h" > > #ifdef __cplusplus > extern "C" { > @@ -47,7 +48,7 @@ _mesa_glsl_release_types(void); > } > #endif > > -enum glsl_base_type { > +enum PACKED glsl_base_type { > GLSL_TYPE_UINT = 0, > GLSL_TYPE_INT, > GLSL_TYPE_FLOAT, > _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
