summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-24 14:56:54 -0600
committerBrian Paul <[email protected]>2008-07-24 15:11:38 -0600
commit90a3af7d9d0849afcee0d35ed0621fe24e1008a9 (patch)
tree309a8fe2f661afc1e878bc44ac347d754443d010 /src/mesa/shader/shader_api.c
parent4ec4ea14a587300041799c5269295ba7e160ab65 (diff)
mesa: glsl: only try to link shaders defining main()
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index b33dfd66636..e894b7b2113 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -262,15 +262,11 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type)
void
_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh)
{
- GLuint i;
if (sh->Source)
_mesa_free((void *) sh->Source);
if (sh->InfoLog)
_mesa_free(sh->InfoLog);
- for (i = 0; i < sh->NumPrograms; i++)
- _mesa_reference_program(ctx, &sh->Programs[i], NULL);
- if (sh->Programs)
- _mesa_free(sh->Programs);
+ _mesa_reference_program(ctx, &sh->Program, NULL);
_mesa_free(sh);
}