metal: MetalFX serves the title's FidelityFX upscale; depth/motion on a real frame and frame generation are what is left #638

Open
opened 2026-11-28 20:30:57 +00:00 by AnastasisKon · 0 comments
AnastasisKon commented 2026-11-28 20:30:57 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T20:30:57Z.


The title's own FidelityFX upscale is served by MetalFX on a native host (spatial, or temporal where the dispatch carries depth and motion vectors), and MetalFX's frame interpolator is wrapped but driven by nothing. This is the state and the work left, so the pieces can be taken in parallel.

What works

  • crates/victory-metal/src/metalfx.rs: Upscale (spatial and temporal in one type, chosen by what the inputs allow), Spatial, Temporal, Interpolator, View (jitter, motion-vector scale, reset), all through dlopen + message sends since the framework is not in the bindings. gfx::Texture::mtl lets a caller outside the crate hand it a title texture.
  • crates/victory-gpu: a MetalFX upscale is a pass of the submission, ordered like the others (Pass::MetalFx), and the title's own FidelityFX dispatch reaches it (Cmd::Metalfx).
  • crates/victory-hle/src/modules/metalfx_ffx.rs: with VICTORY_METALFX=upscale, the title's FidelityFX entry points answer here instead of loading its DLLs. Without the switch, or on a host with no MetalFX, the title's own DLLs run as before. Nothing else of FidelityFX's is served — another effect is refused rather than half-done.
  • Tests: crates/victory-metal/tests/metalfx_pass.rs runs a real spatial, a real temporal and a refusal on this machine's GPU; the dispatch translation has unit tests.

What is left, and who can take it

  1. Temporal on a real frame. The scaler is selected by the dispatch, but nothing has run it on a title frame: no frame has been presented on this machine yet (the boot blocker at image+0x1330a44, #632), so this needs the title to present once, then VICTORY_METALFX=upscale and a look at whether the jitter and motion scale match what the title wrote.
  2. Which texture holds depth and motion vectors. The dispatch names them, so nothing has to be identified by guessing — but the hand-off is only as good as the dispatch's own description, and one frame is what proves it. Same blocker.
  3. Frame generation has no caller, and this is not a defect to fix by wiring. The release ships amd_fidelityfx_upscaler_dx12.dll only; the title never dispatches FSR-frame-generation, so there is no dispatch to intercept. Driving Interpolator means host-side interpolation between two presents, which needs the previous frame's colour and depth plus motion vectors — the same two textures as (2), from the host's side rather than the title's. Whoever picks this up should say in the PR that the frames between presents are invented by us, not by the title.
  4. Non-MetalFX hosts. VICTORY_METALFX off is the default path and unchanged; what has not been measured is a machine with MetalFX present but a scaler missing (e.g. spatial but no temporal). metalfx::temporal()/interpolator() answer that, and the fallback is spatial, but no one has run it with the feature removed.

How to reproduce what exists

cargo test --target x86_64-apple-darwin -p victory-metal --test metalfx_pass
VICTORY_METALFX=upscale tools/macos/run-native.sh "/path/to/folder"     # when a frame presents

The current gate on the branch behind PR (fork AnastasisKon/Native-Victory-macOS): suite-hle 558, suite-shader 597, suite-gpu 493, policy, clippy-win, all passing.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6670796274 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/638). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T20:30:57Z. --- The title's own FidelityFX upscale is served by MetalFX on a native host (spatial, or temporal where the dispatch carries depth and motion vectors), and MetalFX's frame interpolator is wrapped but driven by nothing. This is the state and the work left, so the pieces can be taken in parallel. ## What works * `crates/victory-metal/src/metalfx.rs`: `Upscale` (spatial and temporal in one type, chosen by what the inputs allow), `Spatial`, `Temporal`, `Interpolator`, `View` (jitter, motion-vector scale, reset), all through `dlopen` + message sends since the framework is not in the bindings. `gfx::Texture::mtl` lets a caller outside the crate hand it a title texture. * `crates/victory-gpu`: a MetalFX upscale is a pass of the submission, ordered like the others (`Pass::MetalFx`), and the title's own FidelityFX dispatch reaches it (`Cmd::Metalfx`). * `crates/victory-hle/src/modules/metalfx_ffx.rs`: with `VICTORY_METALFX=upscale`, the title's FidelityFX entry points answer here instead of loading its DLLs. Without the switch, or on a host with no MetalFX, the title's own DLLs run as before. Nothing else of FidelityFX's is served — another effect is refused rather than half-done. * Tests: `crates/victory-metal/tests/metalfx_pass.rs` runs a real spatial, a real temporal and a refusal on this machine's GPU; the dispatch translation has unit tests. ## What is left, and who can take it 1. **Temporal on a real frame.** The scaler is selected by the dispatch, but nothing has run it on a title frame: no frame has been presented on this machine yet (the boot blocker at `image+0x1330a44`, #632), so this needs the title to present once, then `VICTORY_METALFX=upscale` and a look at whether the jitter and motion scale match what the title wrote. 2. **Which texture holds depth and motion vectors.** The dispatch names them, so nothing has to be identified by guessing — but the hand-off is only as good as the dispatch's own description, and one frame is what proves it. Same blocker. 3. **Frame generation has no caller, and this is not a defect to fix by wiring.** The release ships `amd_fidelityfx_upscaler_dx12.dll` only; the title never dispatches FSR-frame-generation, so there is no dispatch to intercept. Driving `Interpolator` means host-side interpolation between two presents, which needs the previous frame's colour and depth plus motion vectors — the same two textures as (2), from the host's side rather than the title's. Whoever picks this up should say in the PR that the frames between presents are invented by us, not by the title. 4. **Non-MetalFX hosts.** `VICTORY_METALFX` off is the default path and unchanged; what has not been measured is a machine with MetalFX present but a scaler missing (e.g. spatial but no temporal). `metalfx::temporal()`/`interpolator()` answer that, and the fallback is spatial, but no one has run it with the feature removed. ## How to reproduce what exists ``` cargo test --target x86_64-apple-darwin -p victory-metal --test metalfx_pass VICTORY_METALFX=upscale tools/macos/run-native.sh "/path/to/folder" # when a frame presents ``` The current gate on the branch behind PR (fork `AnastasisKon/Native-Victory-macOS`): `suite-hle` 558, `suite-shader` 597, `suite-gpu` 493, `policy`, `clippy-win`, all passing.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#638
No description provided.