summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/library/slang_shader_syn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/library/slang_shader_syn.h')
-rw-r--r--src/mesa/shader/slang/library/slang_shader_syn.h55
1 files changed, 47 insertions, 8 deletions
diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h
index 6457bb69bd..42ff92b65a 100644
--- a/src/mesa/shader/slang/library/slang_shader_syn.h
+++ b/src/mesa/shader/slang/library/slang_shader_syn.h
@@ -47,6 +47,10 @@
".emtcode TYPE_QUALIFIER_UNIFORM 4\n"
".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n"
".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n"
+".emtcode TYPE_VARIANT 90\n"
+".emtcode TYPE_INVARIANT 91\n"
+".emtcode TYPE_CENTER 95\n"
+".emtcode TYPE_CENTROID 96\n"
".emtcode TYPE_SPECIFIER_VOID 0\n"
".emtcode TYPE_SPECIFIER_BOOL 1\n"
".emtcode TYPE_SPECIFIER_BVEC2 2\n"
@@ -79,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"
@@ -132,6 +138,7 @@
".emtcode OP_POSTINCREMENT 60\n"
".emtcode OP_POSTDECREMENT 61\n"
".emtcode OP_PRECISION 62\n"
+".emtcode OP_METHOD 63\n"
".emtcode PARAM_QUALIFIER_IN 0\n"
".emtcode PARAM_QUALIFIER_OUT 1\n"
".emtcode PARAM_QUALIFIER_INOUT 2\n"
@@ -169,6 +176,12 @@
"integer_expression\n"
" expression;\n"
"function_call\n"
+" function_call_or_method;\n"
+"function_call_or_method\n"
+" regular_function_call .or method_call;\n"
+"method_call\n"
+" identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END;\n"
+"regular_function_call\n"
" function_call_generic .emit OP_CALL .and .true .emit OP_END;\n"
"function_call_generic\n"
" function_call_generic_1 .or function_call_generic_2;\n"
@@ -421,9 +434,23 @@
"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_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_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"
+" invariant_qualifier .and space;\n"
+"fully_specified_type_optcentroid\n"
+" fully_specified_type_centroid .or .true .emit TYPE_CENTER;\n"
+"fully_specified_type_centroid\n"
+" centroid_qualifier .and space;\n"
"fully_specified_type_optqual\n"
" fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE;\n"
"fully_specified_type_qual\n"
@@ -432,13 +459,21 @@
" 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"
+" \"centroid\" .emit TYPE_CENTROID;\n"
"type_qualifier\n"
" \"const\" .emit TYPE_QUALIFIER_CONST .or\n"
" .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n"
" \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n"
" \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n"
-" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n"
-" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n"
+" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n"
+" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n"
"type_specifier_space\n"
" \"void\" .emit TYPE_SPECIFIER_VOID .or\n"
" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
@@ -618,8 +653,8 @@
" '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n"
"external_declaration\n"
" precision_stmt .emit DEFAULT_PRECISION .or\n"
-" invariant_stmt .emit INVARIANT_STMT .or\n"
" function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n"
+" invariant_stmt .emit INVARIANT_STMT .or\n"
" declaration .emit EXTERNAL_DECLARATION;\n"
"precision_stmt\n"
" \"precision\" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon;\n"
@@ -655,11 +690,13 @@
"identifier\n"
" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n"
"float\n"
-" float_1 .or float_2;\n"
+" float_1 .or float_2 .or float_3;\n"
"float_1\n"
-" float_fractional_constant .and float_optional_exponent_part;\n"
+" float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix;\n"
"float_2\n"
-" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part;\n"
+" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part .and optional_f_suffix;\n"
+"float_3\n"
+" float_digit_sequence .and .true .emit '\\0' .and 'f' .emit '\\0';\n"
"float_fractional_constant\n"
" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n"
"float_fractional_constant_1\n"
@@ -682,6 +719,8 @@
" float_sign .or .true;\n"
"float_sign\n"
" '+' .or '-' .emit '-';\n"
+"optional_f_suffix\n"
+" 'f' .or .true;\n"
"integer\n"
" integer_hex .or integer_oct .or integer_dec;\n"
"integer_hex\n"