From 6b14a3eb191ab798e524f2413180256fbcc2b33e Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Thu, 9 Sep 2010 19:19:08 +0200 Subject: [PATCH] nv50: address regs are 16 bit --- src/gallium/drivers/nv50/nv50_pc_print.c | 4 +++- src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.30.2