diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-10-31 17:29:54 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-10-31 17:42:26 -0600 |
commit | 06fe728e5bbaf09258838dfe8e634d969a63ad74 (patch) | |
tree | a1d47a4be94fc83bb6dd83dc772b0480c0f79da3 /src/mesa/shader/slang/library/slang_shader.syn | |
parent | 90711775d74d7a48fd740fadc04e9aaae106a89d (diff) | |
download | external_mesa3d-06fe728e5bbaf09258838dfe8e634d969a63ad74.zip external_mesa3d-06fe728e5bbaf09258838dfe8e634d969a63ad74.tar.gz external_mesa3d-06fe728e5bbaf09258838dfe8e634d969a63ad74.tar.bz2 |
mesa: fix some bugs with precision qualifier parsing
Diffstat (limited to 'src/mesa/shader/slang/library/slang_shader.syn')
-rw-r--r-- | src/mesa/shader/slang/library/slang_shader.syn | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn index 06bd8ac..ef4b410 100644 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ b/src/mesa/shader/slang/library/slang_shader.syn @@ -229,6 +229,7 @@ .emtcode OP_FIELD 59 .emtcode OP_POSTINCREMENT 60 .emtcode OP_POSTDECREMENT 61 +.emtcode OP_PRECISION 62 /* parameter qualifier */ .emtcode PARAM_QUALIFIER_IN 0 @@ -753,9 +754,17 @@ parameter_declarator_2 /* <parameter_declaration> ::= <type_qualifier> <parameter_qualifier> + <precision> <parameter_declarator> + | <type_qualifier> <parameter_qualifier> + <precision> <parameter_type_specifier> + | <type_qualifier> <parameter_qualifier> <parameter_declarator> | <type_qualifier> <parameter_qualifier> <parameter_type_specifier> + | <parameter_qualifier> <precision> + <parameter_declarator> + | <parameter_qualifier> <precision> + <parameter_type_specifier> | <parameter_qualifier> <parameter_declarator> | <parameter_qualifier> <parameter_type_specifier> */ @@ -768,6 +777,12 @@ parameter_declaration_2 parameter_declaration_3 parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4; parameter_declaration_4 + parameter_declaration_optprec .and parameter_declaration_rest; +parameter_declaration_optprec + parameter_declaration_prec .or .true .emit PRECISION_DEFAULT; +parameter_declaration_prec + precision .and space; +parameter_declaration_rest parameter_declarator .or parameter_type_specifier; /* @@ -1047,6 +1062,7 @@ simple_statement .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or selection_statement .or iteration_statement .or + precision_stmt .emit OP_PRECISION .or jump_statement .or expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE; |