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 b7baa59..e09b830 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 5a08721..af6a408 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);
 }