Skip to content

Tiling: detile_level copies contiguous runs (16 B in swizzled modes) in one go - #1512

Draft
oishigeso wants to merge 1 commit into
xcl-dev:mainfrom
oishigeso:detile-1-runs
Draft

oishigeso wants to merge 1 commit into
xcl-dev:mainfrom
oishigeso:detile-1-runs

Conversation

@oishigeso

@oishigeso oishigeso commented Nov 24, 2026 •

Copy link
Copy Markdown

Part 1 of 2 for #1511. detile_level copied a texture one element at a time. Within a swizzled mode's 16-byte micro-tile run, and along a row in the linear and thin modes, consecutive elements are consecutive in both layouts, so it now copies those runs in one go.

What is in it

  • crates/xcl/src/gpu/tiling.rs: detile_level copies runs; the same offsets as before (Layout::offset_z)

Tested

  • AMD Radeon RX 6700 XT (driver 32.0.21030.2001), Ryzen 5 3600, Windows 10 Pro 19045, rustc 1.100.0, release
  • RGBA8 2048×2048 on the console pipe config: 22 ms → 10 ms; BC (8 / 16 B elements) ~10 % faster
  • cargo test -p xcl --lib detile -- --test-threads=1: 7 passed, 0 failed on the stack with part 2. Six of them are at this PR's head (detile_level_runs_match_elements, new, and detile_level_matches_element_by_element, linear_levels_detile_by_rows_as_by_elements, tile_then_detile_round_trips_with_partial_blocks, a_batch_detiled_on_several_threads_matches_one_thread, retail_ttpf_textures_detile_with_their_mip_chains); gpu_detile_matches_the_cpu comes with D3D12.X: title textures are detiled on the GPU #1513. Run before the rebase onto 930e8b4, which had no conflicts

Regression run

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: AMD Radeon RX 6700 XT
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 373 (PresentX 374)
presents per 2 s (last 3): 0 28 60
device removals: 0
crashes: 0
peak commit: 19259 MB

PR (this PR's head commit; the title is run through a folder named RetailTitle):

xcl-smoke v1
commit: fddfa2675a3ffc722a7a0dcf2ed8da1938b97713
gpu: AMD Radeon RX 6700 XT
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 579 (PresentX 579)
presents per 2 s (last 3): 59 60 60
device removals: 0
crashes: 0
peak commit: 18876 MB

Not tested

  • NVIDIA, Intel; Linux / Wine

AI use

  • Claude Code (Claude Opus 5.5) wrote the change, its test and this description, and ran the tests and runs above on my PC at my direction.

🤖 Generated with Claude Code

…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>

@gut0to gut0to left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The focused detile tests are useful. CONTRIBUTING.md also requires the full workspace suite to run on a GPU, with pass/fail/ignored counts and skipped-test names. This description reports only the focused cargo test -p xcl --lib detile run. Please add the full-suite result before merge. AI-assisted review; I checked the Tested section against the guide.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

@JJAutoCompare

Copy link
Copy Markdown

Tested

I ran the CPU tiling unit suite on clean PR head fddfa2675a3ffc722a7a0dcf2ed8da1938b97713 and verified that SHA against the open PR after the run.

cargo test -p xcl --lib gpu::tiling::tests:: -- --test-threads=1 --nocapture
  • 15 passed, 0 failed, 0 ignored, 0 skipped, with 714 tests filtered out. Cargo exited 0 and emitted no SKIPPED lines.
  • detile_level_runs_match_elements, detile_level_matches_element_by_element, and linear_levels_detile_by_rows_as_by_elements passed. They compare against element-by-element output for contiguous swizzled copies, mip tails, truncated inputs, and padded linear rows.
  • Windows 11 Enterprise Evaluation 25H2 (build 26200.9974), AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175. Rust 1.100.0 (x86_64-pc-windows-msvc), Cargo 1.100.0, default unoptimized test profile. DXC 1.9.2609.5 configured through XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64. CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, and XCL_ADAPTER=A770 were set. Cargo target and TEMP/TMP were isolated on L:/XclTooling.

Not tested

GPU execution, the full workspace suite, retail-title smoke runs, and performance.

AI use

Codex (gpt-6.2-sol) ran the tests, verified the SHA, and wrote this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants