Module: Mesa Branch: main Commit: 71813afa7ab318b1cab1b03279b8de1f26805c4b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=71813afa7ab318b1cab1b03279b8de1f26805c4b
Author: Faith Ekstrand <faith.ekstr...@collabora.com> Date: Mon Dec 4 08:57:00 2023 -0600 nak: Take num_barriers from RA Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26463> --- src/nouveau/compiler/nak_assign_regs.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nouveau/compiler/nak_assign_regs.rs b/src/nouveau/compiler/nak_assign_regs.rs index 9bda8a4cae4..4901dd9c204 100644 --- a/src/nouveau/compiler/nak_assign_regs.rs +++ b/src/nouveau/compiler/nak_assign_regs.rs @@ -1199,6 +1199,13 @@ impl Shader { self.info.num_gprs = total_gprs.try_into().unwrap(); + // We do a maximum here because nak_from_nir may set num_barriers to 1 + // in the case where there is an OpBar. + self.info.num_barriers = max( + self.info.num_barriers, + max_live[RegFile::Bar].try_into().unwrap(), + ); + let limit = PerRegFile::new_with(|file| { if file == RegFile::GPR { gpr_limit