summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-30 11:49:17 -0700
committerEric Anholt <eric@anholt.net>2010-06-30 12:01:42 -0700
commit849e18153cd91d812f694b806a84008498860bc3 (patch)
tree7a8df32990a8c3dd9697c641369d1f125a038afa /src/mesa/shader/shader_api.c
parent0eda9ae0a6bcd6a7e014df046c87fac5caee0e9e (diff)
glsl2: Use Mesa's gl_shader_program instead of our own struct glsl_program.
This avoids more allocation and shuffling of data around.
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 40b8286a13..f05ebc9fcb 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -53,7 +53,7 @@ static struct gl_shader_program *
_mesa_new_shader_program(GLcontext *ctx, GLuint name)
{
struct gl_shader_program *shProg;
- shProg = CALLOC_STRUCT(gl_shader_program);
+ shProg = talloc_zero(NULL, struct gl_shader_program);
if (shProg) {
shProg->Type = GL_SHADER_PROGRAM_MESA;
shProg->Name = name;
@@ -117,7 +117,7 @@ _mesa_free_shader_program_data(GLcontext *ctx,
}
if (shProg->InfoLog) {
- free(shProg->InfoLog);
+ talloc_free(shProg->InfoLog);
shProg->InfoLog = NULL;
}
@@ -139,7 +139,7 @@ _mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
{
_mesa_free_shader_program_data(ctx, shProg);
- free(shProg);
+ talloc_free(shProg);
}