Fix forward of 60926: the old render key at SEMANTICS 2225, and the second source's XR blends refused

- pipeline::compile::tests::the_old_render_descriptor_key_keeps_its_value: the key 60926 printed
  (left) at SEMANTICS 2225, 45541a82c360366c...; it was f65d353b285b1571... at 2224.
- engine_fragment::a_second_source_blend_without_fast_math_reads_the_second_output: its last loop
  blended each of the six extended-range formats (raw 550 to 555) premultiplied over and expected
  the pipeline made. A blend into one of Apple's extended-range forms is refused now (the refusal
  commit before), so the blended half expects NotImplemented(Format); the unblended half is made as
  before, with no dual-source output. The test's doc says so.

Test only; the runtime pin stays.

Verified: m3-max-60926 (msi, at d69740f5ce) showed both failures and nothing else: fmt, clippy
and Rustdoc green; tests 4401 run, 4399 passed, these 2 failed, 20 skipped. The next check is
named in the report.
This commit is contained in:
Anees Iqbal committed 2026-11-20 17:26:22 -08:00
1 parent d7de71c58d
commit 2f5cf2374e
2 files changed
+19 -9

No files matched your search

@@ -1262,7 +1262,7 @@ fn the_old_render_descriptor_key_keeps_its_value() {
let key = device("moltenvk-m3").render_descriptor_key(&d);
let hex: String = key.digest().iter().map(|b| format!("{b:02x}")).collect();
assert_eq!(
hex, "f65d353b285b15718f52e7a7e654de45d332f5a68c80627b84b362830cdbfbb9",
hex, "45541a82c360366ccef8505eb2a6518780c2227f3c13e871bb31b1bec30bd784",
"the old runtime's key of the descriptor"
);
}
@@ -2186,10 +2186,10 @@ fn a_premultiplied_blend_into_a_padded_attachment_is_computed_in_the_shader() {
/// it is made too, the second output stored nowhere. Under fast math the same pipeline is made too;
/// the blend of a function that writes no second output is refused as Metal refuses its pipeline,
/// `InvalidDescriptor(ColorAttachment)`.
/// Into each of the six extended-range formats, unblended (the raw texel through the interface) or
/// blended premultiplied over (the storage form's blend, which reads no second source), with and
/// without fast math, the function's two outputs make the pipeline, the second stored nowhere: no
/// dual-source output.
/// Into each of the six extended-range formats unblended (the raw texel through the interface), with
/// and without fast math, the function's two outputs make the pipeline, the second stored nowhere:
/// no dual-source output. Blended premultiplied over, which reads no second source, each is refused
/// `NotImplemented(Format)`, as every blend into one of Apple's extended-range forms is.
#[test]
fn a_second_source_blend_without_fast_math_reads_the_second_output() {
use crate::metal::format::ExtendedRange;
@@ -2325,7 +2325,8 @@ fn a_second_source_blend_without_fast_math_reads_the_second_output() {
})) => {}
r => panic!("{stem}: no second output: {:?}", r.map(|_| ())),
}
// A second output no blend reads, into each extended-range format: stored nowhere.
// A second output no blend reads, into each extended-range format: stored nowhere where
// the attachment is unblended; a blend into one is refused (`blended_pipelines`).
for raw in 550..=555u32 {
let pf = PixelFormat::try_from(raw).expect("format");
for (bc, math) in [(&safe, "safe"), (&fast, "fast")] {
@@ -2344,9 +2345,18 @@ fn a_second_source_blend_without_fast_math_reads_the_second_output() {
)));
d.color_attachments[0] = Some(color);
let what = format!("{stem}: {pf:?} {math} blended {blending}");
let pipe = dev
.compile_render_pipeline(&d, &Budget::standard())
.unwrap_or_else(|e| panic!("{what}: {e}"));
let made = dev.compile_render_pipeline(&d, &Budget::standard());
if blending {
match made {
Err(Error::Unsupported(u)) => {
assert_eq!(u.feature, Feature::Format, "{what}: {u:?}");
assert_eq!(u.needs, Needs::NotImplemented, "{what}: {u:?}");
}
r => panic!("{what}: {:?}", r.map(|_| ())),
}
continue;
}
let pipe = made.unwrap_or_else(|e| panic!("{what}: {e}"));
assert!(
!pipe
.requirements