Files
metal2vulkan/scripts/conformance-coverage/crossings.tsv
T
Anees Iqbal 30a76f3e8d Compare the depth-resolved stencil filter against Metal
The steps this packet landed as, in order:
- Measure compressionType, and say why no case states it

Content: the tree of `development` at 2eb1d1baf1, unchanged.
2026-10-26 13:19:14 +02:00

11 KiB

1# A crossing of the option space: two or more Metal enums or option sets that one case module
2# puts to Metal **together**, where the answer is a function of the pair and not of either value
3# alone. The per-value columns of docs/CONFORMANCE-COVERAGE.md count values; this counts pairs.
4#
5# A row is ONE claim about ONE set of axes, at the cell where its falsification is read: a case of
6# the module, or `family` where the cross takes more than one of its cases. The same claim at a
7# second sample count, format or shape is not a second row.
8#
9# The generator FAILS on a row whose module ran no Metal, whose cell is not one of that module's
10# recorded cases, whose axis has no generated value list, which crosses fewer than two axes or
11# names one twice, or whose module states fewer than TWO values of an axis by name -- a module
12# that cannot vary an axis cannot cross it, so one value would falsify the row. What it cannot
13# check is whether the expected answer needs both axes; that is what the last field is for, and a
14# reader checks it against the case.
15#
16# An axis is a Metal enum or option set. A cross with a Metal field that is a boolean or a number
17# (a stencil mask, a per-sample depth, an extent), or of a type with itself in two slots (the two
18# stencil faces), is no pair of the option space and cannot be said here: it is declared in
19# other_crossings.tsv and counted apart. A cross with a grouping that is no Metal item at all -- a
20# format's class, the shape of a shader's output -- can be said in neither, and the document states
21# that limit.
22# modulecellaxeswhat only the cross decides
23blend_interactionsblend-interaction-mask-blendMTLColorWriteMask+MTLBlendOperationwhether the write mask is applied before the blend reads the destination or after it. Only `Min` and `Subtract` can see the order: under `Add`, `Max` and `ReverseSubtract` a channel the mask drops stores the destination either way, which is the one blend the mask's own sweep was written with
24blend_interactionsblend-interaction-mask-blendMTLColorWriteMask+MTLBlendFactorwhether a mask that drops alpha changes what an RGB factor reads from the destination's alpha. Neither sweep can ask it: the mask sweep's blend reads no channel but its own, and the factor sweep's mask keeps every channel
25blend_interactionsfamilyMTLBlendFactor+MTLPixelFormatwhether Metal clamps the blend colour to `[0, 1]` before a factor multiplies by it. The float attachment alone reads as the colour not being clamped and the normalized one alone as the result being clamped like any overflow; the pair says the factor was 1 and not 2
26border_swizzlesfamilyMTLPixelFormat+MTLSamplerBorderColorwhich channel of the border colour a format's channel reads. `A8Unorm`'s one channel takes the colour's **red**, so its opaque-black border reads alpha 0 where a four-channel format's reads 1
27border_swizzlesborder-swizzles-rgba8unormMTLSamplerBorderColor+MTLTextureSwizzlewhether a border texel goes through the texture's swizzle like any other texel: a side that swizzled the texel it fetched and not the border it substituted answers the colour's own channels in a swizzled lane
28depth_resolve_pairsresolve-depth-filters-4MTLMultisampleDepthResolveFilter+MTLStoreActionwhether the resolve is the same under both resolving store actions. Twenty-one cells say so under each, so a side that resolves from the stored copy under one and from the tile under the other diverges in a cell while each value alone is right
29depth_stencil_spacedepthstencil-facing-facesMTLCullMode+MTLWindingwhether the face whose rules a primitive takes is read from the same two settings as whether it is culled: a side that culls correctly and then applies the other face's operations leaves the other face's value in the stencil
30depth_stencil_spacedepthstencil-depth-slotMTLCompareFunction+MTLStencilOperationwhich of the three stencil slots a fragment reaches, which the depth comparison and the stencil comparison decide together, and what the slot then writes: a side that routed a failed depth test to the stencil-failure slot is right about every comparison and every operation alone
31fetch_orderedfamilyMTLColorWriteMask+MTLPixelFormatwhich memory bytes a channel mask keeps, which the format's channel order decides: a side that wrote the attachment through a channel-swapped view without swapping the mask is exact on one format and divergent on the other
32format_footprintsfamilyMTLPixelFormat+MTLTextureTypewhich texture types Metal describes a texture of, which is the format's to decide: the one-plane `YCBCR*` and `RGB10A8_2P` formats answer a size and **no texture** for `Cube` and `CubeArray` and a texture for the other six types, while the padded and plain formats answer a texture for all eight
33int_attributesinteger-vertex-attributesMTLVertexFormat+MTLVertexStepFunctionwhether the conversion of an integer attribute is the same whichever step function fetched the record. Metal's constant step is a fetch no fixed-function vertex input can express, so a side whose shader-pulled path converts unlike its fixed-function one is right about every format and every step function alone
34pass_sequence_actionspass-sequence-color-actionsMTLStoreAction+MTLLoadActionwhether the next pass over one attachment sees what this one stored. `MTLStoreActionStore` then `MTLLoadActionLoad` keeps pass A's draw and the host's own texels outside it; `MTLStoreActionDontCare` then `MTLLoadActionLoad` keeps **neither** of them, the texels the host wrote before pass A everywhere, so A's clear and A's draw are both gone; and under pass B's `MTLLoadActionClear` over the whole attachment the store action moves no texel at all. So neither value alone says anything: the 36 (load, store, options) triples of `pass_descriptors` only read the fields back, and every other pass case fixes one side of the boundary
35pixel_samplersfamilyMTLPixelFormat+MTLSamplerMinMagFilter+MTLSamplerAddressModewhat a pixel-coordinate sample reads at and past the texture's edge: the address mode decides which texel a tap outside falls on, the filter decides how many taps there are, and the format decides what their average rounds to. The family's sixteen cases are the cells
36render_staterender-state-facingMTLCullMode+MTLWindingwhich of a triangle and its reverse survives a draw: flipping the winding flips it and flipping the cull mode flips it back, so neither setting's own value decides anything and a side that reads one and not the other draws the wrong one of the pair
37shader_stencilstencil-outputMTLCompareFunction+MTLStencilOperationwhich operation a fragment's `[[stencil]]` output fires, under a state whose two faces carry different comparisons and different operations: a side that fired the pass operation where the comparison failed writes a byte the comparison alone and the operation alone both allow
38heap_metal_sizesheap-sizes-block-writes-onlyMTLTextureUsage+MTLPixelFormat+MTLTextureTypewhether Apple's private `BlockWritesOnly` usage bit changes a heap answer. Every shape is recorded with the bit and without it, so a side whose layout depends on the bit for one format or one texture type and not another diverges in a cell while the bit alone and each format alone are right
39indirect_command_depthindirect-render-commands-patch-drawsMTLIndirectCommandType+MTLTessellationControlPointIndexTypewhether an indirect patch draw reads its control-point indices from the command or from the pipeline that command holds. The buffer's descriptor declares both patch-draw types and each command carries its own pipeline, so the indexed type is the pipeline's and the index buffer is the command's argument: a side that encoded one command's type against the other's pipeline marks the grid the other owns, while the command types alone are a sweep and the index type alone is a direct draw's question
40sampler_crossingsfamilyMTLSamplerBorderColor+MTLSamplerAddressModewhether a border-reading mode on one axis substitutes the border for a tap another axis put out of range. One case a border colour, and six address triples that put the border-reading mode on `s` alone, on `t` alone, on `r` alone and on all three: the sweeps that compared every colour read the border on `r` with `s` and `t` inside the texture, so no row of them asks which axis's mode the substitution follows
41sampler_crossingsfamilyMTLSamplerMinMagFilter+MTLSamplerMipFilterwhich level a sampler reads when the LOD clamp raises the requested one, and with which of the two filters -- `NotMipmapped` ignores the clamp outright, and the two mip filters pick their level and then their filter. The filter sweep samples at texel centres where a linear footprint is one texel, and the mip sweep pins both filters to nearest and says so, so neither can tell the three rules apart
42sampler_crossingssampler-compare-filter-pairsMTLCompareFunction+MTLSamplerMinMagFilterwhether Metal filters the comparison's **results** or compares a filtered depth. Sixteen cells of every comparison against a nearest and a linear filter, sampled where four texels carry the footprint at weights of a quarter each and at 9/16, 3/16, 3/16 and 1/16: the comparison sweep samples at texel centres, where a linear footprint is one texel and all eight comparisons read the same under either rule
43texture_descriptor_pairstexture-pairs-usage-crossingsMTLTextureUsage+MTLPixelFormatwhich crossings of a usage with a format Metal's texture descriptor takes, and what it makes of them. `ShaderWrite` on `BC1_RGBA`, on `ASTC_4x4_LDR` and on `Depth32Float` each answer a texture of usage 0x3 and `RenderTarget` on the two block-compressed formats one of 0x4, where `ShaderAtomic` is fatal on every format but `R32Uint`: so the descriptor is where a guess puts the refusal and the pair is what says Metal does not put it there
44texture_descriptor_pairstexture-pairs-usage-crossingsMTLTextureUsage+MTLTextureTypewhether a usage bit that bars lossless compression bars it in every texture type. A 1D texture of 5000 texels answers 32768 bytes under `ShaderRead` and under `ShaderRead | PixelFormatView` alike, because its height is 1 and no usage of it is ever compressed, where the same two usages part by 128 bytes on a 64 by 64 2D texture -- so the usage sweep in one type reads as the bit always moving the footprint
45stencil_resolved_sampleresolve-stencil-depth-resolved-sampleMTLMultisampleStencilResolveFilter+MTLMultisampleDepthResolveFilterwhich sample's stencil a combined attachment's resolve texture holds. Under `Sample0` it is sample 0's whatever the depth filter, and under `DepthResolvedSample` it is the stencil of the sample the depth filter took: `sample-0-between` answers 0x33 under all three depth filters on one stencil filter and 0x33, 0x11 and 0x55 on the other. A side that read the stencil filter and ignored the depth filter, or took the depth-picked sample whatever the stencil filter, is right on four of the six cells and wrong on two, and neither value's own sweep reaches them