diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-24 17:18:56 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-01-06 09:00:35 -0700 |
commit | 06f2139b8285d9f8a3a33b633d14dde48e0112fe (patch) | |
tree | 005503af8bf8a3116a3ba5bb13ccaa9f1656de21 /src/mesa/shader/slang/library/slang_shader.syn | |
parent | d450ede4c41915f9e07d9881236d3ad0c435a19f (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.
(cherry picked from commit 8d95e66cf78921cd067c4bcf6a1053a7ec3a2ed4)
Diffstat (limited to 'src/mesa/shader/slang/library/slang_shader.syn')
-rw-r--r-- | src/mesa/shader/slang/library/slang_shader.syn | 20 |
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; /* |