Tests: some_ranges in texture_upload wraps its generator instead of overflowing #2771
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!2771
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2771"
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?
@inf1425 on GitHub · 2026-11-26 11:38 UTC · original
inf1425:tests/texture-upload-lcg-overflow→nvidia-dev· +1 −1 · 1 files · 1 commits · draftThe
some_rangeshelper intexture_upload's tests advances a linear congruential generator withn = n * 1103515245 + 12345, andngrows without bound. By the third loop pass it exceeds u64, and debug builds (cargo test) panic with "attempt to multiply with overflow". Both GPU tests that use the helper fail on a GPU. CI has no GPU, so they return before reaching it. The step now wraps, as such a generator should. Royalflamejlh reported this in #42 (comment) and proposed exactly this line. This PR applies it.What is in it
crates/xcl/src/hle/d3d12x/texture_upload.rs(inmod tests):n = n.wrapping_mul(1103515245).wrapping_add(12345). Test code only. The helper came in with73fc616f.Tested
cargo test -p xcl --lib texture_upload: 8 passed, 0 failed, in 3 runs. Without this PR,pieces_hold_the_texels_of_their_levelsandgpu_parts_of_a_texture_go_up_and_the_rest_staysfail.cargo test --workspace --no-fail-fast -- --test-threads=4at this PR's head: 1746 passed, 4 failed, 48 ignored. The failures are not touched here: the 2 late-release tests (#2770),d3d12_mesh_stream::console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly(#2632), and the flakyhle::kernelx::tests::memory_under_a_shown_page_is_told_to_sparse_before_it_goes, a race that #2772 fixes. That last test passed in 3 further lib runs and 10 runs on its own.XCL_HEAP_WINDOWS=1.Regression run
#[cfg(test)] mod testsand never reachesxcl.exe, butscripts/pr_check.pycounts any file undercrates/xcl/src/as runtime. Smoke blocks fromnvidia-devand from this head will be added once a title is available, unless a maintainer prefers thetest-onlylabel.main:
PR:
Not tested
AI use
@MarcosMDev on GitHub · 2026-11-26 12:25 UTC · original
Test report:
6b2691eagainst its baseaf2ceccon a desktop RTX 4060 (Windows): the 2texture_uploadtests fail 10 of 10 on the base and pass 10 of 10 here; full suite, no new failure. No title was run.Debug, each tree in its own worktree and target folder,
cargo build --workspace --lockedfirst.cargo test -p xcl --lib hle::d3d12x::texture_upload::tests, 10 times in a row: base 6 passed, 2 failed every time (attempt to multiply with overflowattexture_upload.rs:1002); head 8 passed, 0 failed every time.cargo test --workspace --locked --no-fail-fast -- --test-threads=4: base 1745 passed, 6 failed, 48 ignored; head 1747 passed, 4 failed, 48 ignored. The 4 left are the 2 late-release tests (counted 3 times; #2770) andconsole_ms_in_as_slot_and_ms_with_as_are_refused_cleanly. Thekernelxrace you mention did not fail here. The same 30 SKIPPED lines on both.The change is inside
#[cfg(test)] mod tests, and in a release buildn * …already wraps, so the generator's values are the same there as before.RTX 4060 8 GB (driver 621.01), Ryzen 7 5700X, 24 GB, Windows 11 26200, rustc 1.100.0, DXC 1.9.2609.5.
Not tested: a release build, AMD, any title, so no smoke blocks from me.
AI use: Claude Code (Claude Opus 5.5) ran the tests and drafted this; I read it before posting.
@Prime1997 on GitHub · 2026-11-26 13:19 UTC · original · reviewed
Good targeted test result; retain this PR. Clean exact head
6b2691e18b02fd5f5efcca5c8e27db93e3ce727a: 2 passed, 0 failed, 0 ignored, 0 reported skips. No production or fixture edits were made.hle::d3d12x::texture_upload::tests::pieces_hold_the_texels_of_their_levels: passed; CPU layout/fill assertions using D3D12 device layouts, no command submission in this test body.hle::d3d12x::texture_upload::tests::gpu_parts_of_a_texture_go_up_and_the_rest_stays: passed; bounded texture upload/readback assertions. The fixture may omit partial rounds with zero pieces while still running full uploads.Adapter attribution remains blocked: these fixtures call
D3D12CreateDevice(None)and can fall back to WARP. Their logs do not identify the selected adapter, so this is not a confirmed NVIDIA hardware result even though an RTX 3060 Ti is installed andXCL_ADAPTERwas requested. The passing assertions remain useful functional evidence.Build:
cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Run each exact test name in a fresh process:<test-exe> <exact-name> --exact --test-threads=1 --nocapture. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug. Private target paths are placeholders. Test processes had a 90-second process-tree deadline, isolated caches/data, one DXC worker, one pipeline worker,XCL_ASYNC_PSO=1 XCL_LATE_RELEASE=1 XCL_UMA_WINDOWS=4 XCL_UMA_MB=16 XCL_COHERENT_MB=16 XCL_HEAP_WINDOWS=0, and the pinned private compiler.Compiler SHA-256: dxcompiler
0689e2fee0a1c9df8662a59680469f24e2a3ad7ce6bbbcc9284f7a83172bfc59; dxil64be2368211d257a038a7d4ea6bb3e24c878eb8d588c7b8414fccf759b69c2ac.Latest refs checked: main
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, nvidia-devaf2cecc40886a8682ecf3267f5328c6dc4b66ad7. The native results above are on the exact PR head, not a main integration. Source-only merge-tree against latest main reports clean; that does not validate a rebased build. Full-suite, gameplay, performance and general driver compatibility are not established.AI use: Codex (GPT-6) inspected the fixtures, ran the bounded checks and audited the raw results. Optional temporary Discord for coordinating contributor work, testing and comparing results.
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.