Repository navigation
IPC clients can capture their frame: MCP capture_frame, per-exe trigger, service + shell triggers (#1810) - #1811
Merged
Merged
Conversation
An IPC client (forced IPC or shell-launched) had no working capture route. - Per-app MCP capture_frame + %TEMP%\displayxr_atlas_trigger[.<exe>][.projection]: the IPC client compositor now installs the same mcp_capture hand-off the in-process compositors do and polls u_capture_intent after each layer commit. A request asks the SERVICE for this client's per-client atlas (pre-weave, DP-input crop, encoded bytes as stored) over the existing workspace_capture_frame call, then moves the PNG to the exact path the in-process compositors write. Windows-only (only the D3D11 service answers). - Service: an APP caller now captures its OWN compositor's atlas (comp_d3d11_service_capture_frame_for_client) instead of whichever client rendered last; CONTROLLER/DIAG and the debug triggers are unchanged. - IPC_CAPTURE_FLAG_RAW_ALPHA carries the client's DXR_ATLAS_CAPTURE_RAW_ALPHA to the service (which reads its own env). Request-only modifier bit; the wire struct and proto.json are unchanged; an old service ignores it. xrCaptureAtlasDXR's IPC branch sends it too. - workspace_screenshot_trigger is now consumed for an ADR-029 CLIENT_TEXTURE presenter (pipeline_client_texture_weave): the render thread's poll sits past the PRESENTER_SELF/CLIENT_TEXTURE early return, so it was dead there. Stat before render_mutex at 4 Hz; dump only after a frame was woven. - workspace_capture_frame with flags == 0 (what the shell's MCP capture_frame sends) was rejected before any log; the stage now defaults to IPC_CAPTURE_FLAG_ALL, and a failed capture logs a WARN. In-process capture paths are untouched. 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.
Fixes #1810: an IPC client (forced IPC, or an app under the shell) had no working capture route. All four routes now work; hardware-verified on the win box, 2026-10-03.
Root causes and fixes
capture_framereported "not wired".workspace_capture_frameIPC call, whichxrCaptureAtlasDXR's IPC branch already used. The service gainscomp_d3d11_service_capture_frame_for_client; the old entry point forwards withxc=NULL, so existing callers are unchanged.displayxr_atlas_trigger.<exe>was never consumed.u_capture_intentsemantics as in-process) and writes the same output path the in-process compositors use.workspace_screenshot_triggernever fired for a client-present (ADR-029 client-texture) presenter.pipeline_default_policy_renderreturns early for that presenter kind, and the client's weave runs inpipeline_client_texture_weave, which had no trigger check.render_mutex, consuming the trigger only after a woven frame. No new waits.capture_framereturnedok:false.flags=0("runtime picks"), whichcapture_framerejected.flags==0now defaults to the full atlas, and a failed capture logs a WARN.IPC_CAPTURE_FLAG_RAW_ALPHAbit, soDXR_ATLAS_CAPTURE_RAW_ALPHA=1in the client env works over IPC. The wire structs are unchanged.In-process capture paths are untouched.
Verified (dev service from this branch,
cube_zones_d3d11_win,XRT_FORCE_MODE=ipc DISPLAYXR_ZONES=1 DISPLAYXR_MCP=1)displayxr_atlas.cube_zones_d3d11_win.pngwritten (144 KB)capture_frame{"path": "...displayxr-mcp-capture-<pid>-<frame>.png", "size_bytes": 145155}workspace_screenshot_triggerworkspace_screenshot.png+workspace_screenshot_atlas_2_2x1.pngcapture_frame(installed shell v2.3.2 on this dev service)ok:true,displayxr_capture_atlas_2_2x1.pngUsed straight away: these captures numerically verified #1809's service pure-zones path. The UNORM-strip leg reads exactly one encode above the
_SRGBleg in the per-client atlas: greys 60→133, 210→234, red (38,8,8)→(108,50,50).Not covered
🤖 Generated with Claude Code