13 KiB
13 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 | # module | cell | axes | what only the cross decides |
| 23 | blend_interactions | blend-interaction-mask-blend | MTLColorWriteMask+MTLBlendOperation | whether 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 |
| 24 | blend_interactions | blend-interaction-mask-blend | MTLColorWriteMask+MTLBlendFactor | whether 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 |
| 25 | blend_interactions | family | MTLBlendFactor+MTLPixelFormat | whether 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 |
| 26 | border_swizzles | family | MTLPixelFormat+MTLSamplerBorderColor | which 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 |
| 27 | border_swizzles | border-swizzles-rgba8unorm | MTLSamplerBorderColor+MTLTextureSwizzle | whether 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 |
| 28 | depth_resolve_pairs | resolve-depth-filters-4 | MTLMultisampleDepthResolveFilter+MTLStoreAction | whether 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 |
| 29 | depth_stencil_space | depthstencil-facing-faces | MTLCullMode+MTLWinding | whether 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 |
| 30 | depth_stencil_space | depthstencil-depth-slot | MTLCompareFunction+MTLStencilOperation | which 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 |
| 31 | fetch_ordered | family | MTLColorWriteMask+MTLPixelFormat | which 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 |
| 32 | format_footprints | family | MTLPixelFormat+MTLTextureType | which 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 |
| 33 | int_attributes | integer-vertex-attributes | MTLVertexFormat+MTLVertexStepFunction | whether 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 |
| 34 | pass_sequence_actions | pass-sequence-color-actions | MTLStoreAction+MTLLoadAction | whether 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 |
| 35 | pixel_samplers | family | MTLPixelFormat+MTLSamplerMinMagFilter+MTLSamplerAddressMode | what 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 |
| 36 | render_state | render-state-facing | MTLCullMode+MTLWinding | which 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 |
| 37 | shader_stencil | stencil-output | MTLCompareFunction+MTLStencilOperation | which 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 |
| 38 | heap_metal_sizes | heap-sizes-block-writes-only | MTLTextureUsage+MTLPixelFormat+MTLTextureType | whether 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 |
| 39 | indirect_command_depth | indirect-render-commands-patch-draws | MTLIndirectCommandType+MTLTessellationControlPointIndexType | whether 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 |
| 40 | sampler_crossings | family | MTLSamplerBorderColor+MTLSamplerAddressMode | whether 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 |
| 41 | sampler_crossings | family | MTLSamplerMinMagFilter+MTLSamplerMipFilter | which 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 |
| 42 | sampler_crossings | sampler-compare-filter-pairs | MTLCompareFunction+MTLSamplerMinMagFilter | whether 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 |
| 43 | texture_descriptor_pairs | texture-pairs-usage-crossings | MTLTextureUsage+MTLPixelFormat | which 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 |
| 44 | texture_descriptor_pairs | texture-pairs-usage-crossings | MTLTextureUsage+MTLTextureType | whether 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 |
| 45 | stencil_resolved_sample | resolve-stencil-depth-resolved-sample | MTLMultisampleStencilResolveFilter+MTLMultisampleDepthResolveFilter | which 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 |
| 46 | primitive_type_crossings | primitive-type-restart-indices | MTLPrimitiveType+MTLIndexType | whether the index value `0xffff` ends a primitive or names a vertex. The value that ends one is the index type's own maximum, and only a strip has a primitive for it to end: over one index run the two strips answer different covered sets under the two index types and the point, the line list and the triangle list answer the same set under both. The primitive type's own sweep states one index type a case over ordinary indices, and the index type's sweep never reaches a strip at its maximum, so neither can ask it |
| 47 | shared_creator_formats | shared-creator-padded-format-storage | MTLStorageMode+MTLPixelFormat | which of the two a nil from `newSharedTextureWithDescriptor:` belongs to. Six formats by four storage modes, 24 cells: nil at `Shared`, `Managed` and `Memoryless` and a texture at `Private`, alike for the four padded 10-bit formats and for `RGBA8Unorm` and `R16Uint` as controls. The removed runtime rule read the format axis alone off a probe that had asked at `Shared` while its comment said `Private`, and answered nil for four formats at every mode; a storage sweep at one format could not tell that nil from a format's own, and a format sweep at one mode is the misreading itself |
| 48 | read_write_tiers | read-write-tier-descriptors | MTLPixelFormat+MTLTextureType | whether a format's read-write usage is the texture type's to grant. Thirty uncompressed colour formats in each of the eight non-multisample types, one descriptor of `ShaderRead | ShaderWrite` usage and private storage a cell: Metal answered a texture at all 240, and at the 22 further cells where a compressed or a depth format may be asked at all -- the pair's own asymmetry, and why those five formats are swept per permitted type rather than per type. That uniformity is the claim and only the grid states it: a side that granted the usage to a format in one type and refused it in another answers every `Type2D` cell exactly and a 1D, cube, 3D or `TextureBuffer` cell wrongly, where every other case of this family states `Type2D` alone |