flowchart TD
S["D3D12 command signature
[INCREMENTING_CONSTANT -> root param 0, DRAW]"] --> P["d3d12: one op per argument {src, dst, words, index}
INCREMENTING_CONSTANT: words = 1, index = 1"]
A["argument buffer
command i: draw arguments only"] --> K
P --> K["expand_indirect kernel
thread (word x, command y)"]
K --> Q{"op.index set?"}
Q -->|yes| I["write y, the command's index"]
Q -->|no| C["copy the word from
command y's arguments"]
I --> R["Metal record y:
draw arguments + root constants"]
C --> R
R --> D["the draw reads index
as an ordinary root constant"]