From: Kristian H. Kristensen Date: Thu, 23 Apr 2020 18:33:04 +0000 (-0700) Subject: freedreno/ir3: Parse, but ignore @in, @out and @tex headers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34e7179dfa2217d003e398cae6f797a0b2dd6aee;p=mesa.git freedreno/ir3: Parse, but ignore @in, @out and @tex headers Part-of: --- diff --git a/src/freedreno/ir3/ir3_lexer.l b/src/freedreno/ir3/ir3_lexer.l index aca2d62b4db..823cb1587dc 100644 --- a/src/freedreno/ir3/ir3_lexer.l +++ b/src/freedreno/ir3/ir3_lexer.l @@ -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); diff --git a/src/freedreno/ir3/ir3_parser.y b/src/freedreno/ir3/ir3_parser.y index f12222e7a5c..b42ea9d4fe2 100644 --- a/src/freedreno/ir3/ir3_parser.y +++ b/src/freedreno/ir3/ir3_parser.y @@ -260,6 +260,9 @@ static void print_token(FILE *file, int type, YYSTYPE value) %token T_A_INVOCATIONID %token T_A_WGID %token T_A_NUMWG +%token T_A_IN +%token T_A_OUT +%token 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; }