From 48a398bf5b1b5c07d0eac15b4c6af68fe07b5c99 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 6 Dec 2021 17:55:10 -0500 Subject: [PATCH] pan/bi: Generalize I->table for Valhall Can be reused for resource tables in a natural way. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_printer.c.py | 2 +- src/panfrost/bifrost/compiler.h | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/panfrost/bifrost/bi_printer.c.py b/src/panfrost/bifrost/bi_printer.c.py index f61e1996e43..872dfe7e8e4 100644 --- a/src/panfrost/bifrost/bi_printer.c.py +++ b/src/panfrost/bifrost/bi_printer.c.py @@ -169,7 +169,7 @@ bi_print_instr(const bi_instr *I, FILE *fp) fprintf(fp, " = %s", bi_opcode_props[I->op].name); if (I->table) - fprintf(fp, ".%s", bi_table_as_str(I->table)); + fprintf(fp, ".table%u", I->table); switch (I->op) { % for opcode in ops: diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 515a8f10696..edb9a1dd54a 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -401,8 +401,14 @@ typedef struct { * useless double fills */ bool no_spill; - /* Override table, inducing a DTSEL_IMM pair if nonzero */ - enum bi_table table; + /* On Bifrost: A value of bi_table to override the table, inducing a + * DTSEL_IMM pair if nonzero. + * + * On Valhall: the table index to use for resource instructions. + * + * These two interpretations are equivalent if you squint a bit. + */ + unsigned table; /* Everything after this MUST NOT be accessed directly, since * interpretation depends on opcodes */