A seq_cst atomic operation on memory another thread reaches (an AIR 2.9 air.atomic.* buffer atomic of order 5, its success order for a compare-exchange; an LLVM atomic load, store, atomicrmw or cmpxchg of seq_cst) now takes the fence the landed seq_cst fence lowers to: an acquire-release memory barrier at the operation's scope over the memories its order applies to, then lower::sync::barrier's add of 1 on the device's fence word at Device scope with the barrier's semantics. A store, a read-modify-write and a compare-exchange take it after the operation; a load takes it before. Thread memory's atomics take none (no other invocation observes their order); texture atomics of any order but relaxed stay refused; relaxed, acquire, release and acq_rel operations are unchanged. The fence before a load, derived: the stores' fences alone order every pair of fenced stores and forbid store buffering and the R and 2+2W shapes, but two readers may still see two independent seq_cst stores in opposite orders (IRIW), since a reader's two acquire loads synchronize with nothing between them. MSL's single total order forbids that outcome. With an add on the one fence word before each load, the two readers' second adds are ordered on that word; the earlier reader's first load acquired its store, which then happens before the later reader's add and so its second load, which must see it. A fence after a load would order nothing more. Each such operation now costs one contended add on the device word: the runtime README's fence known-gap line says so (every non-explicit atomic of MSL 4.1 is one), read from the fence's measured rows. msl_4_1_orders_reach_spirv expects the fence's add after a27_wide_and_float's float add and after each of a27_fragment_atomics' three atomics. reach.tsv drops the SeqCstFence row, whose refusal no longer exists. The identity harness maps the device's fence word (with_fence_word: its 4 bytes past the zero range, the rest still unmapped), and engine_atomics' run_orders binds every kernel with it: the interpreter trapped on the fence's add in the two contention tests whose kernels hold LLVM seq_cst atomics. SEMANTICS_VERSION 2367 (renumbered at landing; 2363-2366 went to arm 9, the blob move, the 1D bicubic and the shared slice): a module holding a seq_cst atomic operation changes. Verified: - red 389e7cf44e, job m3-max-85066: a_seq_cst_atomic_operation_takes_the_fence fails at "a fence's barrier" (no add follows the store); the fence tests and msl_4_1_orders_reach_spirv pass. Green there: 4 passed. - the product suite at the fix without the harness's fence word (85066): 3495 passed, 3 failed, 24 skipped. The failures were golden_hashes_match_the_table (re-blessed on development) and engine_atomics' llvm_ and narrow_atomics_are_exact_under_contention, whose interpreter trapped on the unmapped fence word. With it (85271): engine_atomics, engine_seq_cst and engine_air_2_9 28 passed. - validation 1344 passed, 2 skipped; conformance 1053 passed, 0 skipped; doctests EXIT=0 (85066). - clippy plain 85270, m2v_gpu 85269 and m2v_cpu_icd 85268 EXIT=0 at this tree. Rustdoc and api-docs 85093 EXIT=0 at the fix without the harness change, which adds test code only.
11 KiB
11 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). | |||
| 5 | feature | LibraryKind | none | a metallib file type Apple's toolchain is not seen to write |
| 6 | feature | Stage | none | a stage outside AIR's public stages |
| 7 | feature | AddressSpace | none | Apple's AGX library address spaces |
| 8 | feature | ModuleRecord | none | LLVM constructs AIR does not emit |
| 9 | feature | Instruction | none | LLVM instructions AIR does not emit |
| 10 | feature | Type | none | LLVM types AIR does not emit |
| 11 | feature | CallingConvention | none | LLVM calling conventions AIR does not use |
| 12 | feature | UnknownIntrinsic | rare | AIR from a newer compiler (macOS 27 AIR 2.9) |
| 13 | feature | AgxUnmodeled | rare | Apple's own libraries' AGX intrinsics |
| 14 | feature | StaticInitializer | none | LLVM initializers AIR does not emit |
| 15 | feature | Recursion | rare | recursion through visible functions |
| 16 | feature | DynamicCall | rare | function pointers and function tables |
| 17 | feature | Linking | rare | dynamic libraries and linked functions |
| 18 | feature | SimdWidth | app | simdgroup functions on a device whose subgroups cannot run 32 wide for the use |
| 19 | feature | LocalSize | app | a threadgroup size past a smaller device's limit |
| 20 | feature | PartialThreadgroups | app | a dispatchThreads grid that is not whole threadgroups, of a kernel whose partial-threadgroups variant cannot be made |
| 21 | feature | IrreducibleConvergent | rare | irreducible loops around barriers or simd operations |
| 22 | feature | ComputeDerivativesWithSimd | rare | derivatives in a kernel |
| 23 | feature | ComputeDerivatives | rare | derivatives in a kernel |
| 24 | feature | QuadOperations | app | quad shuffles in kernels on devices without quad operations there |
| 25 | feature | SimdgroupMatrix | rare | simdgroup matrix kernels |
| 26 | feature | SimdgroupMatrix16x16x16 | rare | 16x16x16 simdgroup matrix products (Metal: Apple10 GPUs and later) |
| 27 | feature | ArgumentBufferTextures | app | argument buffers holding textures and samplers (bindless) |
| 28 | feature | ArgumentBufferObjects | rare | pipeline states and ICBs in argument buffers |
| 29 | feature | DereferenceLoadedPointer | app | pointers loaded from argument buffers |
| 30 | feature | HandleAsPointer | rare | resource handles used as byte pointers |
| 31 | feature | ConstantGlobalEscaping | rare | a constant global whose address escapes |
| 32 | feature | ThreadgroupMemorySize | rare | threadgroup memory past a smaller device's limit |
| 33 | feature | ZeroedThreadgroupMemory | rare | threadgroup memory on a device without shaderZeroInitializeWorkgroupMemory, which Vulkan 1.3 requires |
| 34 | feature | CoherentMemory | rare | coherent(device) accesses |
| 35 | feature | Int64Atomics | rare | 64-bit atomics |
| 36 | feature | ImageAtomics | rare | texture atomics beyond 32-bit integers |
| 37 | feature | DescriptorCount | app | many textures or buffers in one stage on a smaller device |
| 38 | feature | Float64Arithmetic | rare | doubles (MSL has none outside Apple's own code) |
| 39 | feature | Format | system | pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) |
| 40 | feature | DivergentImplicitLod | app | implicit-LOD sampling through a dynamically chosen texture |
| 41 | feature | ImplicitLodOutsideFragment | rare | implicit-LOD sampling outside fragment functions |
| 42 | feature | MinLodClamp | rare | min_lod_clamp on a device without shaderResourceMinLod |
| 43 | feature | TexelOffset | app | texel offsets a device cannot apply |
| 44 | feature | GatherExtended | rare | gathers with dynamic offsets or components |
| 45 | feature | StorageImageMultisample | rare | writable multisampled textures |
| 46 | feature | StorageTextureInVertexStage | rare | writable textures in vertex functions |
| 47 | feature | CubeArray | rare | cube arrays on a device without imageCubeArray |
| 48 | feature | SamplerAnisotropy | app | anisotropic samplers on a device without samplerAnisotropy |
| 49 | feature | SamplerBorderColor | app | border colors a device cannot express |
| 50 | feature | SamplerLodBias | app | constexpr samplers with an LOD bias |
| 51 | feature | SamplerCompare | app | compare samplers a device cannot apply to the image |
| 52 | feature | PixelSamplerCompare | none | Apple's compiler rejects it |
| 53 | feature | TexelBuffer | app | texture buffers past a device's texel-buffer limits |
| 54 | feature | RasterOrderGroups | rare | raster order groups |
| 55 | 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) |
| 56 | feature | PrimitiveId | rare | primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function |
| 57 | 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 |
| 58 | feature | VertexAmplification | rare | vertex amplification |
| 59 | feature | LayeredRendering | rare | layered rendering on a device without its features |
| 60 | feature | ClipDistance | rare | clip distances on a device without them |
| 61 | feature | DualSourceBlending | rare | dual-source blending on a device without it |
| 62 | feature | Barycentrics | rare | barycentric coordinates |
| 63 | feature | StencilExport | rare | stencil from the shader |
| 64 | feature | SampleRateShading | rare | per-sample shading |
| 65 | feature | PullModelInterpolation | rare | interpolant inputs read at the centroid, a sample or an offset |
| 66 | feature | DivergentInterpolation | rare | an interpolant read at a sample or an offset in a branch, a loop or after a discard |
| 67 | feature | PixelCoverageAtSampleRate | rare | coverage read at sample rate |
| 68 | feature | InterfaceComponents | rare | too many varyings or attachments for a device |
| 69 | feature | UnmatchedVarying | none | a Metal link error |
| 70 | feature | VertexStepRate | app | instanced vertex layouts stepped at a rate above 1 |
| 71 | feature | VertexInputLayout | rare | vertex offsets or strides off their format's alignment, or past a device's limits |
| 72 | feature | Tessellation | rare | tessellation |
| 73 | feature | MeshShading | rare | mesh pipelines |
| 74 | feature | TileShading | rare | tile shaders (Apple GPU families) |
| 75 | feature | Imageblocks | rare | imageblocks (Apple GPU families) |
| 76 | feature | RayTracing | rare | ray tracing (out of scope by ruling) |
| 77 | feature | Tensors | rare | shader tensors |
| 78 | feature | RasterizationRateMap | rare | rasterization rate maps |
| 79 | feature | GpuEncodedIndirectCommands | rare | indirect command buffers encoded by a kernel |
| 80 | feature | VulkanVersion | none | a device below Vulkan 1.2 |
| 81 | feature | PushWindow | none | a description whose maxPushConstantsSize is below 128 bytes, less than Vulkan lets a device report |
| 82 | 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 |
| 83 | feature | Constant | none | LLVM constant forms AIR does not emit |
| 84 | feature | Attribute | none | LLVM ABI attributes AIR does not use |
| 85 | feature | BitcodeRecord | none | bitcode records AIR does not emit |
| 86 | feature | SyncScope | none | synchronization scopes AIR does not use |
| 87 | feature | SubgroupOperations | app | simdgroup functions in a stage a device's subgroups do not support |
| 88 | feature | DirectCall | rare | variadic or byval calls the inliner cannot take |
| 89 | feature | WideSwitchLiteral | rare | 64-bit switch literals |
| 90 | feature | Lowering | system | the catch-all of lowering families not landed: any shader can meet one |
| 91 | feature | SamplerAddressMode | app | mirror-clamp-to-edge on a device without it |
| 92 | feature | AlphaToOne | rare | alphaToOneEnabled on a device without alphaToOne |
| 93 | feature | StageStoresAndAtomics | app | stores or atomics in vertex or fragment functions on a device without the feature |
| 94 | feature | FunctionConstantArgument | rare | a function-constant-removed argument read |
| 95 | 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) |
| 96 | feature | GroupCount | rare | more threadgroups than a device dispatches, past the binder's split |
| 97 | feature | IntersectionFunctionTable | rare | ray tracing (out of scope by ruling) |
| 98 | feature | IndependentBlending | rare | per-attachment blending on a device without independentBlend |
| 99 | feature | RasterSampleCount | app | a sample count a device lacks for the attachments |
| 100 | feature | TriangleFillLines | app | wireframe on a device without fillModeNonSolid |
| 101 | feature | TriangleFillPoints | system | Apple's GL renderer's glPolygonMode(GL_POINT) on a device without fillModeNonSolid, or a portability-subset device without pointPolygons (MoltenVK) |
| 102 | feature | DepthClipClamp | app | depth clamp on a device without depthClamp |
| 103 | feature | DepthBiasClamp | app | depth bias clamp on a device without depthBiasClamp |
| 104 | feature | ConstantAlphaBlendFactor | app | blend-alpha factors on a portability-subset device without them |
| 105 | feature | SparseTexture | rare | sparse residency reads |
| 106 | feature | TextureSwizzle | app | texture swizzles whose Metal behaviour is unmeasured |
| 107 | feature | PostDepthCoverage | rare | the coverage after early depth and stencil tests, on every device |
| 108 | feature | PrivateMemory | rare | very large per-thread arrays |
| 109 | feature | Reflection | rare | reflection of argument kinds Metal's answer is unmeasured for |
| 110 | feature | ViewportDepthRange | rare | viewport depth outside [0, 1] |
| 111 | feature | IndirectRenderState | rare | render state set by a kernel on an indirect command |
| 112 | feature | GlobalBuiltinInFragment | rare | Metal 3.1 global built-ins in fragment functions |
| 113 | limit | InlinedInstructions | rare | very large shaders after inlining |
| 114 | limit | OutputBlocks | rare | very large control flow |
| 115 | limit | IrreducibleDepth | none | deeply nested irreducible loops |
| 116 | limit | SpirvWords | rare | very large output modules |
| 117 | limit | WorkUnits | rare | very large shaders |
| 118 | limit | LedgerBytes | rare | very large shaders |
| 119 | limit | TypeCount | none | a type table past the cap |
| 120 | limit | MetadataNodes | none | metadata past the cap |
| 121 | limit | BitstreamNesting | none | malformed nesting |
| 122 | limit | InstructionCount | rare | very large modules |
| 123 | limit | LayoutNesting | none | argument-buffer layouts nested past the cap |
| 124 | limit | ConstructNesting | none | control flow nested past the cap |
| 125 | limit | PrivateArenaBytes | none | a private arena past 4 GiB |
| 126 | limit | CallStackBytes | rare | deep visible-function call stacks |
| 127 | ratemap | ScreenExtent | rare | a rate map whose screen is past 16384 a side |
| 128 | ratemap | LayerCount | none | a rate map of more than two layers, which Apple's compile crashes on |
| 129 | ratemap | DenseSamples | rare | a rate map axis with more quality samples than screen pixels |
| 130 | ratemap | SampleOutOfRange | rare | a rate map quality sample outside [0, 1] among others |
| 131 | ratemap | SampleCount | rare | a rate map axis of more distinct samples than measured (9 on one layer, 4 on two) |
| 132 | budget | Time | none | a translation past its deadline: a defect of ours to fix on any supported input (AGENTS.md: 20 seconds) |
| 133 | feature | PrivateRenderState | none | Apple-private pipeline fields of OpenGL on Metal (no public header) |
| 134 | feature | CommandPredication | none | Apple-private command predication on a device without buffer device addresses |
| 135 | feature | ProgramScopeResource | app | MSL 3.2 textures, samplers and threadgroup memory bound at program scope (macOS 15 and later) |
| 136 | feature | ProgramScopeSharedSlot | rare | MSL 3.2 program-scope buffers aliasing another argument of another type at one index |
| 137 | feature | ProgramScopeLinked | rare | MSL 3.2 program-scope bindings in a linked visible function or a dynamic library |
| 138 | feature | ProgramScopeRead | none | a read of a program-scope buffer's global that Apple's compiler is not seen to write |
| 139 | feature | GenericPointer | system | MSL 4.1 generic pointers held in memory or of two spaces (macOS 27 and later) |
| 140 | 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) |