Shaders: translate the title's FidelityFX upscaler programs (FSPX images) #258

Open
Ortomanic wants to merge 9 commits from upstream-pr/258 into main
Ortomanic commented 2026-11-24 23:01:59 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Ortomanic on 2026-11-24T23:01:59Z.


Changes

The title's FidelityFX upscaler keeps its compute programs in FSPX images inside the container, with no DXIL part. They failed with malformed shader: no DXIL part and their dispatches were dropped, so the upscaled scene was never written.

  • First commit: an FSPX image is read as a native program (victory_shader::program_part, new fspx.rs).
  • The other eight commits are the instructions and descriptor forms those programs use that did not lower yet: v_dot4_* as Dot4AddPacked, v_pk_fmac_f16, src_scc as an operand, s_bfm_b32/s_mov_b64 literals in descriptor constants, image atomics with 16-bit coordinates, partial-channel image stores, raw views of a loaded buffer descriptor, and v_readlane_b32 at constant lanes after a whole-wave section.

Programs outside the upscaler are not affected by the first commit. This is the title's own upscaler running as translated code, so it is independent of #86 (a PC FSR path) and of #188 (a plain stretch for the dispatch); either can sit beside it.

Validation

  • CachyOS, Wine 11.22, vkd3d-proton 3.1.r64, RTX 5080 (32-lane waves).
  • In the title, before: 20 compute programs logged no DXIL part. After: none, and the upscaler's dispatches run.
  • Offline over the shader pack on a 32-lane host: of the 29 FSPX programs, 23 translate on plain upstream ffe310e with this series; all that translate convert with dxil-spirv. On this fork three more still refuse on a 32-lane host because they need a 64-lane form.
  • On NVIDIA the upscaler's output texture is an R9G9B9E5 render target with unordered access, which the host refuses; the picture only appears together with #32. With both, the lit world frame is shown through the title's own upscale.
  • cargo clippy --workspace --all-targets --locked -- -D warnings for the Windows target, with and without --all-features, and cargo test -p victory-shader -p xtask pass on this branch (cross-compiled from Linux with the pinned toolchain). Four unit tests are added.
  • Not run on Windows or on AMD.

AI-assisted patch with local build and runtime validation.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6593155167 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/258). Originally posted by [Ortomanic](https://github.com/Ortomanic) on 2026-11-24T23:01:59Z. --- ## Changes The title's FidelityFX upscaler keeps its compute programs in `FSPX` images inside the container, with no `DXIL` part. They failed with `malformed shader: no DXIL part` and their dispatches were dropped, so the upscaled scene was never written. - First commit: an `FSPX` image is read as a native program (`victory_shader::program_part`, new `fspx.rs`). - The other eight commits are the instructions and descriptor forms those programs use that did not lower yet: `v_dot4_*` as `Dot4AddPacked`, `v_pk_fmac_f16`, `src_scc` as an operand, `s_bfm_b32`/`s_mov_b64` literals in descriptor constants, image atomics with 16-bit coordinates, partial-channel image stores, raw views of a loaded buffer descriptor, and `v_readlane_b32` at constant lanes after a whole-wave section. Programs outside the upscaler are not affected by the first commit. This is the title's own upscaler running as translated code, so it is independent of #86 (a PC FSR path) and of #188 (a plain stretch for the dispatch); either can sit beside it. ## Validation - CachyOS, Wine 11.22, vkd3d-proton 3.1.r64, RTX 5080 (32-lane waves). - In the title, before: 20 compute programs logged `no DXIL part`. After: none, and the upscaler's dispatches run. - Offline over the shader pack on a 32-lane host: of the 29 `FSPX` programs, 23 translate on plain upstream `ffe310e` with this series; all that translate convert with dxil-spirv. On this fork three more still refuse on a 32-lane host because they need a 64-lane form. - On NVIDIA the upscaler's output texture is an R9G9B9E5 render target with unordered access, which the host refuses; the picture only appears together with #32. With both, the lit world frame is shown through the title's own upscale. - `cargo clippy --workspace --all-targets --locked -- -D warnings` for the Windows target, with and without `--all-features`, and `cargo test -p victory-shader -p xtask` pass on this branch (cross-compiled from Linux with the pinned toolchain). Four unit tests are added. - Not run on Windows or on AMD. AI-assisted patch with local build and runtime validation.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/258:upstream-pr/258'
git switch 'upstream-pr/258'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/258'
git switch 'upstream-pr/258'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/258'
git switch 'upstream-pr/258'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/258'
git switch 'main'
git merge --squash 'upstream-pr/258'
git switch 'main'
git merge --ff-only 'upstream-pr/258'
git switch 'main'
git merge 'upstream-pr/258'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
fxceless/victory-fork!258
No description provided.