Set language_version to 130 (the max currently supported) when reading IR.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 7 Apr 2010 22:16:20 +0000 (15:16 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Apr 2010 01:14:53 +0000 (18:14 -0700)
This is necessary so _mesa_glsl_initialize_types can create appropriate
glsl_types and add them to the symbol table.

In the future, we'll want to set it to the max GLSL version supported by
the current driver.

glsl_parser_extras.cpp

index 88889d59b0ee2dd15cc83f938b3843b51df08342..efcb125dfc54a5d4762a9b35dbaa8d2eb66f4128 100644 (file)
@@ -761,6 +761,11 @@ main(int argc, char **argv)
 
       _mesa_ast_to_hir(&instructions, &state);
    } else {
+      /* FINISHME: We should initialize this to the max GLSL version supported
+       * FINISHME: by the driver.  At the moment, we don't know what that is.
+       */
+      state.language_version = 130;
+
       _mesa_glsl_read_ir(&state, &instructions, shader);
    }