diff options
author | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-07-24 22:41:14 +0200 |
---|---|---|
committer | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-07-27 20:32:07 +0200 |
commit | 800f48258623f8caf25d013f44784edb7caa3f93 (patch) | |
tree | bb187a8b98e920f24762516620587402b6ab2c4b /src/mesa/drivers/dri/r300/r300_shader.c | |
parent | 92f7a599c7e94b0687d02efef1890e1a8ed2f9f3 (diff) |
r300: Allow compiler to add constants in a cleaner way
Adding constants is used in a number of non-native instruction
rewrites, and it required us to keep copies of modified gl_programs
around. This is a first step towards ending this.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_shader.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_shader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c index 3704c10155..40b073f2c7 100644 --- a/src/mesa/drivers/dri/r300/r300_shader.c +++ b/src/mesa/drivers/dri/r300/r300_shader.c @@ -38,6 +38,7 @@ static void freeFragProgCache(GLcontext *ctx, struct r300_fragment_program_cont while (fp) { tmp = fp->next; + rc_constants_destroy(&fp->code.constants); _mesa_reference_program(ctx, &fp->Base, NULL); _mesa_free(fp); fp = tmp; @@ -50,6 +51,7 @@ static void freeVertProgCache(GLcontext *ctx, struct r300_vertex_program_cont *c while (vp) { tmp = vp->next; + rc_constants_destroy(&vp->code.constants); _mesa_reference_vertprog(ctx, &vp->Base, NULL); _mesa_free(vp); vp = tmp; |