Files
metal2vulkan/scripts/refusal-surface/reach.tsv
T
Anees Iqbal 20287666c0 Blend extended-range attachments in the device's arithmetic; drop the 32-bit float Metal blend
Rule 1 (owner, 10-29): where the device has a native form, it is the only form.
An extended-range attachment's raw codes are something no blend unit reads, so the
shader still blends it (capability), inside the pixel interlock or over lavapipe's
input attachment. Its arithmetic used to be Metal's compiler's: lerps, common
factors, fusing by factor rank, half rounding at every step, a separate float4
model and computed-output tables. Now it is a blend unit's arithmetic: S*Fs op D*Fd
in float, in the order of the blend equation, with the source, second source and
blend color clamped to the form's range first (`extended_range::blend::native`).
- computed.rs is deleted. blend_color.rs keeps only the two source ranges.
- input_blend.rs and fetch.rs call native().
- The blend color is pushed as raw f32 bits (HalfBlendColor), so
  PushField::BlendColor is gone.
- Every blended extended-range output that stores a channel now records
  ExtendedRangeBlendSource (half) or ExtendedRangeFloatBlendSource (float).
- The refusals ConstantColorDifference, SrgbForm and FloatOutput are gone, as is
  the fast-math DualSource refusal for extended range. Every factor, operation
  and mask is built; only outputs other than four half or float lanes are
  still refused (Output).

The 32-bit float storage-form blend (`Blend::float32`, `fetch::float32_blended`)
computed Metal's fused forms in float. Every committed profile except
roadmap-2022 and vk12-floor sets COLOR_ATTACHMENT_BLEND on R32/RG32/RGBA32_SFLOAT,
so that form copied Metal's bits where the device blends natively. It is removed:
- a fetched 32-bit float attachment takes the generic float blend
  (UnmeasuredFetchBlend);
- one that is not fetched gets the device's blend after the pass splits.
The float4-output paths of the half/unorm8 model (Atom::Sf, Arith::Kept,
round_inner, Blend::float/narrow/takes_float) were dead after this and are pruned.

Removed:
- the Metal blend-table validation lane (extended_range_blend_table.rs)
- devtools xr_blends
- the xr_blend_table*.txt fixtures
- lower/arith/tests/blend32.rs
- the extended_range tests that pinned Metal's forms

Added:
- every_blend_is_the_devices_arithmetic: every form, 19 factors, 5 operations,
  rotating masks and adversarial sources, bit-exact against a float model of
  S*Fs op D*Fd
- every_blend_is_built_but_a_placeholder

Docs:
- FAST-PATHS: the "Metal's rounding per shape" fast row is removed. The
  extended-range blend is now a device-gaps row with the two notes. The
  32-bit float row and the interlock section are fixed.
- artifact.rs note docs and the API.md catalogue are rewritten.
- REFUSALS is regenerated, reach.tsv updated and api_signatures blessed
  (removed ExtendedRangeBlend::{ConstantColorDifference, FloatOutput, SrgbForm},
  PushField::BlendColor).
- Conformance: the two notes join replay::NATIVE_NOTES, and 16 Apple M3 Max
  known-gaps rows hold the xr-blend add/premul sites the device's arithmetic
  moves: one code, two at the sRGB premultiplied sites.
- SEMANTICS_VERSION 1923, ARTIFACT_FORMAT_VERSION 479.

Size: a premultiplied half4 fill into RGB10A8_2P_XR10 on moltenvk-m3 goes from
3275 to 1937 SPIR-V words (the blend itself from 2133 to 795). The float4 fill
goes from 3435 to 1951 words, and BGRA10_XR_sRGB premultiplied from 7992 to 6654.

Verified:
- metal2vulkan lib, touched modules: 511/511.
- Sabotage: rounding the source to half in native() fails
  every_blend_is_the_devices_arithmetic; restored, it passes.
