Repository navigation
feat(weave): v13 XrWeaveSubmitMonoIn2DDXR — one flat view while the panel is held 2D (#1796) - #1797
Conversation
…anel is held 2D (#1796) A desktop-Linux present-owner that drops the lens for a reason of its own (the browser holding the panel 2D while a menu is open over inline 3D) got its content woven through no lens: both views interlaced, soft and doubled. xrRequestDisplayModeDXR is hardware-only by contract, and apps rely on that for fade-to-flat transitions, so the default stays. XR_DXR_weave v13 adds a per-submit opt-in. With XrWeaveSubmitMonoIn2DDXR chained and the session's CONFIRMED hardware state 2D (mc->weave.hw_2d_confirmed), the Linux weave engine skips process_atlas and paints the whole output as one off-panel band: the centre view (batch: each rect's left half unsqueezed; v6: the centre tile) at full output resolution, flat regions and the v4 overlay on top as usual. No effect in 3D, no latch, no session events. Windows, macOS and Android accept and ignore it. No vendor plug-in change: the engine paints the band itself, the DP is not called. Wire: ipc_arg_weave_submit::mono_in_2d (appended; the dma-buf call is 968 of 1024 B). The Linux handlers hand it to the engine per submit (comp_multi_weave_linux_set_mono_in_2d). Test: weave_present_vk_linux gains --mono-in-2d, --hold-2d-at=N, --release-3d-at=M and --expect-mono (woven == the left view unsqueezed, and NOT the anaglyph). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Consumer: DisplayXR/displayxr-browser-pvt#225 (patches 0345/0346) chains this struct during the Linux menu hold. |
|
Cross-session review (from the session that wrote #1785 and reviewed #1775). No blocking findings. The direction is right: Checked:
Your three questions:
One edge to test before merge: toggle 2D↔3D quickly while 🤖 Generated with Claude Code |
…ate wording, fast hold test (#1796) - VIEW CHOICE. One helper, u_weave_flat_view_index (u_weave_span2d.h), now picks the view for EVERY flat path of the Linux engine: the off-panel bands, non-batch flat regions and v13 mono. All three are therefore in register. - 1-2 views: view 0, the LEFT view (a batch rect's left half), for every batch submit. This is what the bands always used. It is deterministic, because both eyes are about equidistant from the axis, so a nearest-axis rule would flip with the head. - N > 2: the view whose eye is nearest the display axis (smallest |x| of the DP's per-view eye offset; a tie goes to the lower index). - N > 2 with no offsets: the centre index, (N-1)/2. The header and spec no longer say "centre view". Unit-tested in tests_aux_weave_span2d (stereo invariance, 2x2 and 8-view nearest-axis, fallbacks). The test app cannot submit an N-view grid. - SPEC. §5f states that mono follows the DP-CONFIRMED hardware-2D state for the session, not the request. It starts on the first submit after the confirmation and ends on the first submit after the confirmed state is 3D again. It also gains the view table. - TEST. weave_present_vk_linux --test-hold-flicker (implies --mono-in-2d) runs frames 10..49 in six-frame cycles: a 1-frame hold, a 2-frame hold, and a hold opened and closed inside one frame. Every frame is read back. Each frame must be mono exactly when the last request before its submit was 2D: no woven frame while held, no stale mono after release. - D3D11-service parity: #1798. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #1796.
What
XR_DXR_weavev13 addsXrWeaveSubmitMonoIn2DDXR(type1004999249, the last value of the 240–249 decade). It is chained per submit. WhenmonoIn2Dis set and the session's confirmed hardware state is 2D, the desktop-Linux weave engine:process_atlas;Other rules:
xrRequestDisplayModeDXRis unchanged: 2D keeps the weave. Apps rely on that for fade-to-flat.The consumer is the DisplayXR Browser's Linux menu hold (browser-pvt 0344). While a menu is open over inline 3D, the page's content is now flat and sharp instead of soft and doubled.
Why a weave flag and not a 2D rendering mode
See #1796. In short:
xrBeginSessionfrom the head device.Changes
XR_DXR_weave.h: the new struct, SPEC_VERSION 13. Also the registry README, the spec docs (§5f + version table), and a pointer fromXR_DXR_display_info.md.oxr_weave.c: parses the chain and passes it to the IPC client.ipc_arg_weave_submit::mono_in_2d: appended. The dma-buf call is 968 of 1024 B. Both client submit paths fill it.comp_multi_weave_linux_set_mono_in_2dper submit.weave_run_frame: when the flag is set and the session is confirmed 2D, the whole output becomes one band. Oneweave(v13)WARN per edge.u_weave_flat_view_index(u_weave_span2d.h) picks the view for every flat path: off-panel bands, non-batch flat regions, and mono. The paths are therefore always in register.(N−1)/2.weave_present_vk_linux --test-hold-flicker(implies--mono-in-2d): frames 10–49 in six-frame cycles. Each cycle has a 1-frame hold, a 2-frame hold, and a 2D+3D pair inside one frame. Every frame is read back and must be mono exactly when the last request before its submit was 2D.tests_aux_weave_span2d: unit test for the view selection (stereo invariance, 2×2 / 8-view nearest-axis, fallbacks). The test app cannot submit an N-view grid.weave_present_vk_linux: new options--mono-in-2d,--hold-2d-at=N,--release-3d-at=M,--expect-mono.--expect-monorequires woven == left view unsqueezed and woven ≠ anaglyph. With the flag chained,--expect-anaglyphalso requires woven ≠ mono.Verification (headless, sim_display anaglyph)
Setup:
build_linux.sh --hybrid --apps.XDG_RUNTIME_DIR, withDISPLAYandWAYLAND_DISPLAYunset.DXR_PLUGIN_EXCLUSIVE=sim-display,SIM_DISPLAY_FAKE_TRACKING=1,SIM_DISPLAY_FAKE_LENS=1.--headless 60 --service-pid=…. Every run below PASSED.Errors are mean |woven − reference| per channel.
--mono-in-2d --expect-anaglyph(3D: flag ignored)--mono-in-2d --hold-2d-at=10 --expect-mono--hold-2d-at=10 --expect-anaglyph(2D without the opt-in)--mono-in-2d --hold-2d-at=10 --release-3d-at=30 --expect-anaglyph--expect-anaglyph(regression)--test-display-mode/ G=deferred --mono-in-2d(event sequences)--test-hold-flicker --expect-anaglyphAll runs also passed fd counts flat, HUD composited, and the v12 origin/serial checks.
Service log for B/D:
weave(v13): MONO — hardware 2D and the caller asked for one view …weave(v13): weave resumed (the hardware is 3D again)ctestwithDXR_PLUGIN_EXCLUSIVE=sim-display: 74/76.tests_aux_weave_span2dpasses: 42 assertions in 5 test cases.tests_rig_composerandtests_oxr_view_spacefail identically on themainbuild (v2.22.2), so they predate this PR.git clang-formatwas run onsrc/.Follow-up
Not verified
🤖 Generated with Claude Code