Repository navigation
feat(d3d11): multi-screen M6 half 1 — in-process D3D11 segments, two appended plug-in slots - #1857
Merged
Merged
Conversation
…; sim_display implements both (multi-screen M6) Two appended slots, no XRT_PLUGIN_API_VERSION bump (ADR-020): xrt_plugin_iface::create_dp_d3d11_for_screen (the D3D11 twin of the Vulkan per-screen factory, takes the xrt_screen_binding) and xrt_display_processor_d3d11::set_present_origin (slot 32; the size assert moves to 33), each announced by a HAS macro so a plug-in built against an older header can guard. sim_display's D3D11 DP implements both: a screen-bound instance describes its screen and confines its draw to the canvas it is handed; the unbound DP is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…en M6, ADR-047 D2 on Windows) comp_d3d11_segments mirrors the Vulkan segment manager: screen-table join from the registry, lifecycle with hysteresis, two-pass weave (primary first, then left to right), CopySubresourceRegion crops, viewport AND scissor = segment before every process_atlas, back buffer re-bound between DPs, flat-2D fill of unwoven segments and uncovered canvas via a new renderer rect blit. The compositor takes the screen list at session creation (oxr_session hands it over on Windows like it does for vk_native on Linux), caches the window's desktop rect from the metrics read that feeds Kooima, and decides the split at the one weave site shared by the app frame and the repaint thread. A window on the primary monitor only keeps the single-DP path byte for byte. Not segmented: the #918 output-adapter split, zones/Local2D frames, zero-copy, shared-texture sessions, pinned sessions, DXR_SEGMENTS=0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Cross-session review from the Linux multi-screen session (ds1-linux/dxr) — the ABI / shared-surface parts only; I did not run the D3D11 code. No blockers from the Linux side.
Two notes, neither needs a change here:
🤖 Generated with Claude Code |
…een (multi-screen M6) The layout test pins the last slot of xrt_plugin_iface; the M6 append moved it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-screen M6, Windows half 1: in-process D3D11 segments (ADR-047 D2)
A window that spans two monitors is woven per segment by the in-process D3D11 compositor: each segment (canvas ∩ monitor) gets the display processor of ITS monitor, a pre-cropped atlas holding exactly that segment's views,
canvas = segment, and its own present origin; everything lands in the one DXGI back buffer. A window on the primary monitor only keeps the single-DP path byte for byte. The Linux/Vulkan model (M2–M4) is mirrored line for line ind3d11/comp_d3d11_segments.{h,cpp}; only the GPU work is D3D11.What changes
struct_size):xrt_plugin_iface::create_dp_d3d11_for_screen(inst, device, context, window, const xrt_screen_binding *, out)— the D3D11 twin of the Vulkan per-screen factory.XRT_PLUGIN_IFACE_HAS_CREATE_DP_D3D11_FOR_SCREEN.xrt_display_processor_d3d11::set_present_origin(x, y)— the D3D11 twin of the Vulkan slot (slot 32; the size assert moves to 33).XRT_DP_D3D11_HAS_PRESENT_ORIGIN, plusxrt_display_processor_d3d11_tolerates_resample.comp_d3d11_segments: screen-table join from the registry, lifecycle with hysteresis, decide loop, two-pass weave order (primary first, then left to right),CopySubresourceRegioncrops,ClearRenderTargetView, viewport AND scissor = segment before everyprocess_atlas(the vendor weaver reads both and writes only inside them), back buffer re-bound before every DP, flat-2D fill of unwoven segments and uncovered canvas through a newcomp_d3d11_renderer_blit_rect.comp_d3d11_compositor_set_screens(session creation, underc->mutex), the window's desktop rect cached from the same metrics read that feeds Kooima (device px, per-monitor-DPI-aware process), the split decided at the one weave site shared by the app frame and the repaint thread, segment DPs torn down before the primary.oxr_session.chands the screen list + DP registry to the D3D11 compositor on Windows, like it does for vk_native on Linux.comp-segments.md§ Windows / D3D11, roadmap M6 row.What does NOT change (on purpose, follow-ups)
split_active). On the hybridwinbox the split engages even on one adapter (ADR-039), so on that class of machine M6 is reachable today only withDXR_D3D_FORCE_GPU=scanout+DXR_SPLIT_SAME_ADAPTER=0. Next PR.set_window).Verified on the two-panel
winrig (AL + DS1, LeiaSR 1.38.0+2056)cube_handle_d3d11_winon this build, window at (3000,300) straddling the monitor boundary at x=3840, split disabled:canvas=(0,0 824x1788)in the DP log), the DS1 part and the off-desktop rows are filled flat 2D — the captured back buffer shows the seam exactly at the monitor edge;feat/win-m6-dp-segments): a second DP is created throughcreate_dp_d3d11_for_screenfor the DS1 (monitor 0xb72e… -> SR display 0x2), both DPs weave their own viewport every frame (vp=(0,0 824x1788)/vp=(824,0 824x1788)), the DS1 weaver is windowless with EXTERNAL routing + display binding and reports the pinned nominal viewer pair.tests_comp_segments(198 assertions) unchanged and passing.Companion: displayxr-leia-plugin PR
feat/win-m6-dp-segments(needs a runtime tag carrying the two slots before its Windows CI pin can move; the code is#ifdef-guarded on the new macros so it builds against v2.27.0 meanwhile).🤖 Generated with Claude Code