Merge current master into native mesh runtime
Preserve the native object/mesh path alongside upstream texture-buffer and restore-batch changes. Advance semantics, artifact and runtime versions beyond both parents (2343/607/2560) and refresh the runtime source guard. Workspace all-target all-feature Clippy passes. The complete golden table is retained from upstream pending its genuine Apple-assembler refresh in hosted CI.
This commit is contained in:
commit
2c297ad7bf
104 files changed
+9722
-3027
No files matched your search
+67
-39
@@ -270,8 +270,8 @@ and so do the command line, the compile worker and every validation tool. It hol
|
||||
[RESOURCE-ID.md](RESOURCE-ID.md)), reads, writes and updates atomically its texture buffers, slots and
|
||||
argument buffers' members alike (a uniform texel buffer where it reads one, a storage texel
|
||||
buffer where it writes one, the element of set 1's texel-buffer array at its ID's index; where
|
||||
the ID's word names a format the profile holds as words, `metal::format::texel_buffer_form`,
|
||||
that element is a view of `R32_UINT` and the function converts its texels itself, under the
|
||||
the ID's word names a format the profile holds as words for the usage its bit 11 tells,
|
||||
`metal::format::texel_buffer_form`, that element is a view of `R32_UINT` and the function converts its texels itself, under the
|
||||
stage's `SpecKey::TexelBufferWords`, which a binder sets true where such a texture buffer may
|
||||
be reached and under which, false, each access is the element's own view's:
|
||||
RESOURCE-ID.md, the texture buffer word), and
|
||||
@@ -1419,17 +1419,6 @@ exception: on a device without maximal reconvergence its precision notes may add
|
||||
return before the body and SPIR-V reconverges only over all invocations (section 2.2.5; the
|
||||
note's entry in the precision-note catalogue).
|
||||
|
||||
### Levels a slot reads
|
||||
|
||||
Each texture slot of a stage states the levels of its bound view its reads reach, counted from the
|
||||
view's first level (`StageModule::level_reads`, one `LevelReads` a slot): whether some read may
|
||||
reach any level (`any`: a level the function computes, a level-count query used beyond the
|
||||
containment of a constant level, a level-of-detail query, a sample through no sampler or with a
|
||||
minimum level of detail, a storage access, or a use the analysis does not follow), the highest
|
||||
constant level a fetch, size query or gather names (`named`) and the lowest whose texels a fetch
|
||||
or gather reads (`lowest_read`), and its samples by the sampler each reads through (`sampled`, with the highest
|
||||
and the lowest constant level of detail). A sample's level is its sampler's to bound.
|
||||
|
||||
### Indirect command buffers
|
||||
|
||||
An indirect command buffer's commands are records in ordinary buffer storage
|
||||
@@ -1808,10 +1797,13 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
`float` sum rounded once per lane, a lane-order chain of `half` additions, or a Hillis-Steele
|
||||
scan of them.
|
||||
- `metal2vulkan-degrade-device-denormals` (precision). `PrecisionNote::DeviceDenormals`: `float`
|
||||
denormals follow the device: Metal reads an `f32` denormal operand of its float arithmetic,
|
||||
comparisons, and functions as the zero of its sign and flushes a denormal result to one, where a
|
||||
Vulkan device keeps or flushes them by its own float controls (this translation declares no
|
||||
`DenormFlushToZero`). Recorded where the module leaves an operation's denormals to the device,
|
||||
denormals follow the device. Metal's answer at the denormal boundary is per operation (an Apple
|
||||
M3 Max): it flushes before rounding on some (a product, a fused multiply-add, `dot` and `mix`
|
||||
whose exact result lies just below `2^-126` answer a zero, where a device that rounds first
|
||||
answers `2^-126`) and keeps a denormal on others (`sin`, `tan`, `asin`, `sinh`, `asinh` and
|
||||
`atanh` of a denormal operand answer a denormal), where a Vulkan device keeps or flushes
|
||||
denormals by its own float controls (this translation declares no `DenormFlushToZero`): the
|
||||
device may answer either. Recorded where the module leaves an operation's denormals to the device,
|
||||
on every device: `+ - *`, the comparisons, `fma`, `dot`, `sqrt`, `rsqrt`, `trunc`, `rint` and
|
||||
`ldexp` on `float` (by the device's products); `fneg`, `fabs`, `floor` and `ceil` on `float`;
|
||||
the divisions and the remainder, the device's maths functions (`fast::fmod`'s fused
|
||||
@@ -1943,11 +1935,10 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
each fetching draw after the earlier draws of its pass by a barrier between them (the runtime's
|
||||
`Metrics::attachment_loop_reads`, or its copies into the attachment's shadow on a device without
|
||||
the attachment feedback loop). Vulkan orders nothing between the overlapping fragments of one draw
|
||||
there, where Metal orders them in primitive order: a fragment that covers a pixel an earlier
|
||||
fragment of its own draw covered may read the texel from before that fragment's write. Exact for a
|
||||
draw whose primitives do not overlap at a pixel; otherwise each such pixel holds the result of
|
||||
some order of the draw's fragments there. A raster order group on the color input, or on a color
|
||||
output of an attachment the function reads, takes the same form.
|
||||
there, where Metal orders them in primitive order: a fetch may read the texel from before its
|
||||
draw, so overlapping read-modify-writes of one draw may leave one application. Exact for a draw
|
||||
whose primitives do not overlap at a pixel. A raster order group on the color input, or on a
|
||||
color output of an attachment the function reads, takes the same form.
|
||||
- `metal2vulkan-degrade-fp8-value` (precision). `PrecisionNote::Fp8Value`: An 8-bit float converts
|
||||
to an integer from the format's documented value with Metal's saturating float-to-integer rule,
|
||||
where Metal's device here answers otherwise: Metal on Apple M3 compiles these reads but extends
|
||||
@@ -1978,7 +1969,14 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
filter choice, level and clamps are Metal's. Metal's fixed-point weights, exact grid sums, float
|
||||
accumulators and sixty-fourth level fractions are not reproduced: a lane may differ by a few grid
|
||||
steps (`1/4080` at 8 bits), by up to `2.1e-3` on an extended-range sRGB texture's bicubic sample,
|
||||
and by up to `1/64` of the two levels' difference under a linear mip filter. Measured for the
|
||||
and by up to `1/64` of the two levels' difference under a linear mip filter. An extended-range
|
||||
3D texture's linear mip filter blends its two levels' 3D filters as a 2D texture's do, where
|
||||
Metal's blend of a 3D texture's levels fits no rule tried (the XR mip probe, an Apple M3 Max on
|
||||
macOS 27.0.1: the closest rule 284 of 8,192 samples apart). The conformance crate's probe
|
||||
`extended_linear_mip_blends` (the M3 Max, 16,384 lanes per form, filter and shape) puts Metal's
|
||||
own two levels' samples, blended by `mix` at the fraction on sixty-fourths, within `0.031` of
|
||||
its linear-mip sample of a `BGR10_XR` or `BGRA10_XR` 2D texture and within `0.033` of a 3D
|
||||
one's. Measured for the
|
||||
bicubic filter by the conformance case `bicubic-texel-classes` (Metal on an Apple M3 Max, macOS
|
||||
27.0.1): Metal's results lie on the format's grid, a sixteenth of a code for `RGBA8Unorm`,
|
||||
`R8Unorm` and `RGBA8Snorm`, a whole code for `RGBA16Unorm` and an exact `half` for
|
||||
@@ -2087,8 +2085,8 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
device's filter of them) by the MSL transfer through the device's `Pow`, at every such access on
|
||||
every device. A `float` read of a texture buffer held as words decodes an 8-bit sRGB colour code
|
||||
the same way, and records the note where the profile holds an 8-bit sRGB format's texture
|
||||
buffers as words (`metal::format::texel_buffer_form`): its routine reads every format the
|
||||
profile holds so.
|
||||
buffers of some usage as words (`metal::format::texel_buffer_form`): its routine reads every
|
||||
format the profile holds so for some usage.
|
||||
- `metal2vulkan-degrade-function-storage-assumed` (precision).
|
||||
`PrecisionNote::FunctionStorageAssumed`: A vertex or fragment function keeps more private memory
|
||||
(its `alloca`s, a call stack among them, or constants held as `Private` variables) than the floor,
|
||||
@@ -2117,7 +2115,14 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
half-float format, or `ARGB8Unorm`; an integer texel written into a storage texture of
|
||||
the float class that may hold a half-float or small-float format, which Metal rounds to nearest
|
||||
even and the device's store as it rounds a `float` (toward zero on every measured driver, one
|
||||
unit in the last place, a finite value past 65504 stored as 65504); and a fragment function's
|
||||
unit in the last place, a finite value past 65504 stored as 65504); a fragment function's
|
||||
`float` texel written, in a pipeline of `TextureWriteRoundingMode::NearestEven`, to a storage
|
||||
texture that may hold a half-float or `RG11B10Float` format, which Metal's mode 2 rounds to
|
||||
nearest even (`RG11B10Float` held at its largest finite value) and the device's store as at the
|
||||
default mode, with the same bound (a `half` texel's `RG11B10Float` channel too; measured on an
|
||||
Apple M3 Max, macOS 27.0.1, by the conformance crate's probe `texture_write_rounding_storage`:
|
||||
262,112 half-float channels and 196,583 `RG11B10Float` channels of each texel type, each within
|
||||
one code of the default's); and a fragment function's
|
||||
blend into an `ARGB8Unorm` attachment over its input attachment where no Vulkan blend state on its rotated
|
||||
image gives Metal's (a destination alpha in a color factor, say), whose result the attachment's
|
||||
write converts; and a render pipeline's private logic operation that the fragment function
|
||||
@@ -2170,8 +2175,9 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
- `metal2vulkan-degrade-quads-split-by-clipping` (precision). `PrecisionNote::QuadsSplitByClipping`:
|
||||
A fragment function runs a quad or simdgroup operation, recorded on every device: a device may
|
||||
shade a triangle it clips as several triangles, and then a quad a seam between the pieces crosses
|
||||
runs once per piece, each run with the other piece's pixels as helper invocations, so the
|
||||
operation counts or combines fewer active lanes than Metal's, whose quad holds all four.
|
||||
runs once per piece, each run with the other piece's pixels as helper invocations, so a helper
|
||||
query in either run names the other piece's covered pixels as helpers, where Metal's quad,
|
||||
shaded once, names none.
|
||||
- `metal2vulkan-degrade-fragment-simdgroup-grouping` (precision).
|
||||
`PrecisionNote::FragmentSimdgroupGrouping`: A fragment function runs a simdgroup operation (a
|
||||
reduction, scan, vote, ballot, shuffle, broadcast or AGX multiply-add) or reads its
|
||||
@@ -2186,8 +2192,12 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
quad's other covered pixels as helpers, where the device shades them as one quad: a ballot of the
|
||||
helper query names covered pixels as helpers on the M3 Max (3 of the 16 quads of an 8x8 target, 2
|
||||
to 4 of the 12 of a 7x5 one, under the full-screen triangle with every third pixel discarded) and
|
||||
none on the device. A device whose fragment subgroup holds fewer than two quads combines the
|
||||
one quad's pixels alone, so a reduction ahead of a `discard_fragment` counts no quad the discard
|
||||
none on the device. A device whose fragment subgroup holds fewer than 32 lanes runs it as a
|
||||
partly occupied simdgroup, its upper lanes inactive: a fill from past the subgroup reads an
|
||||
inactive lane, which Metal leaves undefined (MSL 4.1 section 6.10.2: a thread needs to only read
|
||||
data from another active thread in the SIMD-group), and the device reads the calling lane in its
|
||||
place. Where the subgroup holds fewer than two quads, the device combines the one quad's pixels
|
||||
alone, so a reduction ahead of a `discard_fragment` counts no quad the discard
|
||||
drops, where an Apple GPU's simdgroup counts the dropped quads of its 8x4 pixel block; the
|
||||
device states one fragment subgroup size, so no required size widens it, and no exact form
|
||||
exists there.
|
||||
@@ -2359,7 +2369,11 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
device that computes `half` in 16 bits under the 16-bit float controls, a `half` one is the
|
||||
device's 16-bit `Fma` on the `half` operands. Recorded bound: a `half` result
|
||||
held in `float` within one `half` ulp of Metal's; a `float` one, and a 16-bit one, within half an
|
||||
ulp of the product plus half an ulp of the result, in its own format.
|
||||
ulp of the product plus half an ulp of the result, in its own format, but where the unfused
|
||||
product overflows: an unfused `half` product can overflow where Metal's fused result is finite,
|
||||
and the overflow is the device's answer (a 16-bit product of magnitude `65520` or more is the
|
||||
infinity of its sign, so `fma(256.0h, 256.0h, -65504.0h)` answers `inf` on lavapipe where Metal
|
||||
answers 32).
|
||||
- `metal2vulkan-degrade-device-texel-conversion` (precision).
|
||||
`PrecisionNote::DeviceTexelConversion`: Native device sampling (a texel conversion): the module
|
||||
hands a read, sample or gather with a `float` result the device's own conversion of the texel's
|
||||
@@ -2417,12 +2431,22 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
exact result once (RADV's does, one `half` ulp from Metal's where the `float` result lies on a
|
||||
`half` midpoint), so a pipeline that rounds through the pair records the note there too, a
|
||||
static note of the rounding. Under those controls a `half` `+`, `-`, `*`, `/` and `sqrt` are the
|
||||
device's 16-bit instructions, whose results take no such rounding. Also recorded where a `half`
|
||||
read from its bits is the device's widening, or a `half` encoded to its bits (where they are not
|
||||
the bits it was read from) is the device's narrowing, and that conversion is not under those
|
||||
controls: the device's conversion without them, and `GLSL.std.450 UnpackHalf2x16` and
|
||||
`PackHalf2x16` on every device without `shaderFloat16`. A half denormal may read or encode as the
|
||||
zero of its sign.
|
||||
device's 16-bit instructions between exact conversions, Metal's by the Vulkan spec, but a
|
||||
driver's compiler may compute them in `float` and leave them unrounded, so a pipeline holding a
|
||||
16-bit `+`, `-`, `*`, `/` or fused multiply-add records the note too, on every device, a static
|
||||
note of the rounding (a `sqrt` alone does not). Intel's Windows driver 101.2145 on a UHD
|
||||
Graphics 630 does so: a tree of three 16-bit `OpFAdd`s, or `Fma`s of a product, each decorated
|
||||
`NoContraction` under all three 16-bit controls, on 4,096 invocations, matched neither the
|
||||
`half` tree nor the `float` tree rounded once on 2,284 sums and 4,080 products, each printed one
|
||||
a `float` of more significant bits than a `half` holds (job m3-max-83092; the Iris Xe under Mesa
|
||||
ANV 26.2.6 gave the `half` tree on every one, job m3-max-83093). A chain the program then stores
|
||||
as `half` is the `float` chain rounded once: in the runtime's quad test there, 112 of its 1,536
|
||||
compared halves, by 1 code at 100 of them and by up to 40 where the operands cancel. Also
|
||||
recorded where a `half` read from its bits is the device's widening, or a `half` encoded to its
|
||||
bits (where they are not the bits it was read from) is the device's narrowing, and that
|
||||
conversion is not under those controls: the device's conversion without them, and
|
||||
`GLSL.std.450 UnpackHalf2x16` and `PackHalf2x16` on every device without `shaderFloat16`. A half
|
||||
denormal may read or encode as the zero of its sign.
|
||||
- `metal2vulkan-degrade-device-half-denormals` (precision). `PrecisionNote::DeviceHalfDenormals`:
|
||||
half denormals may flush to zero where Metal preserves them. The module computes `half` under
|
||||
the 16-bit float controls on a device that offers `shaderFloat16` with 16-bit `RoundingModeRTE`
|
||||
@@ -2431,7 +2455,9 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
the device's 16-bit instructions, its `half` values are held at 16 bits, a `float` rounds to
|
||||
`half` through the conversion and its widening, and a `half` widens from and narrows to its bits
|
||||
by the device's conversion, each Metal's but for a half denormal (a magnitude below `2^-14`),
|
||||
operand or result, which the device may read or answer as the zero of its sign. Recorded by
|
||||
operand or result, which the device may read or answer as the zero of its sign (and but for the
|
||||
rounding `metal2vulkan-degrade-native-half-conversion` records for the 16-bit arithmetic and
|
||||
the conversion pair). Recorded by
|
||||
every module that declares those controls on such a device, and by no other: a device with
|
||||
16-bit `DenormPreserve` declares it too and records nothing, and a device lacking another
|
||||
control computes `half` in `float` (`metal2vulkan-degrade-native-half-conversion`,
|
||||
@@ -2474,7 +2500,9 @@ category, and says what makes an operation carry the note and what may differ. E
|
||||
`fadd`, `fsub`, `fmul`, `fdiv` or fused multiply-add whose other operands only the run knows:
|
||||
Metal keeps its bits, and the device's move of it as a `float` may quiet it (an RTX 3090 stores
|
||||
`0x7fc00321` where Metal stores `0x7f800321`; the other cards in the runs so far kept the bits).
|
||||
A `half` constant moves as its bits and records nothing; `double` is not measured.
|
||||
A `half` constant moves as its bits and records nothing; `double` is not measured. The note
|
||||
covers a NaN's payload moved through loads, stores and selects as well as one an operation
|
||||
computes.
|
||||
- `metal2vulkan-degrade-native-min-max` (precision). `PrecisionNote::NativeMinMax`: Native device
|
||||
maths: Metal's `fmin`, `fmax`, `min3`, `max3`, `clamp` or `saturate` (its `clamp(x, +0, 1)`) on
|
||||
`float` or `half` is the device's `GLSL.std.450` `NMin`, `NMax` or `NClamp`, and `median3`
|
||||
|
||||
Reference in new issue
Block a user