pan/bi: Generalize I->table for Valhall

Can be reused for resource tables in a natural way.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15216>
This commit is contained in:
Alyssa Rosenzweig 2021-12-06 17:55:10 -05:00 committed by Marge Bot
parent 20891e75c2
commit 48a398bf5b
2 changed files with 9 additions and 3 deletions

View File

@ -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:

View File

@ -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 */