Commit Graph
36 Commits
Author SHA1 Message Date
Anees Iqbal 5c9d347c2f Count the makings a driver charges for where the runtime calls them
The steps this packet landed as, in order:
- Report every count a call moved, and hold the ones that are facts
- Move the runtime pin for the makings counter

Content: the tree of `development` at 17e13b1552, unchanged.
2026-10-26 13:19:08 +02:00
Anees Iqbal 9c9e487162 Say whether a call's driver work happens at the call or at the commit
Content: the tree of `development` at ebc6dd8a19, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 2e41fc424f Time a draw in a short encoder too, so the draw's cost is a call's
Content: the tree of `development` at 4823d5306c, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 2567160ae3 Count how much of the public API the per-call table times
Content: the tree of `development` at 5542892eb8, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 9dc0f3e0c8 Measure the driver's own cost under the timed calls
Content: the tree of `development` at 1e28d3468e, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal f61fc42597 Time the device API call by call against Metal in the host A/B
Content: the tree of `development` at 810b236620, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal b8faf62b78 Add the calls a per-call cost table needs to the host A/B's Gpu trait
Content: the tree of `development` at 639a611616, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 35dd559a04 Bound a run of indexed indirect draws' index fetches in two dispatches
The steps this packet landed as, in order:
- Announce a provoking mode past 1 at the draws Metal's third way draws otherwise

Content: the tree of `development` at 107929f7b9, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 642435208f Draw a run of direct indexed strips' lists in one dispatch
The steps this packet landed as, in order:
- Draw far-start public draws under the last provoking vertex in the pulled list form

Content: the tree of `development` at 77ada94845, unchanged.
2026-10-26 13:19:06 +02:00
Anees Iqbal 537b9caf0c Close host_ab's calls workload, and fit two lane files to the stack
The steps this packet landed as, in order:
- Bump the semantics, artifact format and runtime versions for the stacked review round
- Pin the runtime sources of the stacked review round
- Bless the golden hash tables over the stacked review round

Content: the tree of `development` at 06fe802723, unchanged.
2026-10-26 13:19:05 +02:00
Anees Iqbal 9516e41497 Say what an indirect command holds of the pipeline state set on it
The steps this packet landed as, in order:
- Time indirect commands' CPU setters and getters in host_ab
- Read and write one field of an indirect command's record
- Set and read an indirect command's fields one at a time
- Call an indirect execution's check where it may see something, and run the CPU's later writes
- Load vkGetDescriptorSetLayoutSupport inside the exit guard's sections
- Hand out indirect command buffer IDs to 2^31 - 1 and place every one's records, as an M3 Max does
- Refuse an indirect command buffer reservation Metal hangs at as such
- Place an indirect command buffer's records at any length, found only at their start
- Leave a resource ID pool made after a reservation of 0 alone, as Metal does
- Ignore a late reservation call before looking at what it holds, as Metal does
- Expect the merged-draw tests' pipeline makings' notices on every device
- Keep an indirect compute command's threadgroup lengths where Metal keeps them
- Take the pieces of the ICB identifier range Metal's encoders take
- Answer a GPU-written command's state identifier as the state its ID named then
- Run a GPU-written record's released state as Metal does, from the buffer's kept programs
- State and test the bound on the programs a GPU-writable buffer keeps
- Record the earlier-window record of a re-held ID as a known gap

Content: the tree of `development` at 7d31ebb207, unchanged.
2026-10-26 13:19:05 +02:00
Anees Iqbal 0d9e71903b Read VK_EXT_provoking_vertex: provokingVertexLast and provokingVertexModePerPipeline
The steps this packet landed as, in order:
- Write the index rewrite pass's primitives in either provoking vertex order
- Draw Apple's last provoking vertex: a last-vertex pipeline, else lists led by it
- Test Apple's provoking vertex modes against Metal's on the device
- Describe the provoking third way as pipeline-dependent; fix the table test
- Check the last provoking vertex through a geometry stage; key its slice notice on stages
- Test that executions keep the first vertex; scale the weights check by the values
- Register rt6_provoking in the engine inventory and golden printouts
- Add host_ab's provoking workload: flat-shaded draws at provoking vertex modes 0 and 1
- Add the index gather pass: one dispatch for a run of direct draws' lists
- Gather direct indexed draws' lists in runs: one dispatch per run, not three per draw
- Add the rotated-weights variant: Metal's barycentric weights from a rotated triangle
- Count private lists' gathers under a last-vertex pipeline; take the open runs whole
- Draw listed triangles' barycentric weights through the rotated-weights variant
- Draw every provoking vertex mode past 1 the third way, its top bit set or not
- Announce nothing for a provoking-mode draw that makes no primitive

