docs(color): ADR-021 encoding-state invariant + DP-declared handoff [#409]#411
Merged
Conversation
…409] Establish a vendor-neutral color contract for the runtime, replacing the three ad-hoc per-path colorspace strategies surfaced during the #407/#408 sRGB investigation. - ADR-021: matched-pair invariant (decode..encode or passthrough, never half); compose space is DisplayXR-internal/vendor-neutral; DP-handoff encoding is DECLARED by the DP (LINEAR/ENCODED/EITHER) and the runtime converts compose->handoff to match (both directions). Production DPs with a configurable conversion control declare EITHER -- an instance of the contract, not its definition. Canonical TF is standard sRGB; no vendor curves in runtime shaders. Model A (passthrough) baseline; Model B (linear compose) sanctioned future, scoped to the workspace compose path. ADR kept vendor-neutral. - compositor-pipeline.md: correct the wrong "DP expects linear input" assertion; document the latent sRGB-SRV half-conversion. - vendors/leia/weaver.md: map the SDK's sRGB-conversion knob to the ADR-021 contract + record the plug-in wiring gaps (vendor specifics live here, not in the ADR). - comp_d3d11_service.cpp: one-shot guard + corrected comment on the per-client sRGB-SRV branch (decode with no matching re-encode; dead in practice, fires for a real sRGB-swapchain client under the workspace). - Fix inbound anchor links to the renamed color-space section. Co-Authored-By: Claude Opus 4.8 (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
Establishes a vendor-neutral color contract for the runtime (ADR-021) and fixes the documentation + code that the #407/#408 sRGB investigation showed to be inconsistent. Docs + one-line guard only — no behavior change.
Resolves the design question in #409.
Why
The three compositor paths each grew a different colorspace strategy, and the reactive fixes were tuned to one vendor's display processor — inverting DisplayXR's dependency direction (the DP adapts to the runtime, not the reverse). One path (service/workspace sRGB-client branch) carries the same unmatched-decode half-conversion #407/#408 fixed in-process; it's latent only because every shipping app stores encoded-into-UNORM.
Changes
docs/adr/ADR-021(new) — the encoding-state contract:LINEAR/ENCODED/EITHER) and the runtime declares per-frame what it sends. Production DPs typically acceptEITHER, so the runtime never converts at the boundary.linear_to_srgb()is to be removed).compositor-pipeline.md— corrects the wrong "DP expects linear input" assertion to the declared-handoff model; documents the latent sRGB-SRV half-conversion.vendors/leia/weaver.md— maps the vendor SDK's sRGB-conversion knob to the ADR contract + records the plug-in wiring gaps. (Vendor specifics live here, not in the ADR.)comp_d3d11_service.cpp— one-shot guard + corrected comment on the per-client sRGB-SRV branch.Not in this PR (specified in the ADR as next steps)
process_atlas()per-frame atlas-encoding argument + the DP-vtable capability field (ABI work per ADR-020).Test
Docs + a one-shot
U_LOG_Wbehind astatic bool; no runtime behavior change. The guarded branch is dead in practice today.🤖 Generated with Claude Code