Shaders: lower v_mov_b32 abs/neg modifiers bitwise #2548
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!2548
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2548"
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?
@fuzeofficlal on GitHub · 2026-11-25 15:38 UTC · original
fuzeofficlal:fix/shader-vmov-b32-bitwise-modifiers-883→main· +126 −41 · 2 files · 1 commits · openRefs #883
Summary
Ports the remaining
v_mov_b32half of #883 (AscilCH'scacf6ad, withCo-authored-bypreserved) onto currentmain(v_cndmask_b32already landed there):absandnegmodifiers onv_mov_b32clear or flip bit 31 bitwise without flushing subnormal values or quietingsNaNpayloads unless a floating-point output modifier (clamporomod) is active.Lower::src_bitsincrates/victory-shader/src/emit/lower.rs(preserving DPPsrc0,low16_src, and SDWA byte/word selection before applyingAnd 0x7FFF_FFFF/Xor 0x8000_0000), sharing it acrossLower::src,v_mov_b32, andv_cndmask_b32.v_mov_b32throughas_float+write_fonly whenv.clamp || v.omod != 0.Verification
emit::valu_tests::v_mov_b32_modifiers_are_bitwise(crates/victory-shader/src/emit/valu_tests.rs) coveringv_mov_b32_e64(-v1,|v1|,-|v1|),v_mov_b32_sdwa(-v1,-v1.w0,|sext(v1.b0)|) across normals,±0.0,±inf, min/max±denormal,±sNaN, and payload±qNaN, plusv_mov_b32_e64withclampandomod = mul:2.lower.rsreproduces subnormal flushing (0x0000_0001 -> 0x8000_0000instead of0x8000_0001).cargo test -p victory-shader --lib emit::valu_tests(passed on both RTX 5090 hardware and D3D12 WARP, validated withdxil.dll)cargo clippy -p victory-shader --all-targets -- -D warnings(default and--no-default-features)cargo xtask policy@Marvisak on GitHub · 2026-11-25 18:35 UTC · original · edited 2026-11-26 03:23 UTC
Automated triage for the maintainers.
Verdict: merge candidate (unchanged). The new head is a rebase onto current
main, and it merges cleanly. I reread the whole diff.Lower::src_bits(crates/victory-shader/src/emit/lower.rs) appliesabs/negto the bits after the DPP,low16and SDWA selection.Lower::srcstill refuses modifiers on other integer operations.v_mov_b32goes through the float path only withclamp/omod.v_cndmask_b32now uses the shared helper in place of its own copy of the same loop. The test invalu_tests.rsis unchanged in what it covers.As noted before, #1275 makes the same change on an old base, and only one of the two should land.
CI: passing (
check).Generated by Claude Code
@brainbudt on GitHub · 2026-11-25 21:10 UTC · original
APPROVE — independently verified
cc7e263merged ontomain(13f91ca).-0.0, subnormals, signaling and quiet NaNs, and combinedabs/neg. Negative control withmain's lowering confirmed negating0x00000001returned0x80000000instead of0x80000001; this PR preserves the payload.1.9.2609.5): accepted 8/8 containers (all 7 regression shaders plus an additional DPP shader whose disassembly showsWaveReadLaneAt -> and i32 -> xor i32).cargo check -p victory-shader --target x86_64-pc-windows-msvc --tests --lockedpassed.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.