use ctx->Driver.DeleteProgram() in a few more places
authorBrian <brian.paul@tungstengraphics.com>
Sat, 22 Mar 2008 16:27:03 +0000 (10:27 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Sat, 22 Mar 2008 16:27:03 +0000 (10:27 -0600)
src/mesa/shader/program.c
src/mesa/shader/shader_api.c

index 2097c395918d2c7a2c9a2e241987563193805793..d2c9183558f34d1d4071a429cb4f99902a613607 100644 (file)
@@ -386,7 +386,7 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
    clone->Format = prog->Format;
    clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions);
    if (!clone->Instructions) {
-      _mesa_delete_program(ctx, clone);
+      ctx->Driver.DeleteProgram(ctx, clone);
       return NULL;
    }
    _mesa_copy_instructions(clone->Instructions, prog->Instructions,
index e9c35fce71562ae090964aac8c83c5bfc5cb3208..76da855a07e930c7257a81a8a1585cc1648b6140 100644 (file)
@@ -79,7 +79,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
          /* to prevent a double-free in the next call */
          shProg->VertexProgram->Base.Parameters = NULL;
       }
-      _mesa_delete_program(ctx, &shProg->VertexProgram->Base);
+      ctx->Driver.DeleteProgram(ctx, &shProg->VertexProgram->Base);
       shProg->VertexProgram = NULL;
    }
 
@@ -88,7 +88,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
          /* to prevent a double-free in the next call */
          shProg->FragmentProgram->Base.Parameters = NULL;
       }
-      _mesa_delete_program(ctx, &shProg->FragmentProgram->Base);
+      ctx->Driver.DeleteProgram(ctx, &shProg->FragmentProgram->Base);
       shProg->FragmentProgram = NULL;
    }
 
@@ -246,7 +246,7 @@ _mesa_free_shader(GLcontext *ctx, struct gl_shader *sh)
       _mesa_free(sh->InfoLog);
    for (i = 0; i < sh->NumPrograms; i++) {
       assert(sh->Programs[i]);
-      _mesa_delete_program(ctx, sh->Programs[i]);
+      ctx->Driver.DeleteProgram(ctx, sh->Programs[i]);
    }
    if (sh->Programs)
       _mesa_free(sh->Programs);