summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/prog_instruction.c')
-rw-r--r--src/mesa/shader/prog_instruction.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index c67831385f6..ed479a7f614 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -97,6 +97,20 @@ _mesa_realloc_instructions(struct prog_instruction *oldInst,
}
+/**
+ * Copy an array 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