[Mesa-dev] [PATCH] r600g: fix relative addressing on RS880

Marek Olšák maraeo at gmail.com
Sun Aug 26 17:27:09 PDT 2012


This sets AR_HANDLE_NORMAL for RS880. I've added RS780 too, because I thought
it was a similar GPU, but I cannot test it.

I don't really know if this fix is correct. All I can say is that either
AR_HANDLE_RV6XX is broken (unlikely, but I cannot test it, because none
of my GPUs use it) or RS880 should really be handled like RV670.
---
 src/gallium/drivers/r600/r600_asm.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index f01de41..03ded6c 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -256,16 +256,15 @@ static struct r600_bytecode_tex *r600_bytecode_tex(void)
 
 void r600_bytecode_init(struct r600_bytecode *bc, enum chip_class chip_class, enum radeon_family family)
 {
-	if ((chip_class == R600) && (family != CHIP_RV670))
+	if ((chip_class == R600) &&
+	    (family != CHIP_RV670 && family != CHIP_RS780 && family != CHIP_RS880)) {
 		bc->ar_handling = AR_HANDLE_RV6XX;
-	else
-		bc->ar_handling = AR_HANDLE_NORMAL;
-
-	if ((chip_class == R600) && (family != CHIP_RV670 && family != CHIP_RS780 &&
-					   family != CHIP_RS880))
 		bc->r6xx_nop_after_rel_dst = 1;
-	else
+	} else {
+		bc->ar_handling = AR_HANDLE_NORMAL;
 		bc->r6xx_nop_after_rel_dst = 0;
+	}
+
 	LIST_INITHEAD(&bc->cf);
 	bc->chip_class = chip_class;
 }
-- 
1.7.9.5



More information about the mesa-dev mailing list