summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_pc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-12-10 20:13:40 +0100
committerChristoph Bumiller <[email protected]>2010-12-10 20:20:34 +0100
commit51f22689a419a8a13ca105e8ffc905b5fadea0db (patch)
tree309fedef234bc3320f4b6017f1d5f9061f2861de /src/gallium/drivers/nvc0/nvc0_pc.c
parente32ec112785d9ea111a9de0087f2f487cadc9051 (diff)
nvc0: fix branching ops
- bra is PC relative - jump to else condition was inverted - handle integer comparisons
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_pc.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.c b/src/gallium/drivers/nvc0/nvc0_pc.c
index e38f6ced24b..cf7b8e347fb 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc.c
@@ -328,6 +328,7 @@ nvc0_emit_program(struct nv_pc *pc)
NOUVEAU_DBG("emitting program: size = %u\n", pc->emit_size);
+ pc->emit_pos = 0;
for (n = 0; n < pc->num_blocks; ++n) {
struct nv_instruction *i;
struct nv_basic_block *b = pc->bb_list[n];
@@ -335,7 +336,7 @@ nvc0_emit_program(struct nv_pc *pc)
for (i = b->entry; i; i = i->next) {
nvc0_emit_instruction(pc, i);
pc->emit += 2;
- pc->emit_pos += 2;
+ pc->emit_pos += 8;
}
}
assert(pc->emit == &code[pc->emit_size / 4]);