diff options
author | Bryan Cain <bryancain3@gmail.com> | 2011-08-04 15:43:34 -0500 |
---|---|---|
committer | Bryan Cain <bryancain3@gmail.com> | 2011-08-04 15:43:34 -0500 |
commit | 4683529048ee133481b2d8f1cae1685aa1736f9a (patch) | |
tree | e02d90f4164e4dc6259000c358d65e6af84a3a31 /src/mesa/program/program.c | |
parent | 50073563b2bfe3716b3dc8b1ed2f91381ba24305 (diff) | |
parent | 9adcab9cd464d659288e31e6767efb5dee3894ff (diff) | |
download | external_mesa3d-4683529048ee133481b2d8f1cae1685aa1736f9a.zip external_mesa3d-4683529048ee133481b2d8f1cae1685aa1736f9a.tar.gz external_mesa3d-4683529048ee133481b2d8f1cae1685aa1736f9a.tar.bz2 |
Merge branch 'glsl-to-tgsi'
Conflicts:
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_program.c
Diffstat (limited to 'src/mesa/program/program.c')
-rw-r--r-- | src/mesa/program/program.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index adca094..ecff234 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -388,8 +388,9 @@ _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog) if (prog->String) free(prog->String); - _mesa_free_instructions(prog->Instructions, prog->NumInstructions); - + if (prog->Instructions) { + _mesa_free_instructions(prog->Instructions, prog->NumInstructions); + } if (prog->Parameters) { _mesa_free_parameter_list(prog->Parameters); } @@ -1031,7 +1032,8 @@ _mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog) GLuint i; GLuint whiteSwizzle; GLint whiteIndex = _mesa_add_unnamed_constant(prog->Parameters, - white, 4, &whiteSwizzle); + (gl_constant_value *) white, + 4, &whiteSwizzle); (void) whiteIndex; |