Don't call _mesa_glsl_initialize_types for every builtin function.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 9 Jun 2010 05:41:30 +0000 (22:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 9 Jun 2010 18:14:58 +0000 (11:14 -0700)
This was clearly wrong; types are now only initialized once.

glsl_parser_extras.cpp
ir_reader.cpp

index 3c895946be510f0f1ba53ddf602134ab859d082e..5ebbc27aca8de76bd8e7122520b08ec3fd05c5e0 100644 (file)
@@ -744,6 +744,7 @@ main(int argc, char **argv)
        * FINISHME: by the driver.  At the moment, we don't know what that is.
        */
       state.language_version = 130;
+      _mesa_glsl_initialize_types(&state);
 
       _mesa_glsl_read_ir(&state, &instructions, shader);
    }
index 0a2d18e2e0103fbeb554141f3bcfb1ade46ac5ce..f05682640fde9cf1bc0cc7bd07119772f85abe79 100644 (file)
@@ -71,13 +71,6 @@ _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
       return;
    }
    
-   _mesa_glsl_initialize_types(state);
-
-   /* FINISHME: Constructors probably shouldn't be emitted as part of the IR.
-    * FINISHME: Once they're not, remake them by calling:
-    * FINISHME: _mesa_glsl_initialize_constructors(instructions, state);
-    */
-
    scan_for_prototypes(state, instructions, expr);
    if (state->error)
       return;