Skip to content

vulkan: initialize presentation upscaling independently of frame generation - #417

Draft
monsterlag wants to merge 1 commit into
NotRexed:mainfrom
monsterlag:fix/upscale-without-framegen
Draft

monsterlag wants to merge 1 commit into
NotRexed:mainfrom
monsterlag:fix/upscale-without-framegen

Conversation

@monsterlag

@monsterlag monsterlag commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Upscaling and Sharpness silently stop working when Frame generation is Off. The direct-present path omits its
sampled view, and the scaling pipeline was initialized only by interpolation. This change forwards the direct
view under the existing replay lock and initializes only the scaler's own pipeline/sampler when filtering is
requested. Off still skips interpolation's copy/luma work, frame sets and display-thread startup.

The scaler has independent initialization/failure state, rejects invalid crop/destination dimensions, and
cleans partial image allocations without retaining stale size metadata. Initialization failure falls back to
the existing blit. No renderer API, aspect policy, decoder or game-generation change is included.

Validation prepared on main 7398e5a:

  • Actual production initializer/scaler functions compiled with authored API spies and strict audited Clang.
    Catmull, Lanczos, sharpness-only, both frame-generation environment states, all-off, cached initialization
    failure/cleanup, resize allocation failure/recovery and crop clamping/recovery pass.
  • The original production scaler function fails the first FG-off dispatch assertion at runtime.
  • Existing frame-generation-off gate test passes. Direct sampled-view forwarding and age bookkeeping have
    an explicitly source-based wiring check; the API-spy fixture does not claim GPU/lifetime validation.
  • Windows/Linux source checks, the SPIR-V job and Linux AppImage build all pass in CI. The Linux spy check ran both RX_VK_FRAMEGEN environment configurations; the original-function negative was local-only. A fresh matching integration with the aspect fix built successfully (357 seconds, zero failed files).
  • First live RTX 5090 check: FG off, Catmull-Rom, 100% resolution, actual 3840x1080 window. The successful-dispatch diagnostic reports mode 1 and a 1920x1080 destination; no interpolation initialization occurred. The Kokiri scene/HUD remained visible with centered sidebars, including a 5120x2160 fullscreen round trip. Remaining filter/size cases are being checked after incorporating the new upstream rendering optimization.

For runtime verification, opt into RX_VK_UPSCALE_LOG=1: after its first scale dispatch, the renderer logs mode,
sharpness, source, requested crop and destination dimensions once. It emits no per-frame diagnostic stream.
This fixes the independently established bypass; it does not claim to fix the reported 32:9 black-screen case.

The sampled view shares the cached image's existing retirement policy. This change does not add a later presentation-fence ownership model; aggressive eviction overrides remain an inherited edge outside this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant