Files
metal2vulkan/scripts/refusal-surface/reach.tsv
T
Anees Iqbal 255f758265 Pipeline: behind the agx flag a wider fragment input reads its vertex output's lanes, then zeros
The planner's ruling for the wide case of agx.allow_mismatched_component_counts: Metal
makes a render pipeline whose fragment function reads a varying at more components
than its flagged vertex function writes, and leaves the lanes past the output's
undefined (M3 Max, macOS 27.0.1, job m3-max-87586: 150 such lanes read 147 distinct
values, none written). One form on every device, decided at pipeline make by structure:

- LoweringInputs::widened_varyings (new public field, serde default): the user varyings
  a flagged vertex function writes at fewer lanes than the pipeline's fragment function
  reads, with the count it reads, of the same AIR scalar type. compile_render_pipeline
  and render_variant_key derive it from the two Function stages' specialized entries
  (compile.rs widened_varyings: return-struct field types against fragment-input
  parameter types), only where the vertex entry carries the flag; a Compiled stage on
  either side gives none. render_pipeline compiles the vertex stage, and only where its
  StageIo carries the flag and the set is not empty compiles it again under the set;
  render_variant_key hands it to the vertex inputs, so a runtime's stage-by-stage
  compile under the keys widens too, and the pipeline key matches.
- Planning declares such an output at the read count (StageIo outputs list it so, so
  link matches equal types) and marks its object in StageIoPlan::widened; store writes
  the value's lanes then a constant 0 per extra lane (OpCompositeConstruct). Colour
  outputs, whose declared components may differ from their form for other reasons, are
  never marked.
- The key appends the set only when set: every other function keeps its key.
- Link is unchanged: a wider input behind a vertex function compiled alone stays
  Unsupported{UnmatchedVarying, NotImplemented}, as does a mesh producer; flag 0 or
  absent stays Metal's link error.

