Add `void' type to table of available types
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Mar 2010 19:11:50 +0000 (12:11 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Mar 2010 19:11:50 +0000 (12:11 -0700)
This will make void-01.glsl test fail, so I may regret this later.
However, this will make supporting functions that return void or
functions that have a void parameter list easier to handle.

builtin_types.sh
glsl_types.cpp

index b7baa59b23c536125b8969834c26921402719b24..e09b8309b4a90677b3465f0ed886cf67c8fcb6be 100755 (executable)
@@ -122,6 +122,9 @@ cat <<EOF
 static const struct glsl_type error_type =
    glsl_type(GLSL_TYPE_ERROR, 0, 0, "");
 
+static const struct glsl_type void_type =
+   glsl_type(GLSL_TYPE_VOID, 0, 0, "void");
+
 const struct glsl_type *const glsl_error_type = & error_type;
 
 EOF
index 5a087216ea65cfdb7f4177508ca18d904a8165c7..af6a40800b00b751d00836455ffec381cd872014 100644 (file)
@@ -50,6 +50,7 @@ generate_110_types(glsl_symbol_table *symtab)
                             Elements(builtin_structure_types));
    add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types,
                             Elements(builtin_110_deprecated_structure_types));
+   add_types_to_symbol_table(symtab, & void_type, 1);
 }