FidelityFX: a thin list's copy of the upscale description is whole (432 bytes, not 416) #290

Open
Joly0 wants to merge 1 commit from upstream-pr/290 into v26.11.16
Joly0 commented 2026-11-29 19:26:22 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by Joly0 on 2026-11-29T19:26:22Z.


With VICTORY_THIN=1, the FSR upscale on a thin list is dispatched later from a copy of the title's ffxDispatchDescUpscale (dispatch_later, 29/11). The copy was UPSCALE_SIZE = 416 bytes, but the description is 432: after reset (+408) come cameraNear, cameraFar, cameraFovAngleVertical, viewSpaceToMetersFactor (+412..+427, the words 13-16 from +360 that dlss_inputs and prepare_framegen already read) and flags (+428).

The PC DLL read the last four words from whatever followed the copy and refused about 28 % of the upscales with FFX_API_RETURN_ERROR_PARAMETER (code 6, logged as ffxDispatch on the host DLL (thin list) code=6). The output was left unwritten, so whole frames came out dark or wrong: the constant flickering with VICTORY_THIN=1 and FSR. Lists recorded without THIN pass the title's own description and were never affected.

Fix: UPSCALE_SIZE = 432 (one constant, comment corrected).

Measured (v26.11.16 + this; VICTORY_THIN=1 VICTORY_PORT_CONSTANTS=1, FSR 4 Quality 720p→1080p + FSR 3.1 frame generation; 2-minute bench; RX 7800 XT, Ryzen 9 7945HX, 32 GB):

  • FSR refusals per run: 704 and 827 before, 0 after (5 runs)
  • Dark frames in a capture every 32 frames: 4-6 of 29 before, 0 of 27 after
  • Flicker seen on screen: yes before, no after; also no flicker in ~5 minutes of real play
  • Narrowed down beforehand: no flicker with THIN without FSR/FG; still flickering with FSR without FG; the refused and accepted descriptions differed only in command list, jitter and frame time

For context, with the fix, VICTORY_THIN=1 VICTORY_PORT_CONSTANTS=1 vs defaults in the bench (two runs each, mixed order): 21.4-22.1 fps vs 15.0-16.1; seconds below 15 fps 1-3 vs 30-52; freezes over 200 ms 0-1 vs 2-6. No device losses. In ~5 minutes of real play with both switches: no T-poses.

Base: v26.11.16, because stable-amd does not have dispatch_later yet; v26.11.15 has the same 416.

Checked: cargo clippy -p victory-hle --all-targets with and without --features diagnostics (-D warnings), diag build of victory. cargo test -p victory-hle does not compile on v26.11.16 before or after this (an error in victory-gpu: block_tables not found on Layout), so no test was run.

🤖 Generated with Claude Code

<!-- greyfinch-sync:PastiiJay/klbf-lab:issue:5554252995 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/290). Originally posted by [Joly0](https://github.com/Joly0) on 2026-11-29T19:26:22Z. --- With `VICTORY_THIN=1`, the FSR upscale on a thin list is dispatched later from a copy of the title's `ffxDispatchDescUpscale` (`dispatch_later`, 29/11). The copy was `UPSCALE_SIZE` = 416 bytes, but the description is 432: after `reset` (+408) come `cameraNear`, `cameraFar`, `cameraFovAngleVertical`, `viewSpaceToMetersFactor` (+412..+427, the words 13-16 from +360 that `dlss_inputs` and `prepare_framegen` already read) and `flags` (+428). The PC DLL read the last four words from whatever followed the copy and refused about 28 % of the upscales with `FFX_API_RETURN_ERROR_PARAMETER` (code 6, logged as `ffxDispatch on the host DLL (thin list) code=6`). The output was left unwritten, so whole frames came out dark or wrong: the constant flickering with `VICTORY_THIN=1` and FSR. Lists recorded without THIN pass the title's own description and were never affected. **Fix:** `UPSCALE_SIZE` = 432 (one constant, comment corrected). **Measured** (v26.11.16 + this; `VICTORY_THIN=1 VICTORY_PORT_CONSTANTS=1`, FSR 4 Quality 720p→1080p + FSR 3.1 frame generation; 2-minute bench; RX 7800 XT, Ryzen 9 7945HX, 32 GB): - FSR refusals per run: 704 and 827 before, **0** after (5 runs) - Dark frames in a capture every 32 frames: 4-6 of 29 before, **0 of 27** after - Flicker seen on screen: yes before, **no** after; also no flicker in ~5 minutes of real play - Narrowed down beforehand: no flicker with THIN without FSR/FG; still flickering with FSR without FG; the refused and accepted descriptions differed only in command list, jitter and frame time For context, with the fix, `VICTORY_THIN=1 VICTORY_PORT_CONSTANTS=1` vs defaults in the bench (two runs each, mixed order): 21.4-22.1 fps vs 15.0-16.1; seconds below 15 fps 1-3 vs 30-52; freezes over 200 ms 0-1 vs 2-6. No device losses. In ~5 minutes of real play with both switches: no T-poses. **Base:** `v26.11.16`, because `stable-amd` does not have `dispatch_later` yet; v26.11.15 has the same 416. **Checked:** `cargo clippy -p victory-hle --all-targets` with and without `--features diagnostics` (`-D warnings`), diag build of `victory`. `cargo test -p victory-hle` does not compile on v26.11.16 before or after this (an error in `victory-gpu`: `block_tables` not found on `Layout`), so no test was run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
PastiiJay commented 2026-11-29 19:50:52 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-11-29T19:50:52Z.


thanks a lot @Joly0, an analysis down to the field is rare and really appreciated! that's exactly the defect, it's fixed for the next version, and your write-up confirms the fix. you'll be credited for it.

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7261605349 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/290#issuecomment-7261605349). Originally posted by [PastiiJay](https://github.com/PastiiJay) on 2026-11-29T19:50:52Z. --- thanks a lot @Joly0, an analysis down to the field is rare and really appreciated! that's exactly the defect, it's fixed for the next version, and your write-up confirms the fix. you'll be credited for it.
Joly0 commented 2026-11-29 20:08:57 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by Joly0 on 2026-11-29T20:08:57Z.


@PastiiJay Thanks, trying my best, i like the project, seems promising, but still needs a lot of work.

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7261846316 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/290#issuecomment-7261846316). Originally posted by [Joly0](https://github.com/Joly0) on 2026-11-29T20:08:57Z. --- @PastiiJay Thanks, trying my best, i like the project, seems promising, but still needs a lot of work.
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/290:upstream-pr/290'
git switch 'upstream-pr/290'

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 'v26.11.16'
git merge --no-ff 'upstream-pr/290'
git switch 'upstream-pr/290'
git rebase 'v26.11.16'
git switch 'v26.11.16'
git merge --ff-only 'upstream-pr/290'
git switch 'upstream-pr/290'
git rebase 'v26.11.16'
git switch 'v26.11.16'
git merge --no-ff 'upstream-pr/290'
git switch 'v26.11.16'
git merge --squash 'upstream-pr/290'
git switch 'v26.11.16'
git merge --ff-only 'upstream-pr/290'
git switch 'v26.11.16'
git merge 'upstream-pr/290'
git push origin 'v26.11.16'
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
PastiiJay/klbf-lab!290
No description provided.