Repository navigation
feat(d3d11): multi-screen segments under the weave-on-scanout split (M6 on hybrid boxes) - #1878
Merged
Merged
Conversation
…omposite unit The flat-2D fill of a segment no DP can weave went through comp_d3d11_renderer_blit_rect, which records on the renderer's (app) context. The destination is the weave target, which under the #918 weave-on-scanout split lives on the output device the renderer knows nothing about, so the fill could not run there. Move the blit to comp_d3d11_outcomp (comp_d3d11_outcomp_blit_rect), the unit that already owns the output-side composite on the device the target lives on. Same HLSL (the renderer's projection VS/PS), same linear sampler desc, same opaque blend / rasterizer / depth state, so the pixels are unchanged off the split, where the outcomp's device and context ARE the app's. Its shaders are compiled on first use, so a session that never blits pays nothing. The renderer's blit_rect had no other caller and is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plit (multi-screen M6) The segment path bailed whenever the #918 output-device split was engaged, and ADR-039 makes the split the default on every hybrid box (and keeps it on one adapter), so the shipping configuration never wove a window per screen without DXR_D3D_FORCE_GPU=scanout + DXR_SPLIT_SAME_ADAPTER=0. Nothing in the path actually needed the gate: d3d11_dp_weave is the weave site on both sides of the split, the segment manager is already created on d3d11_out_device() and hands its DPs d3d11_out_context() (the plug-in's create_dp_d3d11_for_screen is given the output device), and atlas_srv there is the egress slot being woven, the output-side copy of the composed atlas cropped to the box that slot was painted at. With the flat-2D fill on the output composite unit (previous commit) the gate is removed: one segment path, per-segment crop / viewport / scissor / present origin unchanged, #1863 routing unchanged (the mosaic is painted on the app device and crosses the bridge like any atlas). A window on one screen is still the single-DP split weave, byte for byte: comp_d3d11_segments_update returns false and process_atlas runs with the arguments it always had. A split session logs one WARN when its segment manager is made, naming the output device it lives on (the rig check's proof). Test: a split egress slot one frame behind a resizing window (its own tile size, the live canvas) still partitions its tile exactly, the seam where the live window puts it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dmap M6, ADR-047 Amendment 1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Multi-screen M6 on Windows now works on the default in-process D3D11 path on hybrid boxes, i.e. under the #918 weave-on-scanout split (ADR-039). A window straddling two panels is woven per screen without
DXR_D3D_FORCE_GPU=scanout/DXR_SPLIT_SAME_ADAPTER=0.Design
d3d11_dp_weaveis the weave site on both sides of the split (the "split bypasses the windowed weave site" trap is a Vulkan-compositor thing, not D3D11). The!c->split_activegate is removed.d3d11_out_device()and hands its DPsd3d11_out_context(); under the split that is the output (scanout) device, where the primary DP already lives.create_dp_d3d11_for_screen(inst, device, context, NULL, binding, ...)is simply handed the output device. No plug-in change: the Leia factory (leiasr_d3d11_create_for_screen) uses whatever device/context it is given, and the primary DP has always been made on the output device the same way (d3d11_make_dp(..., out_dev, out_ctx, true), which tells the plug-in nothing extra).atlas_srvat the segment site is the egress slot being woven: the output-side copy of the composed atlas, already cropped to the box that slot was painted at. The per-segment crop, viewport + scissor,canvas = segmentandset_present_originare exactly the non-split ones.comp_d3d11_renderer_blit_rect, which records on the renderer's (app) context: wrong device under the split. It is nowcomp_d3d11_outcomp_blit_rect, the same HLSL / linear sampler / opaque blend / rasterizer / depth state re-made on the outcomp's device (compiled on first use). Off the split the outcomp's device and context are the app's, so the pixels are unchanged; the renderer'sblit_recthad no other caller and is removed.What is byte-identical
comp_d3d11_segments_updatereturns false, andprocess_atlasruns with the same arguments as before. The only additions on that path are the segment manager's per-weave table update (no GPU work) and, once per manager on a split session that has ≥2 screens, one WARN line.Not changed / out of scope
Zones / Local2D frames (non-whole-window canvas), zero-copy frames, shared-texture path, pinned sessions, service/hosted path, HWND-follows-majority.
Tests
tests_comp_segments: new case, a split egress slot one frame behind a resizing window (tile 800/824/840 against a 1649 px canvas, seam at an odd column) still partitions its tile with the seam where the live window puts it.ctest -C Release: all segment / compositor tests pass. 3tests_oxr_view_space_mode_*cases fail identically on unmodifiedmainon thewinbox (environment: they need a >2-view DP and this box registers Leia SR).Rig check (needs the two-panel
winrig; not run here)DXR_D3D_FORCE_GPU/DXR_SPLIT_SAME_ADAPTERin the env.cube_handle_d3d11_winlaunched non-elevated (viaexplorer.exe <bat>soXR_RUNTIME_JSONis honoured).SetWindowPos.%LOCALAPPDATA%\DisplayXR\DisplayXR_cube_handle_d3d11_win.*.logexpect, in order:D3D11 output-device split ACTIVE: weave/repaint/present move to '<Intel ...>'(orADR-039 same-adapter ENGAGE)D3D11 display processor created via factory on the SCANOUT devicesegments: under the #918 output-device split — segment DPs are created on the OUTPUT device (LUID=..., device 0x...)(new)segments: created a segment DP for screen 0x... ('\.\DISPLAY...', plug-in 'leia-sr') via create_dp_d3d11_for_screencanvas=(0,0 824x...)andcanvas=(824,0 824x...)per-segment views: segments=2 ... -> total=4(oxr_session)segments: could not create a DP, D3D11 debug-layer device-mismatch errors,#918 R1refusals beyond the first frame.segments: retiring the segment DP ...after ~0.5 s and the frame is the plain single-DP split weave.🤖 Generated with Claude Code