Files
metal2vulkan/docs
Anees Iqbal cfe3cadd65 Count a render target's shadow over host pages apart from a shader write's
One work packet, landed as 3 commits (fd42939b4c..6801186813 on archive/development-linear-2026-10-28), in order:

* Count a render target's shadow over host pages apart from a shader write's

What: WorkCounts::host_texture_shadows_written (a texture over host pages made a shadow because
its usage renders into it or writes it) is split into two counts:
- host_texture_shadows_render_target: the usage holds RenderTarget, whatever else it holds. A
  texture of both RenderTarget and ShaderWrite counts here, and so does an Unknown usage (Metal
  reports every usage for it).
- host_texture_shadows_shader_write: the usage writes it through a shader (ShaderWrite or
  ShaderAtomic) and does not render into it.
ShadowCause::Written becomes ShadowCause::RenderTarget and ShadowCause::ShaderWrite in
in_place.rs. Render target wins because such a texture stays a shadow whatever a check of shader
writes could show.

Why: whether guest frames make shader-written textures over host pages at all decides whether
writing them in place is worth its check. The old count lumped them with render targets, so no
run could tell. Writing them in place is parked on park/shaderwrite-in-place.

The shadowed-texture notice's words are unchanged for both causes, and every texture takes the
path it took. No run's answer or announcement changes, so RUNTIME_VERSION is unchanged.

Tests:
- tests::in_place's decision test now expects each cause by usage. The usages include render
  target with shader write, render target with atomic, shader write with atomic, and every usage.
  It also checks that a shader write's notice reads as a render target's.
- New device lane in_place_textures::textures_that_render_or_write_count_their_shadows_apart:
  64x64 R32Uint textures over no-copy pages, of seven usages, under InPlace and under Shadow. Each
  moves exactly the count it should (render target, shader write, or the exact form's).

Verified:
- cargo clippy for metal2vulkan-runtime, metal2vulkan and metal2vulkan-validation, all targets
  and features, plain and under --cfg m2v_gpu.
- The runtime's in_place and degradation unit tests.
- metal2vulkan's fast_paths, api_signatures and refusal_surface tests.
- api_signatures.tsv blessed.
- The runtime-sources pin is not updated.

Not run: the new device lane. It was landed without its device run on the user's word
("skip the tests, just land it"), so its first run is development's gate.

Removed: WorkCounts::host_texture_shadows_written (now host_texture_shadows_render_target and
host_texture_shadows_shader_write). Nothing in the tree read it but api_signatures.tsv.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.

* Re-bless the golden tables for the new profile field

The YCbCr in-place packet (42abe9a315) added a field to the device profile, which moves every
profile's key. The tables record each profile's key beside its cells, so both went stale on
`development`.

Only the 20 `profile` key lines in each table change; no cell moved (every other line is
identical), so SEMANTICS_VERSION needs nothing here.

Verified: `cargo nextest run -p metal2vulkan --all-features --run-ignored ignored-only
-E 'test(bless_golden_hashes)'` passed at 00404a4ba4, and the diff holds profile lines only.
2026-10-28 17:24:19 +02:00
..