Repository navigation
Shaders: lower constant 64-bit integer compares without INT64 - #1090
tarcisioads wants to merge 1 commit into
Conversation
|
Ran the new lowering test at 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
Two related PRs from the same area are still open and I have not looked at them yet (#1099 for 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. |
…er compares without INT64 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 0b7067f on Windows 11, RTX 5070, MSVC:
cargo test -p victory-shader -- --test-threads=1passes on the head (121 passed, 1 ignored).- Merged into our fork: workspace tests, shader tests and
clippy -D warnings(default and all features) are all clean.
The change is right. The f/t predicates don't read their operands, so returning the constant lane result before src64 matches the 16- and 32-bit path and keeps INT64 out of SFI0. The v_cmpx forms go through the same lane call.
On a full game package, translate --validate --list keeps every program's result, with 0 programs changed (counts only compared).
AI-assisted (Claude Code).
0b7067f to
9a2513e
Compare
Where a fork-only change duplicates upstream's own version of a feature, upstream's is kept and the fork's dropped: - victory-shader is upstream's crate with the fork-only merges replayed onto it oldest first; those that do not apply onto upstream are dropped (37 of 63: among them Marvisak#704/raw views, gather4_l, the lane-mask and Marvisak#308 ports, Marvisak#947, Marvisak#1022, Marvisak#1112, Marvisak#1090, Marvisak#1182). Marvisak#284 (legacy fused madds) and Marvisak#98 (permlane16 in whole-wave sections) are dropped too: the first disagrees with upstream's hardware-checked model, the second refused 46 programs upstream translates. - translate: upstream's --cache replaces Marvisak#254's write-cache and work queue; Marvisak#378, Marvisak#517, Marvisak#673 and the victory.toml console are re-applied. - victory-gpu: upstream's stride table, page table and heap views replace the fork's Marvisak#704/stride-table wiring; fork-only fixes re-applied on top. Package (shaders.rpf, translate --validate --list, counts): vertex/pixel emitted 12559 -> 14295 of 14337, compute 2359 -> 2628 validated, mesh 2730 -> 2811 validated. Tests: the failures left (rect fourth corner, two stride tests, row order, gather4 at a level, memory table, dynamic heap slots) fail on upstream main as well on this host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Proposed close. This duplicates #1685. The change in the #1685's test ( 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 Generated by Claude Code |
catminou4
left a comment
There was a problem hiding this comment.
Merge with current main (940d32f) breaks compilation — verified locally after git merge origin/main:
error[E0063]: missing field `view_marks` in initializer of `Parts<'_>`
Same break as #1587/#1519/#1004: main added view_marks to Parts after this PR was opened. Constant 64-bit integer compares without INT64 look right; rebase + initialize the new field, and I will re-test.
Handle
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)