FSR 3 Frame Generation causes missing foliage/leaves and black textures (all profiles, including pure default Series X) #3173

Open
opened 2026-12-02 16:17:32 +00:00 by ThatAppleFanboy · 1 comment
ThatAppleFanboy commented 2026-12-02 16:17:32 +00:00 (Migrated from github.com)
Contributor

Imported from ubiquitarianism/leonida. Originally posted by ThatAppleFanboy on 2026-12-02T16:17:32Z.


Enabling FSR 3 Frame Generation (-FsrFrameGen or via the F1 menu) causes missing foliage/leaves and black textures across the scene.
This is a regression. It now happens on all configurations, including a pure default Series X launch with no extra parameters. Previously the visual issues were more limited or not present on the default path.
Steps to reproduce

  1. Launch with the D3D12 runtime (e.g. via scripts\play-d3d12.ps1).
  2. Enable FSR 3 Frame Generation (-FsrFrameGen or set it in the F1 menu).
  3. Enter the open world / any area with vegetation.
  4. Observe missing leaves/foliage and black textures.
    Reproducible on:
    • Series S (title’s own upscaler + FSR 3 FG 2x)
    • Series X (default / pure, no extra switches)
    • With and without other upscaler overrides
    Expected behavior
    FSR 3 Frame Generation should generate intermediate frames without destroying foliage or causing black textures. The picture should remain comparable to the non-FG path (only smoother).
    Actual behavior
    • Leaves and foliage disappear or become incomplete.
    • Various surfaces/textures turn black.
    • Happens consistently once FSR FG is active.
    Environment
    • Runtime: Mandy (ProjectLeonida) D3D12 (leonida.exe)
    • Profile tested: Series S and Series X
    • Frame generation: FSR 3 (2x) via FidelityFX swapchain
    • Built with DLSS support present (warnings during build are the usual unused/dead-code ones and do not appear related)
    Additional context / likely area
    Recent changes around G-buffer fallback and input tagging for frame generation (late November commits on fg.rs / FSR integration) appear to have made the default path supply incomplete or incorrect depth/motion/G-buffer inputs to FSR 3.
    On the title’s own temporal upscaler path (Series X default), the title hands nothing over; the fallback sourcing of G-buffer data seems insufficient or stale for FSR FG. Selecting DLSS in the F1 menu (which forces the FidelityFX upscaler path) may improve or avoid the issue, supporting the input-quality hypothesis.
    Related files:
    • d3d12/crates/leonida-gpu/src/fg.rs (G-buffer fallback / tagging)
    • d3d12/crates/leonida-gpu/src/fsr.rs (input preparation for present)
    Startup logs otherwise look normal (Series S / title upscaler line, shader precompile progressing, no crashes).
    This is separate from the existing frame-gen settings discussion in #3109 (fixed 60° FOV etc.).
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:6749434399 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/3173). Originally posted by [ThatAppleFanboy](https://github.com/ThatAppleFanboy) on 2026-12-02T16:17:32Z. --- Enabling FSR 3 Frame Generation (-FsrFrameGen or via the F1 menu) causes missing foliage/leaves and black textures across the scene. This is a regression. It now happens on all configurations, including a pure default Series X launch with no extra parameters. Previously the visual issues were more limited or not present on the default path. Steps to reproduce 1. Launch with the D3D12 runtime (e.g. via scripts\play-d3d12.ps1). 2. Enable FSR 3 Frame Generation (-FsrFrameGen or set it in the F1 menu). 3. Enter the open world / any area with vegetation. 4. Observe missing leaves/foliage and black textures. Reproducible on: • Series S (title’s own upscaler + FSR 3 FG 2x) • Series X (default / pure, no extra switches) • With and without other upscaler overrides Expected behavior FSR 3 Frame Generation should generate intermediate frames without destroying foliage or causing black textures. The picture should remain comparable to the non-FG path (only smoother). Actual behavior • Leaves and foliage disappear or become incomplete. • Various surfaces/textures turn black. • Happens consistently once FSR FG is active. Environment • Runtime: Mandy (ProjectLeonida) D3D12 (leonida.exe) • Profile tested: Series S and Series X • Frame generation: FSR 3 (2x) via FidelityFX swapchain • Built with DLSS support present (warnings during build are the usual unused/dead-code ones and do not appear related) Additional context / likely area Recent changes around G-buffer fallback and input tagging for frame generation (late November commits on fg.rs / FSR integration) appear to have made the default path supply incomplete or incorrect depth/motion/G-buffer inputs to FSR 3. On the title’s own temporal upscaler path (Series X default), the title hands nothing over; the fallback sourcing of G-buffer data seems insufficient or stale for FSR FG. Selecting DLSS in the F1 menu (which forces the FidelityFX upscaler path) may improve or avoid the issue, supporting the input-quality hypothesis. Related files: • d3d12/crates/leonida-gpu/src/fg.rs (G-buffer fallback / tagging) • d3d12/crates/leonida-gpu/src/fsr.rs (input preparation for present) Startup logs otherwise look normal (Series S / title upscaler line, shader precompile progressing, no crashes). This is separate from the existing frame-gen settings discussion in #3109 (fixed 60° FOV etc.).
zmasi commented 2026-12-02 19:17:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-12-02T19:17:24Z.


Traced the #3173 symptoms across fsr.rs, resource.rs, draw.rs, texture.rs, and d3d12/scripts/play-nvidia.ps1, and opened #3206 (137c231a5d) addressing three concrete causes:

  1. Launcher LEONIDA_TEXTURE_ROOM_PERCENT = '80' double-counted FSR 3 VRAM (d3d12/scripts/play-nvidia.ps1):
    • FidelityFX allocates its ~1.5-2.0 GB swapchain + context buffers up front on frame 1 directly on ID3D12Device, so those bytes are already counted in DXGI QueryVideoMemoryInfo(LOCAL).CurrentUsage (used in resource::room) on top of targets_room_kept() (3,072 MB), LEONIDA_WINDOWS_BAR_MB, shadow::card_for, and precompiled PSOs.
    • Cutting LEONIDA_TEXTURE_ROOM_PERCENT from 90 to 80 under -FsrFrameGen / F1 FSR 3 FRAME GEN 2X subtracted another 10% of budget after FSR's buffers were already in used, tripping resource::room() to false right above the 2 GiB floor. Unmade bindless textures (draw.rs heap_textures) and unmapped on_demand mip tiles (texture.rs) read (0, 0, 0, 0) on D3D12 — turning opaque surfaces black (rgb = 0) and discarding alpha-tested leaves/foliage (alpha = 0 < cutoff). Selecting DLSS shrank render targets + FSR max_render_size, easing used below the 80% cliff.
    • Quick local check even before rebuilding: -FsrFrameGen -More @{ LEONIDA_TEXTURE_ROOM_PERCENT = '90' } tests the 90% default directly.
  2. Typeless depth targets missed USAGE_DEPTHTARGET | USAGE_STENCILTARGET and plane-0 SRV formats (d3d12/crates/leonida-gpu/src/fsr.rs):
    • resource.rs creates every shader-readable host depth target as typeless (R32G8X24_TYPELESS on Series X, R32_TYPELESS, R24G8_TYPELESS, R16_TYPELESS) with ALLOW_DEPTH_STENCIL, whereas fsr::Resource::texture only matched typed D16/D24/D32 formats — leaving usage = 0 and causing FidelityFX's DX12 backend to attempt invalid CreateShaderResourceView formats (E_INVALIDARG) in PrepareV2 (breaking depth dilation / disocclusion on thin foliage).
  3. PrepareV2 DEPTH_READ (0x20 / 0xE0) barriers on the title's own upscaler (d3d12/crates/leonida-gpu/src/fsr.rs):
    • Without DLSS, scene depth reaches Present in DEPTH_READ (0x20) or 0xE0, which ffx_state mapped to STATE_DEPTH_ATTACHMENT (DEPTH_WRITE, 0x10), producing illegal 0xD0 barriers or desynchronizing GPU vs tracked depth state across frames. #3206 transitions depth and motion explicitly to NON_PIXEL_SHADER_RESOURCE around PrepareV2 and fixes ffx_state.

AI-assisted: Gemini 4 Carbon (High) + Gemini 4 Neon (XHigh).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7355930209 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/3173#issuecomment-7355930209). Originally posted by [zmasi](https://github.com/zmasi) on 2026-12-02T19:17:24Z. --- Traced the `#3173` symptoms across `fsr.rs`, `resource.rs`, `draw.rs`, `texture.rs`, and `d3d12/scripts/play-nvidia.ps1`, and opened #3206 (`137c231a5d`) addressing three concrete causes: 1. **Launcher `LEONIDA_TEXTURE_ROOM_PERCENT = '80'` double-counted FSR 3 VRAM (`d3d12/scripts/play-nvidia.ps1`)**: - FidelityFX allocates its `~1.5-2.0 GB` swapchain + context buffers up front on frame 1 directly on `ID3D12Device`, so those bytes are already counted in DXGI `QueryVideoMemoryInfo(LOCAL).CurrentUsage` (`used` in `resource::room`) on top of `targets_room_kept()` (`3,072 MB`), `LEONIDA_WINDOWS_BAR_MB`, `shadow::card_for`, and precompiled PSOs. - Cutting `LEONIDA_TEXTURE_ROOM_PERCENT` from `90` to `80` under `-FsrFrameGen` / F1 `FSR 3 FRAME GEN 2X` subtracted another `10%` of budget after FSR's buffers were already in `used`, tripping `resource::room()` to `false` right above the `2 GiB` floor. Unmade bindless textures (`draw.rs` `heap_textures`) and unmapped `on_demand` mip tiles (`texture.rs`) read `(0, 0, 0, 0)` on D3D12 — turning opaque surfaces **black** (`rgb = 0`) and discarding **alpha-tested leaves/foliage** (`alpha = 0 < cutoff`). Selecting DLSS shrank render targets + FSR `max_render_size`, easing `used` below the `80%` cliff. - Quick local check even before rebuilding: `-FsrFrameGen -More @{ LEONIDA_TEXTURE_ROOM_PERCENT = '90' }` tests the `90%` default directly. 2. **Typeless depth targets missed `USAGE_DEPTHTARGET | USAGE_STENCILTARGET` and plane-0 SRV formats (`d3d12/crates/leonida-gpu/src/fsr.rs`)**: - `resource.rs` creates every shader-readable host depth target as typeless (`R32G8X24_TYPELESS` on Series X, `R32_TYPELESS`, `R24G8_TYPELESS`, `R16_TYPELESS`) with `ALLOW_DEPTH_STENCIL`, whereas `fsr::Resource::texture` only matched typed `D16/D24/D32` formats — leaving `usage = 0` and causing FidelityFX's DX12 backend to attempt invalid `CreateShaderResourceView` formats (`E_INVALIDARG`) in `PrepareV2` (breaking depth dilation / disocclusion on thin foliage). 3. **`PrepareV2` `DEPTH_READ` (`0x20` / `0xE0`) barriers on the title's own upscaler (`d3d12/crates/leonida-gpu/src/fsr.rs`)**: - Without DLSS, scene depth reaches `Present` in `DEPTH_READ` (`0x20`) or `0xE0`, which `ffx_state` mapped to `STATE_DEPTH_ATTACHMENT` (`DEPTH_WRITE`, `0x10`), producing illegal `0xD0` barriers or desynchronizing GPU vs tracked depth state across frames. #3206 transitions `depth` and `motion` explicitly to `NON_PIXEL_SHADER_RESOURCE` around `PrepareV2` and fixes `ffx_state`. AI-assisted: Gemini 4 Carbon (High) + Gemini 4 Neon (XHigh).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy#3173
No description provided.