Files
metal2vulkan/scripts/refusal-surface/reach.tsv
T
Anees Iqbal b5ac9fd07b rt: visibility results, one precise occlusion query per mode, copied into the buffer at the pass's end
What: `setVisibilityResultMode:offset:` builds `Boolean` and `Counting`. Each such mode set is one
segment counted by one precise occlusion query (`VK_QUERY_CONTROL_PRECISE_BIT`), begun in the
pass's rendering before the segment's first draw and ended there at the next mode set or the
encoder's end; a segment with no draw begins and ends its query as it ends, so its word is 0.
After `vkCmdEndRendering` the pass copies the counts (`vkCmdCopyQueryPoolResults`, 64-bit, WAIT)
straight into the visibility result buffer's `VkBuffer` at place+offset, one copy for each run of
consecutive offsets in one pool, before the pass's second barrier (recorded or owed), which orders
them before every later command; a Shared buffer's segment end barrier reaches the host, and a
Managed buffer's write and a texture over the buffer in an image of its own are kept as a blit's
write is. `Boolean` writes the count too, nonzero exactly where a sample passed (Metal documents a
nonzero word; the M3 Max writes 1): an accepted difference in docs/API.md section 10, and the
conformance cases compare a `Boolean` word as nonzero alone.

A command buffer takes its queries from occlusion pools of 256 the device lends it
(`crate::visibility`), each query reset on the host (`hostQueryReset`) as the command buffer
retires or drops uncommitted; the device keeps at most 16 pools free and destroys the rest
(`Gauges::occlusion_pools`). `occlusionQueryPrecise` joins the floor's required features (every
venue's profile reports it; Roadmap 2022 requires it), with the README floor table, the
runtime-floor profile's `m2v_runtime_floor` block and the regeneration script's list.

