Files
metal2vulkan/docs
Anees Iqbal 6fe743aa73 Runtime: 4:2:2 textures are made, decoded by contents lowered for them, and refused as Metal refuses
A GBGR422 or BGRG422 texture is made (FormatEmulation::ChromaPairs, its image
R8G8_UNORM of the bytes), over a buffer as any 2D texture. Only a content
lowered for it reads its texels as Metal's:

- KernelKey carries a Chroma: the texture slots bound to a 4:2:2 texture per
  stage, and whether a stage may reach one through a handle while one lives
  (PipelineInterface::handle_float_images and Gauges::chroma_textures).
- A dispatch picks the kernel state's content for it beside the sRGB and word
  variants (ComputePipelineState::variant), a draw the state's content for its
  draws (RenderPipelineState::for_draws); both are made at the first need,
  counted in Metrics::translations_at_encode and Metrics::chroma_contents, and
  kept in the device's map of contents (LRU, KERNEL_ENTRIES), whose
  fill-past-capacity test is tests/kernel_map.rs's
  the_map_holds_its_cap_and_forgets_the_least_recently_used. A draw or
  dispatch on one counts in Metrics::chroma_launches. A state without either
  runs its own module as before.
- Refusal::ChromaPairs (metal-measured, Metal's own asserts): a type other
  than 2D (texture buffers included), an odd width, more than one level, a
  view.
- Gap::ChromaPairsUse: ShaderWrite (and unknown) usage, RenderTarget usage, a
  swizzle at the make, and a function compiled outside the runtime bound to
  one or reaching one through a handle (the consumer never hands the runtime
  such a kernel).
- Buffer::new_texture's doc states that Metal refuses a linear 4:2:2 texture
  and why the runtime takes one.

The device test now asserts the six kernel states' contents, the 80
dispatches on them and the live gauge, and a second device test the
refusals and gaps. docs/REFUSALS.md and basis.rs regenerated (the
TextureSwizzle row's site list was stale at the base and is current now);
the API signature table blessed. Not yet built.
2026-12-04 21:23:49 -08:00
..