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/mesa | |
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/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_batch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c index d79e0ea00c7..9658b48ca13 100644 --- a/src/mesa/drivers/dri/i965/brw_state_batch.c +++ b/src/mesa/drivers/dri/i965/brw_state_batch.c @@ -46,9 +46,10 @@ brw_track_state_batch(struct brw_context *brw, if (!brw->state_batch_list) { /* Our structs are always aligned to at least 32 bytes, so * our array doesn't need to be any larger + * TODO: don't use rzalloc */ - brw->state_batch_list = ralloc_size(brw, sizeof(*brw->state_batch_list) * - batch->bo->size / 32); + brw->state_batch_list = rzalloc_size(brw, sizeof(*brw->state_batch_list) * + batch->bo->size / 32); } brw->state_batch_list[brw->state_batch_count].offset = offset; |