Files
metal2vulkan/scripts/refusal-surface/reach.tsv
T
Anees Iqbal 0702b43baf Translator: a kernel's partial-threadgroups variant that cannot be made is refused as PartialThreadgroups
Every refusal of the partial-threadgroups variant (LoweringInputs::partial_threadgroups) named
Feature::GpuEncodedIndirectCommands, the feature of indirect command buffers a kernel encodes,
which none of them is. A new feature, Feature::PartialThreadgroups (NotImplemented), names them
all:
- lower/select.rs (finish): the kernel's simdgroups run on the emulated tier (its profile's
  subgroups, its lockstep order or its pinned widest mode give it that tier), whose exchanges
  are not walked past the grid. This is the one a SIMD-group or quad-group kernel meets on a
  device whose subgroups are narrower than 32 (lavapipe, and the Iris Xe in the equality test).
- lower/simd/divergent.rs (barriers): a kernel whose uniform barriers need a vote word its
  stage's workgroup memory cannot hold beside its static arena.
- lower/mesh/mod.rs (plan_partial_groups): a tile function, a kernel that reads a stage-input
  region, one with compute derivatives or a cooperative imageblock slice write.
- pipeline/compile.rs (analyze_one): the input beside flat_grid, folded_groups, replay_bindings
  or emulated_simdgroups. Its condition was one with the folded and call-threadgroups
  combinations, which stay GpuEncodedIndirectCommands; it is split in two.
Today the four sites build the same refusal with no symbol, so no text tells the causes apart,
and none is added.

The flat variant's refusal at lower/select.rs:1715 (flat_grid with call_threadgroups, on the
emulated tier or with a workgroup synchronization) stays GpuEncodedIndirectCommands: it refuses
the flat variant, not the partial-threadgroups one, with the flat variant's other refusals
(lower/access/mod.rs plan_replay, pipeline/compile.rs analyze_one); the runtime never sets
flat_grid (no hit in crates/metal2vulkan-runtime/src).

The runtime's test of a refused variant (pipeline.rs, the non-observer's lowering) matches the
new feature, so a variant refused now is still kept as a refusal and its state runs the plain
module. A refusal kept in a device's cache directory before this commit still reads: the
marker (cache.rs REFUSED) holds no feature, and it is found by the variant's key
(function_compile_key), which this commit does not move.

No version moves. No persisted outcome records the moved refusals' class:
- the runtime's cache directory: the marker above, under an unchanged key;
- the golden tables (golden_hashes.tsv, 77 GpuEncodedIndirectCommands cells;
  public_fixture_expectations_engine.tsv, 96): every subject compiles under no inputs, where
  partial_threadgroups is false, and every moved site is reached only under it;
- the authored compile census (corpus/authored-compile.tsv): no GpuEncodedIndirectCommands
  cell;
- the committed observations, cutover lists and conformance recordings: no hit
  (git grep -c over corpus/, cutover/ and crates/metal2vulkan-conformance).
The runtime guard's inputs do not change: every file edited here is outside them or on the
guard's list of compile-time files.

The consumer: git grep -n 'GpuEncodedIndirectCommands' cae6d420df in its checkout gives 0
lines (and 0 for PartialThreadgroups).

docs/REFUSALS.md is regenerated (scripts/refusal-surface/refusal_surface.py), with the new
row's reach mark in reach.tsv (app: a dispatchThreads grid that is not whole threadgroups), and
the signatures table (api_signatures.tsv) has the new variant (signatures.py --bless); the
api_surface table lists Feature as an enum, not its variants, so it does not change. docs/API.md
section 5 and the partial_threadgroups input's doc name the new feature. The translator's
partial-threadgroups tests assert it.
2026-11-22 07:17:41 -08:00

