summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-12-18 16:18:00 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-12-18 16:18:00 +0000
commit2a5afe3ab8d4c3624ed72b99a11b6a9017078d1c (patch)
tree77c8b5ba0ac5fa4f941f060c3e4252ecf20b1153 /src/mesa/shader/program.c
parent6cec977773c87ac95ca66089eb50850c9f0a27ed (diff)
Added PRINT instruction for GL_NV_fragment_program.
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r--src/mesa/shader/program.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index ca0421181c..307736f79c 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -278,8 +278,14 @@ _mesa_delete_program(GLcontext *ctx, struct program *prog)
else if (prog->Target == GL_FRAGMENT_PROGRAM_NV ||
prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
struct fragment_program *fprog = (struct fragment_program *) prog;
- if (fprog->Instructions)
+ if (fprog->Instructions) {
+ GLuint i;
+ for (i = 0; i < fprog->Base.NumInstructions; i++) {
+ if (fprog->Instructions[i].Data)
+ _mesa_free(fprog->Instructions[i].Data);
+ }
_mesa_free(fprog->Instructions);
+ }
if (fprog->Parameters)
_mesa_free_parameter_list(fprog->Parameters);
}