From: Ben Skeggs Date: Thu, 14 Feb 2008 13:14:15 +0000 (+1100) Subject: nv40: always copy 4 float immediates for now. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c239ec2d76a7cb1c4ce0a782a30639bb061705d;p=mesa.git nv40: always copy 4 float immediates for now. --- 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;