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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 490f9194457..3d5f648191a 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -1480,6 +1480,20 @@ _mesa_realloc_instructions(struct prog_instruction *oldInst,
return newInst;
}
+/**
+ * Copy an narray of program instructions.
+ * \param dest pointer to destination.
+ * \param src pointer to source.
+ * \param n number of instructions to copy.
+ * \return pointer to destination.
+ */
+struct prog_instruction *
+_mesa_copy_instructions(struct prog_instruction *dest,
+ const struct prog_instruction *src, GLuint n)
+{
+ return _mesa_memcpy (dest, src, n * sizeof (struct prog_instruction));
+}
+
/**
* Basic info about each instruction