Skip to content

fix(windows): size all D3D11 render pools to five slots — restores the #267 pool fix lost in merge - #280

Open
petercr wants to merge 2 commits into
TheOrcDev:mainfrom
petercr:upstream/pool-slots
Open

fix(windows): size all D3D11 render pools to five slots — restores the #267 pool fix lost in merge#280
petercr wants to merge 2 commits into
TheOrcDev:mainfrom
petercr:upstream/pool-slots

Conversation

@petercr

@petercr petercr commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

The #267 merge landed the ScreenCamera smokes, diagnostics, and drain pacing, but kept the pre-#262 pool sizing (windows_d3d11_render_pool_slots returns 3 for screen-only, 5 for camera sessions). The reviewed #267 stack sized all pools to five slots unconditionally — post-#262 stop/preview-restore accounting raised steady-state churn for every session shape, and a 3-slot screen-only pool starves CFR ticks into silent single-frame skips under fence lag.

Evidence (win11-x64-i5-8400-gtx1650-super, GTX 1650 SUPER)

With main's sizing, a screen-only direct-D3D11 session shows texturePoolPressureEvents > 0 and cadence loss; with all pools at 5 slots, pressure events are 0 across runs and observed fps recovers above the issue floor. This sizing is also the leading suspect for the open P0 second-session decay (#271 release record), since decay reproduces only with real camera sessions where lease residency stretches furthest.

Changes

  • windows_d3d11_render_pool_slots returns 5 unconditionally (still inside the per-format pool ceiling of 8)
  • Test renamed to windows_d3d11_sessions_size_deep_render_pools asserting both shapes = 5

Testing

  • cargo test -p videorc-backend: 1519 passed, 0 failed
  • cargo fmt --check --all: clean
  • Real-app screen-only smoke (--d3d11 --require-d3d11): PASS, pressure 0, 29.5fps observed on 1080p30

Related: open P0 "second-session recording lag" in docs/releases/0.9.71.md

Summary by CodeRabbit

  • Bug Fixes
    • Improved rendering consistency for screen-only sessions by ensuring they use the same pool capacity as sessions with camera input.
    • Updated internal validation to reflect the standardized rendering capacity.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ef276f8-22e0-4b05-8481-942bcba38f42

📥 Commits

Reviewing files that changed from the base of the PR and between 92f9149 and 30b1dd8.

📒 Files selected for processing (1)
  • crates/videorc-backend/src/windows_d3d11_session.rs

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The D3D11 render pool now always allocates five slots. The existing test was renamed and updated to verify five slots for non-camera sessions.

Changes

D3D11 render pool sizing

Layer / File(s) Summary
Set and validate fixed pool size
crates/videorc-backend/src/windows_d3d11_session.rs
windows_d3d11_render_pool_slots returns five slots for all sessions. The test name and non-camera assertion now reflect the fixed size.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: 🔵 Low · up to 30b1d

The pool-sizing change has no identified product-impacting defect, but the Rust lint check did not complete. The PR is mergeable with explicit owner follow-up to rerun and complete that check; no actionable runtime merge blocker is otherwise supported.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the Windows D3D11 render pool sizing change to five slots.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Rebased TheOrcDev#280 onto current main: screen-only sessions still starve CFR ticks
into silent single-frame skips with 3-slot pools under fence lag, and the
TheOrcDev#262 stop/preview-restore accounting keeps steady-state churn high for every
session shape. The per-format pool ceiling of 8 accommodates 5 slots for
split screen-camera sessions.
@petercr
petercr force-pushed the upstream/pool-slots branch from 30b1dd8 to cfe2e3b Compare August 27, 2026 19:03
@petercr

petercr commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main — still needed

Refreshed the branch onto fd49a359 (0.9.81-alpha.1 line, post-#305/#307/#308): the diff is now just the 17-line sizing change. Confirmed main still sizes screen-only pools to 3 slots (windows_d3d11_render_pool_slotsif camera_required { 5 } else { 3 }), and nothing in #278/#279/#303/#305/#307/#312 changed pool depth or the per-format ceiling of 8.

Still applies and still matters because:

Gates: cargo test -p videorc-backend windows_d3d11_sessions_size pass (renamed test asserts 5 for both shapes), cargo fmt --check --all clean. CI should now run against the clean one-file diff.

@petercr petercr closed this Sep 4, 2026
@petercr petercr reopened this Sep 4, 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.

1 participant