xg: coalesce contiguous elements in tiled color texture transfers #248

Closed
Valdi320 wants to merge 1 commit from upstream-pr/248 into main
Valdi320 commented 2026-11-26 16:34:36 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T16:34:36Z.


Change

Coalesce horizontal spans of adjacent storage elements where the existing 2D color swizzle equations guarantee contiguity. Clip the last span at the logical width; preserve the element-by-element path for depth/stencil, MSAA, volume, packed tails and unknown swizzles. No layout ABI or address equation changes.

Measurements

Host release-mode synthetic copy loop, 2049x1025 logical texture, seven alternating upload trials, median:

Format/layout Span Old -> new
R8 4 KiB 16 25.895 -> 1.564 ms
RGBA8 4 KiB 4 25.798 -> 6.980 ms
RGBA8 64 KiB 4 29.766 -> 8.472 ms
BC1 64 KiB 2 1.558 -> 0.819 ms
Both full backing allocations and downloaded pitched buffers are byte-identical to element-by-element copies, including padding. Synthetic CPU transfer loop, not measured retail FPS.

Validation

  • New host property test compares 23,396,004 addresses across layout variants, mip levels, array layers and hardware revisions, including 2,765,956 grouped spans. All six no-GPU groups pass.
  • Rebuilt XG: 4/4 provider checks pass under GE-Proton11-14, including bidirectional library copies and 10,103,777 address comparisons.
  • Rebuilt D3D12: 8/8 Lanes gates on RTX 4080 with unchanged fixture staged with new provider.
  • The optional native reference DLL was unavailable, so its three comparison gates were not run successfully; no claim of native differential or full GPU/AMD validation. No retail data included.
<!-- greyfinch-sync:brcly/TuxBox:issue:5513762598 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/248). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T16:34:36Z. --- ## Change Coalesce horizontal spans of adjacent storage elements where the existing 2D color swizzle equations guarantee contiguity. Clip the last span at the logical width; preserve the element-by-element path for depth/stencil, MSAA, volume, packed tails and unknown swizzles. No layout ABI or address equation changes. ## Measurements Host release-mode synthetic copy loop, 2049x1025 logical texture, seven alternating upload trials, median: | Format/layout | Span | Old -> new | | --- | --- | --- | | R8 4 KiB | 16 | 25.895 -> 1.564 ms | | RGBA8 4 KiB | 4 | 25.798 -> 6.980 ms | | RGBA8 64 KiB | 4 | 29.766 -> 8.472 ms | | BC1 64 KiB | 2 | 1.558 -> 0.819 ms | Both full backing allocations and downloaded pitched buffers are byte-identical to element-by-element copies, including padding. Synthetic CPU transfer loop, not measured retail FPS. ## Validation - New host property test compares 23,396,004 addresses across layout variants, mip levels, array layers and hardware revisions, including 2,765,956 grouped spans. All six no-GPU groups pass. - Rebuilt XG: 4/4 provider checks pass under GE-Proton11-14, including bidirectional library copies and 10,103,777 address comparisons. - Rebuilt D3D12: 8/8 Lanes gates on RTX 4080 with unchanged fixture staged with new provider. - The optional native reference DLL was unavailable, so its three comparison gates were not run successfully; no claim of native differential or full GPU/AMD validation. No retail data included.
Valdi320 commented 2026-11-26 23:21:02 +00:00 (Migrated from github.com)

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


Deferred: independent XG span optimization has synthetic measurements, but needs real-workload relevance and vendor validation before another review. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at 94a5f7c; no branch deleted.

<!-- greyfinch-sync:brcly/TuxBox:comment:7205466958 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/248#issuecomment-7205466958). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T23:21:02Z. --- Deferred: independent XG span optimization has synthetic measurements, but needs real-workload relevance and vendor validation before another review. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at `94a5f7c`; 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!248
No description provided.