Shaders: pass SignedOpKind::Signed for float dx.op.wavePrefixOp #3151
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!3151
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3151"
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?
@reeledMarek on GitHub · 2026-11-26 10:27 UTC · original
reeledMarek:fix/shader-wave-prefix-f32-signed-kind→main· +132 −1 · 3 files · 1 commits · openSummary
crates/victory-shader/src/emit/lower.rs(Lower::shape),wavePrefixOpunconditionally passedSignedOpKind = 1(Unsigned) even whenop == Op::AddF(dx.op.wavePrefixOp.f32).SignedOpKind = 0(Signed) for floating-pointwavePrefixOp(matchingwaveActiveOpdirectly below atOp::AddF => (0, 0)), otherwisedxil.dllvalidation rejects the shader.self.s.m.i8(u8::from(!float))and add a synthetic compute wave32 prefix-sum test incrates/victory-shader/src/emit/lower/wave_prefix_tests.rsverifyingSignedOpKind = 0forOp::AddF(plus DXIL validator check on Windows) andSignedOpKind = 1forOp::AddU.@oni-swr on GitHub · 2026-11-26 10:44 UTC · original
Independent WARP verification of head
c9b42b64(parent main63bcca4). Synthetic only, no game data.Setup:
VICTORY_D3D12_WARP=1,VICTORY_WARP=1; DXGI adapter reported "Microsoft Basic Render Driver" (flags=2 software, 0 video memory). The physical GPU was not opened. DXIL validator: dxil.dll 1.8.2502.11 (Windows Kits 10.0.26100.0). rustc: rustc 1.98.1 (48a229cea 2026-09-01).cargo test -j 4.Result: no defect found in the change.
emit::lower::wave_prefix_tests::wave_prefix_op_sets_signed_op_kind_for_float_and_unsigned_for_intpasses on head. With only theself.s.m.i8(u8::from(!float))line put back toi8(1), it fails on the float assertion (left[121, None, 0, 1], right[121, None, 0, 0]), so the test does discriminate the change.cargo test -p victory-shader --no-fail-fast -- --test-threads=1: head 299 passed, 4 failed, 3 ignored. main: 298 passed, 4 failed, 3 ignored. The same 4 fail on both:synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}. They are not caused by this PR (the wave-of-32 ones are WARP refusing the fixed-wave pipeline).Limits of what I could show:
wavePrefixOpmodule with sop = 1 (before) and sop = 0 (after), so the validator does not enforce "Signed required for float" here. The change follows the DXIL operand definition, which I did not find a way to confirm through this validator.The parameter is incorrect), exactly as it does for the existing wave-of-32 tests above. So there is no runtime comparison of results on WARP; the evidence is the emitted operands plus validation.AI use: Claude Code (Claude Sonnet 5.5) ran this verification; Claude Code (Claude Opus 5.5) coordinated. No game files, dumps, shader names or hashes were used.
@Dukestar69 on GitHub · 2026-11-26 11:31 UTC · original · approved these changes
Verified against
origin/main(63bcca4):cargo test -p victory-shader --lib wave_prefix_tests:: -- --test-threads=1: passed (wave_prefix_op_sets_signed_op_kind_for_float_and_unsigned_for_int).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.Cleanly passes
SignedOpKind::Signedfor floatdx.op.wavePrefixOpcalls per DXIL spec.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.