Content: the tree of `development` at 91b1df7b21, unchanged.
2026-10-26 13:19:05 +02:00
Anees Iqbal a755eb6d27 host_ab: the consumer's frames call by call (calls), with allocations per call
The steps this packet landed as, in order:
- Box a render encoder's lowering where it is made
- Allocate less per draw and per pass end
- Make room once for an encoder's per-resource range lists and a command buffer's first sets
- host_ab calls: each frame's wall time, and the runtime's replay and scheduler counts
- host_ab calls: draws after one useResources of 0, 1, 256 or 4096 buffers
- Take a draw's used resources while its encoder's residency is unchanged
- Wake the recorder from the scheduler's thread, so a commit wakes one thread
- Hold an encoder's first tracker part in place, so a pass open allocates as before the box

Content: the tree of `development` at b775ade3a0, unchanged.
2026-10-26 13:19:05 +02:00
Anees Iqbal 27ad7597c1 Measure dispatches after one useResources in host_ab's encode workload
The steps this packet landed as, in order:
- Take the compute dispatch memo while the encoder's residency is unchanged
- Start a shared event listener's thread at its first notification
- Add a command buffer's scheduled event signal (encodeSignalEventScheduled:value:)
- Count the scheduler's passes, and measure signals, bursts and moving offsets in host_ab
- Hash the pipeline memos with the runtime's key hasher
- Let a dispatch take what its pipeline state last planned for the same shape
- Drop two casts clippy flags in completion_here's scheduled signal check
- State host_ab's dispatches taken as settled and as planned before

Content: the tree of `development` at f9d39326a3, unchanged.
2026-10-26 13:19:05 +02:00
Anees Iqbal 328f69c087 host_ab: announce chosen kinds at every occurrence, and count the notices
The steps this packet landed as, in order:
- Keep a draw's shape where its derivation announces nothing at each occurrence
- Read getBytes into the caller's bytes where they are laid out packed
- Let a message sink skip low severities, and make no line it skips
- Say how many getBytes reads of the layouts test went through the staging queue
- host_ab: --announce-each all, --sink-least, and a count of the other messages
- Let the draw-shape notice tests wait for every key's own pipeline
- Write replaceRegion from the caller's bytes where they are laid out packed

Content: the tree of `development` at f0fa09bc2d, unchanged.
2026-10-26 13:19:05 +02:00
Anees Iqbal dbd4d908e4 List a used resource as written only in the stages whose function writes memory
The steps this packet landed as, in order:
- Take a draw's shape from its encoder's earlier draws of the same inputs

Content: the tree of `development` at e5259206a6, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal b30642f159 Merge a GPU replay's draws of one list type or points into one draw in the translator
The steps this packet landed as, in order:
- Draw a GPU-written render execution of one list type or points as one merged draw
- Reset an indirect command buffer's records on the GPU with one fill
- Regenerate the refusal surface after the merged draws, rebased onto development
- Regenerate the refusal surface over the host-step cause

Content: the tree of `development` at 99ae896ad5, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 31421e12b9 Bind set 0's buffers at dynamic offsets and find a command's set 0 among its command buffer's
Content: the tree of `development` at fa2a26bda6, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 710a557e16 Draw host_ab's many_draws again with its uniforms over host pages a heap lies over
The steps this packet landed as, in order:
- Add host_ab's layers workload, shaped as m2vbench's composite mode
- Count the variables each stage's entry point uses at a layout binding

Content: the tree of `development` at 75b8996c58, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 4a286a459a Send GPU-written compute executions to the host step where it runs them faster
The steps this packet landed as, in order:
- Set the runtime version and pin the runtime sources at the merged tree
- Set the semantics version and pin the runtime sources after the render GPU form
- Bless the golden hashes at the merged tree
- Bless the authored compile census at the merged tree
- Regenerate the refusal surface at the merged tree
- Pin the runtime sources after the compute indirect command cost rule
- Regenerate the refusal surface after the compute indirect command cost rule

Content: the tree of `development` at f4a0642491, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal f05f8a5a94 Count a replayed draw's misses of the buffers its slot tables do not hold
The steps this packet landed as, in order:
- Run GPU-written render commands on the GPU alone, and let a check state what it looks for
- Say that a check of every kind runs on the GPU alone where the records rule out both kinds
- Pass what the check looks for in the compute lane's checked execution
- Add host_ab's icb_draws workload: a kernel writes the draws of Apple's GPU-encoded ICB sample

Content: the tree of `development` at 665d587ae2, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 83ecf464ec Make a long new host-visible buffer in fresh pages imported by pointer, with nothing written
Content: the tree of `development` at 12606c508c, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 44f56137e3 Time host_ab's held new buffers and their first CPU write in the memory workload
The steps this packet landed as, in order:
- Time host_ab's first GPU fill of held new buffers, each set held to the end
- Let host_ab run the memory workload's parts alone

Content: the tree of `development` at b41eddf02b, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 3d9304798d Add host_ab's icb workload: a kernel writes compute commands that a second encoder executes
The steps this packet landed as, in order:
- Run GPU-written compute executions on the GPU alone by indirect dispatches where the device has no generated commands
- Run a concurrent encoder's GPU-alone execution with no barrier between its commands

