aco: fix uninitialized data error in waitcnt pass
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 10 Mar 2020 15:07:19 +0000 (15:07 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Mar 2020 11:46:56 +0000 (11:46 +0000)
Shouldn't create any incorrect waitcnts but may create suboptimial
waitcnts in rare cases.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4133>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4133>

src/amd/compiler/aco_insert_waitcnt.cpp

index e0184993c6b4d3857c89ccd7c242a48f691668c7..254eb97d1510c2038e9155115c6557b61cf61ccb 100644 (file)
@@ -247,7 +247,7 @@ struct wait_ctx {
    bool pending_s_buffer_store = false; /* GFX10 workaround */
 
    wait_imm barrier_imm[barrier_count];
-   uint16_t barrier_events[barrier_count]; /* use wait_event notion */
+   uint16_t barrier_events[barrier_count] = {}; /* use wait_event notion */
 
    std::map<PhysReg,wait_entry> gpr_map;