From e466d733686bef8ed1a19639bfac287f2f64abc0 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Fri, 1 Apr 2022 18:23:29 +0200 Subject: [PATCH] r600: make r600_load_ar available to driver code This is needed for the new NIR assembler Signed-off-by: Gert Wollny Acked-by: Emma Anholt Part-of: --- src/gallium/drivers/r600/r600_asm.c | 6 +++--- src/gallium/drivers/r600/r600_asm.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 060511e6cef..83bdfc75051 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -1212,7 +1212,7 @@ static int load_ar_r6xx(struct r600_bytecode *bc) } /* load AR register from gpr (bc->ar_reg) with MOVA_INT */ -static int load_ar(struct r600_bytecode *bc) +int r600_load_ar(struct r600_bytecode *bc) { struct r600_bytecode_alu alu; int r; @@ -1293,10 +1293,10 @@ int r600_bytecode_add_alu_type(struct r600_bytecode *bc, /* Check AR usage and load it if required */ for (i = 0; i < 3; i++) if (nalu->src[i].rel && !bc->ar_loaded) - load_ar(bc); + r600_load_ar(bc); if (nalu->dst.rel && !bc->ar_loaded) - load_ar(bc); + r600_load_ar(bc); /* Setup the kcache for this ALU instruction. This will start a new * ALU clause if needed. */ diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h index 501d827744a..4590783592f 100644 --- a/src/gallium/drivers/r600/r600_asm.h +++ b/src/gallium/drivers/r600/r600_asm.h @@ -328,6 +328,7 @@ void r600_bytecode_special_constants(uint32_t value, unsigned *sel); void r600_bytecode_disasm(struct r600_bytecode *bc); void r600_bytecode_alu_read(struct r600_bytecode *bc, struct r600_bytecode_alu *alu, uint32_t word0, uint32_t word1); +int r600_load_ar(struct r600_bytecode *bc); int cm_bytecode_add_cf_end(struct r600_bytecode *bc);