Repository navigation
Conversation
…verflowing The helper's linear congruential step `n = n * 1103515245 + 12345` grows without bound: from the third loop pass it is past u64, and debug builds (cargo test) panic with "attempt to multiply with overflow". Both GPU tests that use it failed on a GPU (CI has none, so they return before reaching it): - texture_upload::tests::pieces_hold_the_texels_of_their_levels - texture_upload::tests::gpu_parts_of_a_texture_go_up_and_the_rest_stays The step now wraps, as such a generator is meant to. Test code only; on an RTX 4060 Laptop GPU all 8 texture_upload tests pass (3 runs). Assisted-by: Claude Code (Claude Opus 5.5)
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
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 with 73fc616.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 (Tests: wait for late release before checking released pipelines are gone #2770),d3d12_mesh_stream::console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly(amd-dev 6a0bb5b: 13 tests fail on an RX 9070 XT, and the lib test binary aborts after 1,024 of 1,564 tests #2632), and the flakyhle::kernelx::tests::memory_under_a_shown_page_is_told_to_sparse_before_it_goes, a race that kernelx: forget a graphics reservation before Windows can hand its address out #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