diff options
author | Brian <[email protected]> | 2006-12-18 08:28:06 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2006-12-18 08:28:06 -0700 |
commit | ad2519ac6bd4f0464530c5d868045675392ff880 (patch) | |
tree | 05ae3d8c7a67c10e6cc34e09f03eb81992032abe /src/mesa | |
parent | 962a9f2f9d0326408c9b400d765a6aa14c5a5f57 (diff) |
Use _mesa_free_linked_program_data()
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/slang/slang_link2.c | 46 |
1 files changed, 6 insertions, 40 deletions
diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 50e62d89de0..6a276d69ac0 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.3 * * Copyright (C) 2006 Brian Paul All Rights Reserved. * @@ -23,9 +23,9 @@ */ /** - * \file slang_link.c - * slang linker - * \author Michal Krol + * \file slang_link2.c + * GLSL linker + * \author Brian Paul */ #include "imports.h" @@ -36,7 +36,7 @@ #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" -#include "shaderobjects.h" +#include "shader_api.h" #include "slang_link.h" @@ -229,40 +229,6 @@ link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) } -static void -free_linked_program_data(GLcontext *ctx, struct gl_linked_program *linked) -{ - if (linked->VertexProgram) { - if (linked->VertexProgram->Base.Parameters == linked->Uniforms) { - /* to prevent a double-free in the next call */ - linked->VertexProgram->Base.Parameters = NULL; - } - _mesa_delete_program(ctx, &linked->VertexProgram->Base); - linked->VertexProgram = NULL; - } - - if (linked->FragmentProgram) { - if (linked->FragmentProgram->Base.Parameters == linked->Uniforms) { - /* to prevent a double-free in the next call */ - linked->FragmentProgram->Base.Parameters = NULL; - } - _mesa_delete_program(ctx, &linked->FragmentProgram->Base); - linked->FragmentProgram = NULL; - } - - - if (linked->Uniforms) { - _mesa_free_parameter_list(linked->Uniforms); - linked->Uniforms = NULL; - } - - if (linked->Varying) { - _mesa_free_parameter_list(linked->Varying); - linked->Varying = NULL; - } -} - - /** * Shader linker. Currently: * @@ -286,7 +252,7 @@ _slang_link2(GLcontext *ctx, struct gl_fragment_program *fragProg; GLuint i; - free_linked_program_data(ctx, linked); + _mesa_free_linked_program_data(ctx, linked); linked->Uniforms = _mesa_new_parameter_list(); linked->Varying = _mesa_new_parameter_list(); |