rt: generateMipmapsForTexture:, the device's linear blit of each level, under a static note

web3d calls generateMipmapsForTexture: once in each stream, which the player skipped and counted
(mipmaps 1). It is built as Apple defines the call: each level below the texture's first made
from the level above it, over each slice, a view's levels and slices its own.

- BlitCommandEncoder::generate_mipmaps: one vkCmdBlitImage a level with VK_FILTER_LINEAR, the
  first level read and the rest written whole (their old contents discarded) behind the copy's
  first barrier, one barrier between each level and the next, and the last bringing every level
  home, the last level's writes visible to every later command. A texture of one level records
  nothing.
- Refusal::MipmapFormat for a format Apple defines no mipmaps of (a depth or stencil, compressed,
  YCbCr or integer one: not colour-renderable and filterable); Gap::MipmapFilter where the
  device's format query lacks blits from and to the image's format or its linear filtering,
  where the image holds the pixel format through a conversion, and for a view in another format
  than its image's, whose blit would filter the image's.
- PrecisionNote::DeviceFilteredMipmaps, the static note BlitCommandEncoder::GENERATE_MIPMAPS_NOTE
  carries: the filter is the device's, where Apple states none. The old runtime announces it as
  its existing device-filtered-mipmaps kind; validation allows it unbounded; codec and
  ARTIFACT_FORMAT_VERSION 541, fast_paths' list, API.md's catalogue entry.
- The conformance rt side plays Step::GenerateMipmaps and announces the note; the replay player
  plays the call and its skipped_mipmaps counter is gone (REPLAY-STREAM.md).
- Test: an 8x8 RGBA8Unorm texture of four levels, each level below the first within one code of
  the box of the four texels it halves in the level above as the device left them, its first
  level kept, one submission and the chain's four barriers besides the segment's end; one level
  records nothing; RGBA8Uint is Refusal::MipmapFormat. REFUSALS and api_signatures regenerated.
This commit is contained in:
Anees Iqbal committed 2026-11-18 19:10:22 -08:00
1 parent ecb8284ff7
commit 4df69ca062
21 files changed
+507 -27

No files matched your search

+3
View File
@@ -3321,6 +3321,9 @@ bound.
above (its blit, or a bilinear filter in float where its blits cannot filter the format), not
Apple's: a channel can differ from Metal's where the filtered value lies near a rounding boundary,
and wholly where a box averages infinities, NaNs or a float format's extremes.
On `metal2vulkan-rt` it is the static note `PrecisionNote::DeviceFilteredMipmaps` of
`generate_mipmaps` (`BlitCommandEncoder::GENERATE_MIPMAPS_NOTE`), its blit chain alone, on every
device: a format the device's blits cannot filter is `Gap::MipmapFilter`.
- `metal2vulkan-degrade-heap-depth-stencil-apart` (precision). `HeapDepthStencilApart`: A depth or
stencil texture made in a heap on a device whose driver lays depth and stencil images apart from
the memory they are bound to (`DriverFact::DepthStencilImagesLieApart`) that no shadow of the