Mesa (main): r600: make r600_load_ar available to driver code

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 12:16:41 UTC 2022


Module: Mesa
Branch: main
Commit: e466d733686bef8ed1a19639bfac287f2f64abc0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e466d733686bef8ed1a19639bfac287f2f64abc0

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Fri Apr  1 18:23:29 2022 +0200

r600: make r600_load_ar available to driver code

This is needed for the new NIR assembler

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Acked-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15714>

---

 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);
 



More information about the mesa-commit mailing list