Files
reims-vgpu/docs/video
Anees Iqbal aaec87ae4f ⬆️ Build on metal2vulkan a759d0e88f's runtime
Move the runtime from f6a96b7da8 to a759d0e88f, the tip of metal2vulkan's
development (runtime version 1643 to 1648; its runtime sources pinned as
abac6049).

metal2vulkan's gate on a759d0e88f was still running when this was committed;
the owner chose not to wait for it.

What changes for the guest:

- A 2D texture over host pages whose usage only samples or reads it is a linear
  image over the pages, with no shadow and no copy in at each command buffer's
  first use, on a device whose startup check passes: on that device, an image's
  first move keeps every byte while the CPU writes beside it, checked for
  pointer imports, fresh pages and dma-bufs each, and kept in the shader cache
  by driver and runtime version. Vulkan does not promise that move (an image
  over imported memory starts UNDEFINED), so this relies on the driver, by the
  owner's ruling of 2026-10-26. REIMS_VGPU_EXACT gains `host_page_textures`,
  which keeps every such texture a shadow, as before, and `all` names it; the
  accuracy ledger and docs/api.md say so. Render targets, written textures and
  two-plane YCbCr surfaces keep their shadows.
- A memoryless texture bound at a texture slot is taken, as plain Metal takes
  it, where the runtime refused the setter and this platform died there (an RX
  580 user's guest, at setFragmentTextures:withRange:). A command whose function
  uses the slot, a useResource of it or a blit of it fails the command buffer
  with MTLCommandBufferErrorInvalidResource (9) from the Metal submission that
  holds it, as Metal's GPU does (measured by metal2vulkan on the M3 Max). This
  platform passes the new CommandBufferError::InvalidResource to core as one of
  Metal's failures: the fourteenth it lists. A memoryless texture's CPU reads
  and writes move nothing, and its views are nil, as on Metal.
- new_texture_with_vk_image takes IdPlacement::Outside; nothing here passes it
  yet, so the window's swapchain images still take texture IDs.
- Nothing else in the span moves what a guest computes or observes: the
  in-place check's dma-buf pages come from cached memory, and the rest is
  counts, docs, tests and the sources pins.

The public surface gains CommandBufferError::InvalidResource,
DevicePolicy::host_page_textures and its HostPageTexturePolicy, and WorkCounts'
in-place and shadow-cause counts. No Degradation, RuntimeGap, refusal or notice
kind moved, so DIES and the relayed kinds stand. Device info, GPU families and
feature queries answer as before. The Vulkan platform ends the process at one
site fewer: the memoryless binding.

docs/video/bugs.md says what the pin carries for B73: the in-place textures and
the counts that tell them from the shadows that stay.

New tests, of the memoryless binding, on every platform:
a_memoryless_texture_at_a_fragment_slot_fails_only_a_draw_that_uses_it; and on
the Mac, memoryless_slots_fail_as_metals, which measured Metal's lines
(macOS 27.0.1): a draw whose function ignores the slot completes; one that
samples it fails the command buffer with code 9, the blit before its pass run
and neither its clear nor the blit after it, the signal after them not firing.

Checked, every test passing in its full run:
- on the M3 Max (macOS 27.0.1): rustfmt, the three clippy passes cargo xtask
  check makes (the Mac's, its tested features', and x86_64-unknown-linux-gnu's),
  and the 900 tests of reims-vgpu-vulkan and reims-vgpu on MoltenVK;
- the Vulkan crate's 434 tests and reims-vgpu's and the C API's 50 video and
  scaler tests on gem10's RX 7900 XTX and Radeon 780M, with no amdgpu reset.
The RTX 5080 Laptop GPU's run was skipped at the owner's word: the GPU was busy
with the owner's VM.
Only those crates link the runtime, so the rest of cargo xtask check (core's
tests, under Rosetta too, the Metal, window and video crates, and the header)
and the suite, which drives the C API on the Metal platform, do not
reach the change and were not run.
2026-10-26 21:45:46 +02:00
..
2026-10-26 12:24:31 +02:00
2026-10-26 12:24:31 +02:00