summaryrefslogtreecommitdiffstats
path: root/glsl_parser.ypp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-06-08 22:33:43 -0700
committerKenneth Graunke <[email protected]>2010-06-09 11:14:58 -0700
commit57503a22d767c146862b5e2ac0e07f8a8f5193df (patch)
treeaf5220a3bd53a901f661d2bb21fd3faba9915882 /glsl_parser.ypp
parent4b0029a97d564679becb4bbf243dadb8b8b87c0a (diff)
Only initialize types after #extension directives have been processed.
Since _mesa_glsl_initialize_types add types for various extensions, we can't call it until after processing "#extension foo : disable" lines. Fixes tex_rect_02.frag.
Diffstat (limited to 'glsl_parser.ypp')
-rw-r--r--glsl_parser.ypp16
1 files changed, 7 insertions, 9 deletions
diff --git a/glsl_parser.ypp b/glsl_parser.ypp
index 99c6ca132c7..ae009ed20cb 100644
--- a/glsl_parser.ypp
+++ b/glsl_parser.ypp
@@ -186,21 +186,19 @@
%%
translation_unit:
- version_statement
+ version_statement extension_statement_list
{
_mesa_glsl_initialize_types(state);
}
- extension_statement_list external_declaration_list
- |
- {
- state->language_version = 110;
- _mesa_glsl_initialize_types(state);
- }
- extension_statement_list external_declaration_list
+ external_declaration_list
;
version_statement:
- VERSION INTCONSTANT EOL
+ /* blank - no #version specified */
+ {
+ state->language_version = 110;
+ }
+ | VERSION INTCONSTANT EOL
{
switch ($2) {
case 110: