d3d12: start a paged descriptor heap's title memory cleared #301

Merged
NickStallman merged 2 commits from upstream-pr/301 into main 2026-11-27 08:25:30 +00:00
NickStallman commented 2026-11-27 06:48:54 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-27T06:48:54Z.


Refs #232. A paged descriptor heap's title-visible memory comes from the title's own allocator, which need not clear it. A slot the title never writes then holds leftover bytes that are neither an authored descriptor record nor an empty one. Binding a table that spans such a slot fails with E_INVALIDARG, and the draw or dispatch is skipped (… with a reflected table).

Found in ProjectScarlett on an RTX 5090 while narrowing #215's write sets: tables with legally unwritten slots were refused.

Change (device/descriptor_paging.rs): clear the heap's title memory when the arena is created, so an unwritten slot reads as the empty record.

Test: a new Lanes scenario, unwritten-descriptors (in all and the verify suite). It installs XMem allocation hooks that fill what they hand out with 0xA5, creates a CBV_SRV_UAV heap while they are in place, and dispatches through a table whose t1..t3 are never written.

  • Without the fix (8b1f6ac, AMD): FAIL unwritten-descriptors: output kept its sentinel: the table was refused and the dispatch skipped.
  • With the fix: passes on both cards.

Checks

  • python -m unittest discover -s tests -q: OK.
  • AMD Raphael iGPU (1002:13c0), RADV, GE-Proton11-14: full python tuxbox.py check passed on cc66885, 136 gates, including lanes-selftest-unwritten-descriptors.
  • RTX 5090 (10de:2b85), driver 620.70.10, GE-Proton11-14: full python tuxbox.py check passed on the fix alone (f7ec7a9, same runtime change), 135 gates; tuxbox.py verify --only lanes-selftest on cc66885 passed all 16, including the new scenario.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5522494045 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/301). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-27T06:48:54Z. --- Refs #232. A paged descriptor heap's title-visible memory comes from the title's own allocator, which need not clear it. A slot the title never writes then holds leftover bytes that are neither an authored descriptor record nor an empty one. Binding a table that spans such a slot fails with `E_INVALIDARG`, and the draw or dispatch is skipped (`… with a reflected table`). Found in ProjectScarlett on an RTX 5090 while narrowing #215's write sets: tables with legally unwritten slots were refused. **Change** (`device/descriptor_paging.rs`): clear the heap's title memory when the arena is created, so an unwritten slot reads as the empty record. **Test:** a new Lanes scenario, `unwritten-descriptors` (in `all` and the verify suite). It installs XMem allocation hooks that fill what they hand out with `0xA5`, creates a CBV_SRV_UAV heap while they are in place, and dispatches through a table whose t1..t3 are never written. - Without the fix (8b1f6ac, AMD): `FAIL unwritten-descriptors: output kept its sentinel: the table was refused and the dispatch skipped`. - With the fix: passes on both cards. **Checks** - `python -m unittest discover -s tests -q`: OK. - AMD Raphael iGPU (1002:13c0), RADV, GE-Proton11-14: full `python tuxbox.py check` passed on cc66885, 136 gates, including `lanes-selftest-unwritten-descriptors`. - RTX 5090 (10de:2b85), driver 620.70.10, GE-Proton11-14: full `python tuxbox.py check` passed on the fix alone (f7ec7a9, same runtime change), 135 gates; `tuxbox.py verify --only lanes-selftest` on cc66885 passed all 16, including the new scenario. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
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
brcly/TuxBox!301
No description provided.