summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/programopt.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-10-29 18:03:16 +0000
committerBrian Paul <[email protected]>2006-10-29 18:03:16 +0000
commitd6272e06172f7ac7a0d6e8062e8ffba33e1ab3ba (patch)
tree6aadaf797cea8dfdc12ba662f209282d15d6ef6c /src/mesa/shader/programopt.c
parentefd95c10844df0c93ee3eab41259f719f55f171f (diff)
Change _mesa_init_instruction() to initialize an array of instructions.
Diffstat (limited to 'src/mesa/shader/programopt.c')
-rw-r--r--src/mesa/shader/programopt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index 55991dcce34..b17f5afc699 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -85,8 +85,8 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
* newInst[2] = DP4 result.position.z, mvp.row[2], vertex.position;
* newInst[3] = DP4 result.position.w, mvp.row[3], vertex.position;
*/
+ _mesa_init_instructions(newInst, 4);
for (i = 0; i < 4; i++) {
- _mesa_init_instruction(newInst + i);
newInst[i].Opcode = OPCODE_DP4;
newInst[i].DstReg.File = PROGRAM_OUTPUT;
newInst[i].DstReg.Index = VERT_RESULT_HPOS;
@@ -191,8 +191,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
}
assert(inst->Opcode == OPCODE_END); /* we'll overwrite this inst */
- for (i = 0; i < 6; i++)
- _mesa_init_instruction(inst + i);
+ _mesa_init_instructions(inst, 6);
/* emit instructions to compute fog blending factor */
if (fprog->FogOption == GL_LINEAR) {