diff options
author | Stephane Marchesin <[email protected]> | 2008-02-16 02:54:11 +0100 |
---|---|---|
committer | Stephane Marchesin <[email protected]> | 2008-02-16 02:54:22 +0100 |
commit | 4032ff3889021089debce1c43a0bb984b121cbf6 (patch) | |
tree | fa2bceed9f90d7cc3d775357578876342ff23359 /src/mesa/pipe/nv30/nv30_fragprog.c | |
parent | 6e3e5ba3bb25183efafcf78d6794fc50236c2835 (diff) |
nv30: fixes.
Diffstat (limited to 'src/mesa/pipe/nv30/nv30_fragprog.c')
-rw-r--r-- | src/mesa/pipe/nv30/nv30_fragprog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/pipe/nv30/nv30_fragprog.c b/src/mesa/pipe/nv30/nv30_fragprog.c index 0233873d925..0db1ac868c7 100644 --- a/src/mesa/pipe/nv30/nv30_fragprog.c +++ b/src/mesa/pipe/nv30/nv30_fragprog.c @@ -1,6 +1,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_state.h" +#include "pipe/p_util.h" #include "pipe/p_shader_tokens.h" #include "pipe/tgsi/util/tgsi_parse.h" @@ -675,7 +676,7 @@ nv30_fragprog_translate(struct nv30_context *nv30, struct tgsi_parse_context parse; struct nv30_fpc *fpc = NULL; - fpc = calloc(1, sizeof(struct nv30_fpc)); + fpc = CALLOC(1, sizeof(struct nv30_fpc)); if (!fpc) return; fpc->fp = fp; @@ -716,7 +717,7 @@ nv30_fragprog_translate(struct nv30_context *nv30, assert(imm->Immediate.DataType == TGSI_IMM_FLOAT32); assert(fpc->nr_imm < MAX_IMM); - for (i = 0; i < imm->Immediate.Size; i++) + for (i = 0; i < 4; i++) vals[i] = imm->u.ImmediateFloat32[i].Float; fpc->imm[fpc->nr_imm++] = constant(fpc, -1, vals); } |