Offer: GPU-verified FidelityFX CAS golden model for shader validation (ffx-kit) #713
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Marvisak/VIctory. Originally posted by Cobrall on 2026-11-24T07:33:38Z.
Hi VIctory team,
Following Halfect's work in #712 on DXIL validation for compute shaders (25,889 matched program labels, 1693/1693 validation), I'd like to offer a complementary tool that may help with the FidelityFX CAS portion of the shader pipeline.
What ffx-kit does:
APrxLoRcpF1/APrxMedRcpF1/APrxLoSqrtF1bit tricks, green-channel weight path, D3Dsaturate(NaN)=0semanticsWhy this matters for VIctory:
A naive "mathematically exact" CPU reference disagrees with AMD's intended fast-math paths by up to ~8.5% of signal. When validating translated CAS shaders against exact math, this produces false failures. ffx-kit provides the correct reference to validate against.
Results (RTX 4070 Ti, DXC 1.9.2609.5):
manifest.jsonwith SHA-256 hashes for each compiled variantHow it could integrate:
.spv/DXIL files as ground-truth references for your CAS shader translatorcas_golden.py) to Rust for CI integrationCasFilterH) is ready for native runtime integration (Python harness limited by wgpu'sRelaxedPrecisionhandling on Windows)Repo: https://github.com/Cobrall/ffx-kit
No game files, console binaries, or keys involved — only official open-source AMD FidelityFX headers.
Happy to adapt the harness to VIctory's CI, answer questions about the bit-exact golden model, or provide the Rust port of the CPU reference if useful.
cc @Halfect — this may complement your DXIL validation work on compute shaders.
now also includes a zero-dep Rust reference implementation
Update: the repo now includes a zero-dep Rust reference implementation at
rust/cas_golden.rs(std only, verified viacargo check). This means VIctory's CI can drop it directly into a test crate without any external dependencies — no need to port the Python golden model by hand.Update: The repository now includes a zero-dependency Rust reference implementation at
rust/cas_golden.rs.It has been verified via
cargo checkand tested against the Python reference, mirroring AMD's fast-math approximations (APrxLoRcpF1,APrxMedRcpF1,APrxLoSqrtF1) and D3Dsaturate(NaN)=0semantics exactly.This can be dropped directly into a Rust or C++ test harness to validate translated CAS shaders against the intended AMD output, bypassing the need for the Python harness or naive "mathematically exact" references (which disagree by up to ~8.5% of signal).
Happy to help adapt this further if it fits into VIctory's CI pipeline!
Imported from Marvisak/VIctory. Originally posted by cj5k9dnkfd-afk on 2026-11-24T07:37:47Z.
Hi anyone have the files game
Imported from Marvisak/VIctory. Originally posted by Cobrall on 2026-11-24T07:42:01Z.
exe? or 209GB?
Imported from Marvisak/VIctory. Originally posted by Cobrall on 2026-11-24T07:53:27Z.
now also includes a zero-dep Rust reference implementation
Imported from Marvisak/VIctory. Originally posted by Cobrall on 2026-11-24T07:55:11Z.
Update: the repo now includes a zero-dep Rust reference implementation at
rust/cas_golden.rs(std only, verified viacargo check). This means VIctory's CI can drop it directly into a test crate without any external dependencies — no need to port the Python golden model by hand.Imported from Marvisak/VIctory. Originally posted by Cobrall on 2026-11-24T07:58:55Z.
Update: The repository now includes a zero-dependency Rust reference implementation at
rust/cas_golden.rs.It has been verified via
cargo checkand tested against the Python reference, mirroring AMD's fast-math approximations (APrxLoRcpF1,APrxMedRcpF1,APrxLoSqrtF1) and D3Dsaturate(NaN)=0semantics exactly.This can be dropped directly into a Rust or C++ test harness to validate translated CAS shaders against the intended AMD output, bypassing the need for the Python harness or naive "mathematically exact" references (which disagree by up to ~8.5% of signal).
Happy to help adapt this further if it fits into VIctory's CI pipeline!
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:46:29Z.
Automated triage for the maintainers.
This is an offer of an external tool (a CAS reference model hosted in another repository), not a report about VIctory's code. VIctory checks its translated shaders by translating the title's own GFX10 programs and validating/running the emitted DXIL (
victory-shader), so it has no step that would consume a separately compiled FidelityFX reference. Offers of outside tools fall under what this tracker treats as out of scope.If you want a specific check in VIctory's own test suite, pull requests are open to everyone: a self-contained test under
crates/victory-shaderwith synthetic inputs is the way to propose it.Separately, to the commenter asking for the game: game files must not be requested or shared here.
This issue will be closed in 48 hours unless the reporter replies or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code