Tiling: bounds check tile linear slice and mask base_xor to block size #1373
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1383"
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?
Imported from ivall/xcl. Originally posted by slopgobblercobbler on 2026-11-24T15:25:37Z.
Summary
In
crates/xcl/src/gpu/tiling.rs:offset_z:pitch_blocks(w.max(1).div_ceil(self.block_w)).base_xorand intra-block xor offset within_blk_mask = self.block_bytes - 1, ensuring the intra-block offset never overruns the block size regardless of swizzle mode bit patterns.tile:out[o..o + e].copy_from_slice(&linear[s..s + e])with checked slicing viaout.get_mut(o..o + e)andlinear.get(s..s + e)to prevent out-of-bounds panics on truncated linear inputs or boundary coordinates.Changes
crates/xcl/src/gpu/tiling.rs:offset_z: applyin_blk_masktobase_xorand intra-block offset; guardw.max(1).tile: bounds-check destination and source subslice access.Tested
cargo test -p xcl -- tiling: all tiling tests passed cleanly.Not Tested
AI Use
Co-Authored-By: Claude Code (Claude Opus 5.5) / Gemini Antigravity
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:33:46Z.
Full-suite run, since this PR has no test report yet. Tested exact head
4842033(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 756 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.truncated_directories_are_rejected,import_directory_without_null_terminator_exceeding_size_is_error,delay_import_without_null_terminator_exceeding_size_is_error,export_tables_exceeding_directory_bounds_is_error,thunks_with_out_of_bounds_iat_slot_is_error.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 756 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
upstream-sync referenced this pull request2026-11-24 16:07:30 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:49:49Z.
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 unmodifiedmain.)Thanks!
upstream-sync referenced this pull request2026-11-24 17:06:49 +00:00
upstream-sync referenced this pull request2026-11-24 18:09:17 +00:00
upstream-sync referenced this pull request2026-11-24 19:07:54 +00:00
upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:28:23Z.
Regression run of
b58bc3c7on 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: 101 % 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.upstream-sync referenced this pull request2026-11-25 22:06:32 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:03:22Z.
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
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:01Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:35:57Z.
Triage (#1607) – head
b58bc3c#1624 (same author) contains all three hunks of this PR unchanged in
gpu/tiling.rs(offset_z'sw.max(1)and maskedbase_xor, the bounds-checked copy intile) and adds the same guards toChain's tile / detile paths, zeroesbase_xorfor linear images inimage_layout/image_chain, bounds the thick 3D mip tail by depth, and has tests. This PR has no test.Recommendation: close (superseded by #1624).
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.