freedreno/ir3: Parse, but ignore @in, @out and @tex headers
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 23 Apr 2020 18:33:04 +0000 (11:33 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 25 Apr 2020 00:03:43 +0000 (00:03 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4741>

src/freedreno/ir3/ir3_lexer.l
src/freedreno/ir3/ir3_parser.y

index aca2d62b4dbb81eafd217cb605ec7720148081a8..823cb1587dcb21120901a50f8471f5cfb70e006f 100644 (file)
@@ -79,6 +79,9 @@ static int parse_reg(const char *str)
 "@invocationid"                   return TOKEN(T_A_INVOCATIONID);
 "@wgid"                           return TOKEN(T_A_WGID);
 "@numwg"                          return TOKEN(T_A_NUMWG);
+"@in"                             return TOKEN(T_A_IN);
+"@out"                            return TOKEN(T_A_OUT);
+"@tex"                            return TOKEN(T_A_TEX);
 "(sy)"                            return TOKEN(T_SY);
 "(ss)"                            return TOKEN(T_SS);
 "(absneg)"                        return TOKEN(T_ABSNEG);
index f12222e7a5cb8f5af39c047eec551c4c7719cb50..b42ea9d4fe21d7266acd4de5fa912a10d9f40783 100644 (file)
@@ -260,6 +260,9 @@ static void print_token(FILE *file, int type, YYSTYPE value)
 %token <tok> T_A_INVOCATIONID
 %token <tok> T_A_WGID
 %token <tok> T_A_NUMWG
+%token <tok> T_A_IN
+%token <tok> T_A_OUT
+%token <tok> T_A_TEX
 /* todo, re-add @sampler/@uniform/@varying if needed someday */
 
 /* src register flags */
@@ -506,6 +509,9 @@ header:            localsize_header
 |                  invocationid_header
 |                  wgid_header
 |                  numwg_header
+|                  in_header
+|                  out_header
+|                  tex_header
 
 const_val:         T_FLOAT   { $$ = fui($1); }
 |                  T_INT     { $$ = $1;      }
@@ -549,6 +555,18 @@ numwg_header:      T_A_NUMWG '(' T_CONSTANT ')' {
                        add_const($3, 0, 0, 0, 0);
 }
 
+/* Stubs for now */
+in_header:         T_A_IN '(' T_REGISTER ')' T_IDENTIFIER '(' T_IDENTIFIER '=' integer ')' { }
+
+out_header:        T_A_OUT '(' T_REGISTER ')' T_IDENTIFIER '(' T_IDENTIFIER '=' integer ')' { }
+
+tex_header:        T_A_TEX '(' T_REGISTER ')'
+                       T_IDENTIFIER '=' integer ',' /* src */
+                       T_IDENTIFIER '=' integer ',' /* samp */
+                       T_IDENTIFIER '=' integer ',' /* tex */
+                       T_IDENTIFIER '=' integer ',' /* wrmask */
+                       T_IDENTIFIER '=' integer     /* cmd */ { }
+
 iflag:             T_SY   { iflags.flags |= IR3_INSTR_SY; }
 |                  T_SS   { iflags.flags |= IR3_INSTR_SS; }
 |                  T_JP   { iflags.flags |= IR3_INSTR_JP; }