diff options
author | Rob Clark <[email protected]> | 2015-10-10 12:39:57 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-10-16 19:33:37 -0400 |
commit | 60690cb3b3082b7397c48769ec28b5570f6b7d7e (patch) | |
tree | 1bd08b1871c373dea862223b2974f63c80a87aa0 /src/glsl | |
parent | 33de998230414bf5603927424ffca85792b176d1 (diff) |
glsl: move builtin vector types to glsl_types.cpp
First step at untangling NIR's dependency on glsl_types without bringing
in the dependency on glsl_symbol_table. The builtin types are now in
glsl_types (which will end up in NIR), but adding them to the symbol-
table stays in builtin_types.cpp (which will not be part of NIR).
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/builtin_types.cpp | 4 | ||||
-rw-r--r-- | src/glsl/glsl_types.cpp | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/glsl/builtin_types.cpp b/src/glsl/builtin_types.cpp index 0aedbb3546a..bbdcd199e92 100644 --- a/src/glsl/builtin_types.cpp +++ b/src/glsl/builtin_types.cpp @@ -43,9 +43,7 @@ * convenience pointers (glsl_type::foo_type). * @{ */ -#define DECL_TYPE(NAME, ...) \ - const glsl_type glsl_type::_##NAME##_type = glsl_type(__VA_ARGS__, #NAME); \ - const glsl_type *const glsl_type::NAME##_type = &glsl_type::_##NAME##_type; +#define DECL_TYPE(NAME, ...) #define STRUCT_TYPE(NAME) \ const glsl_type glsl_type::_struct_##NAME##_type = \ diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index 27934478e2d..1c66dce85c4 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/glsl/glsl_types.cpp @@ -1729,3 +1729,17 @@ glsl_type::coordinate_components() const return size; } + +/** + * Declarations of type flyweights (glsl_type::_foo_type) and + * convenience pointers (glsl_type::foo_type). + * @{ + */ +#define DECL_TYPE(NAME, ...) \ + const glsl_type glsl_type::_##NAME##_type = glsl_type(__VA_ARGS__, #NAME); \ + const glsl_type *const glsl_type::NAME##_type = &glsl_type::_##NAME##_type; + +#define STRUCT_TYPE(NAME) + +#include "builtin_type_macros.h" +/** @} */ |