summaryrefslogtreecommitdiff
path: root/src/mesa/shader/prog_instruction.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-20 08:12:17 -0600
committerBrian <brian@yutani.localnet.net>2007-04-21 10:05:05 -0600
commit4cc2674aee98a4c2972f4f097a89b7b4a30df4ab (patch)
tree54c9d2bfd8450815725d2e24ebd226c4699041db /src/mesa/shader/prog_instruction.c
parenta7f7366d382b2fe124f1495baf0360bffa30f0c0 (diff)
fix instruction comment code
Diffstat (limited to 'src/mesa/shader/prog_instruction.c')
-rw-r--r--src/mesa/shader/prog_instruction.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index 1e8e081226..d6b5652a27 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -108,7 +108,13 @@ 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));
+ GLuint i;
+ _mesa_memcpy(dest, src, n * sizeof(struct prog_instruction));
+ for (i = 0; i < n; i++) {
+ if (src[i].Comment)
+ dest[i].Comment = _mesa_strdup(src[i].Comment);
+ }
+ return dest;
}