Files
metal2vulkan/docs
Anees Iqbal 17473a1a42 Player: a render encoder's residency declarations play through the runtime
The render encoder's arm played its eight residency forms (useResource:usage:,
useResources:count:usage:, useHeap:, useHeaps:count:, each with stages: or without) as nothing,
"as the runtime's render encoder has none". The runtime's RenderCommandEncoder has use_resource
and use_heap now, so they play through it as a compute encoder's do: each resource of the call,
or of its list, through use_resource with the call's usage; each heap, or each of its list,
through use_heap. The stream records each C array and its count as one list, so the usage is
argument 1, and the stages come last; the runtime's render encoder takes no stages, so they are
not read.

What each read before, and now:
- Render encoder, all eight forms: before, no argument and no runtime call; a skipped object they
  named was not counted. Now: the resource ({Buffer: object} or {Texture: object}) or heap of
  argument 0, each of a list; the usage at argument 1; a skipped object is a skipped call, each
  of a list as its own, as docs/REPLAY-STREAM.md says of skipped_calls.
- Compute encoder, the four forms: unchanged in what they read; one resolver (NewRuntime::uses)
  now serves both encoders, and heap_of, which only the compute arm called, is gone.
- The usage: before, 1, 2 or 3, any other value refused. Now MTLResourceUsage's option set of
  read (1), write (2) and sample (4), any other bit or none refused. Without the sample bit, a
  render encoder's useResource:usage: of read | sample, which played as nothing before, would
  now be refused.
- objects_named, which the unwritten count reads a render or blit encoder's call by, and which
  notes the objects a command buffer's encoders name (resource indices owed, placed buffers' and
  no-copy Managed buffers' users, tiled textures' takes): before, bare objects and lists only, so
  a residency declaration's {Buffer: object} or {Texture: object} named nothing. Now it names the
  resource too, on compute and render encoders alike.

docs/REPLAY-STREAM.md: render and compute encoders play their residency declarations through
the runtime's encoder, the stages forms as those without; the unwritten count's reaching calls
include a residency declaration's resource.

Tests: the commit before this one (red: the skipped-object device test and the unwritten test).
2026-11-23 09:02:13 -08:00
..