Repository navigation
feat(example): VK weave scope, device-side pack guidance, runtime pin → v2.12.0 - #5
Merged
Merged
Conversation
… v2.12.0 Follow-up to #4, which covered the D3D11 stub only. Three gaps a vendor forking for a hardware-weaving (FPGA/ASIC) display would have hit: 1. The VK DP had no get_scanout_caps, so a Vulkan-first vendor got no example and no hint that declaring scope is mandatory for them too. Added with the pointer-type trap called out: every other method in that file takes the GENERIC base, but this slot is on the VK VARIANT (dp->base, not dp->base.base) because the variant embeds the base by value and growing it would shift every appended slot (ADR-020). 2. example_device.c said nothing about hardware weaving — yet it is the file that decides the pack. The tile geometry declared there IS the layout the chip receives, which is exactly why process_atlas can be a passthrough. Documented the three common packs, the XRT_MAX_VIEWS=8 ceiling, and why the existing 1x1 @ 1.0,1.0 + 2x1 @ 0.5,1.0 pair is worth keeping even for an SBS-only product: it is the only shape that makes BOTH modes fill the worst-case swapchain envelope, the sole condition for zero-copy (ADR-030). 3. The runtime pin was v2.7.1, which predates the slot — so everything added in #4 was compiled out and a fresh fork saw inert code. Bumped both coupled pins (CMakeLists DXR_RUNTIME_GIT_TAG + workflow RUNTIME_REF, enforced together by the Rule-5 drift check) to v2.12.0, the first release carrying it. Checked before bumping: both tags are ABI major v5, and the vcpkg commit this template pins is byte-identical between them, so nothing else in CI has to move. Verified: all three stubs syntax-check clean against v2.12.0 headers with the guards ON. Co-Authored-By: Claude Opus 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.
Follow-up to #4, which covered the D3D11 stub only. Auditing the template as a vendor would actually read it turned up three gaps.
1. The VK DP had no
get_scanout_capsA Vulkan-first vendor (or anyone shipping Linux) got no example and, worse, no signal that declaring scope is mandatory for them too.
Added — with the pointer-type trap called out explicitly, because it is genuinely easy to get wrong: every other method in
example_processor_vk.ctakes the generic base (struct xrt_display_processor *), but this slot is on the VK variant (struct xrt_display_processor_vk *) and registers ondp->base, notdp->base.base. The reason is worth knowing rather than memorising: the variant embeds the base by value, so the scope query could not be added to the base without shifting every appended variant slot (ADR-020).2.
example_device.cnever mentioned hardware weaving — but it's the file that decides the packThis is the conceptual link the template was missing. For a hardware-weaving display the device file matters more than the weaver: the tile geometry declared there is the layout the chip receives, which is exactly why
process_atlascan be a passthrough. Nothing in the template said so.Documented inline: the three common packs (SBS-half
2×1 @ 0.5,1.0, top-and-bottom1×2 @ 1.0,0.5, quiltN×M), theXRT_MAX_VIEWS = 8ceiling and why exceeding it is a runtime ABI change rather than a plug-in one, and why the template's existing1×1 @ 1.0,1.0+2×1 @ 0.5,1.0pair is worth keeping even for an SBS-only product — it's the only shape making both modes fill the worst-case swapchain envelope, which is the sole condition for zero-copy (ADR-030). A0.5 × 0.53D mode always costs a copy.3. The pin predated the slot, so #4 was inert
DXR_RUNTIME_GIT_TAGwasv2.7.1— older than the runtime change — so every#ifdef XRT_DP_*_HAS_SCANOUT_CAPSblock added in #4 compiled out. A fresh fork saw code that did nothing.Bumped both coupled pins (
CMakeLists.txt+ workflowRUNTIME_REF, which the Rule-5 drift check hard-fails if they diverge) to v2.12.0, the first release carrying the slot.Checked before bumping, rather than assuming a 5-minor jump was free:
XRT_PLUGIN_API_VERSION_CURRENT = 5, so it's ABI-compatible;v2.7.1andv2.12.0, so the "keep vcpkg in sync with the runtime's CI" coupling doesn't move;Verification
All three stubs syntax-check clean against
v2.12.0headers with the guards ON (cl /Zs):example_processor_d3d11.cpp,example_processor_vk.c,example_device.c. CI here is the real test of the pin bump — it builds the full plug-in + installer againstv2.12.0via FetchContent.