GPU: guard zero/overflowing stride in expand_rects and add primitive.rs unit tests #1204
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1204
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1204/head"
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?
@geiyiliyabumo on GitHub · 2026-11-24 16:25 UTC · original
geiyiliyabumo:test/gpu-primitive-audit→main· +87 −2 · 1 files · 1 commits · merged 2026-11-25 00:13 UTCSummary
Closes #1061
Full verification details and change notes are documented in #1061 (commit
e3c9dd0, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
@Aniseto on GitHub · 2026-11-24 16:48 UTC · original
Ran the
primitivetests ate3c9dd0:Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.The three new tests pass (
zero_or_overflowing_stride_is_ignored_without_panicking,unorm16_unorm8_clamping_and_unknown_formats_expand_correctly,multiple_rectangles_and_f32_f16_vector_formats_expand_in_sequence) and the four existing ones are unaffected. They are unit-level tests, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain. No test report on this PR yet.Not tested: a title that hits a zero or overflowing stride (no game data here), RDNA2/RDNA4 and Intel GPUs.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; no game data was used.
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
e3c9dd0:cargo test -p victory-gpupasses, 53 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@upipibi on GitHub · 2026-11-24 20:33 UTC · original
Duplicate check: this PR and #1158 have the same diff (91 changed lines, no differences) and commits by the same author (给伊莉雅补魔). Only one of the two needs review; the other can be closed.
@geiyiliyabumo on GitHub · 2026-11-24 21:07 UTC · original
Thanks @upipibi for flagging this! Just to clarify provenance: this PR (#1204) is the original author PR (authored by
geiyiliyabumo, already reviewed/approved by @mercuryVM and @Aniseto). #1158 was opened by another account (@Vittorio17) using our commit from our fork branch, so #1204 is the canonical one to keep.AI-assisted; synthetic tests only, no game files.