Refusals: Metal's own, each where the mode is set, the encoder's mode unchanged:
`Refusal::NoVisibilityResultBuffer`, `Refusal::VisibilityResultOffset` (not a multiple of 8, or
past the buffer), `Refusal::VisibilityResultOffsetTaken` (Apple documents each offset as set once
per pass; Metal's validation stops it), and `Refusal::ArgumentPlace` at alignment 8 for an offset
at an allocation byte off a multiple of 8 (VUID-vkCmdCopyQueryPoolResults-flags-00823). Gaps, each
counted and a README known gap: `DrawKind::AccumulatedVisibilityResults` (a mode in an
`Accumulate` pass; `Metrics::accumulated_visibility_refused`) and
`DrawKind::VisibilityResultInterrupt` (a command that would end the rendering while a query counts:
a memory barrier after a writing draw, a draw that moves an attachment to the feedback layout, pays
an owed barrier before an attachment read or copies into a shadow, and, bounded, a draw that looks
at textures over a buffer in an image of their own or reaches a Managed buffer with textures over
its device copy; `Metrics::visibility_interrupts_refused`). Every refusal is checked before the
encoder changes state; a segment's first draw may still end the rendering, before its query
begins. `DrawKind::VisibilityResults` is gone. `RenderPassDescriptor::visibility_result_type`
(`VisibilityResultType`, Metal's `visibilityResultType`) is a field now.

Translator: `PrecisionNote::DeviceOcclusionCount`, the static note of a `Boolean` or `Counting`
result (`RenderCommandEncoder::VISIBILITY_NOTE`), quoting Vulkan's "Occlusion Queries" (precise
counts differ between implementations: fragments killed before rasterization, counts multiplied
per colour output) and "Fragment Operations" (`earlyFragmentMultisampleCoverageAfterSampleCounting`);
its codec tag, ARTIFACT_FORMAT_VERSION 588, validation's allowance (unbounded, no tolerance), the
conformance degradation `device-occlusion-count` among the native notes, and docs/API.md's
catalogue. The dead `Feature::CountingVisibility` (no construction site) is removed with its reach
row. The old runtime's `Device::new` is untouched; the runtime-floor test profile now states
`occlusionQueryPrecise`, which re-keys that profile's fingerprint.

Why: the visibility-cut ruling. A guest that sets a mode got a refusal; it now gets its results,
or a typed, counted refusal where the cut does not build the shape (continuations and a combine
are not built).

Verified: cargo fmt; scripts/api-signatures --bless/--check, refusal_surface (0 without reach or
basis), metal-coverage and conformance-coverage regenerated, check_device_profiles (0 findings).
The compile job (fmt, signatures, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace
Rustdoc -D warnings) and the lavapipe rt suite, with tests/visibility.rs (Boolean and Counting
against the CPU's counts, pool reuse and the 16-pool bound past 17, Metal's refusals, Accumulate,
the barrier and attachment-read interrupts), are named in the lane's report.
2026-11-21 06:16:57 -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
40featureBufferRangeappa buffer window past a device's descriptor range
41featureInt64Arithmeticrare64-bit integers on a device without shaderInt64
42featureFloat64Arithmeticraredoubles (MSL has none outside Apple's own code)
43featureFormatsystempixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them)
44featureDivergentImplicitLodappimplicit-LOD sampling through a dynamically chosen texture
45featureImplicitLodOutsideFragmentrareimplicit-LOD sampling outside fragment functions
46featureMinLodClampraremin_lod_clamp on a device without shaderResourceMinLod
47featureTexelOffsetapptexel offsets a device cannot apply
48featureGatherExtendedraregathers with dynamic offsets or components
49featureStorageImageMultisamplerarewritable multisampled textures
50featureStorageTextureInVertexStagerarewritable textures in vertex functions
51featureCubeArrayrarecube arrays on a device without imageCubeArray
52featureSamplerAnisotropyappanisotropic samplers an argument buffer lists, on a device without samplerAnisotropy
53featureSamplerBorderColorappborder colors a device cannot express
54featureSamplerLodBiasappconstexpr samplers with an LOD bias
55featureSamplerCompareappcompare samplers a device cannot apply to the image
56featurePixelSamplerComparenoneApple's compiler rejects it
57featureTexelBufferapptexture buffers past a device's texel-buffer limits
58featureRasterOrderGroupsrareraster order groups
59featureFramebufferFetchsystemprogrammable 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)
60featurePrimitiveIdrareprimitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function
61featurePrivatePrimitivesrarea 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
62featureVertexAmplificationrarevertex amplification
63featureLayeredRenderingrarelayered rendering on a device without its features
64featureClipDistancerareclip distances on a device without them
65featureDualSourceBlendingraredual-source blending on a device without it
66featureBarycentricsrarebarycentric coordinates
67featureStencilExportrarestencil from the shader
68featureSampleRateShadingrareper-sample shading
69featurePullModelInterpolationrareinterpolant inputs read at the centroid, a sample or an offset
70featureDivergentInterpolationrarean interpolant read at a sample or an offset in a branch, a loop or after a discard
71featureSamplePositionsrarecustom sample positions on a device that takes none at the pass's sample count
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
112featureTextureSizeappa texture past a device's image limits
113featureTextureSampleCountappa sample count a device lacks for the texture
114featureTextureViewappa texture view Vulkan cannot make exactly
115featureTextureSwizzleapptexture swizzles whose Metal behaviour is unmeasured
116featureMipmapGenerationappgenerateMipmapsForTexture: of a format or chain neither the device's blits nor the compute filter can run
117featureHostMemorysystemnewBufferWithBytesNoCopy: where the device cannot import the memory
118featureGpuTimesrareGPU times on a queue without timestamps
119featureViewFormatReinterpretationappa view of another component layout on a portability subset (MoltenVK)
120featureSeparateMultisampledDepthStencilrareseparate multisampled depth and stencil textures
121featurePostDepthCoveragerarethe coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage
122featurePrivateMemoryrarevery large per-thread arrays
123featureSparseTexturesraresparse heaps on a device without sparse images
124featureTimelineSemaphoresnonea device below the runtime's floor
125featureReflectionrarereflection of argument kinds Metal's answer is unmeasured for
126featureHeapTextureTilingapptextures in Shared heaps on a device whose optimal images take no host memory
127featureViewportDepthRangerareviewport depth outside [0, 1]
128featureUndeclaredTextureUsageappa shader write to a texture made without ShaderWrite, which plain Metal runs
129featureRenderTargetSizerarea render area past a device's framebuffer limits
130featureIndirectRenderStaterarerender state set by a kernel on an indirect command
131featureGlobalBuiltinInFragmentrareMetal 3.1 global built-ins in fragment functions
132bindDescriptorRangeExceededappa buffer window past a device's descriptor range
133bindTexelBufferTooLargerarea texture buffer past maxTexelBufferElements its parts do not bind
134bindHeapTooLargeraremore resident textures than the pipeline's heap holds (bindless at scale)
135bindTessellationFactorRangeraretessellation factors past one storage descriptor
136bindPatchIndexRangerarepatch indices past one storage descriptor
137bindControlPointIndexRangerarecontrol-point indices past one storage descriptor
138bindMissingStageInRegionnonea stage-in region never set, which Metal leaves undefined
139bindUniformViewAliasedrareProfile F's uniform-view fallback aliased by a write
140bindMissingDeviceAddressrarea slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses
141limitInlinedInstructionsrarevery large shaders after inlining
142limitOutputBlocksrarevery large control flow
143limitIrreducibleDepthnonedeeply nested irreducible loops
144limitSpirvWordsrarevery large output modules
145limitWorkUnitsrarevery large shaders
146limitLedgerBytesrarevery large shaders
147limitTypeCountnonea type table past the cap
148limitMetadataNodesnonemetadata past the cap
149limitBitstreamNestingnonemalformed nesting
150limitInstructionCountrarevery large modules
151limitLayoutNestingnoneargument-buffer layouts nested past the cap
152limitConstructNestingnonecontrol flow nested past the cap
153limitPrivateArenaBytesnonea private arena past 4 GiB
154limitCallStackBytesraredeep visible-function call stacks
155ratemapScreenExtentrarea rate map whose screen is past 16384 a side
156ratemapLayerCountnonea rate map of more than two layers, which Apple's compile crashes on
157ratemapDenseSamplesrarea rate map axis with more quality samples than screen pixels
158ratemapSampleOutOfRangerarea rate map quality sample outside [0, 1] among others
159ratemapSampleCountrarea rate map axis of more distinct samples than measured (9 on one layer, 4 on two)
160budgetTimenonea translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds)
161featurePrivateRenderStatenoneApple-private pipeline fields of OpenGL on Metal (no public header)
162featureExtendedRangeBlendsysteman 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
163featureCommandPredicationnoneApple-private command predication on a device without buffer device addresses
164featureProgramScopeBindingappMSL 3.2 program-scope buffer bindings (macOS 15 and later)
165featureGenericPointersystemMSL 4.1 generic pointers held in memory or of two spaces (macOS 27 and later)
166featureSeqCstFencerarea seq_cst fence in a vertex or fragment stage without its stores and atomics
167featureWideLinesnonea 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)