summaryrefslogtreecommitdiffstats
path: root/src/glsl/main.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-18 12:02:35 -0700
committerEric Anholt <[email protected]>2010-08-18 14:16:07 -0700
commit5d0f430e8ed01db29d11d22e4b6c3760d8c39f8f (patch)
treeb36d56d5d4ad7638570b8dd0f5da3df1a0b3a266 /src/glsl/main.cpp
parent0b09e6410f1173c2f69b601e43c5b14d8ad97345 (diff)
mesa: Free old linked shaders when relinking new shaders.
Diffstat (limited to 'src/glsl/main.cpp')
-rw-r--r--src/glsl/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 24d6076d07b..cb9f8a52773 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -209,6 +209,10 @@ int
main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
+ GLcontext local_ctx;
+ GLcontext *ctx = &local_ctx;
+
+ ctx->Driver.NewShader = _mesa_new_shader;
int c;
int idx = 0;
@@ -265,7 +269,7 @@ main(int argc, char **argv)
}
if ((status == EXIT_SUCCESS) && do_link) {
- link_shaders(whole_program);
+ link_shaders(ctx, whole_program);
status = (whole_program->LinkStatus) ? EXIT_SUCCESS : EXIT_FAILURE;
if (strlen(whole_program->InfoLog) > 0)