Decode RGB9E5 inputs in failed upscale fallbacks #425

Merged
klimovich008 merged 1 commit from codex/fix-rgb9e5-upscale into main 2026-11-08 14:06:29 +00:00
klimovich008 commented 2026-11-08 00:47:08 +00:00 (Migrated from github.com)

What this fixes

When an upscale network fails to translate on AMD, entering Kokiri or changing dynamic resolution can turn the scene into bright neon colors.

Why merge

  • Samples the declared RGB9E5 view using the existing upscale shader and its scene-color conversion.
  • Checks sampling, linear filtering and storage-format support before creating typed views.
  • Keeps gameplay TAAU history separate. Movie paths, existing environment controls and unsupported-format fallbacks remain unchanged.

Change

gpu/vk/vk_draw.cpp: share the existing typed helper and use it for compatible RGB9E5 fallback inputs.
tests/test_upscale_fallback.py: exercise the actual fallback function across 13 routing and capability cases without Vulkan.

Tested

  • python -I -B tests/test_upscale_fallback.py --cxx clang++ checks the routing and unsupported-feature fallbacks. Fails on the old code, passes now.
  • Real captured input: the original blit matches native output byte for byte; the typed shader passes 8,364 channel checks against spatial decoding and interpolation.
  • RX 9070 XT, Windows: 116 seconds, 2,040 presents, zero VUIDs. The sampled neon transition is gone; steady Kokiri still renders. No game data is included.

Not covered

  • Tested on AMD only.
  • This is a spatial fallback. Neural temporal reconstruction and view overrides, additional mips or layers are outside this change.
## What this fixes When an upscale network fails to translate on AMD, entering Kokiri or changing dynamic resolution can turn the scene into bright neon colors. ## Why merge - Samples the declared RGB9E5 view using the existing upscale shader and its scene-color conversion. - Checks sampling, linear filtering and storage-format support before creating typed views. - Keeps gameplay TAAU history separate. Movie paths, existing environment controls and unsupported-format fallbacks remain unchanged. ## Change `gpu/vk/vk_draw.cpp`: share the existing typed helper and use it for compatible RGB9E5 fallback inputs. `tests/test_upscale_fallback.py`: exercise the actual fallback function across 13 routing and capability cases without Vulkan. ## Tested - `python -I -B tests/test_upscale_fallback.py --cxx clang++` checks the routing and unsupported-feature fallbacks. Fails on the old code, passes now. - Real captured input: the original blit matches native output byte for byte; the typed shader passes 8,364 channel checks against spatial decoding and interpolation. - RX 9070 XT, Windows: 116 seconds, 2,040 presents, zero VUIDs. The sampled neon transition is gone; steady Kokiri still renders. No game data is included. ## Not covered - Tested on AMD only. - This is a spatial fallback. Neural temporal reconstruction and view overrides, additional mips or layers are outside this change.
Commenting is not possible because the repository is archived.
No description provided.