d3d12: decode meshlet-coded indices in title-memory BLAS builds (stacked on #320) #375
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/375"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-28T06:25:43Z.
Summary
Stacked on #320 (gtb-sbe's guest-memory acceleration structures). This branch is #320's head (
561b805) plus two commits,7886a3candc800b90. Only those are new here, so please review it after #320 lands. I'll rebase once it does.ProjectScarlett's own bottom-level builds name index format 53, which D3D12 does not define.
guest_addresses::geometrysized any index format other than R16_UINT or R32_UINT as 0 bytes. As a result, the title's address was never resolved and reached the host build as an index buffer. vkd3d-proton reads such a format as R32_UINT at that address. NickStallman measured this on #320 (comment): 581 distinct raw BLAS index addresses about 12 minutes into the story, followed by an Xid 13.Format 53 is a meshlet-coded stream:
0x80000000 | meshlets, the triangle count, one more word;meshlet << 21 | c << 14 | b << 7 | a, three positions in that list;This commit:
commands/build_raytracing/meshlet_indices.rs) into R32_UINT indices in an upload buffer that the list retains;Notes:
The decoding was validated offline against captured ProjectScarlett builds before this port: paired-leaf score 1.0000 on 61,973 pairs against the console's own leaves. In game, a local build with this decoder, plus the packed-position decode and a check that vertex ranges are committed, was the first of our title-memory build runs without a GPU page fault. This PR has not been run in game on its own.
Tested
No Lanes scenario: Lanes has no title-memory BLAS case to extend, and #320's BLAS reference builds from native buffers. The decoder is a pure function over the stream's bytes, covered by unit tests in
tests/commands/meshlet_indices.rs:These tests compile in the Windows typecheck. I also ran them on Linux by building the module on its own: 3 passed.
GPU, driver and backend: AMD RX 9060 XT, Mesa RADV 26.1.8, Linux 7.3.1, Proton Experimental (private rootful Xwayland)
Commands run and their results:
Checks
No evidence JSON changes.
🤖 Generated with Claude Code