From fc8809d849e2e5b72f3e89c2d12cd4eafa61ea44 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 3 Dec 2026 15:01:41 -0800 Subject: [PATCH] Translator: the identity domains push the depth range fold's field A render pipeline of a vertex function under the depth range fold was refused under the identity domains: "unsupported: IdentityDomains (an encoder value the function reads as DepthRangeFold)". That is the runtime's every device: the first draw through a twin on an RTX 3090, job m3-max-85794. identity_refusal (lower/select.rs) names each push field the identity domains push, and PushField::DepthRangeFold was not in it. The runtime does push it: draws() maps it to FieldValue::DepthRangeFold, and fill_push writes the first viewport's [znear, zfar - znear]. The field joins the list, and identity_admits' doc names it beside ViewportCount. No encoding changes: the fold's variant was refused before and is made now. The versions stay at the fold's placeholders (SEMANTICS_VERSION 2368, ARTIFACT_FORMAT_VERSION 609). The runtime-sources pin does not move, because lower/select.rs is not one of its inputs (pin-compute). Verified: the READY gives the job lines (the commit before red, here green). --- crates/metal2vulkan/src/lower/select.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan/src/lower/select.rs b/crates/metal2vulkan/src/lower/select.rs index 0118f23d9..d86305d9b 100644 --- a/crates/metal2vulkan/src/lower/select.rs +++ b/crates/metal2vulkan/src/lower/select.rs @@ -1733,7 +1733,9 @@ fn identity_unsourced(f: &RuntimeFact) -> bool { /// (`PushField::RenderTargetArrayLength`); the address of the runtime's memory that holds a /// kernel's private arena past the floor (`PushField::PrivateArenaAddress`); the draw's viewport /// count, at or past which a vertex function that writes `[[viewport_array_index]]` stores -/// `ViewportIndex` 0 (`PushField::ViewportCount`); and a vertex function's indirect command buffer +/// `ViewportIndex` 0 (`PushField::ViewportCount`); the draw's viewport depth range, which a +/// vertex function under the depth range fold folds into its position +/// (`PushField::DepthRangeFold`); and a vertex function's indirect command buffer /// execution range and command (`PushField::IndirectRange`, `PushField::IndirectSequence`, /// `PushField::IndirectBase`). Its /// fields past the push window are a parameter block, whose address the window holds. Its refusal @@ -1776,11 +1778,11 @@ fn identity_pushes(field: PushField, loc: PushLoc, views: bool) -> bool { | PushField::RenderTargetArrayLength | PushField::PrivateArenaAddress | PushField::ViewportCount + | PushField::DepthRangeFold | PushField::IndirectRange | PushField::IndirectSequence | PushField::IndirectBase => true, - PushField::DepthRangeFold - | PushField::RootTableAddress + PushField::RootTableAddress | PushField::CaptureIndexAddress | PushField::MergedDrawAddress | PushField::AmplificationId