aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-10-07 00:34:26 +0200
committerMarek Olšák <[email protected]>2016-10-31 11:53:38 +0100
commit52d2b28f7f107fbaff023533a15058055fa73bf0 (patch)
treeb6f1de58134f1d10fc9dd766b81945021b53513a /src/compiler/spirv
parent9454f7c0ef55a9357473e451f0f59432c9438f01 (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/spirv')
-rw-r--r--src/compiler/spirv/vtn_variables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index c9744c4513d..bbcca146107 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -35,7 +35,8 @@ vtn_access_chain_extend(struct vtn_builder *b, struct vtn_access_chain *old,
struct vtn_access_chain *chain;
unsigned new_len = old->length + new_ids;
- chain = ralloc_size(b, sizeof(*chain) + new_len * sizeof(chain->link[0]));
+ /* TODO: don't use rzalloc */
+ chain = rzalloc_size(b, sizeof(*chain) + new_len * sizeof(chain->link[0]));
chain->var = old->var;
chain->length = new_len;