Docs: docs/API.md accepted differences gains the line (Metal undefined, we give zeros;
no precision note, per the ruling); the UnmatchedVarying, StageIo and link docs say
where the gap now remains; reach.tsv's line likewise; REFUSALS.md regenerated; the API
signature table blessed (LoweringInputs.widened_varyings); the inputs-encoding and serde
round-trip tests cover the field. SEMANTICS_VERSION stays at 2394 (the narrow
form's bump).

Tests: the red tests of 3f0fa825f4 (jobs m3-max-87655 lavapipe + translator, m3-max-87661
RTX 5080) go green in the jobs named in the READY message.
2026-12-04 21:23:45 -08:00

140 lines
11 KiB
Plaintext

# Reach marks of docs/REFUSALS.md: section<TAB>variant<TAB>mark<TAB>why. Marks: system (a guest's
# CoreAnimation, CoreImage or VideoToolbox plausibly reaches it), app (a typical Metal app from
# public API), rare (specialized public API), none (no public API path). A judgment, kept by hand;
# refusal_surface.py lists every variant that has none (--missing-reach).
feature LibraryKind none a metallib file type Apple's toolchain is not seen to write
feature Stage none a stage outside AIR's public stages
feature AddressSpace none Apple's AGX library address spaces
feature ModuleRecord none LLVM constructs AIR does not emit
feature Instruction none LLVM instructions AIR does not emit
feature Type none LLVM types AIR does not emit
feature CallingConvention none LLVM calling conventions AIR does not use
feature UnknownIntrinsic rare AIR from a newer compiler (macOS 27 AIR 2.9)
feature AgxUnmodeled rare Apple's own libraries' AGX intrinsics
feature StaticInitializer none LLVM initializers AIR does not emit
feature Recursion rare recursion through visible functions
feature DynamicCall rare function pointers and function tables
feature InlineAsm none inline assembly other than the empty asm("") decode drops, which MSL refuses to compile
feature Linking rare dynamic libraries and linked functions
feature SimdWidth app simdgroup functions on a device whose subgroups cannot run 32 wide for the use
feature PartialThreadgroups app a dispatchThreads grid that is not whole threadgroups, of a kernel whose partial-threadgroups variant cannot be made
feature IrreducibleConvergent rare irreducible loops around barriers or simd operations
feature ComputeDerivativesWithSimd rare derivatives in a kernel
feature ComputeDerivatives rare derivatives in a kernel
feature QuadOperations app quad shuffles in kernels on devices without quad operations there
feature SimdgroupMatrix rare simdgroup matrix kernels
feature SimdgroupMatrix16x16x16 rare 16x16x16 simdgroup matrix products (Metal: Apple10 GPUs and later)
feature ArgumentBufferTextures app argument buffers holding textures and samplers (bindless)
feature ArgumentBufferObjects rare pipeline states and ICBs in argument buffers
feature DereferenceLoadedPointer app pointers loaded from argument buffers
feature HandleAsPointer rare resource handles used as byte pointers
feature ConstantGlobalEscaping rare a constant global whose address escapes
feature ThreadgroupMemorySize rare threadgroup memory past a smaller device's limit
feature ZeroedThreadgroupMemory rare threadgroup memory on a device without shaderZeroInitializeWorkgroupMemory, which Vulkan 1.3 requires
feature CoherentMemory rare coherent(device) accesses
feature Int64Atomics rare 64-bit atomics
feature ImageAtomics rare texture atomics beyond 32-bit integers
feature DescriptorCount app many textures or buffers in one stage on a smaller device
feature Float64Arithmetic rare doubles (MSL has none outside Apple's own code)
feature Format system pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them)
feature DivergentImplicitLod app implicit-LOD sampling through a dynamically chosen texture
feature ImplicitLodOutsideFragment rare implicit-LOD sampling outside fragment functions
feature MinLodClamp rare min_lod_clamp on a device without shaderResourceMinLod
feature TexelOffset app texel offsets a device cannot apply
feature GatherExtended rare gathers with dynamic offsets or components
feature StorageImageMultisample rare writable multisampled textures
feature StorageTextureInVertexStage rare writable textures in vertex functions
feature CubeArray rare cube arrays on a device without imageCubeArray
feature SamplerAnisotropy app anisotropic samplers on a device without samplerAnisotropy
feature SamplerBorderColor app border colors a device cannot express
feature SamplerLodBias app constexpr samplers with an LOD bias
feature SamplerCompare app compare samplers a device cannot apply to the image
feature PixelSamplerCompare none Apple's compiler rejects it
feature RasterOrderGroups rare raster order groups
feature FramebufferFetch system programmable 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)
feature PrimitiveId rare primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function
feature PrivatePrimitives rare a 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
feature VertexAmplification rare vertex amplification
feature LayeredRendering rare layered rendering on a device without its features
feature ClipDistance rare clip distances on a device without them
feature DualSourceBlending rare dual-source blending on a device without it
feature Barycentrics rare barycentric coordinates
feature StencilExport rare stencil from the shader
feature SampleRateShading rare per-sample shading
feature PullModelInterpolation rare interpolant inputs read at the centroid, a sample or an offset
feature DivergentInterpolation rare an interpolant read at a sample or an offset in a branch, a loop or after a discard
feature PixelCoverageAtSampleRate rare coverage read at sample rate
feature InterfaceComponents rare too many varyings or attachments for a device
feature UnmatchedVarying rare a varying read wider than written behind a vertex function compiled alone, or at another component count behind a mesh function, under agx.allow_mismatched_component_counts as 1 (seen in modules Apple's Metal shader converter wrote); otherwise a Metal link error
feature VertexStepRate app instanced vertex layouts stepped at a rate above 1
feature VertexInputLayout rare vertex offsets or strides off their format's alignment, or past a device's limits
feature Tessellation rare tessellation
feature MeshShading rare mesh pipelines
feature TileShading rare tile shaders (Apple GPU families)
feature Imageblocks rare imageblocks (Apple GPU families)
feature RayTracing rare ray tracing (out of scope by ruling)
feature Tensors rare shader tensors
feature RasterizationRateMap rare rasterization rate maps
feature GpuEncodedIndirectCommands rare indirect command buffers encoded by a kernel
feature VulkanVersion none a device below Vulkan 1.2
feature PushWindow none a description whose maxPushConstantsSize is below 128 bytes, less than Vulkan lets a device report
feature IdentityDomains none the identity domains, which the runtime alone takes and which lower only kernels over buffer slots, textures in slots or argument buffers, and runtime samplers, so far
feature Constant none LLVM constant forms AIR does not emit
feature Attribute none LLVM ABI attributes AIR does not use
feature BitcodeRecord none bitcode records AIR does not emit
feature SyncScope none synchronization scopes AIR does not use
feature SubgroupOperations app simdgroup functions in a stage a device's subgroups do not support
feature DirectCall rare variadic or byval calls the inliner cannot take
feature WideSwitchLiteral rare 64-bit switch literals
feature Lowering system the catch-all of lowering families not landed: any shader can meet one
feature SamplerAddressMode app mirror-clamp-to-edge on a device without it
feature AlphaToOne rare alphaToOneEnabled on a device without alphaToOne
feature StageStoresAndAtomics app stores or atomics in vertex or fragment functions on a device without the feature
feature FunctionConstantArgument rare a function-constant-removed argument read
feature SamplerBicubicFilter system bicubic filtering forms Metal does not establish, through a constexpr sampler of filter::bicubic (a runtime sampler of MTLSamplerMinMagFilterCubic filters as nearest)
feature IntersectionFunctionTable rare ray tracing (out of scope by ruling)
feature IndependentBlending rare per-attachment blending on a device without independentBlend
feature RasterSampleCount app a sample count a device lacks for the attachments
feature TriangleFillLines app wireframe on a device without fillModeNonSolid
feature TriangleFillPoints system Apple's GL renderer's glPolygonMode(GL_POINT) on a device without fillModeNonSolid, or a portability-subset device without pointPolygons (MoltenVK)
feature DepthClipClamp app depth clamp on a device without depthClamp
feature DepthBiasClamp app depth bias clamp on a device without depthBiasClamp
feature ConstantAlphaBlendFactor app blend-alpha factors on a portability-subset device without them
feature SparseTexture rare sparse residency reads
feature TextureSwizzle app texture swizzles whose Metal behaviour is unmeasured
feature PostDepthCoverage rare the coverage after early depth and stencil tests, on every device
feature PrivateMemory rare very large per-thread arrays
feature Reflection rare reflection of argument kinds Metal's answer is unmeasured for
feature ViewportDepthRange rare viewport depth outside [0, 1]
feature IndirectRenderState rare render state set by a kernel on an indirect command
feature GlobalBuiltinInFragment rare Metal 3.1 global built-ins in fragment functions
feature (computed) none helpers that build a refusal for a feature their callers name: see the "via a helper" rows
limit InlinedInstructions rare very large shaders after inlining
limit OutputBlocks rare very large control flow
limit IrreducibleDepth none deeply nested irreducible loops
limit SpirvWords rare very large output modules
limit WorkUnits rare very large shaders
limit LedgerBytes rare very large shaders
limit TypeCount none a type table past the cap
limit MetadataNodes none metadata past the cap
limit BitstreamNesting none malformed nesting
limit InstructionCount rare very large modules
limit LayoutNesting none argument-buffer layouts nested past the cap
limit ConstructNesting none control flow nested past the cap
limit PrivateArenaBytes none a private arena past 4 GiB
limit CallStackBytes rare deep visible-function call stacks
ratemap ScreenExtent rare a rate map whose screen is past 16384 a side
ratemap LayerCount none a rate map of more than two layers, which Apple's compile crashes on
ratemap DenseSamples rare a rate map axis with more quality samples than screen pixels
ratemap SampleOutOfRange rare a rate map quality sample outside [0, 1] among others
ratemap SampleCount rare a rate map axis of more distinct samples than measured (9 on one layer, 4 on two)
budget Time none a translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds)
feature PrivateRenderState none Apple-private pipeline fields of OpenGL on Metal (no public header)
feature CommandPredication none Apple-private command predication on a device without buffer device addresses
feature ProgramScopeResource app MSL 3.2 textures, samplers and threadgroup memory bound at program scope (macOS 15 and later)
feature ProgramScopeSharedSlot rare MSL 3.2 program-scope buffers aliasing another argument of another type at one index
feature ProgramScopeLinked rare MSL 3.2 program-scope bindings in a linked visible function or a dynamic library
feature ProgramScopeRead none a read of a program-scope buffer's global that Apple's compiler is not seen to write
feature GenericPointer system MSL 4.1 generic pointers held in memory or of two spaces (macOS 27 and later)
feature WideLines none a line under the Apple-private setLineWidth: at a width other than 1 drawn as the band, whose pipeline form the translator does not build (a selected slice or viewport, barycentric weights, multiview, synthesized geometry, too many stage outputs)