summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-09-09 19:19:08 +0200
committerChristoph Bumiller <[email protected]>2010-09-09 19:21:34 +0200
commit6b14a3eb191ab798e524f2413180256fbcc2b33e (patch)
tree05fae5d655bcd9ac4e9ab87c05bfb6a072ae0c67 /src
parent246ebd7df1854db22a7f46302ecb1b5d56b68855 (diff)
nv50: address regs are 16 bit
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_print.c4
-rw-r--r--src/gallium/drivers/nv50/nv50_tgsi_to_nc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_print.c b/src/gallium/drivers/nv50/nv50_pc_print.c
index 74c3970f404..a71401979c3 100644
--- a/src/gallium/drivers/nv50/nv50_pc_print.c
+++ b/src/gallium/drivers/nv50/nv50_pc_print.c
@@ -171,12 +171,14 @@ nv_value_allocated(struct nv_value *value)
static INLINE void
nv_print_address(const char c, int buf, struct nv_value *a, int offset)
{
+ const char ac = (a && nv_value_allocated(a)) ? '$' : '%';
+
if (buf >= 0)
PRINT(" %s%c%i[", cyan, c, buf);
else
PRINT(" %s%c[", cyan, c);
if (a)
- PRINT("%s$a%i%s+", mgta, nv_value_id(a), cyan);
+ PRINT("%s%ca%i%s+", mgta, ac, nv_value_id(a), cyan);
PRINT("%s0x%x%s]", orng, offset, cyan);
}
diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
index 4168bbbc954..6fd749b35f8 100644
--- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
+++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
@@ -674,6 +674,7 @@ bld_get_address(struct bld_context *bld, int id, struct nv_value *indirect)
bld->saved_addr[i][0] = bld_load_imm_u32(bld, id);
bld->saved_addr[i][0]->reg.file = NV_FILE_ADDR;
+ bld->saved_addr[i][0]->reg.type = NV_TYPE_U16;
bld->saved_addr[i][1] = indirect;
return bld->saved_addr[i][0];
}
@@ -967,6 +968,7 @@ emit_store(struct bld_context *bld, const struct tgsi_full_instruction *inst,
case TGSI_FILE_ADDRESS:
assert(reg->Register.Index < BLD_MAX_ADDRS);
value->reg.file = NV_FILE_ADDR;
+ value->reg.type = NV_TYPE_U16;
STORE_ADDR(reg->Register.Index, chan, value);
break;
}