Fragment: what only the storage forms read goes

What:
- coverage::finish no longer returns whether the function loops over its samples: its one reader,
  the snapshot plan of the interlocked storage forms, went with them.
- The extended-range planned blend's reads_second goes: its readers were the storage forms' fetch
  arms.

Why: lint m3-max-62859 at 9d9998df5d failed clippy with -D warnings on both (an unused variable,
lower/fragment/mod.rs:267, and a method never used, lower/arith/extended_range/blend.rs:987).

Verified: cargo fmt --all.
This commit is contained in:
Anees Iqbal committed 2026-11-21 04:39:18 -08:00
1 parent 15e0c18db3
commit b9fb893701
3 files changed
+4 -18

No files matched your search

@@ -982,20 +982,6 @@ impl Blend {
.flatten()
.any(|a| nodes(a).into_iter().any(reads_constant))
}
/// Whether the blend reads the second source (the function's index-1 output).
pub fn reads_second(&self) -> bool {
let second = |n: Node| {
matches!(
n,
Node::Atom(Atom::S1 | Atom::S1a) | Node::OneMinus(Atom::S1 | Atom::S1a)
)
};
[&self.color, &self.alpha]
.into_iter()
.flatten()
.any(|a| nodes(a).into_iter().any(second))
}
}
/// Whether `n` reads the blend color.
@@ -238,9 +238,9 @@ fn most_samples(limits: &crate::device::Limits) -> u32 {
/// derivative, implicit-LOD sample, quad or simdgroup operation, or barrier, refuses the loop. A
/// looping function is refused here; any other records in its interface how link treats it
/// (`StageIo::coverage_loop`).
pub(super) fn finish(cx: &mut SelectCx<'_>) -> Result<bool, Error> {
pub(super) fn finish(cx: &mut SelectCx<'_>) -> Result<(), Error> {
let Some(plan) = cx.families.fragment.coverage else {
return Ok(false);
return Ok(());
};
let late = if !cx.families.fragment.discards.is_empty() {
Some(CoverageLoopRefusal::Discard)
@@ -262,7 +262,7 @@ pub(super) fn finish(cx: &mut SelectCx<'_>) -> Result<bool, Error> {
(false, None) => CoverageLoop::Unlooped,
(false, Some(r)) => CoverageLoop::Refused(r),
};
Ok(plan.looped)
Ok(())
}
/// Declare the `Private u32` the loop hands each pass its sample index in.
@@ -264,7 +264,7 @@ pub fn finish(cx: &mut SelectCx<'_>, m: &mut Meter) -> Result<(), Error> {
if cx.stage == Stage::Fragment && counts_active_lanes(cx) {
cx.precision.insert(PrecisionNote::QuadsSplitByClipping);
}
let looped = coverage::finish(cx)?;
coverage::finish(cx)?;
let interlock = if rog::declared(cx) {
Some(rog::mode(cx)?)
} else {