nak: rewrite repeat().take() into repeat_n()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
Eric Engestrom 2025-10-04 16:24:40 +02:00
parent f571428274
commit e0c5b40561

View file

@ -3261,7 +3261,7 @@ impl<'a> ShaderFromNir<'a> {
// for 32-bit we have 2x32 return type, // for 32-bit we have 2x32 return type,
// for 64-bit we need 2x64, so is_locked must be a 64-bit val. // for 64-bit we need 2x64, so is_locked must be a 64-bit val.
// we can fill the remaining SSAValue with a copy of is_locked // we can fill the remaining SSAValue with a copy of is_locked
let locked_dst = std::iter::repeat(locked_gpr).take(dst.len()); let locked_dst = std::iter::repeat_n(locked_gpr, dst.len());
let nir_dst: Vec<_> = let nir_dst: Vec<_> =
dst.iter().copied().chain(locked_dst).collect(); dst.iter().copied().chain(locked_dst).collect();
self.set_ssa(intrin.def.as_def(), nir_dst); self.set_ssa(intrin.def.as_def(), nir_dst);