Browse Source

small cleanups

tags/mesa_7_1_rc1
Alan Hourihane 18 years ago
parent
commit
eec20c359d
3 changed files with 7 additions and 7 deletions
  1. 1
    2
      src/mesa/shader/prog_parameter.c
  2. 0
    1
      src/mesa/shader/program.c
  3. 6
    4
      src/mesa/shader/shader_api.c

+ 1
- 2
src/mesa/shader/prog_parameter.c View File

@@ -40,8 +40,7 @@
struct gl_program_parameter_list *
_mesa_new_parameter_list(void)
{
return (struct gl_program_parameter_list *)
_mesa_calloc(sizeof(struct gl_program_parameter_list));
return CALLOC_STRUCT(gl_program_parameter_list);
}



+ 0
- 1
src/mesa/shader/program.c View File

@@ -230,7 +230,6 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog,
{
(void) ctx;
if (prog) {
_mesa_bzero(prog, sizeof(*prog));
prog->Id = id;
prog->Target = target;
prog->Resident = GL_TRUE;

+ 6
- 4
src/mesa/shader/shader_api.c View File

@@ -133,6 +133,11 @@ _mesa_free_shader_program_data(GLcontext *ctx,
_mesa_free(shProg->Shaders);
shProg->Shaders = NULL;
}

if (shProg->InfoLog) {
_mesa_free(shProg->InfoLog);
shProg->InfoLog = NULL;
}
}


@@ -143,10 +148,7 @@ void
_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
{
_mesa_free_shader_program_data(ctx, shProg);
if (shProg->Shaders) {
_mesa_free(shProg->Shaders);
shProg->Shaders = NULL;
}

_mesa_free(shProg);
}


Loading…
Cancel
Save