summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx/nvfx_fragprog.c
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-08-22 00:21:55 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-08-22 15:42:16 +0200
commita0c45eabf961905ea7bd48b2750fce41c8ba542b (patch)
treeddec8e9da584d332ec75d554bbe42c4e08dee6f8 /src/gallium/drivers/nvfx/nvfx_fragprog.c
parent8a878c266a8bf50b49d3ef8c5984790581e33133 (diff)
nvfx: use relocations array for vp constants
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_fragprog.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index db33ecd78c..025989ac5b 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -270,7 +270,7 @@ nv40_fp_if(struct nvfx_fpc *fpc, struct nvfx_src src)
static void
nv40_fp_cal(struct nvfx_fpc *fpc, unsigned target)
{
- struct nvfx_label_relocation reloc;
+ struct nvfx_relocation reloc;
uint32_t *hw;
fpc->inst_offset = fpc->fp->insn_len;
grow_insns(fpc, 4);
@@ -284,7 +284,7 @@ nv40_fp_cal(struct nvfx_fpc *fpc, unsigned target)
hw[3] = 0;
reloc.target = target;
reloc.location = fpc->inst_offset + 2;
- util_dynarray_append(&fpc->label_relocs, struct nvfx_label_relocation, reloc);
+ util_dynarray_append(&fpc->label_relocs, struct nvfx_relocation, reloc);
}
static void
@@ -306,7 +306,7 @@ nv40_fp_ret(struct nvfx_fpc *fpc)
static void
nv40_fp_rep(struct nvfx_fpc *fpc, unsigned count, unsigned target)
{
- struct nvfx_label_relocation reloc;
+ struct nvfx_relocation reloc;
uint32_t *hw;
fpc->inst_offset = fpc->fp->insn_len;
grow_insns(fpc, 4);
@@ -325,7 +325,7 @@ nv40_fp_rep(struct nvfx_fpc *fpc, unsigned count, unsigned target)
hw[3] = 0; /* | end_offset */
reloc.target = target;
reloc.location = fpc->inst_offset + 3;
- util_dynarray_append(&fpc->label_relocs, struct nvfx_label_relocation, reloc);
+ util_dynarray_append(&fpc->label_relocs, struct nvfx_relocation, reloc);
//util_dynarray_append(&fpc->loop_stack, unsigned, target);
}
@@ -333,7 +333,7 @@ nv40_fp_rep(struct nvfx_fpc *fpc, unsigned count, unsigned target)
static void
nv40_fp_bra(struct nvfx_fpc *fpc, unsigned target)
{
- struct nvfx_label_relocation reloc;
+ struct nvfx_relocation reloc;
uint32_t *hw;
fpc->inst_offset = fpc->fp->insn_len;
grow_insns(fpc, 4);
@@ -349,10 +349,10 @@ nv40_fp_bra(struct nvfx_fpc *fpc, unsigned target)
hw[3] = 0; /* | endif_offset */
reloc.target = target;
reloc.location = fpc->inst_offset + 2;
- util_dynarray_append(&fpc->label_relocs, struct nvfx_label_relocation, reloc);
+ util_dynarray_append(&fpc->label_relocs, struct nvfx_relocation, reloc);
reloc.target = target;
reloc.location = fpc->inst_offset + 3;
- util_dynarray_append(&fpc->label_relocs, struct nvfx_label_relocation, reloc);
+ util_dynarray_append(&fpc->label_relocs, struct nvfx_relocation, reloc);
}
static void
@@ -1041,9 +1041,9 @@ nvfx_fragprog_translate(struct nvfx_context *nvfx,
}
util_dynarray_append(&insns, unsigned, fp->insn_len);
- for(unsigned i = 0; i < fpc->label_relocs.size; i += sizeof(struct nvfx_label_relocation))
+ for(unsigned i = 0; i < fpc->label_relocs.size; i += sizeof(struct nvfx_relocation))
{
- struct nvfx_label_relocation* label_reloc = (struct nvfx_label_relocation*)((char*)fpc->label_relocs.data + i);
+ struct nvfx_relocation* label_reloc = (struct nvfx_relocation*)((char*)fpc->label_relocs.data + i);
fp->insn[label_reloc->location] |= ((unsigned*)insns.data)[label_reloc->target];
}
util_dynarray_fini(&insns);