diff options
author | Timothy Arceri <[email protected]> | 2016-07-27 09:52:04 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-07-28 08:05:04 +1000 |
commit | 29d70cc964411e86bcd0bbc5591b3d82f849c9f8 (patch) | |
tree | d2da325a50ccaa1b5f13349637dde8fe60d6baac /src/compiler/glsl/link_varyings.cpp | |
parent | af08cfc6266beea091db8bbc6fb8effeaa63c8d3 (diff) |
glsl: free hash tables earlier
These are only used by get_matching_input() which has been call
at this point so free the hash tables.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/glsl/link_varyings.cpp')
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index f6778b6a855..b4799d297dc 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -2156,6 +2156,9 @@ assign_varying_locations(struct gl_context *ctx, } } + hash_table_dtor(consumer_inputs); + hash_table_dtor(consumer_interface_inputs); + for (unsigned i = 0; i < num_tfeedback_decls; ++i) { if (!tfeedback_decls[i].is_varying()) continue; @@ -2165,8 +2168,6 @@ assign_varying_locations(struct gl_context *ctx, if (matched_candidate == NULL) { hash_table_dtor(tfeedback_candidates); - hash_table_dtor(consumer_inputs); - hash_table_dtor(consumer_interface_inputs); return false; } @@ -2185,15 +2186,10 @@ assign_varying_locations(struct gl_context *ctx, if (!tfeedback_decls[i].assign_location(ctx, prog)) { hash_table_dtor(tfeedback_candidates); - hash_table_dtor(consumer_inputs); - hash_table_dtor(consumer_interface_inputs); return false; } } - hash_table_dtor(tfeedback_candidates); - hash_table_dtor(consumer_inputs); - hash_table_dtor(consumer_interface_inputs); if (consumer && producer) { foreach_in_list(ir_instruction, node, consumer->ir) { |