diff --git a/crates/metal2vulkan/src/lower/arith/extended_range.rs b/crates/metal2vulkan/src/lower/arith/extended_range.rs index 34c166ae7..e2b3ca524 100644 --- a/crates/metal2vulkan/src/lower/arith/extended_range.rs +++ b/crates/metal2vulkan/src/lower/arith/extended_range.rs @@ -198,7 +198,10 @@ pub fn decode( /// `BGRA10_XR_sRGB`'s are clamped to 1022 and decoded ([`decode`]), `BGR10_XR_sRGB`'s and the /// two-plane twin's decoded and then clamped to the linear values of codes 0 and 1022, /// `[-384 / 510, 638 / 510]`; a padded form's every code is decoded as it is (code 1023 is one); -/// each lane is the device's narrowing of that value to `half`. Alpha is [`decode`]'s. +/// each lane is the device's narrowing of that value to `half`. Alpha is [`decode`]'s. A padded +/// form's fetch reads so on Metal: each loaded code's value rounded to `half`, a `float` input's +/// too, an sRGB twin's colour through Metal's table (every code of each padded form on the M3 Max +/// under macOS 27.0.1, `probes/padded_fetch.m` of the conformance crate). pub fn tile_value(fb: &mut FunctionBuilder<'_>, form: ExtendedRange, raw: Value) -> BResult { let c = codes(fb, form, raw)?; if form.padded() { diff --git a/crates/metal2vulkan/src/lower/fragment/color.rs b/crates/metal2vulkan/src/lower/fragment/color.rs index de37fb188..c401d5c1c 100644 --- a/crates/metal2vulkan/src/lower/fragment/color.rs +++ b/crates/metal2vulkan/src/lower/fragment/color.rs @@ -224,12 +224,6 @@ pub(super) fn select_param(cx: &mut SelectCx<'_>, b: &ParamBinding) -> Result, c: ColorInput) -> Result<(), Er let refused = Unsupported::not_implemented(Feature::Format); return Err(refused.at_attachment(Attachment::Color(c.color)).into()); } - // What a fetch reads of a padded 10-bit attachment's tile is not measured (its blend's - // destination is, [`blended`]). - if sc.view.extended.is_some_and(ExtendedRange::padded) { - let refused = Unsupported::not_implemented(Feature::FramebufferFetch); - return Err(refused.at_attachment(Attachment::Color(c.color)).into()); - } class_of(c.form, sc.view.read_class(), c.color, false)?; - // An extended-range texel converts by the device's arithmetic. + // An extended-range or padded 10-bit texel converts by the device's arithmetic, its read the + // tile value of its codes ([`value`]). After a clear or an earlier draw of the pass Metal's + // tile holds their `half`, which the codes do not keep: the runtime announces + // `extended-range-blends-stored-codes` there. if let Some(e) = sc.view.extended { cx.families.arith.converts(e); }