diff options
author | Timothy Arceri <[email protected]> | 2017-11-08 10:57:21 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-11-09 12:07:48 +1100 |
commit | 6a72eba755fea15a0d97abb913a6315d9d32e274 (patch) | |
tree | dbbc8d83ec3c919e77aad495d2a79edaa45d75e4 /src/mesa/program/ir_to_mesa.cpp | |
parent | 9c33533586476693a197b7179552d140d54f23f2 (diff) |
mesa: rework how we free gl_shader_program_data
When I introduced gl_shader_program_data one of the intentions was to
fix a bug where a failed linking attempt freed data required by a
currently active program. However I seem to have failed to finish
hooking up the final steps required to have the data hang around.
Here we create a fresh instance of gl_shader_program_data every
time we link. gl_program has a reference to gl_shader_program_data
so it will be freed once the program is no longer active.
Cc: "17.2 17.3" <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Neil Roberts <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102177
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index aa330638836..327fd61d422 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3067,6 +3067,8 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) _mesa_clear_shader_program_data(ctx, prog); + prog->data = _mesa_create_shader_program_data(); + prog->data->LinkStatus = linking_success; for (i = 0; i < prog->NumShaders; i++) { |