Shaders: lower constant 64-bit integer compares without INT64 #1090
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!1090
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1090"
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?
@tarcisioads on GitHub · 2026-11-24 15:39 UTC · original
tarcisioads:shader/const-64-bit-compare→main· +59 −0 · 1 files · 1 commits · openHandle
fandtpredicates (v_cmp_f_{u64,i64},v_cmp_t_{u64,i64}, andv_cmpx_*) in the"u64" | "i64"branch ofcompare()incrates/victory-shader/src/emit/lower.rs, matching the existing 16/32-bit integer path:self.lane(inst, Some(op == "t"))before callingself.src64(), avoiding"a 64-bit compare"and avoiding settingflags::INT64(SFI0 0x8000) unnecessarily.constant_64_bit_compares_lower_without_int64coveringv_cmp_f_u64,v_cmp_t_i64,v_cmpx_f_u64, andv_cmpx_t_i64.Verification
cargo test -p victory-shader(97 passed, 0 failed, 1 ignored benchmark on macOS; Windowsdxil.dllvalidation not run)cargo xtask policy(ok)@Aniseto on GitHub · 2026-11-24 15:48 UTC · original
Ran the new lowering test at
0b7067f: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.emit::lower::tests::constant_64_bit_compares_lower_without_int64passes. This is a CPU-side lowering test, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain.Two related PRs from the same area are still open and I have not looked at them yet (#1099 for
v_interp_p1, #1103 fors_buffer_load_dword); they are small and can be run the same way if that is useful.Not tested: a title using these compares (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 test, wrote this report; no game data was used.
@Zipettte on GitHub · 2026-11-24 16:29 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 0b7067f:
cargo test -p victory-shaderpasses, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 01:26 UTC · original
Automated triage for the maintainers.
Proposed close. This duplicates #1685.
The change in the
"u64" | "i64"arm ofLower::compare(crates/victory-shader/src/emit/lower.rs) is correct:fandtreturnself.lane(inst, Some(op == "t"))beforesrc64, as the 32-bit arm already does, so no Int64 flag is set. However, #1685 makes exactly the same four-line change, and both PRs merge cleanly.#1685's test (
v_cmp_f_and_t_64bit_match_rdna2invalu_tests.rs) is the stronger one. It checks the SFI0 flag, validates the shader, and runs it on the host GPU and WARP to check the result.constant_64_bit_compares_lower_without_int64here checks only that lowering succeeds without the Int64 bit; it does not check thatfgives false andtgives true.If you push an execution check like that, or the maintainer prefers this PR, this verdict can be revisited.
CI: no check runs on the head commit.
This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.