Skip to content

[upstream #1738] Tiling: use fixed-width copies for short runs of wide elements - #390

Open
ufoptg wants to merge 2 commits into
mainfrom
upstream-pr/1738
Open

ufoptg wants to merge 2 commits into
mainfrom
upstream-pr/1738

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Stacked on xcl-dev#1512 (part of xcl-dev#1511). Only 59bc9ee is new. For an 8- or 16-byte element, a short contiguous run can be just one or two elements. At those widths, a fixed-size copy per element beat the variable-size run loop.

What is in it

Tested

  • Ryzen 5 5600X, RTX 2070 (610.88), Windows 11 build 26200, rustc 1.100.0, release.
  • Samply flame graphs, the retail title, one 75 s run per build, 20:A, stock pacing. In profile seconds 65–75, game-host stacks containing detile_level accounted for 19.48% of sampled thread CPU delta on Tiling: detile_level copies contiguous runs (16 B in swizzled modes) in one go xcl-dev/xcl#1512 (fddfa26), 12.30% here. Asset traffic differed between runs. The earlier PIX timing capture identified the streaming interval; the CPU comparison is from samply.
  • Fixed-work benchmark, mode 5 / mode 25, 513×509 elements. Median of seven alternating batches of six conversions. 8 bytes: 1.20× / 1.17× faster than Tiling: detile_level copies contiguous runs (16 B in swizzled modes) in one go xcl-dev/xcl#1512. 16 bytes: 1.53× / 1.43×. Smaller widths ranged from 0.93× to 1.06×. Compared bytes at seven mip levels with full and truncated inputs.
  • cargo test --release --workspace --locked -- --test-threads=4: 752 passed, 0 failed, 41 ignored. Two GPU tests reported SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

Regression run

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 2070
title: A popular game
seconds: 75
exit: 0x0
frames shown: 1479 (PresentX 1479)
presents per 2 s (last 3): 1 4 9
device removals: 0
crashes: 0
peak commit: 25022 MB
xcl-smoke v1
commit: 59bc9eebdac509181118ac5bd7f281a832d0ddf9
gpu: NVIDIA GeForce RTX 2070
title: A popular game
seconds: 75
exit: 0x0
frames shown: 1491 (PresentX 1491)
presents per 2 s (last 3): 0 5 6
device removals: 0
crashes: 0
peak commit: 24695 MB

Not tested

  • AMD and Intel GPUs. No demonstrated improvement in time to finish loading.

AI use
OpenCode, GPT-6.2 Astra: implementation, benchmarks, test runs and PR text.


Mirror of xcl-dev#1738 (auto-synced, do not edit).

suppai-ringo and others added 2 commits November 24, 2026 06:44
…in one go

RGBA8 2048x2048 on the console pipe config: 22 ms -> 10 ms; BC 8/16 B ~10%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants