From: Chris Forbes <chr...@ijw.co.nz>

Signed-off-by: Chris Forbes <chr...@ijw.co.nz>
---
 src/glsl/glsl_parser.yy | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 743cf26..97507eb 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -215,6 +215,7 @@ static bool match_layout_qualifier(const char *s1, const 
char *s2,
 %type <type_qualifier> layout_qualifier_id_list layout_qualifier_id
 %type <type_qualifier> interface_block_layout_qualifier
 %type <type_qualifier> subroutine_qualifier
+%type <type_qualifier> subroutine_type_list
 %type <type_qualifier> interface_qualifier
 %type <type_specifier> type_specifier
 %type <type_specifier> type_specifier_nonarray
@@ -1554,6 +1555,23 @@ subroutine_qualifier:
       memset(& $$, 0, sizeof($$));
       $$.flags.q.subroutine = 1;
    }
+   | SUBROUTINE '(' subroutine_type_list ')'
+   {
+      memset(& $$, 0, sizeof($$));
+      $$.flags.q.subroutine = 1;
+      /* TODO: collect the type list from $3 */
+   }
+   ;
+
+subroutine_type_list:
+   any_identifier
+   {
+      /* TODO */
+   }
+   | subroutine_type_list ',' any_identifier
+   {
+      /* TODO */
+   }
    ;
 
 interpolation_qualifier:
-- 
2.1.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to