12 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 file type Apple's toolchain is not seen to write
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
20featurePartialThreadgroupsappa dispatchThreads grid that is not whole threadgroups, of a kernel whose partial-threadgroups variant cannot be made
21featureIrreducibleConvergentrareirreducible loops around barriers or simd operations
22featureComputeDerivativesWithSimdrarederivatives in a kernel
23featureComputeDerivativesrarederivatives in a kernel
24featureQuadOperationsappquad shuffles in kernels on devices without quad operations there
25featureSimdgroupMatrixraresimdgroup matrix kernels
26featureSimdgroupMatrix16x16x16rare16x16x16 simdgroup matrix products (Metal: Apple10 GPUs and later)
27featureArgumentBufferPointersappargument buffers holding buffer pointers
28featureArgumentBufferTexturesappargument buffers holding textures and samplers (bindless)
29featureArgumentBufferObjectsrarepipeline states and ICBs in argument buffers
30featureDereferenceLoadedPointerapppointers loaded from argument buffers
31featurePointerToIntegerrarepointer to integer casts
32featurePointerComparerarecomparing pointers of different roots
33featureHandleAsPointerrareresource handles used as byte pointers
34featureConstantGlobalEscapingrarea constant global whose address escapes
35featureThreadgroupMemorySizerarethreadgroup memory past a smaller device's limit
36featureZeroedThreadgroupMemoryrarethreadgroup memory on a device without shaderZeroInitializeWorkgroupMemory, which Vulkan 1.3 requires
37featureCoherentMemoryrarecoherent(device) accesses
38featureInt64Atomicsrare64-bit atomics
39featureImageAtomicsraretexture atomics beyond 32-bit integers
40featureDescriptorCountappmany textures or buffers in one stage on a smaller device
41featureBufferRangeappa buffer window past a device's descriptor range
42featureInt64Arithmeticrare64-bit integers on a device without shaderInt64
43featureFloat64Arithmeticraredoubles (MSL has none outside Apple's own code)
44featureFormatsystempixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them)
45featureDivergentImplicitLodappimplicit-LOD sampling through a dynamically chosen texture
46featureImplicitLodOutsideFragmentrareimplicit-LOD sampling outside fragment functions
47featureMinLodClampraremin_lod_clamp on a device without shaderResourceMinLod
48featureTexelOffsetapptexel offsets a device cannot apply
49featureGatherExtendedraregathers with dynamic offsets or components
50featureStorageImageMultisamplerarewritable multisampled textures
51featureStorageTextureInVertexStagerarewritable textures in vertex functions
52featureCubeArrayrarecube arrays on a device without imageCubeArray
53featureSamplerAnisotropyappanisotropic samplers an argument buffer lists, on a device without samplerAnisotropy
54featureSamplerBorderColorappborder colors a device cannot express
55featureSamplerLodBiasappconstexpr samplers with an LOD bias
56featureSamplerCompareappcompare samplers a device cannot apply to the image
57featurePixelSamplerComparenoneApple's compiler rejects it
58featureTexelBufferapptexture buffers past a device's texel-buffer limits
59featureRasterOrderGroupsrareraster order groups
60featureFramebufferFetchsystemprogrammable 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)
61featurePrimitiveIdrareprimitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function
62featurePrivatePrimitivesrarea 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
63featureVertexAmplificationrarevertex amplification
64featureLayeredRenderingrarelayered rendering on a device without its features
65featureClipDistancerareclip distances on a device without them
66featureDualSourceBlendingraredual-source blending on a device without it
67featureBarycentricsrarebarycentric coordinates
68featureStencilExportrarestencil from the shader
69featureSampleRateShadingrareper-sample shading
70featurePullModelInterpolationrareinterpolant inputs read at the centroid, a sample or an offset
71featureDivergentInterpolationrarean interpolant read at a sample or an offset in a branch, a loop or after a discard
72featurePixelCoverageAtSampleRaterarecoverage read at sample rate
73featureInterfaceComponentsraretoo many varyings or attachments for a device
74featureUnmatchedVaryingnonea Metal link error
75featureKernelStageInrarekernel stage-in combinations Metal leaves unestablished
76featureVertexStepRateappinstanced vertex layouts stepped at a rate above 1
77featureVertexInputLayoutrarevertex offsets or strides off their format's alignment, or past a device's limits
78featureTessellationraretessellation
79featureMeshShadingraremesh pipelines
80featureTileShadingraretile shaders (Apple GPU families)
81featureImageblocksrareimageblocks (Apple GPU families)
82featureRayTracingrareray tracing (out of scope by ruling)
83featureTensorsrareshader tensors
84featureRasterizationRateMaprarerasterization rate maps
85featureGpuEncodedIndirectCommandsrareindirect command buffers encoded by a kernel
86featureVulkanVersionnonea device below Vulkan 1.2
87featurePushWindownonea device whose maxPushConstantsSize is below 256 bytes
88featureIdentityDomainsnonethe 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
89featureConstantnoneLLVM constant forms AIR does not emit
90featureAttributenoneLLVM ABI attributes AIR does not use
91featureBitcodeRecordnonebitcode records AIR does not emit
92featureSyncScopenonesynchronization scopes AIR does not use
93featureSubgroupOperationsappsimdgroup functions in a stage a device's subgroups do not support
94featureDirectCallrarevariadic or byval calls the inliner cannot take
95featureWideSwitchLiteralrare64-bit switch literals
96featureLoweringsystemthe catch-all of lowering families not landed: any shader can meet one
97featureSamplerAddressModeappmirror-clamp-to-edge on a device without it
98featureAlphaToOnerarealphaToOneEnabled on a device without alphaToOne
99featureStageStoresAndAtomicsappstores or atomics in vertex or fragment functions on a device without the feature
100featureFunctionConstantArgumentrarea function-constant-removed argument read
101featureSamplerBicubicFiltersystembicubic 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
102featureGroupCountraremore threadgroups than a device dispatches, past the binder's split
103featureIntersectionFunctionTablerareray tracing (out of scope by ruling)
104featureIndependentBlendingrareper-attachment blending on a device without independentBlend
105featureRasterSampleCountappa sample count a device lacks for the attachments
106featureTriangleFillLinesappwireframe on a device without fillModeNonSolid
107featureTriangleFillPointssystemApple's GL renderer's glPolygonMode(GL_POINT) on a device without fillModeNonSolid, or a portability-subset device without pointPolygons (MoltenVK)
108featureDepthClipClampappdepth clamp on a device without depthClamp
109featureDepthBiasClampappdepth bias clamp on a device without depthBiasClamp
110featureConstantAlphaBlendFactorappblend-alpha factors on a portability-subset device without them
111featureSparseTextureraresparse residency reads
112featureTextureSwizzleapptexture swizzles whose Metal behaviour is unmeasured
113featurePostDepthCoveragerarethe coverage after early depth and stencil tests, on every device
114featurePrivateMemoryrarevery large per-thread arrays
115featureReflectionrarereflection of argument kinds Metal's answer is unmeasured for
116featureViewportDepthRangerareviewport depth outside [0, 1]
117featureIndirectRenderStaterarerender state set by a kernel on an indirect command
118featureGlobalBuiltinInFragmentrareMetal 3.1 global built-ins in fragment functions
119bindDescriptorRangeExceededappa buffer window past a device's descriptor range
120bindTexelBufferTooLargerarea texture buffer past maxTexelBufferElements its parts do not bind
121bindHeapTooLargeraremore resident textures than the pipeline's heap holds (bindless at scale)
122bindTessellationFactorRangeraretessellation factors past one storage descriptor
123bindPatchIndexRangerarepatch indices past one storage descriptor
124bindControlPointIndexRangerarecontrol-point indices past one storage descriptor
125bindMissingStageInRegionnonea stage-in region never set, which Metal leaves undefined
126bindMissingDeviceAddressrarea slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses
127limitInlinedInstructionsrarevery large shaders after inlining
128limitOutputBlocksrarevery large control flow
129limitIrreducibleDepthnonedeeply nested irreducible loops
130limitSpirvWordsrarevery large output modules
131limitWorkUnitsrarevery large shaders
132limitLedgerBytesrarevery large shaders
133limitTypeCountnonea type table past the cap
134limitMetadataNodesnonemetadata past the cap
135limitBitstreamNestingnonemalformed nesting
136limitInstructionCountrarevery large modules
137limitLayoutNestingnoneargument-buffer layouts nested past the cap
138limitConstructNestingnonecontrol flow nested past the cap
139limitPrivateArenaBytesnonea private arena past 4 GiB
140limitCallStackBytesraredeep visible-function call stacks
141ratemapScreenExtentrarea rate map whose screen is past 16384 a side
142ratemapLayerCountnonea rate map of more than two layers, which Apple's compile crashes on
143ratemapDenseSamplesrarea rate map axis with more quality samples than screen pixels
144ratemapSampleOutOfRangerarea rate map quality sample outside [0, 1] among others
145ratemapSampleCountrarea rate map axis of more distinct samples than measured (9 on one layer, 4 on two)
146budgetTimenonea translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds)
147featurePrivateRenderStatenoneApple-private pipeline fields of OpenGL on Metal (no public header)
148featureCommandPredicationnoneApple-private command predication on a device without buffer device addresses
149featureProgramScopeBindingappMSL 3.2 program-scope buffer bindings (macOS 15 and later)
150featureGenericPointersystemMSL 4.1 generic pointers held in memory or of two spaces (macOS 27 and later)
151featureSeqCstFencerarea seq_cst fence in a vertex or fragment stage without its stores and atomics
152featureWideLinesnonea 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)