summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-07-25 23:32:18 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2010-07-26 11:20:39 +0200
commita3ba99b3037bad629622766d4e08d48ab6d20aae (patch)
tree428b610c088c2913f8ba8beb40de443f9e7e75e4 /src/gallium/drivers/nv50
parent5811c6926450c4aafd2f9c87a2c6fe73b517f2c6 (diff)
nv50: fix constant_operand opt mul by 2 case
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_optimize.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_optimize.c b/src/gallium/drivers/nv50/nv50_pc_optimize.c
index 0018131fb5..107ef0f4bf 100644
--- a/src/gallium/drivers/nv50/nv50_pc_optimize.c
+++ b/src/gallium/drivers/nv50/nv50_pc_optimize.c
@@ -465,11 +465,7 @@ constant_operand(struct nv_pc *pc,
if ((type == NV_TYPE_F32 && val->reg.imm.f32 == 2.0f) ||
(NV_TYPE_ISINT(type) && val->reg.imm.u32 == 2)) {
nvi->opcode = NV_OP_ADD;
- nv_reference(pc, &nvi->src[s], NULL);
- if (!s) {
- nvi->src[0] = nvi->src[1];
- nvi->src[1] = NULL;
- }
+ nv_reference(pc, &nvi->src[s], nvi->src[t]->value);
} else
if (type == NV_TYPE_F32 && val->reg.imm.f32 == -1.0f) {
nvi->opcode = NV_OP_NEG;