Files
metal2vulkan/scripts/refusal-surface/reach.tsv
T
Anees Iqbal a8d448f4ce Depth stand-ins go: no variant runs its draw's depth or stencil test in the shader
The runtime asks for every render variant with VariantKey::new() (render.rs) and never states
FragmentTests, so VariantKey::shader_tests, shader_stencil and window_depth_varying are false on
its path. No variant it makes tests a fragment's depth or stencil against a stand-in of the pass's
attachment. That variant, its stand-ins and their consumer contract are deleted. The consumer
names none of them on its development branch (consumer check below).

The binder: for a fragment function that stores before Vulkan's tests (TestedStorageWrites), a
draw whose depth test writes (FragmentTests::Depth { writes: true }) or whose stencil test acts
(Stencil, or Drop for a function without the early-tests variant) ran the in-shader variant. It is
now refused NotImplemented at the tested attachment, of the feature that stores first
(FramebufferFetch, or Imageblocks for an imageblock alone):
- a function with the early-tests variant: at the depth attachment for Depth, at the stencil
  attachment for Stencil;
- a function without it: at the depth attachment, or the stencil one where the pass has no depth,
  as Any already was.
A draw whose tests drop but write and count nothing keeps the early-tests variant, and one whose
tests drop nothing runs the pipeline as compiled, as before.

Removed:
- the inputs and keys: VariantKey and LoweringInputs::{shader_tests, shader_stencil,
  window_depth_varying}, and their key bytes;
- the lowering: lower/fragment/depth_test.rs (DepthTest, StencilTest, depth_test_form,
  stencil_test_form, depth_test_word, stencil_test_word, STAND_IN_FORMAT) and its calls from
  fetch's and the imageblock's tests, and the stencil output stage_io stored nowhere under it;