Content: the tree of `development` at 343b1abcb4, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal 7b5fc45e15 Add host_ab's burst workload: calm frames and bursts measured apart
The steps this packet landed as, in order:
- Keep the recycler's proven parked objects through a run of one-off makings
- Remember usage answers by hash, 1024 of them, least recently asked going first
- Pin the runtime sources after the recycler's protected eviction and the usage answers' LRU
- Regenerate the refusal surface at the merged tree

Content: the tree of `development` at bde1abe95b, unchanged.
2026-10-26 13:19:04 +02:00
Anees Iqbal a1c24843d3 Print host_ab's submission counts: completed waits, bare starts, submit infos, finales, pending depth
The steps this packet landed as, in order:
- Composite window surfaces over host pages in host_ab's drag
- Upload window contents into the composited surfaces in host_ab's drag
- Take no copy in and no keep for a blit copy into every texel of a heap shadow

Content: the tree of `development` at c7c1499d07, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal b238e202a4 Report the encoding thread's CPU time per many_draws frame in host_ab
The steps this packet landed as, in order:
- Measure a frame shaped as the guest's window drag in host_ab
- Keep up to 256 spare descriptor pools, a window server's frames' worth

Content: the tree of `development` at c4853d8383, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal 4d9b17a359 Run a batch's first work in its work's VkSubmitInfo, not one of its own
The steps this packet landed as, in order:
- Count render encoders' render pass instances by where they began, and their splits by cause
- Set the runtime version and pin the runtime sources at the merged tree
- Bless the golden output hashes at the merged tree
- Bless the authored compile census at the merged tree
- Regenerate the refusal surface at the merged tree

Content: the tree of `development` at effa414f26, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal 3926ac1204 host_ab: a compositing workload of the consumer's frame shape; count the VkSubmitInfos submitted
Content: the tree of `development` at 89ca6673eb, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal ddd339e2a3 Count released objects by kind and shadow keeps by planner, for the residency churn
The steps this packet landed as, in order:
- Count no-copy imports a live import already holds
- Recycle a texture's image and memory for the next texture of the same making
- Add a control build that turns the image recycler off (--cfg m2v_no_recycle)
- Count image, buffer and memory releases by the place that released them
- Recycle the runtime's buffers and their memory for the next buffer of the same size

Content: the tree of `development` at db877e7a50, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal 7ef86a35d8 Hold a kernel's static half threadgroup arrays as typed Workgroup objects
The steps this packet landed as, in order:
- Pin the runtime sources after the typed threadgroup step's doc edit
- Take the device's sin and cos as Metal's fast ones in a fast-math module on MoltenVK
- Write the typed threadgroup region test's module as a plain string
- Convert a plain class's half texel by the device's conversion on MoltenVK
- host_ab: compare each gpu kernel's output between the sides
- Share an imageblock slice write out to the whole threadgroup where one invocation writes it
- Copy a half slice's cell bits straight to a half-bits slot

Content: the tree of `development` at b0e2bd6190, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal f9ebf83b15 Measure a frame of many small draws in host_ab, shaped as m2vbench's draws mode
Content: the tree of `development` at afac0fda19, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal 0a7b64f41d Bind the last set 0 again, and settle a dispatch once, where nothing it reads changed
The steps this packet landed as, in order:
- Ask a heap texture's image requirements once, and take owned kernels' sets from spare pools
- Find a replayed draw's pipeline where its state's last draws found it

Content: the tree of `development` at 6f29d4516f, unchanged.
2026-10-26 13:19:03 +02:00
Anees Iqbal 3a02b6330a host_ab: feature kernels, a host-clock latency split, and per-variant encode runs
Content: the tree of `development` at 61b5179154, unchanged.
2026-10-26 13:19:02 +02:00
Anees Iqbal 9810aff5e0 Add a host A/B benchmark: the same Metal workloads natively and through the runtime
Content: the tree of `development` at 6d4bcda22f, unchanged.
2026-10-26 13:19:02 +02:00
Anees Iqbal 13b279df1b Squash 11203 commits of translator, runtime, and validation work
Rolls up everything since 43c46ac8 into a single commit. Its tree is
identical to the tree of private master at
b3c77f2d2b20a432be10591a2129547c10b1c24b.

- A Cargo workspace of five crates under crates/: metal2vulkan (the
  translator and the metal2vulkan command), metal2vulkan-runtime (the
  Metal API on Vulkan), metal2vulkan-air (the AIR front end),
  metal2vulkan-validation and metal2vulkan-devtools.
- Dual license: GPL-2.0-or-later OR LGPL-3.0-or-later.
- docs/: API, architecture, fast paths, how-to, Metal coverage,
  refusals, runtime porting and validation guides.

Private-Commit: b3c77f2d2b20a432be10591a2129547c10b1c24b
2026-10-11 20:09:13 +03:00