<p dir="ltr">Can we tweak the commit message a bit:</p>
<p dir="ltr">glsl: move builtin vector types to glsl_types.cpp</p>
<p dir="ltr">builtin_types.CPP contains a lot more than just vec4_type and friends and you're not moving all of them.</p>
<p dir="ltr">On Oct 10, 2015 11:48 AM, "Rob Clark" <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
><br>
> From: Rob Clark <<a href="mailto:robclark@freedesktop.org">robclark@freedesktop.org</a>><br>
><br>
> First step at untangling NIR's dependency on glsl_types without bringing<br>
> in the dependency on glsl_symbol_table. The builtin types are now in<br>
> glsl_types (which will end up in NIR), but adding them to the symbol-<br>
> table stays in builtin_types.cpp (which will not be part of NIR).<br>
><br>
> Signed-off-by: Rob Clark <<a href="mailto:robclark@freedesktop.org">robclark@freedesktop.org</a>><br>
> ---<br>
> src/glsl/builtin_types.cpp | 4 +---<br>
> src/glsl/glsl_types.cpp | 14 ++++++++++++++<br>
> 2 files changed, 15 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/src/glsl/builtin_types.cpp b/src/glsl/builtin_types.cpp<br>
> index 0aedbb3..bbdcd19 100644<br>
> --- a/src/glsl/builtin_types.cpp<br>
> +++ b/src/glsl/builtin_types.cpp<br>
> @@ -43,9 +43,7 @@<br>
> * convenience pointers (glsl_type::foo_type).<br>
> * @{<br>
> */<br>
> -#define DECL_TYPE(NAME, ...) \<br>
> - const glsl_type glsl_type::_##NAME##_type = glsl_type(__VA_ARGS__, #NAME); \<br>
> - const glsl_type *const glsl_type::NAME##_type = &glsl_type::_##NAME##_type;<br>
> +#define DECL_TYPE(NAME, ...)<br>
><br>
> #define STRUCT_TYPE(NAME) \<br>
> const glsl_type glsl_type::_struct_##NAME##_type = \<br>
> diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp<br>
> index b9cb97c..b0bb2ff 100644<br>
> --- a/src/glsl/glsl_types.cpp<br>
> +++ b/src/glsl/glsl_types.cpp<br>
> @@ -1713,3 +1713,17 @@ glsl_type::coordinate_components() const<br>
><br>
> return size;<br>
> }<br>
> +<br>
> +/**<br>
> + * Declarations of type flyweights (glsl_type::_foo_type) and<br>
> + * convenience pointers (glsl_type::foo_type).<br>
> + * @{<br>
> + */<br>
> +#define DECL_TYPE(NAME, ...) \<br>
> + const glsl_type glsl_type::_##NAME##_type = glsl_type(__VA_ARGS__, #NAME); \<br>
> + const glsl_type *const glsl_type::NAME##_type = &glsl_type::_##NAME##_type;<br>
> +<br>
> +#define STRUCT_TYPE(NAME)<br>
> +<br>
> +#include "builtin_type_macros.h"<br>
> +/** @} */<br>
> --<br>
> 2.4.3<br>
><br>
</p>