G-buffer shards: a wave64 mesh program's v_readfirstlane reads each host wave's first lane #517

Closed
opened 2026-11-27 23:47:09 +00:00 by alexballvideos-netizen · 4 comments
alexballvideos-netizen commented 2026-11-27 23:47:09 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T23:47:09Z.


Split out of #258 (claimed by @Tarraga there) so the fix below can be booked on its own.

What: with the world drawing (preview b3c1a1b0, VICTORY_GUESS_GRAPHICS=1), the G-buffer has long fans and sheets on every kind of mesh geometry: characters, cars, buildings. Some triangles are right, others spread from a point. They're already there before lighting.

Cause: the common G-buffer mesh programs (6eedbc0771df10ab, 35d5616385a0a8f8, 08ebaafa2f409986 and others) are wave64 groups whose threads are console lanes, so each 32-lane host wave is half a console wave. Their v_readfirstlane_b32 (7 to 10 per program, some of values that differ per lane: per-meshlet counts) lowered to waveReadLaneFirst, each host wave's own first lane. Lanes 32 to 63 then read lane 32's value, not lane 0's, and build vertices and primitives from the wrong meshlet.

Evidence (M3 Max 36 GB, Series X): with the first-lane read made the console wave's, G-buffer dumps from 140 to 290 s show no fans, where every earlier run had them. Things ruled out on the way are in https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7230018678.

PR to follow.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6656272856 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/517). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T23:47:09Z. --- Split out of #258 (claimed by @Tarraga there) so the fix below can be booked on its own. **What:** with the world drawing (preview `b3c1a1b0`, `VICTORY_GUESS_GRAPHICS=1`), the G-buffer has long fans and sheets on every kind of mesh geometry: characters, cars, buildings. Some triangles are right, others spread from a point. They're already there before lighting. **Cause:** the common G-buffer mesh programs (`6eedbc0771df10ab`, `35d5616385a0a8f8`, `08ebaafa2f409986` and others) are wave64 groups whose threads are console lanes, so each 32-lane host wave is half a console wave. Their `v_readfirstlane_b32` (7 to 10 per program, some of values that differ per lane: per-meshlet counts) lowered to `waveReadLaneFirst`, each host wave's own first lane. Lanes 32 to 63 then read lane 32's value, not lane 0's, and build vertices and primitives from the wrong meshlet. **Evidence (M3 Max 36 GB, Series X):** with the first-lane read made the console wave's, G-buffer dumps from 140 to 290 s show no fans, where every earlier run had them. Things ruled out on the way are in https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7230018678. PR to follow.
alexballvideos-netizen commented 2026-11-27 23:47:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T23:47:16Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230408435 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/517#issuecomment-7230408435). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T23:47:16Z. --- /claim
github-actions[bot] commented 2026-11-27 23:47:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T23:47:26Z.


Claimed by @alexballvideos-netizen. Open a draft pull request with Refs #517 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230410528 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/517#issuecomment-7230410528). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T23:47:26Z. --- Claimed by @alexballvideos-netizen. Open a draft pull request with `Refs #517` in its description within 24 hours, or the claim expires.
LakshanSivakumar commented 2026-11-28 00:36:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:36:09Z.


Thank you for this. It is fixed on main by #518. I have not checked every case from this report in the game myself, so please retest on main a6a58361 and reopen this if you still see it. Closing as fixed.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231042799 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/517#issuecomment-7231042799). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-28T00:36:09Z. --- Thank you for this. It is fixed on main by #518. I have not checked every case from this report in the game myself, so please retest on main a6a58361 and reopen this if you still see it. Closing as fixed.
alexballvideos-netizen commented 2026-11-28 00:53:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-28T00:53:53Z.


Retested on main 226645f9, which includes a6a58361 and #518. M3 Max 36 GB, Series X, headless, VICTORY_DEPTH_TWINS=0, with the base-colour target dumped every 25 s from 140 to 294 s. All 6 dumps are clean: characters in the street, a car interior and a house interior, with no fans or sheets. There were no GPU time-outs and the run went the full 320 s. It stays closed.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231271589 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/517#issuecomment-7231271589). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-28T00:53:53Z. --- Retested on `main` `226645f9`, which includes `a6a58361` and #518. M3 Max 36 GB, Series X, headless, `VICTORY_DEPTH_TWINS=0`, with the base-colour target dumped every 25 s from 140 to 294 s. All 6 dumps are clean: characters in the street, a car interior and a house interior, with no fans or sheets. There were no GPU time-outs and the run went the full 320 s. It stays closed.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#517
No description provided.