Repository navigation
feat(cursor_depth): useMeasuredDisparity() — runtime-measured stereo source (XR_DXR_cursor_depth v7) - #77
Merged
Conversation
…reo source (XR_DXR_cursor_depth v7, ADR-046 Amendment 3) CursorDepth::useMeasuredDisparity(bool) chains XrCursorDepthSourceDXR with XR_CURSOR_DEPTH_SOURCE_MEASURED_DISPARITY_DXR (2) on runtimes reporting spec v7+: no app hit test, no point; the runtime block-matches the submitted outer views. Below v7 it is not sent and the ray cast / hit test is the fallback. useDepthLayer() and useMeasuredDisparity() select one runtime source (last call wins). Extension-header pin bumped to displayxr-extensions@722b47b (cursor_depth spec 7). Contract test covers v7/v6/off-canvas/toggle-off and was mutation-checked (spec gate and source kind). Runtime: displayxr-runtime#1976. 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.
Adds
dxr::CursorDepth::useMeasuredDisparity(bool)for stereo content with no depth (SBS video, stereo photos, camera pairs). Runtime side: ADR-046 Amendment 3,XR_DXR_cursor_depthspec v7, displayxr-runtime#1976.What
useMeasuredDisparity(true): on a runtime that reports spec v7 or later, the hint carriesXrCursorDepthSourceDXR{source = MEASURED_DISPARITY (2)}. No app hit test runs and no point is sent. The runtime block-matches the outer submitted views.useDepthLayer()anduseMeasuredDisparity()now pick one runtime source, and the last call wins. Turning off the source that is not selected does nothing.useDepthLayerbehaves as before.(XrCursorDepthSourceKindDXR)2, with astatic_assertagainst the enum when the header is v7+. A consumer whose vendored header is v5 or v6 therefore still compiles.displayxr_extensions_headerspin moves to displayxr-extensions@722b47b (runtime 1d7fd8b2a,cursor_depthspec 7).Zero cost holds: the request is per frame and only chained while the pointer is over the canvas. Turning it off stops all runtime cost from the next frame.
Evidence
displayxr_cursor_depth_testgets a newtestMeasuredDisparity(). It covers v7 chaining kind 2 with no ray cast, an off-canvas pointer chaining nothing, toggling off to bring back the ray cast, v6 not sending the request, and the last-call-wins / no-op-off cases between the two sources. Fullctest: 7/7 pass on macOS (arm64).>= 6fails "v6: no measured request". Sending SUBMITTED_DEPTH instead of MEASURED fails 3 checks. Both are caught.NOT tested
Release
Following this repo's practice, this needs a tag after merge,
v2.31.0(minor: new API). The media-player PR currently pins this branch's commit SHA and needs a repin to the tag.🤖 Generated with Claude Code