From 4d4335c81a3f7d8434d9983881a63abcbc29dd5c Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Tue, 11 Oct 2016 13:48:16 +0300 Subject: [PATCH] i965/fs: fill allocated memory with zeros where needed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marek Olšák --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index e4e6816..da835cb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -798,7 +798,7 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block, const unsigned size_written = effective_width * type_sz(inst->src[i].type); if (inst->src[i].file == VGRF) { - acp_entry *entry = ralloc(copy_prop_ctx, acp_entry); + acp_entry *entry = rzalloc(copy_prop_ctx, acp_entry); entry->dst = byte_offset(inst->dst, offset); entry->src = inst->src[i]; entry->size_written = size_written; diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp index 5db31c3..8a0469a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp @@ -42,8 +42,8 @@ fs_visitor::dead_code_eliminate() calculate_live_intervals(); int num_vars = live_intervals->num_vars; - BITSET_WORD *live = ralloc_array(NULL, BITSET_WORD, BITSET_WORDS(num_vars)); - BITSET_WORD *flag_live = ralloc_array(NULL, BITSET_WORD, 1); + BITSET_WORD *live = rzalloc_array(NULL, BITSET_WORD, BITSET_WORDS(num_vars)); + BITSET_WORD *flag_live = rzalloc_array(NULL, BITSET_WORD, 1); foreach_block_reverse_safe(block, cfg) { memcpy(live, live_intervals->block_data[block->num].liveout, -- 2.7.4