From 8331d489487268cafb3248a598e409bff6b1b123 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 8 Jun 2010 22:41:30 -0700 Subject: [PATCH] Don't call _mesa_glsl_initialize_types for every builtin function. This was clearly wrong; types are now only initialized once. --- glsl_parser_extras.cpp | 1 + ir_reader.cpp | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp index 3c89594..5ebbc27 100644 --- a/glsl_parser_extras.cpp +++ b/glsl_parser_extras.cpp @@ -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); } diff --git a/ir_reader.cpp b/ir_reader.cpp index 0a2d18e..f056826 100644 --- a/ir_reader.cpp +++ b/ir_reader.cpp @@ -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; -- 2.7.4