d3d12: experiment with parallel detiling of independent texture uploads #279

Closed
Valdi320 wants to merge 1 commit from upstream-pr/279 into main
Valdi320 commented 2026-11-26 22:43:03 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T22:43:03Z.


Scope

Independent TuxBox experiment inspired by public reports of parallel texture preparation in VIctory-family projects. No external implementation copied. Partition disjoint CPU-writeable upload footprints among up to four workers. COM command recording/submission, snapshots, synchronization and resource lifetime stay on the original thread. Default remains serial; batches below 4 MiB remain serial.

Evidence

RTX 4080, GE-Proton11-14 on e76ff6a. Rebuilt provider and guest, final A/B order 1,4,4,1 workers. 64 independent 256x256 R8 placed textures, five CPU updates/readbacks per process, 80 MiB checked over four processes. All passed. Median detile-only time over ten batches per configuration: 4.482 ms vs 1.709 ms (2.62x). Earlier pre-polish trial was 4.992 vs 1.864 ms. Not whole-frame time, not measured on retail. The first run with a stale staged DLL was discarded; final full rebuild produced the correct DLL and explicit timing receipts.

Six no-GPU groups and 17/17 selected GPU gates with four-worker setting (all 14 Lanes self-tests, heaps/tables/queues) pass. No AMD run or full title validation. Run with TUXBOX_TEXTURE_UPLOAD_JOBS=1 or 4 and TUXBOX_TEXTURE_UPLOAD_PROFILE=1 TUXBOX_LOG=1 WINEDEBUG=-all,+debugstr: python tuxbox.py verify --only lanes-texture-upload-batch.

<!-- greyfinch-sync:brcly/TuxBox:issue:5518140793 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/279). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T22:43:03Z. --- ## Scope Independent TuxBox experiment inspired by public reports of parallel texture preparation in VIctory-family projects. No external implementation copied. Partition disjoint CPU-writeable upload footprints among up to four workers. COM command recording/submission, snapshots, synchronization and resource lifetime stay on the original thread. Default remains serial; batches below 4 MiB remain serial. ## Evidence RTX 4080, GE-Proton11-14 on e76ff6a. Rebuilt provider and guest, final A/B order 1,4,4,1 workers. 64 independent 256x256 R8 placed textures, five CPU updates/readbacks per process, 80 MiB checked over four processes. All passed. Median detile-only time over ten batches per configuration: 4.482 ms vs 1.709 ms (2.62x). Earlier pre-polish trial was 4.992 vs 1.864 ms. Not whole-frame time, not measured on retail. The first run with a stale staged DLL was discarded; final full rebuild produced the correct DLL and explicit timing receipts. Six no-GPU groups and 17/17 selected GPU gates with four-worker setting (all 14 Lanes self-tests, heaps/tables/queues) pass. No AMD run or full title validation. Run with TUXBOX_TEXTURE_UPLOAD_JOBS=1 or 4 and TUXBOX_TEXTURE_UPLOAD_PROFILE=1 TUXBOX_LOG=1 WINEDEBUG=-all,+debugstr: python tuxbox.py verify --only lanes-texture-upload-batch.
NickStallman commented 2026-11-26 23:08:49 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-26T23:08:49Z.


AMD run of 0860d03 (this PR's head): the full python tuxbox.py check --adapter 1002:13c0 --proton … --prefix … --windows-dxc … passed, 120 gates, with the default serial setting. Every group passed: Lanes and the self-tests, the D3D12 regression controls and the translator on the GPU.

AMD Raphael iGPU (1002:13c0, RDNA2), RADV (Mesa 26.0.8), GE-Proton11-14, Linux 7.0. I didn't run it with TUXBOX_TEXTURE_UPLOAD_JOBS set and took no timing measurements.

<!-- greyfinch-sync:brcly/TuxBox:comment:7205293775 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/279#issuecomment-7205293775). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-26T23:08:49Z. --- AMD run of `0860d03` (this PR's head): the full `python tuxbox.py check --adapter 1002:13c0 --proton … --prefix … --windows-dxc …` passed, 120 gates, with the default serial setting. Every group passed: Lanes and the self-tests, the D3D12 regression controls and the translator on the GPU. AMD Raphael iGPU (1002:13c0, RDNA2), RADV (Mesa 26.0.8), GE-Proton11-14, Linux 7.0. I didn't run it with `TUXBOX_TEXTURE_UPLOAD_JOBS` set and took no timing measurements.
Valdi320 commented 2026-11-26 23:20:51 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T23:20:51Z.


Deferred to reduce the review queue. Optional parallel texture preparation remains experimental; reactivate when the maintainer wants it and AMD parallel/real-workload measurements are available. Nick's AMD serial check and NVIDIA synthetic A/B remain recorded. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at 0860d03; no branch deleted.

<!-- greyfinch-sync:brcly/TuxBox:comment:7205464171 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/279#issuecomment-7205464171). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T23:20:51Z. --- Deferred to reduce the review queue. Optional parallel texture preparation remains experimental; reactivate when the maintainer wants it and AMD parallel/real-workload measurements are available. Nick's AMD serial check and NVIDIA synthetic A/B remain recorded. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at `0860d03`; no branch deleted.

Pull request closed

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!279
No description provided.