glsl: clear out shader code before compiling
authorBrian Paul <brianp@vmware.com>
Fri, 18 Dec 2009 18:57:15 +0000 (11:57 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 18 Dec 2009 18:57:17 +0000 (11:57 -0700)
commit0478b745fe72360ce91988636b54f6e4834c1fae
tree3c5dd2e5f767f15176365d2c2e4a8218c4d99e96
parent20ee275974a58cd221031d522ad58a9548af2a31
glsl: clear out shader code before compiling

When we start compiling a shader, first free the existing gl_program.
This (mostly) fixes the piglit glsl-reload-source test.
Without this change, we were actually appending the new GPU code
onto the previous program.
src/mesa/shader/slang/slang_compile.c