fix(HDR): background blur with HDR#2274
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCentralizes per-frame FG gating via Upscaling::ShouldUseFrameGenerationThisFrame(), introduces D3D12 UI-buffer mode computation in HDRDisplay to route UI (or fallback copy), preserves UAVs when upgrading LDR→HDR targets, refactors BackgroundBlur to use unified UI-buffer helpers, adds State menu-open queries, and bumps two shader feature versions. ChangesFrame‑Generation, UI Buffer Routing, and Render‑Target UAV Preservation
Sequence DiagramsequenceDiagram
participant DX12 as DX12SwapChain
participant Upscaling as Upscaling
participant HDR as HDRDisplay
participant Blur as BackgroundBlur
participant UI as UI/Renderer
DX12->>Upscaling: ShouldUseFrameGenerationThisFrame()
Upscaling-->>DX12: FG allowed? (yes/no)
DX12->>HDR: SetUIBuffer()
HDR->>HDR: GetD3D12UIBufferMode()
HDR-->>HDR: mode {useUIBuffer, useFallbackCopy}
HDR->>UI: select RTV (uiBuffer / fallbackCopy / backBuffer)
Blur->>HDR: Get*UIBufferViews(...)
HDR-->>Blur: return {srv, rtv}
Blur->>UI: PerformBlur(srv, rtv)
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 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)
Review rate limit: 8/10 reviews remaining, refill in 8 minutes and 29 seconds. 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 the current code and only fix it if needed.
Inline comments:
In `@src/Menu/BackgroundBlur.cpp`:
- Around line 113-117: The null-HDR branch in ShouldUseD3D12UIBufferForBlur
incorrectly only checks !ui->GameIsPaused(), causing divergence from
HDRDisplay::SetUIBuffer's routing into uiBufferWrapped; update
ShouldUseD3D12UIBufferForBlur so when hdr is null it also verifies the same
D3D12 UI-buffer decision used by SetUIBuffer (i.e., consult
HDRDisplay::ShouldUseD3D12UIBuffer via the global HDRDisplay instance instead of
only !ui->GameIsPaused()), referencing ShouldUseD3D12UIBufferForBlur,
HDRDisplay::ShouldUseD3D12UIBuffer, HDRDisplay::SetUIBuffer, globals::game::ui
and uiBufferWrapped to locate where to change the condition.
🪄 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: b80f523d-d088-4c80-badf-06bc85e321d9
📒 Files selected for processing (7)
src/Features/HDRDisplay.cppsrc/Features/HDRDisplay.hsrc/Features/Upscaling.cppsrc/Features/Upscaling.hsrc/Features/Upscaling/DX12SwapChain.cppsrc/Menu/BackgroundBlur.cppsrc/State.h
|
✅ A pre-release build is available for this PR: |
SkrubbySkrubInAShrub
left a comment
There was a problem hiding this comment.
Works in all combos on my side too.
Fixes instances of background blur with HDR.
Matrix:
HDR Display loaded, Upscaling disabled, HDR toggle disabled: works.
HDR Display loaded, Upscaling disabled, HDR toggle enabled: works.
HDR Display loaded, Upscaling enabled, Frame Gen disabled, HDR toggle disabled: works.
HDR Display loaded, Upscaling enabled, Frame Gen enabled, HDR toggle disabled: works.
HDR Display loaded, Upscaling enabled, Frame Gen disabled, HDR toggle enabled: works.
HDR Display loaded, Upscaling enabled, Frame Gen enabled, HDR toggle enabled: works.
HDR Display unloaded, Upscaling disabled: works.
HDR Display unloaded, Upscaling enabled, Frame Gen disabled: works.
HDR Display unloaded, Upscaling enabled, Frame Gen enabled: works.
Summary by CodeRabbit
Bug Fixes
Improvements
Chores