Commit Graph
4 Commits
Author SHA1 Message Date
Tk-Glitch 474ffad227 engine/game_rr: per-input ring-buffer detection to prevent descriptor set cache overflow
The Ray Reconstruction engine caches one immutable descriptor set per unique combination of input views (hard limit: 16). Games that rotate their intermediate textures through a ring buffer generate a new combination each frame; with K independent ring buffers of size N the number of distinct combinations grows as N^K, quickly exceeding the cache limit.

Fix: track the number of distinct VkImageView handles seen per input (11 inputs: colour, motion, depth, 8 guides). When an input exceeds 4 distinct views it is flagged as rotating and its data is copied to a canonical plane (a stable internal texture) instead of being borrowed directly. The `direct` lambda now takes an index and checks the per-input flag, so only the inputs that actually rotate incur a blit.

Stable inputs (single view, no ring buffer) continue to be borrowed directly with zero extra cost. The worst-case overhead is one blit per rotating input per frame (~0.05 ms each).

The flag is one-way: once an input is marked as rotating it stays that way for the lifetime of the engine. If a game changes its rendering mode mid-session the flag persists, adding a negligible number of extra blits.
2026-10-19 05:05:23 +02:00
Tk-Glitch 40e0094c19 Add R16_FLOAT depth input support
Alan Wake 2 uses the format for depth when enabling Ray Reconstruction.
The CPU path converts half to float in convert_row_in.
The VRAM interop path blits R16F/R16UNORM depth to an R32F conversion image before copying into the canonical buffer.

Signed-off-by: Tk-Glitch <[email protected]>
2026-10-07 13:12:28 +02:00
Tk-Glitch 58c1edf767 Add R8G8B8A8_UNORM motion vector format
Spider-Man Remastered uses R8G8B8A8_UNORM (DXGI fmt=28) for (some?) motion vectors.

Signed-off-by: Tk-Glitch <[email protected]>
2026-10-06 12:46:23 +02:00
Etienne JUVIGNY 30af9bde35 Add support for DXGI_FORMAT_R9G9B9E5_SHAREDEXP
Fixes RE9 and probably other games with HDR outputs

Signed-off-by: Etienne JUVIGNY <[email protected]>
2026-10-05 13:47:12 +02:00