The steps this packet landed as, in order: - Declare the crossings two pass families already hold Content: the tree of `development` at a4805b6ba1, unchanged.
20 KiB
20 KiB
| 1 | # A crossing that is **not** a pair of the option space, and so cannot be declared in | |||
|---|---|---|---|---|
| 2 | # crossings.tsv: one axis a Metal field that is a boolean or a number, or one Metal type crossed | |||
| 3 | # with **itself** in two or more slots. The answer is still a function of the axes together and of | |||
| 4 | # no one of them alone, which is what makes it a crossing; what it is not is a pair of two Metal | |||
| 5 | # enums, which is what the per-value columns of docs/CONFORMANCE-COVERAGE.md and crossings.tsv | |||
| 6 | # count. These rows are counted APART from the pairs and are never added into them. | |||
| 7 | # | |||
| 8 | # A row is ONE claim about ONE set of axes, at the cell where its falsification is read: a case of | |||
| 9 | # the module, or `family` where the cross takes more than one of its cases. | |||
| 10 | # | |||
| 11 | # An axis is one of two things: | |||
| 12 | # | |||
| 13 | # MTLFoo a Metal enum or option set with a generated value list, which MAY be named | |||
| 14 | # more than once -- that repetition is the type-in-two-slots crossing, and | |||
| 15 | # the count of names is the count of slots; | |||
| 16 | # MTLFoo.item one Metal item of one Metal type, spelled as the items axis keys it: | |||
| 17 | # MTLRenderPipelineDescriptor.alphaToCoverageEnabled, | |||
| 18 | # MTLArgumentEncoder.setArgumentBuffer:offset:. | |||
| 19 | # | |||
| 20 | # The generator FAILS on a row whose module ran no Metal, whose cell is not one of that module's | |||
| 21 | # recorded cases, which crosses fewer than two axes, which says nothing about what the cross | |||
| 22 | # decides, or whose module states fewer than TWO values of an ENUM axis by name. And on three of | |||
| 23 | # its own: a row every axis of which is a Metal enum named once (that is a pair, and belongs in | |||
| 24 | # crossings.tsv under its own checks); a field axis naming an item objc2-metal binds nothing for, | |||
| 25 | # or one this module's own data never reaches; and a field axis whose call answers a Metal type | |||
| 26 | # with a generated value list, which is an enum under another name and must be crossed as that | |||
| 27 | # enum. | |||
| 28 | # | |||
| 29 | # fields in one function, each under a guard on the suite's own vocabulary | |||
| 30 | # (`if let Some(b) = pass.visibility`), so by reachability alone every case that opens a pass | |||
| 31 | # reaches them all; the check also requires this module's text to state the field the guard tests, | |||
| 32 | # so a module that attaches no visibility buffer cannot declare a crossing on | |||
| 33 | # visibilityResultBuffer. | |||
| 34 | # | |||
| 35 | # What the generator CANNOT check for a field axis is that the module put TWO values of the field | |||
| 36 | # to Metal. A boolean's two values and a number's range are nowhere in the text this reads and in | |||
| 37 | # no recording, so a field axis carries only that the field is Metal's and that this module states | |||
| 38 | # it -- a field stated as None or false reads like one stated with a value, which is also why a | |||
| 39 | # bare boolean guard in the leg (`if descriptor.read_only {`) is no guard here. That, and whether | |||
| 40 | # the expected answer needs both axes, is what the last field is for and what a reader checks | |||
| 41 | # against the case. | |||
| 42 | # | |||
| 43 | # A crossing with an axis that is no Metal item at all -- a pixel format's class, the shape of a | |||
| 44 | # shader's output, whether a fragment writes a sample mask -- can be declared in neither file, and | |||
| 45 | # the document states that limit. | |||
| 46 | # module | cell | axes | what only the cross decides |
| 47 | alpha_coverage_pairs | family | MTLRenderPipelineDescriptor.alphaToCoverageEnabled+MTLRenderPipelineDescriptor.rasterSampleCount | whether the coverage an alpha gives is `floor(alpha * rasterSampleCount)` or a round to nearest. At four samples an alpha of 0.5 covers two under either rule; the one-sample row is where they part, and it covers **none**, so the destination survives untouched where rounding would have stored the fragment. Neither sample count alone says which rule it is |
| 48 | alpha_coverage_pairs | a2c-on-4-alpha-50-mask-no-alpha | MTLRenderPipelineDescriptor.alphaToCoverageEnabled+MTLColorWriteMask | whether the alpha the coverage is read from is the fragment's own or what survives the attachment's write mask. A mask that drops alpha leaves the coverage exactly as the same alpha gives with the mask absent and moves only the stored alpha: the mask's own sweep reads a stored channel and never a coverage, and the alpha sweep never meets a mask |
| 49 | alpha_coverage_pairs | a2one-on-1-blend-source-alpha | MTLRenderPipelineDescriptor.alphaToOneEnabled+MTLBlendFactor | whether alpha-to-one replaces the alpha before or after the blend reads it. Under RGB factors of `SourceAlpha` and `OneMinusSourceAlpha` the field on stores the source alone and off stores it blended at 0.5, so the blend read 1 and not 0.5 -- where the field alone moves only the stored alpha and the blend alone gives the 0.5 answer at any setting |
| 50 | argument_encoder_crossings | argument-encoder-cross-offsets | MTLArgumentEncoder.setArgumentBuffer:offset:+MTLArgumentEncoder.setArgumentBuffer:startOffset:arrayElement: | whether the two offsets compose or the second replaces the first. Over the 48-byte layout `(0, element 1)` writes word 6 and `(8, no element)` word 1, and `(8, element 1)` writes word 7 -- the cell neither call alone reaches. `constantDataAtIndex:` answers the constant's offset inside the arguments and so the same number at every cell, which is why the written mask is the site that reads it |
| 51 | argument_encoder_crossings | argument-encoder-cross-type-mixtures | MTLArgumentDescriptor.constantBlockAlignment+MTLDataType | whether `constantBlockAlignment` aligns the constant's offset inside the arguments or the encoder's own alignment. A single `MTLDataTypeUInt` at a block alignment of 64 is 4 bytes aligned to 4 -- the field changes nothing, because offset 0 is aligned to anything -- and a texture in front of it moves that constant to offset 64 and the encoder to 72 bytes while its alignment stays 8. So the field is indistinguishable alone and load-bearing one argument later |
| 52 | argument_encoder_crossings | argument-encoder-cross-type-sizes | MTLDataType+MTLDataType | whether a member's offset is a running sum of the members before it or a packing Metal may order. `char, char, float4, float4` is **48** bytes and `float4, char, float4, char` -- the same multiset -- is **64**, so a sweep of one type at a time sees two encoder lengths and only the permutation sees the layout |
| 53 | indirect_command_depth | indirect-compute-commands-reset-and-ranges | MTLIndirectCommandBuffer.resetWithRange:+MTLComputeCommandEncoder.executeCommandsInBuffer:withRange: | which commands of a buffer wrote anything, which the two ranges decide together: a command is blank where the reset covers it and runs where the execution does. A side that reset the executed range, or executed the reset one, is right about each range's own bounds and writes another command's segment |
| 54 | indirect_command_depth | indirect-render-commands-inherited-state | MTLIndirectCommandBufferDescriptor.inheritBuffers+MTLIndirectRenderCommand.setVertexBuffer:offset:atIndex: | which binding an executed command draws from when the parent encoder and the command have each bound one. With the field off the command's own binding is the only one there is, and with the command setting none the parent's is: each alone names a segment of the output, and only the pair says which of the two wins where both exist |
| 55 | indirect_command_depth | indirect-render-commands-under-the-pass-state | MTLRenderCommandEncoder.setScissorRect:+MTLIndirectRenderCommand.drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance: | which pixels an indirect draw covers, which the parent encoder's scissor and the command's own vertex range decide together -- a render command may not set a scissor of its own, so a side that dropped the pass's state at the execution rasterizes each half of the draw in full while being right about the scissor alone and about the draw alone |
| 56 | pass_attachment_pairs | pass-two-attachments-loads | MTLLoadAction+MTLLoadAction | which attachment each load action is read from, in one pass whose two colour attachments state different ones. An earlier pass of the same command buffer stores a different value into each, so a `Load` shows a value no clear of this pass states and the two attachments' prior values differ: the two off-diagonal pairs are the cells only the pair reaches, and a side that applied colour 0's load action to colour 1 answers both diagonal cells exactly and both off-diagonal ones wrongly. The 36 (load, store, options) triples of `pass_descriptors` read the fields back off one attachment and never render two that disagree |
| 57 | pass_attachment_pairs | pass-two-attachments-loads | MTLPixelFormat+MTLPixelFormat | which attachment each format is read from. `RGBA32Float` beside `R32Float` and the swap make the two planes different sizes **and** leave attachment 1 holding red alone, so a side that took one attachment's format for the other cannot answer the cell at all -- where the equal pair answers the same under every rule, and a sweep of one format at a time is a one-attachment question that no pairing can falsify |
| 58 | pass_attachment_pairs | pass-two-attachments-resolves | MTLStoreAction+MTLStoreAction | which attachment's resolve texture a resolving store writes into: `MultisampleResolve` at one attachment beside `DontCare` at the other, which a depth-only pass has one attachment to state. Colour 0 resolving alone, colour 1 alone and both are the three cells, and a side that took attachment 0's resolve texture for attachment 1 writes colour 0's value into colour 1's texture in the two cells where attachment 1 resolves while answering the colour-0-alone cell exactly. An attachment stored `DontCare` carries no resolve texture, so neither slot's own sweep ever has a second attachment to confuse it with |
| 59 | pass_bound_pairs | pass-bound-clear-reach | MTLRenderPassDescriptor.renderTargetWidth+MTLRenderPassDescriptor.renderTargetHeight+MTLLoadAction+MTLRenderCommandEncoder.drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance: | which texels of an attachment **larger than its pass's render area** the pass changes, and to what. A `Clear` load clears from the origin over the render area rounded up to whole 32-pixel tiles and clipped to the attachment where the pass encodes a draw, the whole level and slice where it encodes none, and a `Load` load keeps every texel whatever the area: so each axis moves a plane only at the others' settings and a case that fixes two of the three says nothing about the other cells. The two numbers are separate axes because the rounding is **per axis** -- the 8 by 40 and 40 by 8 cells are where a side that rounded the larger side, or took one axis's reach for both, answers the square cells exactly and those two wrongly -- and `draw-covers-nothing` beside `no-draw-call` is where a side that read the draw axis as whether a draw *wrote* anything answers two cells alike and both wrongly. The number sweep of `pass_descriptors` reads the two numbers back off a descriptor and renders through neither |
| 60 | pass_sequence_actions | pass-sequence-aspect-actions | MTLStoreAction+MTLStoreAction+MTLLoadAction+MTLLoadAction | which attachment each aspect's action is read from, across a pass boundary where the two aspects disagree in both passes. Pass A stores the depth and discards the stencil, or the reverse, and pass B loads one aspect and clears the other: the depth plane is then a function of the depth's two slots and the stencil plane of the stencil's, and a side that took one aspect's slot for both answers the three symmetric cells exactly and the six asymmetric ones wrongly. Measured: taking the depth attachment's action for the stencil's scratch copy moves four of the nine cells, every one of them in the stencil plane and none in the depth plane |
| 61 | pass_sequence_actions | pass-sequence-color-actions | MTLRenderPassDescriptor.renderTargetWidth+MTLStoreAction+MTLLoadAction | whether the next pass's render area bounds what its load action does to what the last pass stored. A `MTLLoadActionLoad` under a 32 by 32 area of a 40 by 40 attachment keeps every texel, so the bound moves **not one** against the whole-area cell -- the independence `pass_bound_pairs` measured inside one pass, holding across the boundary. A `MTLLoadActionClear` under the same bound clears its own tiles and leaves the 8 texels past them holding **what pass A's store action left there**, so the store action is visible through a `Clear` after all, which it is not over the whole attachment. Neither the area alone nor either action alone reaches either cell |
| 62 | sampler_crossings | family | MTLSamplerMinMagFilter+MTLSamplerMinMagFilter+MTLSamplerDescriptor.lodMinClamp | which of the two filters reads the level `lodMinClamp` raised the requested one to. The two `(min, mag)` pairs whose filters agree answer the same under every rule, so only an unequal pair at a clamp above the sampled level parts Metal's rule from Vulkan's -- the magnifying filter at a level of zero or less, the minifying one above it -- and from a `NotMipmapped` sampler's, which ignores the clamp outright |
| 63 | sampler_crossings | sampler-axis-border-opaque-black | MTLSamplerAddressMode+MTLSamplerAddressMode+MTLSamplerAddressMode | whether a border colour is substituted per **axis** or for the sample. On a lane whose `s` is inside the texture and whose `t` is a period out, a sampler whose `s` mode is `ClampToBorderColor` and whose `t` mode repeats reads either the border or the wrapped texel, and no sampler whose border-reading axis is itself the out-of-range one can part the two readings |
| 64 | sampler_crossings | sampler-axis-mode-triples | MTLSamplerAddressMode+MTLSamplerAddressMode+MTLSamplerAddressMode | whether each axis's own mode decides that axis's wrap. Three **unequal** modes over a grid of one inside coordinate and four outside are what tell it from a decision taken on the coordinate as a whole, or from one axis's mode applied to all three: every sampler whose axes agree, and every sweep that moves one axis with the others repeating, reads the right texel under all three rules |
| 65 | texture_descriptor_pairs | texture-pairs-plain-contents | MTLTextureDescriptor.allowGPUOptimizedContents+MTLTextureUsage | whether lossless compression is a **conjunction** of the flag with the usage or either one's doing. The flag off answers the uncompressed footprint at a usage that would have compressed, and at `ShaderRead | PixelFormatView` it moves nothing because the usage already barred it: so neither the flag's own sweep nor the usage's says which of the two switches moved the number |
| 66 | texture_descriptor_pairs | texture-pairs-type-levels-slices | MTLTextureType+MTLTextureDescriptor.mipmapLevelCount+MTLTextureDescriptor.arrayLength | how many bytes a mip chain takes and how many levels Metal allows, both of which are the **type's** to decide. An 8 by 8 by 64 3D texture takes seven levels and its footprint saturates at four; a 2D array of one slice is 16512 bytes aligned to 16384 where the plain 2D of that extent is 16512 aligned to 128, and at seven levels they part to 33152 against 22528; a cube is six of the array's chain. A sweep over types at one level count, beside a sweep over level counts of one type, answers none of it |
| 67 | texture_descriptor_pairs | texture-pairs-usage-crossings | MTLTextureUsage+MTLTextureDescriptor.height | whether a usage bit that bars lossless compression bars it at every extent. 16 by 16 answers 1152 bytes against 1024 and 16 by 15 answers 1024 against 1024, so one texel of height decides whether the usage moves the footprint at all -- and a usage sweep at one extent reads as the bit always moving it |
| 68 | tessellation_crossings | tessellation-partition-factors | MTLTessellationPartitionMode+MTLRenderCommandEncoder.setTessellationFactorBuffer:offset:instanceStride: | which of the four modes answer the same point set, which is the **factor's** to decide: five of the six pairs of modes agree at one of the eight factors stated here and part at another, and two of those partings are the clamp range's own ends -- `fractionalOdd` stops one below the ceiling and `fractionalEven` starts at 2. The mode sweep states one factor list, so every pair of modes there either agrees or parts once and for all, and the factor sweep states one mode, so it reads a clamp and no rounding |
| 69 | tessellation_crossings | tessellation-partition-degenerates | MTLTessellationPartitionMode+MTLRenderCommandEncoder.setTessellationFactorBuffer:offset:instanceStride: | whether a factor that is not a positive number meets Metal's cull or a partition's clamp, and which. An edge factor of 0 marks nothing under all four modes, `fractionalEven`'s floor of 2 included, so the cull runs before any mode's range; a zero or NaN **inside** factor, which no cull reads, answers one set under each mode and `fractionalOdd`'s is not the other three's. The degenerate sweep states one mode, so it cannot say the clamped answer is the mode's, and the mode sweep states finite factors, so it never meets either rule |
| 70 | tessellation_crossings | family | MTLPatchType+MTLTessellationPartitionMode+MTLRenderCommandEncoder.setTessellationFactorBuffer:offset:instanceStride: | how many of a patch's inside factors the mode's rule is applied to, which is the patch type's. Moving the second inside factor from 2 to 5 moves every quad cell under every mode and **no** triangle cell under any mode, while moving the first moves both: a quad's function reads two inside factors and a triangle's reads one. No case states two inside factors of a triangle, so the half of the claim that the second slot is ignored there is this cross's alone |
| 71 | tessellation_crossings | tessellation-partition-scales | MTLTessellationPartitionMode+MTLRenderCommandEncoder.setTessellationFactorScale: | what a mode's rule does with the fraction a scale produced. `setTessellationFactorScale:` is the one way to hand a partition rule a factor a `half` factor buffer could not have held: `integer` and `fractionalEven` answer the same cell set at both whole products stated here, 8 and 10, and different sets at both products that are not whole, 8.5 and 2.5. The scale sweep states one mode and the mode sweep sets no scale |
| 72 | tessellation_sweeps | tessellation-factor-steps | MTLTessellationFactorStepFunction+MTLRenderCommandEncoder.drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance: | which factor record a patch reads, which is the step function's rule applied to the draw's own `patchStart`, `instanceCount` and `baseInstance`. The case's four legs are chosen so that no two of the four step functions answer all four of them, which takes both axes: a per-patch step and a constant step part only at a patch start above 0, and a per-instance step parts from both only where the draw states more than one instance |
| 73 | layered_targets | layered-attachment-places | MTLRenderPassAttachmentDescriptor.slice+MTLRenderPassAttachmentDescriptor.depthPlane | which of the two fields selects the plane rendered, which is the target's own shape's to decide: an array texture's plane is `slice`'s and a 3D texture's is `depthPlane`'s, so the same number in the other field reaches **nothing** and the plane renders at 0. Each field alone reads as the one that selects a plane, because the cell where it is 0 is the cell the other field was selecting with; only the pair says which field the shape listens to |
| 74 | layered_targets | layered-attachment-levels | MTLRenderPassAttachmentDescriptor.level+MTLRenderCommandEncoder.setScissorRect: | whether a scissor rectangle is read in the **level's** own extent or in the target's level 0. A 2 by 2 rectangle at level 1 of an 8 by 8 target covers a quarter of the 4 by 4 level and not a sixteenth of the target, so the drawn region's own boundary says which extent the frame was. The level alone moves which plane is written and the rectangle alone moves a region of level 0, and neither says what the level's frame is |
| 75 | layered_targets | layered-render-target-array-length | MTLRenderPassDescriptor.renderTargetArrayLength+MTLRenderPassAttachmentDescriptor.slice | which slices a pass reaches: the layer count says how many and the attachment's slice says where they start, so the shader's layer `i` lands in slice `slice + i` and the load and store actions cover exactly those. At a count of 2 from slice 1 the pass writes slices 1 and 2 and leaves slice 0 and slice 3 as an earlier pass left them -- the cell a count at slice 0, or a slice at the default count, reads identically to a side that took the layer absolutely |
| 76 | layered_targets | layered-depth-other-slice | MTLRenderPassAttachmentDescriptor.slice+MTLRenderPassAttachmentDescriptor.slice | whether the slice a pass renders is the **attachment's** or the pass's. Each attachment takes its own: a pass whose colour is at slice 2 and whose depth is at slice 0 writes both, each at its own slice. The cell where the two agree is right under either rule, and only the two unequal cells part a side that took one attachment's slice for the whole pass -- which then leaves the other attachment's plane untouched and writes a plane nothing asked for |