Tests: read the TTPF texture table's mip count from both of its fields (#1121) #1245
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1245
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1245"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tiagonogueiraa-bit on GitHub · 2026-11-24 13:41 UTC · original
tiagonogueiraa-bit:ttpf-mip-count→main· +2 −1 · 1 files · 1 commits · openretail_ttpf_textures_detile_with_their_mip_chainsread a texture's stored mip count from dword 0 bits 28–31 only. Dword 1 bits 0–2 (below the DXGI format) add to it. On the archive the test was written for, those extra levels only fall in the mip-tail block, so the size check passed there. On the other archives it failed. Fixes #1121, part of #707.Across all 46
.ttpfarchives of the package (table fields only,gpu/tiling.rsof main), the model now matches the stored size of 351 970 of 352 461 textures, against 294 726 before. The rest are mipped cubes (#707) and each archive's last entry. The extra levels are real mips: each one is the level above it scaled down 2× (details in #1121).Overlaps #752, which changes the same test. The two edit different lines, and
texture.rsmerges cleanly with both. #752's "volumes: none" message still applies; its size-miss message becomes rare.What is in it
crates/xcl/src/gpu/texture.rs,mod tests,Ttpf::open:mips=(a >> 28) + (b & 7)Tested
cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc, no errors.ttdb_graphics.ttpfis unchanged at 909 / 912.830bf78and its parent47efa2e(Windows MSVC build under Wine,cargo test -p xcl --lib retail_ttpfwithXCL_SAMPLE_TTPFset) (report):ttdb_ui.ttpf: sizes match for 8 115 / 10 013 on the parent and 10 012 / 10 013 on this head. The size assertion now passes. The test then stops at the separatechecked >= 5assertion: only 3 uncompressed mipped textures, all close.ttdb_graphics.ttpf: 909 / 912 on both; the whole test passes on both.Regression run
Not run. The diff is test-only: one line inside
#[cfg(test)] mod testsof a runtime file.Not tested
AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-24 14:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Thanks!
@tiagonogueiraa-bit on GitHub · 2026-11-24 14:02 UTC · original
Hi @ivall, could you review the diff and, if you agree it is test-only, apply the
test-onlylabel? It changes one line inside#[cfg(test)] mod testsofcrates/xcl/src/gpu/texture.rs: the TTPF test's mip count becomes(a >> 28) + (b & 7). Noscripts/smoke.ps1run was made, so thePR descriptioncheck fails only on the twoxcl-smokeblocks.A Windows run of
cargo testwithXCL_SAMPLE_TTPFset is still wanted; a volunteer offered hardware in #1243.Written with Claude Code (Claude Opus 5.5).
@tiagonogueiraa-bit on GitHub · 2026-11-24 14:05 UTC · original
@DavidM1911 thanks for running it! One question so it can count for this change: was
XCL_SAMPLE_TTPFset, and to which archive? Without it,retail_ttpf_textures_detile_with_their_mip_chainsprintsXCL_SAMPLE_TTPF not set – skippingand passes either way. If you have the 1.0.2.1 package,data\ttdb\ui\ttdb_ui.ttpfis a good one to try: on main its first line readsTTPF: the mip chain model size matches for 8115 of 10013 textures, and with this branch it should read 10012 of 10013. The size assertion should pass. The test's other assertions (volumes, ≥ 5 uncompressed mipped textures) still needdata\ttdb\graphics\ttdb_graphics.ttpf(#752).Written with Claude Code (Claude Opus 5.5).
@vitor127wt on GitHub · 2026-11-24 15:01 UTC · original
TTPF test report under Wine
Following up on #1243. I ran the CPU archive test on the exact PR head
830bf7898655e6b3d2c26d96393698ab55c511d6and its parent47efa2ecea0a12934719ae69b81930cf02a4b1c3, using two Series 1.0.2.1 TTPF archives from my own extraction.Tested
7.3.5-2-cachyos), Wine 11.22, Rust 1.100.0, cargo-xwin 0.24.1, Windows MSVC debug builds.XCL_SAMPLE_TTPFto that archive's local path and rancargo xwin test --offline --locked --target x86_64-pc-windows-msvc -p xcl --lib retail_ttpf -- --nocapture --test-threads=1.ttdb_ui.ttpfttdb_graphics.ttpfOn the UI archive, the parent failed the mip-chain size assertion. The PR passed that assertion and reached the separate minimum-sample assertion. All 3 checked UI textures had matching mips, and the test requires at least 5. The graphics archive checked 6 of 6 matching mipped textures and passed the full test on both commits. All four invocations reported zero ignored tests and ran with the archive set.
Not tested
Native Windows and other TTPF archives. This run covers the focused archive test.
AI use
Codex (GPT-6, exact variant unavailable) cross-built and ran the tests, compared the counts and drafted this report.
@tiagonogueiraa-bit on GitHub · 2026-11-24 15:02 UTC · original
Thank you, @vitor127wt: that is exactly the check this change needed, on both archives and both commits. I added it to Tested and marked the PR ready for review.
Written with Claude Code (Claude Opus 5.5).
@Toons29 on GitHub · 2026-11-25 03:18 UTC · original
Regression run of
830bf789on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.@thehollowedone on GitHub · 2026-11-25 07:22 UTC · original
Native Windows integration check of 830bf78. I applied only the PR’s mip-count change to 568e7db.
Tested
cargo build --offline --locked --workspace -j 3passed.cargo test --offline --locked --workspace --no-fail-fast -j 3 -- --nocapture --test-threads=4reported 1,154 passed, 0 failed, 46 ignored. Separately, 25 runtime skip notices (20 native wave64, three unsupported per-lane forms, one driver-cache disable probe, one no heap windows). The opt-in fixtures were unset for this run.cargo test --offline --locked -p xcl --lib retail_ttpf -j 3 -- --nocapture --test-threads=1with one local archive set ran the fixture and passed 1/1. The existing layout match count remained 909/912 on that archive, consistent with the PR description.Not tested
The historical PR checkout as a whole, a title launch, or other GPUs.
AI use
Codex (GPT-6.2 Sol) ran the integration tests and drafted this report.
@DavidM1911 on GitHub · 2026-11-26 04:32 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.