summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-02-07 21:19:23 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-02-09 16:05:00 +0100
commit0f776fea432052c00972ae1c6a0fbf76ec5e0b6c (patch)
tree8d028116149f8d8c47b85f155c9ed4bfa3e2bda6 /src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
parent4124feabcbbcf9ebe1ba37cf64419edbeda9c519 (diff)
nvc0: implement local memory load and store ops
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
index dd1c7f73f5..43c27fd890 100644
--- a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
+++ b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
@@ -569,11 +569,12 @@ bld_lmem_store(struct bld_context *bld, struct nv_value *ptr, int ofst,
loc = new_value(bld->pc, NV_FILE_MEM_L, nv_type_sizeof(NV_TYPE_U32));
- loc->reg.id = ofst * 4;
+ loc->reg.address = ofst * 4;
nv_reference(bld->pc, insn, 0, loc);
- nv_reference(bld->pc, insn, 1, ptr);
- nv_reference(bld->pc, insn, 2, val);
+ nv_reference(bld->pc, insn, 1, val);
+ if (ptr)
+ bld_src_pointer(bld, insn, 2, ptr);
}
static struct nv_value *
@@ -585,7 +586,9 @@ bld_lmem_load(struct bld_context *bld, struct nv_value *ptr, int ofst)
loc->reg.address = ofst * 4;
- val = bld_insn_2(bld, NV_OP_LD, loc, ptr);
+ val = bld_insn_1(bld, NV_OP_LD, loc);
+ if (ptr)
+ bld_src_pointer(bld, val->insn, 1, ptr);
return val;
}