fix(hdr, fsr): HDR with an upscaler or Sharpness reads a sampleable picture; native HDR images RGB10A2 from the start (#2038); FSR 3.1 above Quality #2147

Merged
NotRexed merged 2 commits from fix/hdr-scaled-sampled into main 2026-11-11 05:12:28 +00:00
NotRexed commented 2026-11-11 05:01:59 +00:00 (Migrated from github.com)

Three fixes from tonight's player reports: "HDR is broken, turning Sharpness to 0 fixes it", and "FSR only shows lower resolutions".

HDR black, grey or purple unless Sharpness is 0

With HDR on, the present runs the scale pass (any upscaler, or a Sharpness above 0; every preset sets one) and hands its output to the HDR encode, which samples it (framegen_hdr, hdr_encode.comp, a combined image sampler). That output image was made with STORAGE | TRANSFER_SRC only. Without VK_IMAGE_USAGE_SAMPLED_BIT, sampling it is undefined (and a validation error). Sharpness 0 with no upscaler skips the scale pass, so the HDR pass sampled the game's own image and looked right. The scaled image now has the sampled usage too. This matches the 2.1.0 reports in #2038's comments (a black screen in both HDR modes; purple or blue on a 4090).

Native HDR flickering grey one frame in three (#2038, moosky73's fix)

format_class gave RGBA8 and RGB10A2 the same class. The game's window textures are RGBA8 until it learns its display is HDR10, then RGB10A2 at the same addresses. The one made before the switch kept its RGBA8 image, and the native-HDR check (tex->format == A2B10G10R10) sent that frame through the SDR-to-HDR pass. RGB10A2 now has its own class. This is the reporter's one-line fix (their commit b04f99a), credited as co-author.

FSR 3.1 stopped at Quality (67 %)

DLSS and FSR 4 have the full Render resolution slider (Native as DLAA or FSR 4 Native AA, then 92 % to 33 %). FSR 3.1 has no Native choice of its own, so it fell back to AMD's four modes only. FSR 3.1's steps are now Auto, 100 % (its native AA; FSR 3.1 takes any render size up to the output), 92, 83 and 75 %, then AMD's modes. Help text is added for the new stops. tests/test_upscaler_rows.cpp is updated (passes locally).

Checked

  • Built G:\hk-b2 from this branch.
  • 20 minutes on the Hyrule Field and Kakariko route (SDR, docked 1440p, the default preset's upscaler and Sharpness), screenshots every 20 presents.
    • Flash check: one bright frame, which was a cucco flying past the camera.
    • No device lost, no crash lines.
  • HDR could not be checked in game: this PC's display has no HDR. The sampled usage is what the spec requires for the existing read, and the class change only affects RGB10A2 images, which the game uses only in HDR10 mode.

🤖 Generated with Claude Code

Three fixes from tonight's player reports: "HDR is broken, turning Sharpness to 0 fixes it", and "FSR only shows lower resolutions". ### HDR black, grey or purple unless Sharpness is 0 With HDR on, the present runs the scale pass (any upscaler, or a Sharpness above 0; every preset sets one) and hands its output to the HDR encode, which samples it (`framegen_hdr`, `hdr_encode.comp`, a combined image sampler). That output image was made with `STORAGE | TRANSFER_SRC` only. Without `VK_IMAGE_USAGE_SAMPLED_BIT`, sampling it is undefined (and a validation error). Sharpness 0 with no upscaler skips the scale pass, so the HDR pass sampled the game's own image and looked right. The scaled image now has the sampled usage too. This matches the 2.1.0 reports in #2038's comments (a black screen in both HDR modes; purple or blue on a 4090). ### Native HDR flickering grey one frame in three (#2038, moosky73's fix) `format_class` gave RGBA8 and RGB10A2 the same class. The game's window textures are RGBA8 until it learns its display is HDR10, then RGB10A2 at the same addresses. The one made before the switch kept its RGBA8 image, and the native-HDR check (`tex->format == A2B10G10R10`) sent that frame through the SDR-to-HDR pass. RGB10A2 now has its own class. This is the reporter's one-line fix (their commit b04f99a), credited as co-author. ### FSR 3.1 stopped at Quality (67 %) DLSS and FSR 4 have the full Render resolution slider (Native as DLAA or FSR 4 Native AA, then 92 % to 33 %). FSR 3.1 has no Native choice of its own, so it fell back to AMD's four modes only. FSR 3.1's steps are now Auto, 100 % (its native AA; FSR 3.1 takes any render size up to the output), 92, 83 and 75 %, then AMD's modes. Help text is added for the new stops. `tests/test_upscaler_rows.cpp` is updated (passes locally). ### Checked - Built `G:\hk-b2` from this branch. - 20 minutes on the Hyrule Field and Kakariko route (SDR, docked 1440p, the default preset's upscaler and Sharpness), screenshots every 20 presents. - Flash check: one bright frame, which was a cucco flying past the camera. - No device lost, no crash lines. - HDR could not be checked in game: this PC's display has no HDR. The sampled usage is what the spec requires for the existing read, and the class change only affects RGB10A2 images, which the game uses only in HDR10 mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Commenting is not possible because the repository is archived.
No description provided.