From: Rhys Perry Date: Fri, 3 Apr 2020 16:44:47 +0000 (+0100) Subject: aco: fix copy of uninitialized boolean X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c11c4d8d4c1c862883652b24c26365e9772d8e54;p=mesa.git aco: fix copy of uninitialized boolean This should be harmless but UBSan seems to complain. Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/compiler/aco_insert_waitcnt.cpp b/src/amd/compiler/aco_insert_waitcnt.cpp index 196b45fbb75..aedcad1b573 100644 --- a/src/amd/compiler/aco_insert_waitcnt.cpp +++ b/src/amd/compiler/aco_insert_waitcnt.cpp @@ -293,7 +293,8 @@ struct wait_ctx { max_exp_cnt(6), max_lgkm_cnt(program_->chip_class >= GFX10 ? 62 : 14), max_vs_cnt(program_->chip_class >= GFX10 ? 62 : 0), - unordered_events(event_smem | (program_->chip_class < GFX10 ? event_flat : 0)) {} + unordered_events(event_smem | (program_->chip_class < GFX10 ? event_flat : 0)), + collect_statistics(program_->collect_statistics) {} bool join(const wait_ctx* other, bool logical) { @@ -847,8 +848,6 @@ void handle_block(Program *program, Block& block, wait_ctx& ctx) wait_imm queued_imm; - ctx.collect_statistics = program->collect_statistics; - for (aco_ptr& instr : block.instructions) { bool is_wait = !parse_wait_instr(ctx, instr.get()).empty();