From f0f22d850cad39065f07892cf0f45c6284131bf5 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 16 Aug 2022 10:39:02 +0200 Subject: [PATCH] r600: Fix SCRATCH OP de-assembly 1d871aa6268159cdc63ef846599456d9ba567206 r600g: Implement spilling of temp arrays (v2) Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/r600_asm.c | 10 ++++++++-- src/gallium/drivers/r600/sb/sb_bc_dump.cpp | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 666037af087..f7c10054b5c 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -2274,8 +2274,14 @@ void r600_bytecode_disasm(struct r600_bytecode *bc) fprintf(stderr, "\n"); } else if (r600_isa_cf(cf->op)->flags & CF_MEM) { int o = 0; - const char *exp_type[] = {"WRITE", "WRITE_IND", "WRITE_ACK", - "WRITE_IND_ACK"}; + const char *exp_type_r600[] = {"WRITE", "WRITE_IND", "READ", + "READ_IND"}; + const char *exp_type_r700[] = {"WRITE", "WRITE_IND", "WRITE_ACK", + "WRITE_IND_ACK"}; + + const char **exp_type = bc->gfx_level >= R700 ? + exp_type_r700 : exp_type_r600; + o += fprintf(stderr, "%04d %08X %08X %s ", id, bc->bytecode[id], bc->bytecode[id + 1], cfop->name); o += print_indent(o, 43); diff --git a/src/gallium/drivers/r600/sb/sb_bc_dump.cpp b/src/gallium/drivers/r600/sb/sb_bc_dump.cpp index de3c38805b8..a7c4ccdadba 100644 --- a/src/gallium/drivers/r600/sb/sb_bc_dump.cpp +++ b/src/gallium/drivers/r600/sb/sb_bc_dump.cpp @@ -141,8 +141,14 @@ void bc_dump::dump(cf_node& n) { } else if (n.bc.op_ptr->flags & CF_MEM) { static const char *exp_type[] = {"WRITE", "WRITE_IND", "WRITE_ACK", "WRITE_IND_ACK"}; + static const char *exp_type_r600[] = {"WRITE", "WRITE_IND", + "READ", "READ_IND"}; + fill_to(s, 18); - s << " " << exp_type[n.bc.type] << " "; + if (ctx.hw_class == HW_CLASS_R600 && n.bc.op == CF_OP_MEM_SCRATCH) + s << " " << exp_type_r600[n.bc.type] << " "; + else + s << " " << exp_type[n.bc.type] << " "; s.print_wl(n.bc.array_base, 5); s << " R" << n.bc.rw_gpr << "."; for (int k = 0; k < 4; ++k)