freedreno/computerator: support bindless sampler instructions

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4526>
This commit is contained in:
Jonathan Marek 2020-04-11 18:28:41 -04:00 committed by Marge Bot
parent bc9a28beed
commit 40ccbae622
2 changed files with 4 additions and 1 deletions

View file

@ -291,6 +291,7 @@ static int parse_reg(const char *str)
"p" return 'p';
"s2en" return TOKEN(T_S2EN);
"s" return 's';
"base"[0-9]+ ir3_yylval.num = strtol(yytext+4, NULL, 10); return T_BASE;
"=" return '=';
"(" return '(';

View file

@ -458,6 +458,7 @@ static void print_token(FILE *file, int type, YYSTYPE value)
%token <tok> T_S2EN
%token <tok> T_SAMP
%token <tok> T_TEX
%token <tok> T_BASE
%token <tok> T_NAN
%token <tok> T_INF
@ -719,11 +720,12 @@ cat5_flag: '.' T_3D { instr->flags |= IR3_INSTR_3D; }
| '.' 'p' { instr->flags |= IR3_INSTR_P; }
| '.' 's' { instr->flags |= IR3_INSTR_S; }
| '.' T_S2EN { instr->flags |= IR3_INSTR_S2EN; }
| '.' T_BASE { instr->flags |= IR3_INSTR_B; instr->cat5.tex_base = $2; }
cat5_flags:
| cat5_flag cat5_flags
cat5_samp: T_SAMP { instr->cat5.samp = $1; }
cat5_tex: T_TEX { instr->cat5.tex = $1; }
cat5_tex: T_TEX { if (instr->flags & IR3_INSTR_B) instr->cat5.samp |= ($1 << 4); else instr->cat5.tex = $1; }
cat5_type: '(' type ')' { instr->cat5.type = $2; }
cat5_instr: cat5_opc_dsxypp cat5_flags dst_reg ',' src_reg