diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-24 15:28:21 -0700 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-24 15:28:21 -0700 |
commit | 0fab514ff5e7887767936427b5e02b676abebf3a (patch) | |
tree | 38a1fddc8a2958e55c996d4b12a06beccdc9e10a /src/mesa/shader/slang/library/slang_shader_syn.h | |
parent | b730d0d3e9b202b17a0815cb820fc9905f35cb98 (diff) |
mesa: support for GLSL 1.20 array types
This allows syntax like "float[8] foo, bar;"
Diffstat (limited to 'src/mesa/shader/slang/library/slang_shader_syn.h')
-rw-r--r-- | src/mesa/shader/slang/library/slang_shader_syn.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index f1fc9ca883..f695717782 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -83,6 +83,8 @@ ".emtcode TYPE_SPECIFIER_MAT42 29\n" ".emtcode TYPE_SPECIFIER_MAT34 30\n" ".emtcode TYPE_SPECIFIER_MAT43 31\n" +".emtcode TYPE_ARRAY_SIZE 220\n" +".emtcode TYPE_NO_ARRAY_SIZE 221\n" ".emtcode FIELD_NONE 0\n" ".emtcode FIELD_NEXT 1\n" ".emtcode FIELD_ARRAY 2\n" @@ -425,9 +427,15 @@ "single_declaration_6\n" " constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n" "fully_specified_type_space\n" -" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space;\n" +" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space .and .true .emit TYPE_NO_ARRAY_SIZE;\n" "fully_specified_type_nospace\n" -" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace;\n" +" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_array;\n" +"type_specifier_array\n" +" type_specifier_array_1 .or type_specifier_array_2;\n" +"type_specifier_array_1\n" +" type_specifier_space .and array_size;\n" +"type_specifier_array_2\n" +" type_specifier_nospace .and opt_array_size;\n" "fully_specified_type_optinvariant\n" " fully_specified_type_invariant .or .true .emit TYPE_VARIANT;\n" "fully_specified_type_invariant\n" @@ -444,6 +452,10 @@ " fully_specified_type_prec .or .true .emit PRECISION_DEFAULT;\n" "fully_specified_type_prec\n" " precision .and space;\n" +"opt_array_size\n" +" array_size .or .true .emit TYPE_NO_ARRAY_SIZE;\n" +"array_size\n" +" lbracket .emit TYPE_ARRAY_SIZE .and constant_expression .and rbracket;\n" "invariant_qualifier\n" " \"invariant\" .emit TYPE_INVARIANT;\n" "centroid_qualifier\n" |