Skip to content

XR_DXR_weave v15: app-tunable lens-filter strength for the 2D layer (default = DP's own, Leia 0.6) - #1822

Merged
dfattal merged 1 commit into
mainfrom
feat/weave-v15-filter-strength
Oct 4, 2026
Merged

dfattal merged 1 commit into
mainfrom
feat/weave-v15-filter-strength

Conversation

@dfattal

@dfattal dfattal commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Why

David judged the full lens filter of the 2D layer too soft and picked 0.6 by eye. That is now LeiaSR's compiled default (SR 1.38.0+1874, ST-5799), with an API so an app that knows its content can tune it (text/UI want more filtering, photos/video less).

What

  • XR_DXR_weave spec v15: XrWeaveSubmitOverlayFilterDXR (1004999291), chained next to the v4 overlay.
    • float filterStrength in [0,1]: 0 = no lens filtering, 1 = the DP's full filter.
    • Omitted = the display processor's OWN default (Leia SR: 0.6). The runtime passes "not set", never a number of its own.
    • Out of range or NaN = XR_ERROR_VALIDATION_FAILURE. Per submit, no latch, no version gate needed.
  • Plumbing: oxr → IPC (overlay_filter_strength, -1 = not set; 836 B) → a per-submit service setter, consumed first in weave_submit. Untrusted values outside [0,1] read as default.
  • New appended D3D11 DP slot set_overlay_2d_filter_strength (negative = default) + XRT_DP_D3D11_HAS_OVERLAY_2D_FILTER_STRENGTH. ADR-020; the shipped set_overlay_2d signature stays frozen. Called each frame the layer goes to the DP, before set_overlay_2d.
  • weave_rpc_probe --filter-strength=X; spec §2d + version table; type registry.

Tested on the panel

SR 1874 + dev Leia plug-in (forwarding to srWeaverSetComposeFilterStrength on change), exact woven dumps, weave forced:

probe text sharpness R≠G on text
--filter-strength=0 14.5 0% (unfiltered)
omitted (SR default 0.6) 10.5 20.9%
--filter-strength=1 9.0 21.4%

Windows build green; gen_extensions_index.py --check green.

Leia plug-in counterpart: feat/overlay-2d-filter-strength (PR to follow, after this ships in a runtime release).

🤖 Generated with Claude Code

…ter strength for the 2D layer

The DP's lens filter of the 2D over-layer trades aliasing for softness, and
the best point depends on content: David judged the full filter too soft and
picked 0.6 by eye, to ship as the DEFAULT, with API flexibility for an app
that knows its content (text/UI more filtering, photos/video less).

- XR_DXR_weave spec v15: XrWeaveSubmitOverlayFilterDXR (1004999291), chained
  next to the v4 overlay: float filterStrength in [0,1] (0 = no lens
  filtering, 1 = the DP's full filter). Omitted = the DP's OWN default (a
  vendor value tuned on its panel; Leia SR ships 0.6) - the runtime passes
  "not set", never a number of its own. Out of range / NaN =
  XR_ERROR_VALIDATION_FAILURE. Per submit, no latch; no version gate needed.
- oxr -> IPC (ipc_arg_weave_submit.overlay_filter_strength, -1 = not set;
  836 B) -> handler -> comp_d3d11_service_weave_set_overlay_filter_strength
  (per-submit setter, consumed first in weave_submit; untrusted values
  outside [0,1] read as default).
- New appended D3D11 DP slot set_overlay_2d_filter_strength(float; negative
  = default) + XRT_DP_D3D11_HAS_OVERLAY_2D_FILTER_STRENGTH (ADR-020; the
  shipped set_overlay_2d signature stays frozen). Called each frame the
  layer goes to the DP, before set_overlay_2d.
- weave_rpc_probe: --filter-strength=X chains it.
- Spec §2d "Filter strength (v15)" + version table; type registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dfattal
dfattal requested a review from a team as a code owner October 4, 2026 09:38
@dfattal
dfattal merged commit 19b8196 into main Oct 4, 2026
40 checks passed
@dfattal
dfattal deleted the feat/weave-v15-filter-strength branch October 4, 2026 09:51
dfattal added a commit that referenced this pull request Oct 5, 2026
…on Vulkan

Append xrt_display_processor_vk::set_overlay_2d + set_overlay_2d_filter_strength
(XRT_DP_VK_HAS_OVERLAY_2D[_FILTER_STRENGTH], ADR-020 append, no ABI major) — the
Vulkan twin of the D3D11 slots from #1814/#1822. Same contract: stateless per
frame, layer target-sized, premultiplied, ENCODED sRGB, RGBA8/BGRA8; true = the
DP composites it inside the next process_atlas, false/absent = the runtime keeps
its post-weave blend. VK specifics: a VkImageView + VkFormat, in
SHADER_READ_ONLY_OPTIMAL when process_atlas' command buffer executes.

First producer: the desktop-Linux weave engine. When the frame weaves and the v4
overlay is exactly output-sized, it acquires the overlay and transitions it
before the self-submitting split, offers it to the DP (v15 strength first, v14
unchanged hint from the submit), and skips its own full-window blend when the
DP takes it. Off-panel bands and flat regions are painted over the weave
afterwards, so the layer is redrawn over those rects only, keeping 2D readable
across a seam as before. One WARN on each change of who composites. The IPC
handler forwards overlay_unchanged / overlay_filter_strength on both Linux
submit paths (they were already on the wire).

sim_display has no slot, so its path is unchanged: weave_present_vk_linux
--headless 90 PASSes (HUD composited) with the runtime-blend verdict logged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant