summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r--src/mesa/shader/program.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index ae26c3cc14e..c1606acb1a7 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -342,8 +342,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
_mesa_delete_program(ctx, clone);
return NULL;
}
- memcpy(clone->Instructions, prog->Instructions,
- prog->NumInstructions * sizeof(struct prog_instruction));
+ _mesa_copy_instructions(clone->Instructions, prog->Instructions,
+ prog->NumInstructions);
clone->InputsRead = prog->InputsRead;
clone->OutputsWritten = prog->OutputsWritten;
memcpy(clone->TexturesUsed, prog->TexturesUsed, sizeof(prog->TexturesUsed));