Descriptor table entries are mirrored at submission, so a dispatch can see an entry the title changed after recording it #538

Open
opened 2026-11-28 01:40:54 +00:00 by Olima34 · 2 comments
Olima34 commented 2026-11-28 01:40:54 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:40:54Z.


What happens

The host copies (mirrors) a descriptor table entry when the work is submitted, not when the draw or dispatch is recorded. GTA VI changes entries of its big shared table (root slot 0, entries 8 to 251) between recording a dispatch and submitting it: bind, dispatch, unbind. So the earlier dispatch runs with the later record.

Measured

300 s windowed world runs on the preview branch (b3c1a1b0), Series S, M5 Pro, counting the entries each compute shader's table ranges reach:

run entry uses rewritten before the earlier dispatch was submitted changed between record and submission
1 7.66 million 258 128
2 13.56 million 256 18

Examples (ids only):

  • compute 3d7ddd732c89db9f was recorded with a 2,048-byte constant buffer at entry 251, and a null constant buffer was there at submission (3 times);
  • a96ed16c68231d2d was recorded with a texture view at entry 82, and f50436bfbc651bc5 then has a null view there;
  • 98dc84d373234c59 was recorded with a null view at entry 48, and a placed buffer view was there at submission.

Many other differences are the same placed view with other padding words (1 and 13); those are harmless.

Not seen: an entry holding two records for two commands of one submission (0), or an entry rewritten with older work in flight (0). Only dispatches were counted, not draws.

What would fix it

Keep the bound entries' records with the command when it is recorded, instead of reading the table at submission. It's small in count, but a dispatch that reads a null constant buffer instead of its real one computes garbage.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6657335715 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/538). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-28T01:40:54Z. --- ### What happens The host copies (mirrors) a descriptor table entry when the work is **submitted**, not when the draw or dispatch is **recorded**. GTA VI changes entries of its big shared table (root slot 0, entries 8 to 251) between recording a dispatch and submitting it: bind, dispatch, unbind. So the earlier dispatch runs with the later record. ### Measured 300 s windowed world runs on the preview branch (`b3c1a1b0`), Series S, M5 Pro, counting the entries each compute shader's table ranges reach: | run | entry uses | rewritten before the earlier dispatch was submitted | changed between record and submission | |---|---|---|---| | 1 | 7.66 million | 258 | 128 | | 2 | 13.56 million | 256 | 18 | Examples (ids only): - compute `3d7ddd732c89db9f` was recorded with a 2,048-byte constant buffer at entry 251, and a null constant buffer was there at submission (3 times); - `a96ed16c68231d2d` was recorded with a texture view at entry 82, and `f50436bfbc651bc5` then has a null view there; - `98dc84d373234c59` was recorded with a null view at entry 48, and a placed buffer view was there at submission. Many other differences are the same placed view with other padding words (1 and 13); those are harmless. Not seen: an entry holding two records for two commands of one submission (0), or an entry rewritten with older work in flight (0). Only dispatches were counted, not draws. ### What would fix it Keep the bound entries' records with the command when it is recorded, instead of reading the table at submission. It's small in count, but a dispatch that reads a null constant buffer instead of its real one computes garbage.
Sheffy007 commented 2026-11-28 01:48:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Sheffy007 on 2026-11-28T01:48:04Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231925531 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/538#issuecomment-7231925531). Originally posted by [Sheffy007](https://github.com/Sheffy007) on 2026-11-28T01:48:04Z. --- /claim
github-actions[bot] commented 2026-11-28 01:48:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T01:48:16Z.


Claimed by @Sheffy007. Open a draft pull request with Refs #538 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231927744 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/538#issuecomment-7231927744). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T01:48:16Z. --- Claimed by @Sheffy007. Open a draft pull request with `Refs #538` in its description within 24 hours, or the claim expires.
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#538
No description provided.