Files
metal2vulkan/docs
Anees Iqbal b0e351ffbc Validation: multisampled passes and textures run through the runtime
Family H of the executor's move onto metal2vulkan-runtime: a render
case of more samples (raster_sample_count), and any case binding a
multisampled texture, now runs on the runtime's public API, filled and
read back as executor_contract::multisample states for both executors.

Metal uploads and copies no multisampled texture, and neither does the
runtime. So runtime_multisample fills each slice with one draw of the
owned sample_fill fixture (fixtures/public/engine/sample_fill.metal,
compiled by scripts/regen-air-fixtures), whose fragment runs once per
sample (sample_id) and writes that sample's texel from a buffer: a
color texel through an unsigned-integer view of its texel size (the
texture made with PixelFormatView usage), so its bits cross
unconverted, a Depth32Float one as depth(any) under an always-passing
depth test that writes (a depth outside [0, 1] refused as
depth_outside_unit_range, as runtime_depth refuses it). A multisampled
stencil aspect holds one value in every sample (uniform_stencil), which
the case's pass clears it to. After the draw a dispatch of the
fixture's sample_read kernels reads every sample, one threadgroup each,
as whole words in the attachment layout (unpack_words), unresolved,
as the oracle's sample_readback does.

runtime_textures makes a multisampled texture Private (Metal keeps none
Shared), for rendering and, if color, for views of another format, and
fills it by those draws. runtime_render makes each attachment of a
multisampled pass a Private Type2DMultisample texture of the pass's
samples, with a texture index for its read's view, and reads every
sample back for the comparison. engine::runtime_texture no longer keeps
a multisampled texture off the runtime, and
runs_render_through_runtime takes any sample count. An attachment of
both aspects still carries separate_depth_stencil.

What moves: of the committed cases, 49 multisampled passes (all
public; 2 with both aspects keep the requirement) and 8 cases with a
multisampled input texture (7 public kernel cases, 1 private fragment
case).

ENGINE_EXECUTOR_ABI to vulkan-engine-v197. The new owned fixture adds
rows to the golden tables, re-blessed on development.

Tests: engine/tests.rs routes a multisampled pass, multisampled depth
and stencil attachments and a kernel's multisampled texture through
the runtime; engine_render.rs's
each_sample_of_a_multisampled_target_holds_its_own_invocation draws
sample_rate_mask_in into 4 samples and checks each sample's index, on
Linux through the runtime too, bytes equal to the executor's own;
engine_textures.rs's depth_and_multisampled_textures_read_their_authored_texels
runs through the runtime on Linux. Built and run in the lane's compile
job (ids sent with the sha); not yet built when committed.
2026-11-20 21:59:48 -08:00
..