Shader: prevent WARP device loss on constant floating compares #152
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/152"
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?
Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-24T21:55:18Z.
Refs #136. Lower the constant DXIL predicates for
v_cmp{,x}_{f,tru}_f{16,32}through the existing lane-mask path. The emitted shaders then store the constant result instead of passingfcmp falseorfcmp trueto WARP.This is the floating-point portion of Marvisak/VIctory#1326, including the source-built regression by fuzeofficial. Upstream patch
The same Windows-2025 WARP job verified both versions. The patched test checked all eight opcodes across finite, zero, infinity, quiet-NaN and signaling-NaN inputs. Restoring the original lowering suspended the WARP device on dispatch. Windows verification
On Linux, all eight emitted DXIL modules passed
dxvand disassembled to the expected constant stores. The shader library suite passed 170 tests with two ignored. Windows-target Clippy with warnings denied andcargo xtask policyalso passed. This run used WARP and source-built inputs.AI-assisted using Codex.
Imported from fxceless/victory-fork. Originally posted by bawhen on 2026-11-24T22:18:54Z.
Checked on an RX 7700 (RDNA3, driver 32.0.32029.2010) and WARP.
cargo test -p victory-shader --locked --lib float_compares_that_are_always_false_or_true -- --nocapture08cb7edlower.rsandbitcode.rsfrommainwarp: dispatch failed: The GPU device instance has been suspended, the WARP device removal from #136So on this card it's a WARP/CI fix only: the RX 7700 handles
fcmp false/fcmp truecorrectly.Setup: AMD Radeon RX 7700 (RDNA3, 16 GB), driver 32.0.32029.2010, Ryzen 7 8700F, 16 GB RAM, Windows 11 (build 26300), Rust 1.98.1 from
rust-toolchain.toml. Baselinemainat4e17478:cargo test --workspace --lockedgives 496 passed, 0 failed, 7 ignored. The "without the fix" run checks outmain's version of the PR's non-test files and keeps the PR's new test. No game files used.AI use: Claude Code (Claude Opus 5.5) ran the tests and drafted this comment; posted at my request.
Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T01:32:29Z.
Rechecked the current PR head
dbd9a894099845977fca87c8fdf66a4115897c98on Windows Server 2025 withVICTORY_WARP=1. The exactfloat_compares_that_are_always_false_or_trueregression passed for all eight opcode variants, with no skipped device. The verification commit adds only the workflow, and the job checks that before running the test.Windows WARP run
AI-assisted using Codex.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.