use _mesa_copy_instructions()
authorBrian <brian@yutani.localnet.net>
Thu, 22 Mar 2007 14:50:20 +0000 (08:50 -0600)
committerBrian <brian@yutani.localnet.net>
Thu, 22 Mar 2007 14:50:20 +0000 (08:50 -0600)
src/mesa/main/texenvprogram.c

index 5038b9b0c368703b1f024fe334984ccc7617772c..d1994f76d1b70167a3f1ce30d48de149368b0bed 100644 (file)
@@ -1013,7 +1013,7 @@ create_new_program(GLcontext *ctx, struct state_key *key,
    p.program->NumTexIndirections = 1;  /* correct? */
    p.program->NumTexInstructions = 0;
    p.program->NumAluInstructions = 0;
-   p.program->Base.String = 0;
+   p.program->Base.String = NULL;
    p.program->Base.NumInstructions =
    p.program->Base.NumTemporaries =
    p.program->Base.NumParameters =
@@ -1102,9 +1102,8 @@ create_new_program(GLcontext *ctx, struct state_key *key,
                   "generating tex env program");
       return;
    }
-   _mesa_memcpy(program->Base.Instructions, instBuffer,
-                sizeof(struct prog_instruction)
-                * program->Base.NumInstructions);
+   _mesa_copy_instructions(program->Base.Instructions, instBuffer,
+                           program->Base.NumInstructions);
 
    /* Notify driver the fragment program has (actually) changed.
     */