merge from master
[mesa.git] / src / mesa / shader / programopt.c
index 2d14cd385502ed9187afb835a91755102ca3bdc4..d427ee38f8165b22778c576c12241248ff37fdcb 100644 (file)
@@ -99,8 +99,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
    }
 
    /* Append original instructions after new instructions */
-   _mesa_memcpy(newInst + 4, vprog->Base.Instructions,
-                origLen * sizeof(struct prog_instruction));
+   _mesa_copy_instructions (newInst + 4, vprog->Base.Instructions, origLen);
 
    /* free old instructions */
    _mesa_free(vprog->Base.Instructions);