flowchart TD A["D3D12: DrawIndexedInstanced, topology TRIANGLEFAN
indices h a b c CUT h2 d e f"] --> R["record_draw: count = 3 x (n - 2)
mode by index size and strip cut value"] N["D3D12: DrawInstanced, TRIANGLEFAN
no index buffer"] -->|"indices 0, 1, 2, ...
base vertex = start vertex"| R R --> Q{"cut value set?"} Q -->|no| K1["convert_indices
one thread per output index"] Q -->|yes| K2["convert_fan_cuts: one threadgroup
prefix max of cut positions
in chunks of 256 triangles"] K1 --> T["triangle t = (v[t+1], v[t+2], hub)
provoking vertex first, same winding"] K2 --> T T --> D["triangles touching a cut:
three 0xffffffff, nothing drawn"] T --> M["Metal: indexed triangle list
of 32-bit converted indices"] D --> M