diff options
author | Marek Olšák <[email protected]> | 2016-10-07 00:34:26 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-31 11:53:38 +0100 |
commit | 52d2b28f7f107fbaff023533a15058055fa73bf0 (patch) | |
tree | b6f1de58134f1d10fc9dd766b81945021b53513a /src/compiler/glsl/ast_to_hir.cpp | |
parent | 9454f7c0ef55a9357473e451f0f59432c9438f01 (diff) |
ralloc: use rzalloc where it's necessary
No change in behavior. ralloc_size is equivalent to rzalloc_size.
That will change though.
Calls not switched to rzalloc_size:
- ralloc_vasprintf
- glsl_type::name allocation (it's filled with snprintf)
- C++ classes where valgrind didn't show uninitialized values
I switched most of non-glsl stuff to rzalloc without checking whether
it's really needed.
Reviewed-by: Edward O'Callaghan <[email protected]>
Tested-by: Edmondo Tommasina <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index a9a1ba3c48c..24067b6ac0c 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -6639,8 +6639,8 @@ ast_process_struct_or_iface_block_members(exec_list *instructions, * the types to HIR. This ensures that structure definitions embedded in * other structure definitions or in interface blocks are processed. */ - glsl_struct_field *const fields = ralloc_array(state, glsl_struct_field, - decl_count); + glsl_struct_field *const fields = rzalloc_array(state, glsl_struct_field, + decl_count); bool first_member = true; bool first_member_has_explicit_location = false; |