- the window depth varying: IoRole::WindowDepth, VaryingKey::window_depth, the vertex function's
  store (stage_io's WindowDepth) and the fragment's input, and its link checks;
- the facts and state: RuntimeFact::ShaderTests and ShaderStencilTest, GraphicsState::shader_tests,
  ShaderTestsUse, StandInUse, StandInView, link/shader_tests.rs, and compile::api's stand-in
  requirements;
- the bindings: SyntheticBinding::DepthStandIn and StencilStandIn, WriteSource::DepthStandIn and
  StencilStandIn, PushField::ShaderTestsState and ShaderStencilState, the binder's push words and
  ShaderTestsTemplate, and BindState::{depth_range, depth_clip_mode_clamp, stencil_references},
  which only those words read;
- the copies: DepthStencilCopy::DepthFromStandIn, DepthStandInForm, DepthSplitModule and
  depth_split_module;
- the notes and kinds: PrecisionNote::ComputedSampleDepth (and its conformance Degradation, C3
  deferral and comparison rows, and its catalogue entry in docs/API.md),
  Feature::MultisampledShaderDepthTest (and its reach row), DriverDeviation and VkProperty
  CenterFragCoordDepth and SampleFragCoordDepth, which nothing else reads;
- DrawReplayRule::ShaderTests, and the mechanism rows of the two facts;
- the runtime's translator_fields row for shader_tests.

Tests:
- engine_fragment: the discarding fetch beside depth expects a depth test that writes refused at
  the depth attachment and a stencil test that acts at the stencil attachment. The per-sample
  depth test, the memory-writing fetch's Drop draw, a returned depth
  (a_fetch_that_returns_its_depth_refuses_a_draw_whose_depth_test_writes, which keeps the compiled
  pipeline's checks) and a returned stencil or mask
  (a_returned_stencil_or_sample_mask_refuses_a_draw_whose_tests_act) expect the refusal. The
  stencil test in the shader goes.
- engine_fragment_imageblock: a tested imageblock writer's depth draw is refused
  NotImplemented(Imageblocks) at the depth attachment.
- engine_moved_writers: the writers' wanted tests are the early-tests variant alone; a draw that
  ran the function's own tests is refused.
- depth_stencil_copy, owned_divisions, the mechanism table, api_tests, the binder's templates, the
  variant key's debug text: their stand-in rows go. The binder's stencil words test goes.

api_surface loses its rows; api_signatures is blessed; docs/REFUSALS.md is regenerated.

SEMANTICS_VERSION 2227, ARTIFACT_FORMAT_VERSION 572, RUNTIME_VERSION 2547 (placeholders; main
renumbers). SEMANTICS: the binder's plans of such draws change, and the key bytes go. ARTIFACT: the
codec loses SyntheticBinding, PushField, RuntimeFact, IoRole, VkProperty and PrecisionNote variants,
GraphicsState's field and three structs. RUNTIME: plans and BindState change. The runtime pin
moves.

Consumer check (consumer-uses.sh, consumer development 0140a12682, 61 refs): 0 hits (code) for
ShaderTestsUse, StandInUse, StandInView, shader_tests, shader_stencil, window_depth_varying,
DepthStandInForm, DepthSplitModule, depth_split_module, DepthFromStandIn,
MultisampledShaderDepthTest, CenterFragCoordDepth, SampleFragCoordDepth, ShaderTestsState,
ShaderStencilState, DepthStandIn, StencilStandIn, WindowDepth, window_depth, stencil_references,
depth_clip_mode_clamp, ShaderStencilTest, DepthTest and ShaderTests; depth_range in link-order
lists only. ComputedSampleDepth: 0 on development; used in crates/reims-vgpu-vulkan/src/answer.rs
on 38 of the consumer's steelbrain/* branches, a crate its development no longer has.

Verified: m3-max-61056 (msi) at this commit's tree: fmt, clippy, Rustdoc, and nextest of
metal2vulkan, -conformance, -validation and -runtime, 5885 of 5886 passed; the one failure is
the_old_render_descriptor_key_keeps_its_value, which moves with SEMANTICS_VERSION (main pins it).
States-only plays on lavapipe of the probe player built at the change on 999b82bfe2
(steelbrain/cutxlate-siplay, m3-max-61016): m3-max-61022 to 61026, 61 runs over the 36 streams,
render 502920 states made and 0 refused, compute 108189 made and 0 refused, the counts of the play
before the change: no state a stream makes meets the new refusal.
2026-11-20 18:07:17 -08:00

14 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
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
25featureSimdgroupMatrix16x16x16rare16x16x16 simdgroup matrix products (Metal: Apple10 GPUs and later)
26featureArgumentBufferPointersappargument buffers holding buffer pointers
27featureArgumentBufferTexturesappargument buffers holding textures and samplers (bindless)
28featureArgumentBufferObjectsrarepipeline states and ICBs in argument buffers
29featureDereferenceLoadedPointerapppointers loaded from argument buffers
30featurePointerToIntegerrarepointer to integer casts
31featurePointerComparerarecomparing pointers of different roots
32featureHandleAsPointerrareresource handles used as byte pointers
33featureConstantGlobalEscapingrarea constant global whose address escapes
34featureThreadgroupMemorySizerarethreadgroup memory past a smaller device's limit
35featureZeroedThreadgroupMemoryrarethreadgroup memory on a device without shaderZeroInitializeWorkgroupMemory, which Vulkan 1.3 requires
36featureCoherentMemoryrarecoherent(device) accesses
37featureInt64Atomicsrare64-bit atomics
38featureImageAtomicsraretexture atomics beyond 32-bit integers
39featureDescriptorCountappmany textures or buffers in one stage on a smaller device
40featureStageSizerarea kernel heavier than the heaviest stage measured to compile within host-sized memory, as the device's plan writes it (from_queries), or too large for a driver measured to corrupt one past its bound or to outgrow host memory below it
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
72featureSamplePositionsrarecustom sample positions on a device that takes none at the pass's sample count
73featurePixelCoverageAtSampleRaterarecoverage read at sample rate
74featureInterfaceComponentsraretoo many varyings or attachments for a device
75featureUnmatchedVaryingnonea Metal link error
76featureKernelStageInrarekernel stage-in combinations Metal leaves unestablished
77featureVertexStepRateappinstanced vertex layouts stepped at a rate above 1
78featureVertexInputLayoutrarevertex offsets or strides off their format's alignment, or past a device's limits
79featureTessellationraretessellation
80featureMeshShadingraremesh pipelines
81featureTileShadingraretile shaders (Apple GPU families)
82featureImageblocksrareimageblocks (Apple GPU families)
83featureRayTracingrareray tracing (out of scope by ruling)
84featureTensorsrareshader tensors
85featureRasterizationRateMaprarerasterization rate maps
86featureGpuEncodedIndirectCommandsrareindirect command buffers encoded by a kernel
87featureVulkanVersionnonea device below Vulkan 1.2
88featurePushWindownonea device whose maxPushConstantsSize is below 256 bytes
89featureIdentityDomainsnonethe 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
90featureConstantnoneLLVM constant forms AIR does not emit
91featureAttributenoneLLVM ABI attributes AIR does not use
92featureBitcodeRecordnonebitcode records AIR does not emit
93featureSyncScopenonesynchronization scopes AIR does not use
94featureSubgroupOperationsappsimdgroup functions in a stage a device's subgroups do not support
95featureDirectCallrarevariadic or byval calls the inliner cannot take
96featureWideSwitchLiteralrare64-bit switch literals
97featureLoweringsystemthe catch-all of lowering families not landed: any shader can meet one
98featureSamplerAddressModeappmirror-clamp-to-edge on a device without it
99featureAlphaToOnerarealphaToOneEnabled on a device without alphaToOne
100featureStageStoresAndAtomicsappstores or atomics in vertex or fragment functions on a device without the feature
101featureFunctionConstantArgumentrarea function-constant-removed argument read
102featureSamplerBicubicFiltersystembicubic 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
103featureGroupCountraremore threadgroups than a device dispatches, past the binder's split
104featureIntersectionFunctionTablerareray tracing (out of scope by ruling)
105featureIndependentBlendingrareper-attachment blending on a device without independentBlend
106featureRasterSampleCountappa sample count a device lacks for the attachments
107featureTriangleFillLinesappwireframe on a device without fillModeNonSolid
108featureTriangleFillPointssystemApple's GL renderer's glPolygonMode(GL_POINT) on a device without fillModeNonSolid, or a portability-subset device without pointPolygons (MoltenVK)
109featureDepthClipClampappdepth clamp on a device without depthClamp
110featureDepthBiasClampappdepth bias clamp on a device without depthBiasClamp
111featureConstantAlphaBlendFactorappblend-alpha factors on a portability-subset device without them
112featureSparseTextureraresparse residency reads
113featureTextureSizeappa texture past a device's image limits
114featureTextureSampleCountappa sample count a device lacks for the texture
115featureTextureViewappa texture view Vulkan cannot make exactly
116featureTextureSwizzleapptexture swizzles whose Metal behaviour is unmeasured
117featureMipmapGenerationappgenerateMipmapsForTexture: of a format or chain neither the device's blits nor the compute filter can run
118featureHostMemorysystemnewBufferWithBytesNoCopy: where the device cannot import the memory
119featureGpuTimesrareGPU times on a queue without timestamps
120featureCountingVisibilityrarecounting occlusion queries on a device without precise queries
121featureViewFormatReinterpretationappa view of another component layout on a portability subset (MoltenVK)
122featureSeparateMultisampledDepthStencilrareseparate multisampled depth and stencil textures
123featurePostDepthCoveragerarethe coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage
124featurePrivateMemoryrarevery large per-thread arrays
125featureSparseTexturesraresparse heaps on a device without sparse images
126featureTimelineSemaphoresnonea device below the runtime's floor
127featureReflectionrarereflection of argument kinds Metal's answer is unmeasured for
128featureHeapTextureTilingapptextures in Shared heaps on a device whose optimal images take no host memory
129featureViewportDepthRangerareviewport depth outside [0, 1]
130featureUndeclaredTextureUsageappa shader write to a texture made without ShaderWrite, which plain Metal runs
131featureRenderTargetSizerarea render area past a device's framebuffer limits
132featureIndirectRenderStaterarerender state set by a kernel on an indirect command
133featureGlobalBuiltinInFragmentrareMetal 3.1 global built-ins in fragment functions
134bindDescriptorRangeExceededappa buffer window past a device's descriptor range
135bindTexelBufferTooLargerarea texture buffer past maxTexelBufferElements its parts do not bind
136bindHeapTooLargeraremore resident textures than the pipeline's heap holds (bindless at scale)
137bindTessellationFactorRangeraretessellation factors past one storage descriptor
138bindPatchIndexRangerarepatch indices past one storage descriptor
139bindControlPointIndexRangerarecontrol-point indices past one storage descriptor
140bindMissingStageInRegionnonea stage-in region never set, which Metal leaves undefined
141bindUniformViewAliasedrareProfile F's uniform-view fallback aliased by a write
142bindMissingDeviceAddressrarea slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses
143limitInlinedInstructionsrarevery large shaders after inlining
144limitOutputBlocksrarevery large control flow
145limitIrreducibleDepthnonedeeply nested irreducible loops
146limitSpirvWordsrarevery large output modules
147limitWorkUnitsrarevery large shaders
148limitLedgerBytesrarevery large shaders
149limitTypeCountnonea type table past the cap
150limitMetadataNodesnonemetadata past the cap
151limitBitstreamNestingnonemalformed nesting
152limitInstructionCountrarevery large modules
153limitLayoutNestingnoneargument-buffer layouts nested past the cap
154limitConstructNestingnonecontrol flow nested past the cap
155limitPrivateArenaBytesnonea private arena past 4 GiB
156limitCallStackBytesraredeep visible-function call stacks
157ratemapScreenExtentrarea rate map whose screen is past 16384 a side
158ratemapLayerCountnonea rate map of more than two layers, which Apple's compile crashes on
159ratemapDenseSamplesrarea rate map axis with more quality samples than screen pixels
160ratemapSampleOutOfRangerarea rate map quality sample outside [0, 1] among others
161ratemapSampleCountrarea rate map axis of more distinct samples than measured (9 on one layer, 4 on two)
162budgetTimenonea translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds)
163featurePrivateRenderStatenoneApple-private pipeline fields of OpenGL on Metal (no public header)
164featureExtendedRangeBlendsysteman 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
165featureCommandPredicationnoneApple-private command predication on a device without buffer device addresses
166featureProgramScopeBindingappMSL 3.2 program-scope buffer bindings (macOS 15 and later)
167featureGenericPointersystemMSL 4.1 generic pointers held in memory or of two spaces (macOS 27 and later)
168featureSeqCstFencerarea seq_cst fence in a vertex or fragment stage without its stores and atomics
169featureWideLinesnonea 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)