A guest's render executions merged on an RTX 3090 (NVIDIA 620.70.06) drew their first merged
draw over 4 chunks of 2^31 - 2 vertices, seconds of vertex work, and the GPU hung (Xid 109).
The encoder trail's GPU-form readback showed both executions' totals at exactly 2^33 above the
sum of their commands' corners (321039 and 2184 corners, with second draws of 321047 and 2192
vertices), and a total no sum of whole triangles makes. The arguments, ranges, status words and
second draws were otherwise right. So the u64 count itself came out wrong in the passes, as the
u64 division did before on an RTX 5080 laptop GPU (615.71.09).
The passes now hold every count as its two u32 words, low first, as the prefix and the block
sums already lay out a u64. A command's corners are the OpUMulExtended product of its whole
vertices and its instances. A sum adds the low words and carries into the high ones. The last
pass takes the total's words directly to the u32 division it already ran. A u64 the passes
compute is an address alone. The layout is unchanged, so the vertex variant reads the prefix as
before.
Tests:
- the_merge_passes_compute_no_u64_but_addresses (replacing the division-only check): a u64 in
either pass is built only by OpIAdd, OpIMul, OpUConvert of a u32, a constant or a push
constant load, and used only to build another or as a pointer. Before the change it fails, on
the u64 compare, select, shift, conversion, load and store.
- The interpreter's merge tests (saturation and the VERTICES fault among them) hold the same
answers.
- The trail's GPU-form test gains an indexed case of the guest's shape: 8162 commands, the first
86 through a range read from a buffer, 90 blocks of 91. Its first merged draw must hold no
instance.
Verified:
- On the 2080 and the 3090 (620.70.06), the indexed case's synthetic shape ran right before the
change too (total 22446 corners, no block sum with a high word; the 3090 run skipped the draw).
Its scratch sat below 4 GiB of device address there, so neither device reproduced the guest's
high word, and the hanging device's proof is the guest rerun.