diff options
author | Ben Skeggs <[email protected]> | 2008-04-09 13:42:55 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2008-04-09 13:42:55 +1000 |
commit | 2a8de8ff94e0e0e52e03f8c8427a9e92fae374f4 (patch) | |
tree | c13df91fcc114b297635eb4a254bab5578bc8239 /src/mesa/shader/prog_instruction.c | |
parent | 2655f6901289bcfe3835cf28d7b9eefa242045b8 (diff) | |
parent | 7e57a9e8bba322b2ba8a02eec4b79c90e7052738 (diff) |
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/shader/prog_instruction.c')
-rw-r--r-- | src/mesa/shader/prog_instruction.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index 066129037a7..bea5d0551e4 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -119,6 +119,23 @@ _mesa_copy_instructions(struct prog_instruction *dest, /** + * Free an array of instructions + */ +void +_mesa_free_instructions(struct prog_instruction *inst, GLuint count) +{ + GLuint i; + for (i = 0; i < count; i++) { + if (inst[i].Data) + _mesa_free(inst[i].Data); + if (inst[i].Comment) + _mesa_free((char *) inst[i].Comment); + } + _mesa_free(inst); +} + + +/** * Basic info about each instruction */ struct instruction_info |