Skip to content

fix(upscaling): preserve D3D12 proxy swap chain#2335

Merged
alandtse merged 2 commits into
community-shaders:devfrom
jota2rz:dev
May 15, 2026
Merged

fix(upscaling): preserve D3D12 proxy swap chain#2335
alandtse merged 2 commits into
community-shaders:devfrom
jota2rz:dev

Conversation

@jota2rz
Copy link
Copy Markdown
Contributor

@jota2rz jota2rz commented May 12, 2026

This helps with some scenarios where the chain can break and turn into a black screen.
Also helps with an specific issue at SkyMP where a server renders floating nicknames by directly hooking into the chain, making them invisible when CS is enabled.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed swap chain handling when frame generation uses D3D12 proxy path to prevent interface compatibility issues.
  • Refactor

    • Improved conditional structure for HDR UI buffer operations to enhance code clarity.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

This PR makes two targeted refinements to the graphics rendering pipeline. The D3D12 frame-generation proxy path now bypasses Streamline's swap-chain wrapping to preserve interface compatibility, while the HDR UI buffer clearing condition in the Present hook is refactored into nested if statements for improved readability.

Changes

Graphics Proxy and HDR Buffer Refinements

Layer / File(s) Summary
D3D12 proxy swap-chain wrapping bypass
src/Features/Upscaling.cpp
D3D12 frame-generation proxy skips Streamline's swap-chain upgrade to prevent wrapper from breaking IID_ID3D11Device interface expectations for other plugins; proxy swap chain remains the outermost layer with added documentation.
HDR UI buffer clearing condition refactoring
src/Hooks.cpp
HDR UI buffer clearing in Present hook refactored from combined condition into nested if statements; behavior unchanged—call still occurs only when HDR is ready and frame generation inactive.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • alandtse
  • doodlum
  • jiayev

Poem

🐰 A proxy hides Streamline's gentle touch,
Preserving interfaces—they meant so much.
The HDR buffer, nested and neat,
Makes Present-time logic complete!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title 'fix(upscaling): preserve D3D12 proxy swap chain' directly aligns with the main change, which is preserving the D3D12 proxy swap chain in the upscaling function to maintain SKSE plugin compatibility and prevent black screen issues.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

✅ A pre-release build is available for this PR:
Download

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

Have you tested this with all configurations? HDR on/off, fg on/off, HDR unloaded, Upscaling unloaded?

@jota2rz
Copy link
Copy Markdown
Contributor Author

jota2rz commented May 13, 2026

Have you tested this with all configurations? HDR on/off, fg on/off, HDR unloaded, Upscaling unloaded?

Yes, everything seems to work correctly, but I advise to have at least someone else do testing.
For testing please remember you need to use Borderless Windowed for Frame Generation to work.

Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested myself and I see no regressions

Comment thread src/Hooks.cpp
@alandtse alandtse changed the title fix(upscaling): preserve D3D12 proxy swap chain for SKSE plugins fix(upscaling): preserve D3D12 proxy swap chain May 15, 2026
@alandtse alandtse merged commit 73ab6da into community-shaders:dev May 15, 2026
11 checks passed
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants