conformance: the argb8-targets cases whose blend rounds declare rotated-blend-rounding

5db3215260 ("Rotated blends: every blend not exact by construction announces its rounding")
made the translator raise PrecisionNote::RotatedBlendRounding for every blend on an attachment
held with its channels rotated (ARGB8Unorm) but a minimum or a maximum and one whose four
factors are all ZERO or ONE. The argb8-targets cases declared no such notice, so on lavapipe
the ten whose blend rounds (multiply, source-color, blend-alpha, straight, straight-alpha-one,
straight-red-green-alpha, premultiplied, additive-alpha, reverse-subtract-alpha and
subtract-one-minus-alpha) were divergent at case/notices with the notice undeclared, which the
ledger does not list (conf rc=1 in m3-max-62286 and earlier).

Each RotatedTarget now declares crate::replay::notice_allowance of the note's code where its
state rounds by the translator's rule (RotatedTarget::rounds: a blend whose colour operation is
not Min or Max and whose four factors are not all Zero or One), as the tessellation cases
declare their notices: the notices site alone, every texel still compared exactly, and the
unblended, red-alpha and max states declare nothing. Their texel sites keep their ledger rows.
This commit is contained in:
Anees Iqbal committed 2026-11-21 00:24:27 -08:00
1 parent 1cad2faaf4
commit bc7d76530f
1 file changed
+28
@@ -37,7 +37,9 @@
//! Nothing here can fault a GPU: single-sampled targets of the case's own extent, one full-screen
//! triangle a pass, no loop, and every fetch inside its buffer.
use crate::allowance::Allowance;
use crate::case::{call, made, Abort, Case, Input, MetalSource, Side};
use crate::degradation::Degradation;
use crate::recording::ShaderRef;
use crate::render::{
Blend, BlendColorChannels, ColorState, PassColor, Plane, ReadAt, RenderPass,
@@ -336,6 +338,22 @@ impl RotatedTarget {
fn target(format: PixelFormat) -> TargetSpec {
TargetSpec::read(format, [WIDTH, HEIGHT]).shared()
}
/// Whether the state's blend is not exact by construction on the rotated target, the
/// translator's rule for `PrecisionNote::RotatedBlendRounding`: a blend but a minimum or a
/// maximum of the colour, which takes no factor, and one whose four factors are all `Zero` or
/// `One`.
fn rounds(&self) -> bool {
use BlendFactor as F;
self.state
.blend
.is_some_and(|[(sr, dr, rgb), (sa, da, _)]| {
!matches!(rgb, BlendOperation::Min | BlendOperation::Max)
&& ![sr, dr, sa, da]
.iter()
.all(|f| matches!(f, F::Zero | F::One))
})
}
}
/// The buffers and library every format's leg shares, made once before either leg runs.
@@ -483,6 +501,16 @@ impl Case for RotatedTarget {
shader_refs(FILLS, &[VERTEX, FILL_FLOAT])
}
fn allowances(&self) -> Vec<Allowance> {
// A blend not exact by construction announces its rounding on the `ARGB8Unorm` target
// (`rotated-blend-rounding`). A declaration of the notices site alone: every texel
// compares exactly.
(self.rounds())
.then(|| crate::replay::notice_allowance(Degradation::RotatedBlendRounding.code()))
.into_iter()
.collect()
}
fn inputs(&self) -> Result<Vec<Input>, String> {
let mut inputs = fixture_inputs("fills", FILLS)?;
let colors = self.colors(PixelFormat::RGBA8Unorm);