summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/library/slang_shader.syn
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-11-24 17:18:56 -0700
committerBrian Paul <brian.paul@tungstengraphics.com>2008-11-24 17:18:56 -0700
commit8d95e66cf78921cd067c4bcf6a1053a7ec3a2ed4 (patch)
treee0353699e7ce0f65167d0d89a94621a220220d2b /src/mesa/shader/slang/library/slang_shader.syn
parent0fab514ff5e7887767936427b5e02b676abebf3a (diff)
mesa: added support for GLSL 1.20 array.length() method
This is the only method supported in GLSL 1.20 so we take a few short-cuts.
Diffstat (limited to 'src/mesa/shader/slang/library/slang_shader.syn')
-rw-r--r--src/mesa/shader/slang/library/slang_shader.syn20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn
index a02a3ac5d9..760dfbcea7 100644
--- a/src/mesa/shader/slang/library/slang_shader.syn
+++ b/src/mesa/shader/slang/library/slang_shader.syn
@@ -251,6 +251,7 @@
.emtcode OP_POSTINCREMENT 60
.emtcode OP_POSTDECREMENT 61
.emtcode OP_PRECISION 62
+.emtcode OP_METHOD 63
/* parameter qualifier */
.emtcode PARAM_QUALIFIER_IN 0
@@ -342,6 +343,25 @@ integer_expression
* <function_call> ::= <function_call_generic>
*/
function_call
+ function_call_or_method;
+
+/*
+ * <function_call_or_method> ::= <regular_function_call>
+ * | <postfix_expression> "." <function_call_generic>
+ */
+function_call_or_method
+ regular_function_call .or method_call;
+
+/*
+ * <method_call> ::= <identifier> "." <function_call_generic>
+ */
+method_call
+ identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END;
+
+/*
+ * <regular_function_call> ::= <function_call_generic>
+ */
+regular_function_call
function_call_generic .emit OP_CALL .and .true .emit OP_END;
/*