Skip to content

Textures: copy linear mip levels a row at a time - #334

Closed
jfarre20 wants to merge 1 commit into
xcl-dev:mainfrom
jfarre20:perf/linear-movie-rows
Closed

jfarre20 wants to merge 1 commit into
xcl-dev:mainfrom
jfarre20:perf/linear-movie-rows

Conversation

@jfarre20

@jfarre20 jfarre20 commented Nov 23, 2026 •

Copy link
Copy Markdown

Linear video planes go through the element-by-element address calculation in Chain::detile_level on every upload. This implements the row-copy case described by @gw1337x in the profiling thread on #283. It uses the existing layout calculation for the first element and the stored mip pitch for subsequent rows.

For linear surfaces with no base swizzle, compute the pitched row address once and copy whole elements through the end of the available source. This avoids recalculating an address for every texel in CPU-updated video planes. The regression test compares against the element-wise result for padded mips and truncated input.
@jfarre20 jfarre20 closed this Nov 23, 2026
@jfarre20
jfarre20 deleted the perf/linear-movie-rows branch November 23, 2026 23:51
@regiumlepidi

Copy link
Copy Markdown

Two more GPU families for Not tested (Blackwell, and RDNA2 with native wave64): 1e3d6bb (based on main db1ddb2): pass.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves), driver 617.42 (32.0.16.1742), and AMD Radeon(TM) Graphics (Ryzen 7 9800X3D iGPU, RDNA2, 64-lane waves), driver 32.0.21030.2001, selected with XCL_ADAPTER=radeon
  • Ryzen 7 9800X3D, 48 GB, Windows 11 Pro 25H2, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100, debug
  • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4), no XCL_SAMPLE_* set
Build RTX 5070 Ti RDNA2 iGPU
main db1ddb2 666 passed, 0 failed, 41 ignored 666 passed, 0 failed, 41 ignored
1e3d6bb 667 passed, 0 failed, 41 ignored 667 passed, 0 failed, 41 ignored

GPU tests skipped: the usual 2 (no wave64) on NVIDIA, none on the iGPU; the mesh tests ran on both.

Not tested

  • scripts/smoke.ps1 / movie playback (I have no Series title).
  • The release microbenchmark (it is not in the branch).

AI use: Claude Code with Claude Opus 5.5 ran the build and tests and wrote this comment; the numbers come from those runs.

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.

2 participants