Skip to content

Fix stale fixed-resolution scene scale (experimental opt-in) - #329

Closed
i900gaming wants to merge 1 commit into
NotRexed:mainfrom
i900gaming:fix/fixed-resolution-scene-scale
Closed

i900gaming wants to merge 1 commit into
NotRexed:mainfrom
i900gaming:fix/fixed-resolution-scene-scale

Conversation

@i900gaming

@i900gaming i900gaming commented Nov 7, 2026 •

Copy link
Copy Markdown

Fixed Resolution 100% can leave the scene rendering at its previous dynamic scale. This draft adds an off-by-default correction, enabled with HOS_FIX_RES=1, that invalidates the cached scene scale when the fixed request changes. In the tested scene, the main color/depth targets increased from 1536x864 to 2048x1152 at 100%.

This is a draft with unresolved image corruption at 67%/50%. It is not ready to enable by default.

Cause and change

The controller's fixed path can return a resource-refresh status without marking the scene's cached scale dirty. Instrumentation observed a requested scale of 1.5 while the cached scene value remained 0.75 and the dirty flags were 0.

nx2/oot_patches.py now injects a check at the scene update entry. In fixed mode, with the opt-in enabled, it compares the requested scale in the scene's reference units with the cached value and sets the existing scale-dirty bit (8) when they differ. The game's existing update code performs the recalculation. Other dirty bits are preserved; unchanged values do not continuously invalidate the scene. Auto and the existing initialization warm-up from #102 are retained.

The patch includes documentation, a game-free compiled regression test, and a source-regression workflow step. It contains no renderer/filter changes, game assets, generated game code, binaries, saves, or dumps.

Reproducing the opt-in

  1. Re-lift/rebuild the game executable with this source change; replacing only the Vulkan DLL is insufficient.
  2. Add HOS_FIX_RES=1 to hookshot_env.txt beside the executable and restart.
  3. Select Resolution 100% and compare the main 3D target dimensions with the same scene without the opt-in. The presentation/window size alone is not evidence of the internal resolution.
  4. Remove the variable or set it to 0 and restart to restore the previous behavior.

Known problems and limits

  • 67% and 50% produce image noise in the user's test. Auto, 75% and 100% were reported usable. The lower-scale corruption has not been reproduced in a controlled opt-in-off/on comparison, so it is not yet known whether this patch introduces it or exposes an existing problem. The state-transition tests do not establish image correctness at those scales.
  • A GPU timeout occurred during the investigation (Windows LiveKernelEvent 141). It happened in an earlier diagnostic run, before this correction was executed, with HOS_RES_SCALE=1.5, frame generation and a separate experimental 16x anisotropy override active. The responsible component is unknown. Anisotropy was subsequently disabled; short follow-up tests with the correction, including 2x frame generation, recorded no further timeout. This is not a long-term stability claim, and the timeout is not considered resolved.
  • This does not provide native 1440p/4K rendering. The validated main 3D targets are 2048x1152, although presentation was 2560x1440. A separate experiment at 125%, including bypassing another engine cap, did not establish larger 3D targets; that experiment is excluded here. Different postprocessing passes may still use smaller targets.
  • Automated live menu switching was inconclusive because input overlapped with user interaction. Booting at 100% was checked; a complete runtime transition matrix remains unverified.

Validation and coverage

  • Based on upstream 40c3f851b07a4367a13d7d7bcfb1d5b91cc95dfe. Its nx2/oot_patches.py matches the starting version used for the local fix.
  • python -I -B tests/test_resolution_scale.py --cxx <clang++> passes on Windows. It compiles the injected logic with memory stubs and checks changed/unchanged scale, preservation of other dirty bits, Auto, opt-in absent/0/1, invalid requested values, reference-size normalization, patch idempotence and layout guards.
  • Negative control: removing the scale-dirty bit makes the enabled-case regression check fail.
  • python -I -B tests/test_make_game_cache.py: all six checks pass.
  • The local executable containing the correction was built and tested with copied saves, in the house and outdoor Kokiri area. Main color/depth target dimensions were checked in renderer logs; 2x frame generation and the FPS overlay still operated. This was an existing Windows build with local renderer fixes, not a fresh end-to-end build of this PR's current-main tree.
  • Runtime coverage: Windows, Radeon RX 6900 XT, driver 32.0.21045.16010. This identifies the tested configuration; the scene-state correction is not claimed to be AMD-specific. Other GPUs/platforms have not been runtime-tested.

Before this can leave draft

  • Reproduce and investigate 67%/50% noise against the opt-in-off baseline.
  • Build and runtime-test the complete current-main tree with this patch.
  • Check Auto/fixed transitions and scene changes systematically.
  • Investigate the timeout and run longer stability tests; obtain additional hardware coverage.

@i900gaming
i900gaming force-pushed the fix/fixed-resolution-scene-scale branch from 2577c2f to 06c6ab3 Compare November 7, 2026 21:05
NotRexed added a commit that referenced this pull request Nov 9, 2026
…rts)

The game sized its scene at 0.8 of the picture in graphics mode 1 even at Resolution 100%, and the fixed path kept the
last dynamic scale cached (0.75): v2.0.5 players' logs show the main targets at 1536x864 for a 2560x1440 picture.
nx2/oot_native_resolution.py takes oscarrc91's PR #578 (mode 1's base scale 1.0, the game's own refresh) and
i900gaming's PR #329 (the cached scale marked dirty when it differs) as host switches, on at Resolution 100%
(HOS_SCENE_NATIVE=0/1, HOS_FIX_RES=0/1 over it). Tested: both table edits run, the targets are 2560x1440.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NotRexed

NotRexed commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Thank you! #849 (merged) now makes a fixed Resolution reach the 3D, the same stale fixed-scale problem this fixed, so I'm closing this as superseded. Closing to keep the queue clear; if something is still wrong at 67%/50% on current main, a new PR on top of it is welcome.

@NotRexed NotRexed closed this Nov 9, 2026
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.

3 participants