Repository navigation
feat(vk dp, weave/linux): set_overlay_2d VK slot — 2D under the lens on Vulkan - #1823
Merged
Merged
Conversation
…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>
…ransparency size check follows the append tests_comp_lazy_transparency pinned the VK variant's total size at 15 appended slots, which the set_overlay_2d append (ADR-020) correctly grows to 17 — it now checks that the next slot follows set_transparency_active directly. tests_comp_overlay_2d_vk pins both new slots' offsets and that a plug-in whose struct_size ends before a slot is never called through it. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
What
Vulkan twin of the D3D11
set_overlay_2d/set_overlay_2d_filter_strengthslots (#1814 / #1822, ADR-027 Amendment), and the desktop-Linux weave engine as its first producer. Needed by DisplayXR/displayxr-leia-plugin's Linux port of "2D under the lens" (SR SDKsrWeaverSetComposeInputsVulkan).Interface (
xrt_display_processor_vk.h)set_transparency_active(ADR-020, no ABI major; asserts + size bumped 15 → 17):bool set_overlay_2d(xdp, VkImageView, VkFormat_XDP, w, h, enum xrt_atlas_encoding, bool layer_unchanged)void set_overlay_2d_filter_strength(xdp, float)(negative = DP default)XRT_DP_VK_HAS_OVERLAY_2D,XRT_DP_VK_HAS_OVERLAY_2D_FILTER_STRENGTH; helpersxrt_display_processor_vk_supports_overlay_2d / _set_overlay_2d / _set_overlay_2d_filter_strength.true= DP composites inside the nextprocess_atlas,false/absent = runtime blends post-weave), plus: layer inSHADER_READ_ONLY_OPTIMAL, owned by process_atlas' queue family, alive until that command buffer completes. ThePRESENT_SRC_KHRtarget contract is unchanged.Producer (
comp_multi_weave_linux.c)set_overlay_2dwith the submit's v14overlay_unchanged.weave: 2D overlay (WxH) composited by the display processor INSIDE the weave/blended post-weave by the runtime.overlay_unchanged/overlay_filter_strength(already on the wire) are forwarded on both Linux submit paths viacomp_multi_weave_linux_set_overlay_hints(per submit, like v13 mono).Docs: ADR-027 Amendment + XR_DXR_weave v14/v15 notes.
Not done
Testing
./scripts/build_linux.sh --hybrid --appsgreen; clang-format clean;scripts/tests/test_downstream_pin_bump.pyOK.weave_present_vk_linux --headless 90against a private-XDGdisplayxr-servicewithDXR_PLUGIN_EXCLUSIVE=sim-display(no slot): PASS (incl. "HUD overlay composited over the weave"); the log shows the runtime-blend verdict.featuresdownstream-pin gate should pick up the newXRT_DP_VK_HAS_*macros for leia's Linux track on the next release.🤖 Generated with Claude Code