Repository navigation
feat(win): one D3D12 DP per screen — create_dp_d3d12_for_screen + D3D12 present origin (multi-screen M6) - #323
Merged
Merged
Conversation
…t origin, nominal viewer (multi-screen M6) leiasr_d3d12_create_for_screen + leiasr_d3d12_set_present_origin, the D3D12 twins of the D3D11 per-screen weaver, on the shared plan in leia_sr_multi_win.h: - create_v2 queries the multi caps, plans EXTERNAL routing (+ drag snap only with a real window) + display binding, chains them on the DX12 weaver create-info with the bind-then-routing fallback, and reads the runtime's active display. - A screen-bound weaver on a non-active display with no tracker of its own (SR D4 off) skips srInitialize and pins the nominal viewer; a bound lens (SR D3) is created for its display and handed back to 2D at destroy; otherwise the lens is left to the active panel. - Before every weave a windowless EXTERNAL weaver gets the present origin, and a pinned one its simulated viewer again, with a one-shot log of the first pinned weave's eye pair. The unbound create is unchanged (both entry points share one impl). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…12 set_present_origin (multi-screen M6) - leia_dp_factory_d3d12_for_screen: resolves the binding to an SR display id (the binding's own, else this plug-in's per-monitor claim via leia_win_claims_lookup) and builds the DP around a per-screen weaver. The vtable/state setup both D3D12 factories share moves into leia_dp_d3d12_init. - set_present_origin (slot 24) forwards to the weaver, under XRT_DP_D3D12_HAS_PRESENT_ORIGIN. - Registered in the iface under XRT_PLUGIN_IFACE_HAS_CREATE_DP_D3D12_FOR_SCREEN; against older runtime headers both compile out. Canvas confinement needs nothing new: process_atlas already hands the weaver viewport + scissor = canvas and sets both on the command list. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fill the dashboard cell for a claimed screen from what the plug-in already published: ready = cached platform state READY, verified = the claim's SR FPC_VERIFIED match, serial = its FPC serial. Tracker UNSUPPORTED, lens UNKNOWN, no model, no warnings, no dashboard_command. No SR handle, no SR SDK call, no probe: the claim table + lock-free platform state only. change_counter = claim-set generation (bumped by leia_win_claims_store only when the stored set differs) combined with the platform state, so a poller skips an unchanged screen. Compiled only when the runtime headers announce XRT_PLUGIN_IFACE_HAS_GET_SCREEN_STATUS (v2.33.0+). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dfattal
force-pushed
the
feat/win-d3d12-dp-segments
branch
from
October 10, 2026 18:28
577a07f to
e692b5a
Compare
dfattal
marked this pull request as ready for review
October 10, 2026 18:28
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.
Depends on
DisplayXR/displayxr-runtime#1879 (appends
xrt_plugin_iface::create_dp_d3d12_for_screenandxrt_display_processor_d3d12::set_present_origin, ABI unchanged at 5) — shipped in runtime v2.33.0. This branch is rebased onmainafter #333 (Windows pin →v2.33.0) and #334 (Linux pin), so CI now compiles the new D3D12 paths (XRT_PLUGIN_IFACE_HAS_CREATE_DP_D3D12_FOR_SCREEN/XRT_DP_D3D12_HAS_PRESENT_ORIGINare defined) instead of compiling them out.What
The D3D12 twin of the D3D11 per-screen DP (e58d56e / a786eee / b44a454), for the in-process D3D12 compositor the Unity display provider runs on:
leiasr_d3d12_create_for_screen+leiasr_d3d12_set_present_origin(leia_sr_d3d12.{h,cpp}), on the shared plan inleia_sr_multi_win.h: EXTERNAL routing (+KEEP_DRAG_SNAPonly with a real window) + display binding chained on the DX12 weaver create-info with the bind-then-routing fallback; the runtime's active display read at create; a weaver bound to a non-active display with no tracker of its own (SR D4 off) skipssrInitializeand pins the nominal viewer; SR D3 bound lens per screen, disabled before destroy; per weave, a windowless EXTERNAL weaver getssrWeaverSetPresentOriginand a pinned onesrWeaverSetSimulatedVieweragain (one-shot log of the first pinned weave's eye pair). The unbound create is byte-for-byte the old one (one shared impl).leia_dp_factory_d3d12_for_screen(leia_display_processor_d3d12.{h,cpp}): binding → SR display id (the binding's own, elseleia_win_claims_lookup), DP around the per-screen weaver; the vtable/state setup both D3D12 factories share moves intoleia_dp_d3d12_init;set_present_origin(slot 24) forwards to the weaver.leia_plugin.cunderXRT_PLUGIN_IFACE_HAS_CREATE_DP_D3D12_FOR_SCREEN.get_screen_status(runtime ADR-051 D2, appended aftercreate_dp_d3d12_for_screenin v2.33.0), passive only:ready= cached platform state READY,verified= the claim's SR FPC_VERIFIED match,serial= its FPC serial, trackerUNSUPPORTED, lensUNKNOWN, no model, no warnings, nodashboard_command. It reads only the claim table and the lock-free platform state: no SR handle, no SR SDK call, no probe.change_counter= claim-set generation (bumped byleia_win_claims_storeonly when the stored set actually differs) combined with the platform state. Guarded byXRT_PLUGIN_IFACE_HAS_GET_SCREEN_STATUS.Canvas confinement needs nothing new on this arm:
process_atlasalready hands the weaver viewport + scissor = canvas and sets both on the command list (leiasr_d3d12_weave). SR SDK pins untouched. D3D12 late latching stays off (unchanged).Tests
origin/main(no conflicts);origin/main..HEAD= this PR's 3 commits only.scripts\build-windows.bat build(fresh build dir), against the runtime checkout at exactlyv2.33.0(b47fc4277, clean, unchanged before/after the build): exit 0.leia_plugin.c.objreferencesleia_dp_factory_d3d12_for_screenandleia_plugin_get_screen_status, and the DLL carries theLeia D3D12 per-screen DPstrings, so both#ifdefbranches are active. No new compiler warnings from plug-in sources.leia_sr_multi_win.his reused as-is;test_sr_multi_winruns on the Linux CI).Leia D3D12 per-screen DP: monitor 0x… -> SR display 0x…,SR D3D12 per-screen weaver: display 0x…, window 0000000000000000, caps{…} -> plan{external=1 …},SR D3D12 weaver created via the v2 C API (EXTERNAL routing, display bound) [windowless: phase from the present origin], and on a non-active panel… simulated nominal viewer PINNED …thenfirst weave with the pinned viewer — predicted eyes … (PAIR — weaving).displayxr-cli statusshould show aleia-srvendor cell per claimed screen (ready / verified / FPC serial).🤖 Generated with Claude Code