9.4 KiB
9.4 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 | 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 |
| 35 | 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 |
| 36 | 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 |
| 37 | 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 |
| 38 | 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 |
| 39 | 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 |
| 40 | 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 |
| 41 | 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 |
| 42 | 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 |
| 43 | 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 |