From 4c239ec2d76a7cb1c4ce0a782a30639bb061705d Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 15 Feb 2008 00:14:15 +1100 Subject: [PATCH] nv40: always copy 4 float immediates for now. --- src/mesa/pipe/nv40/nv40_fragprog.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/pipe/nv40/nv40_fragprog.c b/src/mesa/pipe/nv40/nv40_fragprog.c index cb7b4a5e70d..cc637f5dae2 100644 --- a/src/mesa/pipe/nv40/nv40_fragprog.c +++ b/src/mesa/pipe/nv40/nv40_fragprog.c @@ -710,14 +710,15 @@ nv40_fragprog_translate(struct nv40_context *nv40, { struct tgsi_full_immediate *imm; float vals[4]; - int i; imm = &parse.FullToken.FullImmediate; assert(imm->Immediate.DataType == TGSI_IMM_FLOAT32); assert(fpc->nr_imm < MAX_IMM); - for (i = 0; i < (imm->Immediate.Size - 1); i++) - vals[i] = imm->u.ImmediateFloat32[i].Float; + vals[0] = imm->u.ImmediateFloat32[0].Float; + vals[1] = imm->u.ImmediateFloat32[1].Float; + vals[2] = imm->u.ImmediateFloat32[2].Float; + vals[3] = imm->u.ImmediateFloat32[3].Float; fpc->imm[fpc->nr_imm++] = constant(fpc, -1, vals); } break; -- 2.30.2