feat(upscaling): framegen in menus option#2284
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new setting ChangesFrame Generation in Menus
Sequence Diagram(s)sequenceDiagram
participant UI as Game UI
participant State as globals::state
participant Upscaling as Upscaling
participant SwapChain as DX12SwapChain
participant FFX as fidelityFX
UI->>Upscaling: toggle "Frame Generation in Menus" (settings updated)
SwapChain->>Upscaling: call ShouldUseFrameGenerationThisFrame()
Upscaling->>State: read menu flags / ui->GameIsPaused()
Upscaling-->>SwapChain: return enabled/disabled
SwapChain->>FFX: Present(..., frameGenerationEnabled=answer, isHDR)
FFX-->>SwapChain: present result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Features/Upscaling.cpp`:
- Around line 1615-1619: The current ShouldUseFrameGeneration uses
ui->GameIsPaused() as a proxy for menus (in the return expression with
settings.frameGenerationAllowInMenus), which is incorrect; replace that pause
check with a real "menu open" check (e.g., call an existing UI method like
ui->IsMenuOpen()/ui->MenuIsOpen() or add one to the UI class that accurately
reports whether any game menu is visible) and use that instead of
GameIsPaused(); update the condition in Upscaling::ShouldUseFrameGeneration to
consult that menu-open helper so settings.frameGenerationAllowInMenus behaves
consistently across menu types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 20f6f1ce-8483-470a-9944-3f63d7dd97a2
📒 Files selected for processing (3)
src/Features/Upscaling.cppsrc/Features/Upscaling.hsrc/Features/Upscaling/DX12SwapChain.cpp
|
✅ A pre-release build is available for this PR: |
alandtse
left a comment
There was a problem hiding this comment.
Was there a reason we disabled it before?
Latency in menus, but people constantly complain that is causes a jarring reduction in fps. It's a harmless option for those who want it. |
soda3000
left a comment
There was a problem hiding this comment.
Nitpick comment, otherwise good.
| ImGui::Checkbox("Frame Generation in Menus", &settings.frameGenerationAllowInMenus); | ||
| if (auto _tt = Util::HoverTooltipWrapper()) { | ||
| ImGui::TextUnformatted("Keeps frame generation active while game menus are open."); | ||
| ImGui::TextUnformatted("May feel smoother, but can increase menu input latency."); |
There was a problem hiding this comment.
"can increase" -> "increases" since FG necessarily adds input latency
Branch-preserving adaptation: keep this branch's VR/foveated Upscaling path and no-HDRDisplay swapchain handling, wiring the menu option into the current frame-generation call sites.
Keep IsFrameGenerationActive as the runtime-active predicate and use the State main/loading-menu helper for the per-frame frame generation gate.
Branch-preserving adaptation: keep this branch's VR/foveated Upscaling path and no-HDRDisplay swapchain handling, wiring the menu option into the current frame-generation call sites.
Keep IsFrameGenerationActive as the runtime-active predicate and use the State main/loading-menu helper for the per-frame frame generation gate.
Summary by CodeRabbit