- clippy, plain and with --cfg m2v_gpu; rustdoc -D warnings.
- M3 Max conformance replay of 25 cases: half-output-blends-*,
  blend-interaction-format-float32 and xr-blend-*-one-zero are justified; the 16
  xr-blend add/premul sites are held by the new rows.
  The replay exits 0 with the ledger held exactly. The conformance crate
  passes 1007/1007, CONFORMANCE-COVERAGE is regenerated, and runtime
  degradation/catalogue and api_signatures/api_surface/refusal_surface pass.
- M3 device tests (memcap + maclock, --cfg m2v_gpu): 11/11 of
  runtime_lane::extended_range_blends and framebuffer_fetch::generic_blend.
  The renamed blends_of_half_outputs_into_extended_range_texels asserts
  Metal's bytes for one-zero and prints the 16 add/premul outputs the device's
  arithmetic moves.

One work packet, landed as 2 commits on archive/development-linear-2026-10-29: 808143ef80, then 18431ee908 (the re-pin).
2026-10-29 15:43:53 +02:00

20 KiB

1# Reach marks of docs/REFUSALS.md: section<TAB>variant<TAB>mark<TAB>why. Marks: system (a guest's
2# CoreAnimation, CoreImage or VideoToolbox plausibly reaches it), app (a typical Metal app from
3# public API), rare (specialized public API), none (no public API path). A judgment, kept by hand;
4# refusal_surface.py lists every variant that has none (--missing-reach).
5featureLibraryKindnonea metallib that is not an executable library, loaded as one
6featureStagenonea stage outside AIR's public stages
7featureAddressSpacenoneApple's AGX library address spaces
8featureModuleRecordnoneLLVM constructs AIR does not emit
9featureInstructionnoneLLVM instructions AIR does not emit
10featureTypenoneLLVM types AIR does not emit
11featureCallingConventionnoneLLVM calling conventions AIR does not use
12featureUnknownIntrinsicrareAIR from a newer compiler (macOS 27 AIR 2.9)
13featureAgxUnmodeledrareApple's own libraries' AGX intrinsics
14featureStaticInitializernoneLLVM initializers AIR does not emit
15featureRecursionrarerecursion through visible functions
16featureDynamicCallrarefunction pointers and function tables
17featureLinkingraredynamic libraries and linked functions
18featureSimdWidthappsimdgroup functions on a device whose subgroups cannot run 32 wide for the use
19featureLocalSizeappa threadgroup size past a smaller device's limit
20featureIrreducibleConvergentrareirreducible loops around barriers or simd operations
21featureComputeDerivativesWithSimdrarederivatives in a kernel
22featureComputeDerivativesrarederivatives in a kernel
23featureQuadOperationsappquad shuffles in kernels on devices without quad operations there
24featureSimdgroupMatrixraresimdgroup matrix kernels
25featureArgumentBufferPointersappargument buffers holding buffer pointers
26featureArgumentBufferTexturesappargument buffers holding textures and samplers (bindless)
27featureArgumentBufferObjectsrarepipeline states and ICBs in argument buffers
28featureDereferenceLoadedPointerapppointers loaded from argument buffers
29featurePointerToIntegerrarepointer to integer casts
30featurePointerComparerarecomparing pointers of different roots
31featureHandleAsPointerrareresource handles used as byte pointers
32featureConstantGlobalEscapingrarea constant global whose address escapes
33featureThreadgroupMemorySizerarethreadgroup memory past a smaller device's limit
34featureCoherentMemoryrarecoherent(device) accesses
35featureInt64Atomicsrare64-bit atomics
36featureImageAtomicsraretexture atomics beyond 32-bit integers
37featureDescriptorCountappmany textures or buffers in one stage on a smaller device
38featureBufferRangeappa buffer window past a device's descriptor range
39featureInt64Arithmeticrare64-bit integers on a device without shaderInt64
40featureFloat64Arithmeticraredoubles (MSL has none outside Apple's own code)
41featureFormatsystempixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them)
42featureDivergentImplicitLodappimplicit-LOD sampling through a dynamically chosen texture
43featureImplicitLodOutsideFragmentrareimplicit-LOD sampling outside fragment functions
44featureMinLodClampraremin_lod_clamp on a device without shaderResourceMinLod
45featureTexelOffsetapptexel offsets a device cannot apply
46featureGatherExtendedraregathers with dynamic offsets or components
47featureStorageImageMultisamplerarewritable multisampled textures
48featureStorageTextureInVertexStagerarewritable textures in vertex functions
49featureCubeArrayrarecube arrays on a device without imageCubeArray
50featureSamplerAnisotropyappanisotropic samplers an argument buffer lists, on a device without samplerAnisotropy
51featureSamplerBorderColorappborder colors a device cannot express
52featureSamplerLodBiasappconstexpr samplers with an LOD bias
53featureSamplerCompareappcompare samplers a device cannot apply to the image
54featurePixelSamplerComparenoneApple's compiler rejects it
55featureTexelBufferapptexture buffers past a device's texel-buffer limits
56featureRasterOrderGroupsrareraster order groups
57featureFramebufferFetchsystemprogrammable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots)
58featurePrimitiveIdrareprimitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function
59featurePrivatePrimitivesrarea private primitive type drawn in the pulled list form (a vertex function that writes memory or the primitive_id varying, a vertex start past 2^31) on a device without device addresses
60featureVertexAmplificationrarevertex amplification
61featureLayeredRenderingrarelayered rendering on a device without its features
62featureClipDistancerareclip distances on a device without them
63featureDualSourceBlendingraredual-source blending on a device without it
64featureBarycentricsrarebarycentric coordinates
65featureStencilExportrarestencil from the shader
66featureSampleRateShadingrareper-sample shading
67featureSamplePositionsrarecustom sample positions on a device that takes none at the pass's sample count
68featurePixelCoverageAtSampleRaterarecoverage read at sample rate
69featureInterfaceComponentsraretoo many varyings or attachments for a device
70featureUnmatchedVaryingnonea Metal link error
71featureKernelStageInrarekernel stage-in combinations Metal leaves unestablished
72featureTessellationraretessellation
73featureMeshShadingraremesh pipelines
74featureTileShadingraretile shaders (Apple GPU families)
75featureImageblocksrareimageblocks (Apple GPU families)
76featureRayTracingrareray tracing (out of scope by ruling)
77featureTensorsrareshader tensors
78featureRasterizationRateMaprarerasterization rate maps
79featureGpuEncodedIndirectCommandsrareindirect command buffers encoded by a kernel
80featureVulkanVersionnonea device below Vulkan 1.2
81featureConstantnoneLLVM constant forms AIR does not emit
82featureAttributenoneLLVM ABI attributes AIR does not use
83featureBitcodeRecordnonebitcode records AIR does not emit
84featureSyncScopenonesynchronization scopes AIR does not use
85featureSubgroupOperationsappsimdgroup functions in a stage a device's subgroups do not support
86featureDirectCallrarevariadic or byval calls the inliner cannot take
87featureWideSwitchLiteralrare64-bit switch literals
88featureLoweringsystemthe catch-all of lowering families not landed: any shader can meet one
89featureSamplerAddressModeappmirror-clamp-to-edge on a device without it
90featureAlphaToOnerarealphaToOneEnabled on a device without alphaToOne
91featureStageStoresAndAtomicsappstores or atomics in vertex or fragment functions on a device without the feature
92featureFunctionConstantArgumentrarea function-constant-removed argument read
93featureSamplerBicubicFiltersystembicubic filtering forms Metal does not establish; macOS 26.6.2 makes a runtime sampler with MTLSamplerMinMagFilterCubic (the consumer's boots), whose mip-filtered form is refused
94featureGroupCountraremore threadgroups than a device dispatches, past the binder's split
95featureIntersectionFunctionTablerareray tracing (out of scope by ruling)
96featureIndependentBlendingrareper-attachment blending on a device without independentBlend
97featureRasterSampleCountappa sample count a device lacks for the attachments
98featureTriangleFillLinesappwireframe on a device without fillModeNonSolid
99featureDepthClipClampappdepth clamp on a device without depthClamp
100featureDepthBiasClampappdepth bias clamp on a device without depthBiasClamp
101featureConstantAlphaBlendFactorappblend-alpha factors on a portability-subset device without them
102featureSparseTextureraresparse residency reads
103featureTextureSizeappa texture past a device's image limits
104featureTextureSampleCountappa sample count a device lacks for the texture
105featureTextureViewappa texture view Vulkan cannot make exactly
106featureTextureSwizzleapptexture swizzles whose Metal behaviour is unmeasured
107featureMipmapGenerationappgenerateMipmapsForTexture: of a format or chain neither the device's blits nor the compute filter can run
108featureHostMemorysystemnewBufferWithBytesNoCopy: where the device cannot import the memory
109featureGpuTimesrareGPU times on a queue without timestamps
110featureCountingVisibilityrarecounting occlusion queries on a device without precise queries
111featureViewFormatReinterpretationappa view of another component layout on a portability subset (MoltenVK)
112featureSeparateMultisampledDepthStencilrareseparate multisampled depth and stencil textures
113featurePixelCoveragerarecoverage reads at pixel rate in a multisampled pipeline
114featurePostDepthCoveragerarethe coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage
115featureCentroidVaryingrarecentroid varyings in a multisampled pipeline
116featurePrivateMemoryrarevery large per-thread arrays
117featureSparseTexturesraresparse heaps on a device without sparse images
118featureTimelineSemaphoresnonea device below the runtime's floor
119featureReflectionrarereflection of argument kinds Metal's answer is unmeasured for
120featureHeapTextureTilingapptextures in Shared heaps on a device whose optimal images take no host memory
121featureViewportDepthRangerareviewport depth outside [0, 1]
122featureUndeclaredTextureUsageappa shader write to a texture made without ShaderWrite, which plain Metal runs
123featureRenderTargetSizerarea render area past a device's framebuffer limits
124featureIndirectRenderStaterarerender state set by a kernel on an indirect command
125featureGlobalBuiltinInFragmentrareMetal 3.1 global built-ins in fragment functions
126gapTexturesraretexture forms the runtime has not built (texture buffers of some forms, X24Stencil8 views)
127gapResourceHeaprarethe resource-ID heap's remaining forms
128gapSparseHeapsraresparse heaps
129gapSparseTileMapsraresparse texture emulation's unbuilt pieces
130gapHeapPastMaxBufferSizerarea heap past maxBufferSize
131gapRotatedTexturerarea rotated drawable's views, rows past its buffer
132gapHeapTextureAlignmentrarea heap texture needing more than 256 KiB alignment
133gapHeapTextureMemoryappa heap texture the heap's memory type does not take
134gapFunctionTablePastMaxBufferLengthnonea function table past one buffer
135gapIndirectCommandBufferPastMaxBufferLengthnonean ICB past one buffer
136gapIndirectRenderCommandsrareindirect render commands' remaining pieces
137gapIndirectImageblockSizenonean imageblock side past 65535
138gapCommandReplayrarethe device replay of indirect command buffers
139gapRenderAttachmentsrarerender attachment forms not built
140gapAccelerationStructuresrareray tracing (out of scope by ruling)
141gapFeatureEnablenonedevice creation with a feature the runtime's chain lacks
142gapExtensionEnablenonedevice creation with an extension under an unknown name
143gapRendersystemrender pass, resolve and attachment forms not built (20 sites: see the appendix)
144gapTexelsPastBufferLengthrarea texture over a buffer past its length
145gapOverlappingSurfaceRowsrarean IOSurface plane whose rows overlap
146gapMemorylessSurfacePlanerarea memoryless texture over an IOSurface plane
147gapIndirectCommandPastSizenonean indirect command at or past the buffer's size
148gapExecutionRangePastBufferrarean execution range whose 8 bytes run past its buffer
149gapExecutionRangeOffFourrarean execution range at an offset off 4 bytes
150gapIndirectCommandUnstridedBufferrarean executed indirect command's buffer bound without the attribute stride the dynamic layout of its pipeline reads, where the pipeline's descriptor turned `support_dynamic_attribute_stride` on (with it off there is no stride word, and the runtime answers the bind at stride 0 as Metal does)
151gapSamplePositionsAtBeginrarecustom sample positions Vulkan takes only at begin
152gapSharedEventAcrossDevicesrarea shared event opened on another device
153gapViewportDepthRangerareviewport depth outside [0, 1] without the device features
154gapNonFiniteDepthBiasrareNaN or infinite depth bias
155gapDepthNeverWithoutAttachmentraredepth compare Never with no depth attachment
156gapHiddenDepthStencilappa depth-stencil state using depth or stencil the pass lacks
157gapIndirectDrawArgumentsrareindirect draws whose arguments the CPU must read
158gapDepthStencilResolveraredepth/stencil resolve modes a device lacks
159gapTileAtSampleCountnonetile memory at a sample count Apple's GPUs lack
160gapImageblockMastersrareimageblocks of mixed sizes in one pass
161gapTileAndFragmentImageblocksrareexplicit imageblocks shared by tile and fragment functions
162gapMetal4ApiappMetal 4 (the API is missing: METAL-COVERAGE.md)
163gapCounterSampleBuffersappGPU counters and timestamps by sample buffer (missing API)
164gapResidencySetsappresidency sets (missing API)
165gapTextureAccessCountersraresparse texture access counters
166gapIoCommandQueuesrarefast resource loading (missing API)
167gapTextureViewPoolsraretexture view pools (missing API)
168gapColorAttachmentMappingrarecolor attachment mapping (missing API)
169gapLossyTextureCompressionrarelossy texture compression
170gapShaderValidationrareper-pipeline shader validation
171gapShaderLoggingrareshader os_log
172gapDeviceNotificationsraredevice hotplug notifications (deprecated)
173gapRateMapRegionsraredraws in rate-mapped passes the region path does not draw
174gapLayeredPassrarelayered passes needing a per-layer color resolve
175gapOverlappingTextureCopiesrareoverlapping texture copies (Metal races)
176gapEmptyFillPatternnonea fill of no pattern bytes through the Apple-private fillTexture:...:bytes:length:
177gapRebindTexturesnonea runtime extension's rebind with a live texture
178gapDetachTexturesnonea runtime extension's detach with a texture no stand-in presents exactly
179gapDetachedTexelAccessnoneCPU texel access while a runtime extension detached the bytes
180gapTextureBufferLevelsrarea texture buffer of more than one level (public, unusual)
181gapWriteSwizzlenoneApple-private writeSwizzleEnabled with a swizzle that writes
182gapPvrtcBlockOrderrarePVRTC regions off whole levels
183gapDecodedHeapTextureappan ASTC texture in a heap on a device without ASTC
184gapVertexFetchPast4GiBrarevertex fetch past 4 GiB of a bind offset
185gapStageInFetchPast4GiBrarestage-in fetch past 4 GiB of a bind offset
186appleProtectedContentnoneApple-private (no public header)
187appleLineWidthnoneApple-private (no public header)
188appleViewportTransformDisablednoneApple-private (no public header)
189appleVertexAmplificationModenoneApple-private (no public header)
190appleDepthClearednoneApple-private (no public header)
191appleStencilClearednoneApple-private (no public header)
192appleSurfaceClientDirectionnonean IOSurface key in no public header
193bindDescriptorRangeExceededappa buffer window past a device's descriptor range
194bindTexelBufferTooLargerarea texture buffer past maxTexelBufferElements
195bindHeapTooLargeraremore resident textures than the pipeline's heap holds (bindless at scale)
196bindTessellationFactorRangeraretessellation factors past one storage descriptor
197bindPatchIndexRangerarepatch indices past one storage descriptor
198bindControlPointIndexRangerarecontrol-point indices past one storage descriptor
199bindMissingStageInRegionnonea stage-in region never set, which Metal leaves undefined
200bindUniformViewAliasedrareProfile F's uniform-view fallback aliased by a write
201bindMissingDeviceAddressrarea slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses
202limitInlinedInstructionsrarevery large shaders after inlining
203limitOutputBlocksrarevery large control flow
204limitIrreducibleDepthnonedeeply nested irreducible loops
205limitSpirvWordsrarevery large output modules
206limitWorkUnitsrarevery large shaders
207limitLedgerBytesrarevery large shaders
208limitTypeCountnonea type table past the cap
209limitMetadataNodesnonemetadata past the cap
210limitBitstreamNestingnonemalformed nesting
211limitInstructionCountrarevery large modules
212limitLayoutNestingnoneargument-buffer layouts nested past the cap
213limitConstructNestingnonecontrol flow nested past the cap
214limitPrivateArenaBytesnonea private arena past 4 GiB
215limitCallStackBytesraredeep visible-function call stacks
216gapMappedTextureSamplingnonea runtime extension's texture (address_mode_map) sampled where the runtime cannot map it; no Metal API path
217ratemapScreenExtentrarea rate map whose screen is past 16384 a side
218ratemapLayerCountnonea rate map of more than two layers, which Apple's compile crashes on
219ratemapDenseSamplesrarea rate map axis with more quality samples than screen pixels
220ratemapSampleOutOfRangerarea rate map quality sample outside [0, 1] among others
221ratemapSampleCountrarea rate map axis of more distinct samples than measured (9 on one layer, 4 on two)
222budgetTimenonea translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds)
223gapLibrarySourceappa library compiled from Metal source (newLibraryWithSource:); the runtime takes metallibs and AIR
224gapRestartedStripnonea strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws
225gapProvokingVertexnonea draw after the Apple-private setProvokingVertexMode: 1, on a device without the last provoking vertex, whose rotated list cannot draw as Metal draws
226gapPrivatePrimitivesnonea draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote
227gapPrimitiveIdIndicesrarean indexed draw of a primitive_id pipeline, on a device without geometry or tessellation shaders, whose indices the encoder wrote since its last barrier
228featurePrivateRenderStatenoneApple-private pipeline fields of OpenGL on Metal (no public header)
229gapSurfaceDepthStencilrarea blit of the stencil of a Depth32Float_Stencil8 texture over a plane of an IOSurface with planes, or a pass on an X32_Stencil8 one's view as Depth32Float_Stencil8
230featureExtendedRangeBlendsysteman extended-range (XR10) attachment blended from an output other than four half or float lanes; a 16-bit float attachment's storage-form blend of a second-source factor or a one-color-channel mask under fast math; the consumer's guests blend RGB10A8_2P_XR10 attachments
231featureCommandPredicationnoneApple-private command predication on a device without buffer device addresses
232featureProgramScopeBindingappMSL 3.2 program-scope buffer bindings (macOS 15 and later)
233featureSeqCstFencerarea seq_cst fence in a vertex or fragment stage without its stores and atomics
234gapMultisampledBufferCopyrarea buffer<->multisampled-texture copy on a device without sample-rate shading, an integer multisample attachment at the count, or the copy format's storage; and, where maintenance8's depth/colour copies are missing or wrong, what the sample-rate draws cannot move: a 16-bit depth on a driver whose codes the fragment-depth draw is not measured to keep, or a depth or stencil texture they cannot sample or render to (emulated elsewhere; the consumer's Maps pans and screensaver make the copy)
235gapMultisampledBufferLayoutrarea buffer<->multisampled-texture copy at a bytesPerRow of 0 from an offset that is a multiple of 16, or of pixels of 32 bytes or more at a pitch below a row or off the pixel: Metal copies these by rules not yet reduced, and its API validation rejects them
236gapColorAttachmentGroupsappin a render pass of more color attachments than the device draws at once (five or more on a device of four), or one at an index past them: a pipeline state of other colors, a tile state, an execution of render commands, a draw reading another group's attachment