Added PRINT instruction for GL_NV_fragment_program.

This commit is contained in:
Brian Paul
2004-12-18 16:18:00 +00:00
parent 6cec977773
commit 2a5afe3ab8
5 changed files with 107 additions and 15 deletions

View File

@@ -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);
}