Skip to content

cursor_depth: runtime draw in display-zones frames (ADR-046 Amendment 2 §B) #1949

Closed

Description

@dfattal

Gap. The runtime-drawn depth cursor (ADR-046 Amendment 2 §B: #1941 Metal, #1946 Vulkan/GL, #1944 D3D draft) refuses to draw in a frame that uses XR_DXR_display_zones. oxr_session_frame_end.c skips the cursor request for a zones frame and reports XrCursorDepthDrawStateDXR::willDraw = false, so the OS cursor stays. The fallback is safe, but it means zoned apps never get the depth cursor.

Who hits it. The avatar demo's Windows and Linux legs render the 3D subject through a zone (displayxr-demo-avatar#117: the cursor is wired but inert there). Unity's zones apps (desktop-avatar sample) will hit it too.

What's needed

  • The hint already rides the zone-scoped locate: the zone is that locate's canvas, so cursorUV is zone-normalised.
  • Carry the zone id (or rect) with the per-frame draw request.
  • At xrEndFrame, map the placement through that zone's projection views (its submitted subimages / tiles) instead of the full-canvas layer.
  • Draw into those tiles before the DP, as today.
  • One cursor per frame: the zone under the pointer.
  • Tests: placement and draw in a zone sub-rect, with an N-view zone.

Tracking in #tmp-3d-cursor (C0C8EGXSBSM).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions