Mesa (8.0): r600g: take into account kcache banks for bank swizzle check

Dave Airlie airlied at kemper.freedesktop.org
Mon Jan 23 09:53:57 UTC 2012


Module: Mesa
Branch: 8.0
Commit: 20457cfcb81223802f71968e255f2b28942010a8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=20457cfcb81223802f71968e255f2b28942010a8

Author: Vadim Girlin <vadimgirlin at gmail.com>
Date:   Sun Jan 22 01:49:46 2012 +0400

r600g: take into account kcache banks for bank swizzle check

Due to the changes for multiple kcache banks support, now we are assigning
final SRCx_SEL values for kcache access at the later stage, when building the
bytecode. So we need to take into account kcache banks to distinguish
the constants with the same address but different bank index.

Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
(cherry picked from commit 840a342cd0ac4a9937798a2137122387c0d3d7f6)

---

 src/gallium/drivers/r600/r600_asm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index c9b4845..f4977fb 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -722,7 +722,7 @@ static int check_vector(struct r600_bytecode *bc, struct r600_bytecode_alu *alu,
 					return r;
 			}
 		} else if (is_cfile(sel)) {
-			r = reserve_cfile(bc, bs, sel, elem);
+			r = reserve_cfile(bc, bs, (alu->src[src].kc_bank<<16) + sel, elem);
 			if (r)
 				return r;
 		}
@@ -749,7 +749,7 @@ static int check_scalar(struct r600_bytecode *bc, struct r600_bytecode_alu *alu,
 				const_count++;
 		}
 		if (is_cfile(sel)) {
-			r = reserve_cfile(bc, bs, sel, elem);
+			r = reserve_cfile(bc, bs, (alu->src[src].kc_bank<<16) + sel, elem);
 			if (r)
 				return r;
 		}




More information about the mesa-commit mailing list