Files
metal2vulkan/docs
Anees Iqbal e5157492d7 rt: drawables' textures over a swapchain's images, their acquire, and a present that signals the consumer's semaphore
What: the two presenting pieces the new runtime lacked, so a consumer can present on the
runtime's own device.
- Device::new_drawable_texture (unsafe): a texture over an image of the consumer's swapchain,
  checked against the swapchain's create info (2D, one level, its extent and one layer; the format
  the runtime holds the pixel format in; usage holding the texture's, transfer included). Its home
  layout, views, set 1 elements and hazards come from the existing plan (form()). The image is
  never destroyed by the runtime: Backing::Drawable, and the reaper frees only the views.
- Texture::drawable_acquired (unsafe): re-arms the existing homing, so the upload of the next
  submission moves the image home ahead of every later commit; from UNDEFINED the first time and
  from PRESENT_SRC_KHR after a present (texels kept).
- CommandBuffer::present_drawable (unsafe): at commit the last segment's end barrier also moves the
  image home -> PRESENT_SRC_KHR, and that segment's submit info signals the consumer's binary
  semaphore beside the progress semaphore; the group goes at once, as an event signal's does.
- wait_until_scheduled of a presenting command buffer returns once its submission passed
  vkQueueSubmit2: rt marks a command buffer Scheduled, and runs its scheduled handlers, before the
  submit, so a present made after the wait could otherwise wait on an unsubmitted binary signal
  (VUID-vkQueuePresentKHR-pWaitSemaphores-03268), on the shared and on the reserved present queue.
- Refusals with their basis: DrawableDescriptor, DrawableFormat, DrawableUsage, NotDrawable,
  DrawableAcquired, DrawableNotAcquired. docs/REFUSALS.md regenerated, api_signatures blessed
  (9 records added, none removed or changed). The README's presenting section replaces the
  "not built yet" lines, with its known gaps (no acquire semaphore; no present from the presenting
  command buffer's own scheduled handler; a presenting command buffer that never runs leaves the
  image acquired).

Tests (src/tests/present.rs, device cfgs, validation layer): an image made as a swapchain's
stands in for one; three frames of acquire, pass, present and a stand-in present that waits on
the semaphore on the presenting queue and copies the image out of PRESENT_SRC_KHR, for a
render-target and a shader-read drawable; the presenting command buffer's sleeping scheduled
handler must have returned before wait_until_scheduled does; each refusal. Not yet run: built
and run in potluck jobs next.
2026-11-19 00:08:18 -08:00
..