r600g: take into account kcache banks for bank swizzle check
authorVadim Girlin <vadimgirlin@gmail.com>
Sat, 21 Jan 2012 21:49:46 +0000 (01:49 +0400)
committerDave Airlie <airlied@redhat.com>
Sun, 22 Jan 2012 07:22:50 +0000 (07:22 +0000)
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@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_asm.c

index 00ba8e09c6ada6f7473dd6f29fa43ec53fdbfe69..70efc14ca0460aad529aaaa0a19fbcc700649ae4 100644 (file)
@@ -671,7 +671,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;
                }
@@ -698,7 +698,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;
                }