From 0cb6437f4f56bb995321aa91b7fe197dd5bce746 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 4 Apr 2023 15:58:27 +0200 Subject: [PATCH] r600/sfn: fix container allocators This fixes leaks in TexInstr and in Shader. Thanks to Patrick Lerda for pointing out the bug. Fixes: 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6 r600/sfn: rewrite NIR backend Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_instr_tex.h | 2 +- src/gallium/drivers/r600/sfn/sfn_shader.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_tex.h b/src/gallium/drivers/r600/sfn/sfn_instr_tex.h index 777e0383212..9c97537d704 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instr_tex.h +++ b/src/gallium/drivers/r600/sfn/sfn_instr_tex.h @@ -198,7 +198,7 @@ private: unsigned m_resource_id; static const std::map s_opcode_map; - std::list m_prepare_instr; + std::list> m_prepare_instr; }; bool diff --git a/src/gallium/drivers/r600/sfn/sfn_shader.h b/src/gallium/drivers/r600/sfn/sfn_shader.h index 326315568c7..6197a4112a0 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader.h +++ b/src/gallium/drivers/r600/sfn/sfn_shader.h @@ -340,12 +340,14 @@ private: uint32_t m_indirect_files{0}; std::bitset m_flags; uint32_t nhwatomic_ranges{0}; - std::vector m_atomics; + std::vector> m_atomics; uint32_t m_nhwatomic{0}; uint32_t m_atomic_base{0}; uint32_t m_next_hwatomic_loc{0}; - std::unordered_map m_atomic_base_map; + std::unordered_map, std::equal_to, + Allocator>> m_atomic_base_map; uint32_t m_atomic_file_count{0}; PRegister m_atomic_update{nullptr}; PRegister m_rat_return_address{nullptr};