Offer: GPU-verified FidelityFX CAS golden model for shader validation (ffx-kit) #713
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#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?
@Cobrall on GitHub · 2026-11-24 07:33 UTC · original
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!
@cj5k9dnkfd-afk on GitHub · 2026-11-24 07:37 UTC · original
Hi anyone have the files game
@Cobrall on GitHub · 2026-11-24 07:58 UTC · original
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!
@Marvisak on GitHub · 2026-11-25 01:46 UTC · original
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