FidelityFX: a stand-in context where the title's own could not be made (DLSS on), no divide by zero at the first upscaling (#3885) #4410
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4410
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4409"
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?
@davemathews12 on GitHub · 2026-11-30 19:56 UTC · original
davemathews12:fix/ffx-stand-in-context→main· +1066 −823 · 33 files · 11 commits · closed without mergingFixes #3885 (and #170, closed for its old version)
What it changes
The crash.
0xC0000094(integer divide by zero) atvictory-image-…dll+0x28f03e8, in the prologue's prestream, before the first frame of play.Why. With DLSS taking the upscalings,
fidelityfx.rsmakes the title's FidelityFX upscaler at the size its shipping FSR4 accepts. On some PCs even that creation fails. #3885's play log shows:The title never checks the result. It then asks the jitter-phase-count query (
0x1_0004) of the context it thinks it has, writing the answer straight into its upscaler object and ignoring the return code. Every frame, it computes a jitter index ascounter % phase_count. With the query failed, the phase count is still 0 and the title divides by it. Checked against the 1.0.2.1 executable: the field divided by at+0x28f03e8is the one the phase-count query writes, and the same object fills the jitter-offset query (0x1_0005) with it.The fix. When creation fails and DLSS is upscaling, the title gets a stand-in context:
8 × (display / render)²(32 for 960 → 1920, never 0), Halton(2, 3) jitter offsets, and zero GPU memory (the title adds up the total it's given).clamped) uses.code=2.What doesn't change: a creation that succeeds, and every path without DLSS.
How it was tested
+0x28f03e8(#3885 and #170, the same signature on several versions).fidelityfx.rs:cargo clippy -p victory-hle --all-targets --target x86_64-pc-windows-msvcis clean.mimalloc's C++ build needs the Windows SDK, so for this check it was swapped for a system-allocator stub through--config patch…; nothing committed. The pure functions' tests also pass on Linux.cargo testpassed for the crates it touches: the new tests are Windows-only, like the module, so they run in CI. Not run locally.Checked for overlap
docs/dlss.mdand theSHIPPING_MAX_*comment describe the same divide-by-zero for creations that fail at other sizes; this covers the case where the shipping-size creation fails too.FidelityFX: a stand-in context where the title's own could not be mad…to FidelityFX: a stand-in context where the title's own could not be made (DLSS on), no divide by zero at the first upscaling (#3885)@trustno1-coder on GitHub · 2026-12-01 18:41 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed