docs(adr): ADR-044 — the colour contract, per backend and swapchain format - #1761
Merged
Merged
Conversation
…ormat One table for what #1589/#1610 shipped across D3D11, the D3D11 service, D3D12, GL, vk_native (Windows / Linux / macOS-MoltenVK / Android) and Metal: - what each backend enumerates, in order; - what it does with an _SRGB vs a UNORM/float swapchain; - where layers blend; - what the DP receives; - which CTS test pins each row. It also records the rows that are NOT CTS-covered (vk_native on macOS and Android, Metal) and what guards them instead. The app rule fits in one line: write encoded colour into _SRGB, or linear into UNORM; prefer _SRGB, the same way on every leg. Amends ADR-021 (principles unchanged). Its "Model A" now reads as "the atlas is encoded", not "UNORM passes through". Pointers added from ADR-021, INV-4.6 and compositor-pipeline.md. Open rows are recorded, not fixed: - Metal is still pre-#1589 passthrough; - the IPC comp_multi paths are unaudited; - the displayxr-common Windows HUD swapchain is UNORM with display-referred bytes. Motivated by the 2026-09-28 washed-out demos: every demo's Android leg, plus avatar's macOS/Linux legs, picked UNORM and wrote display-referred bytes. Fixed app-side in gauss#138, avatar#113, earthview#76, modelviewer#154 and mediaplayer#89. The per-leg lint is in #1760. Co-Authored-By: Claude Opus 5.5 <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.
Summary
The rule. The swapchain's format says what its bytes mean, and the runtime believes it:
_SRGBholds encoded colour;This is OpenXR's rule, and the CTS judges it (
GradientFormatsLinearVsNonLinear,SourceAlphaBlending*, #1589/#1610). Every native compositor except Metal has followed it since v2.21.0–v2.21.7.The app rule: write encoded colour into
_SRGBor linear into UNORM; prefer_SRGB, and make the choice the same way on every platform leg.This PR adds ADR-044, which puts that into one table and amends ADR-021.
What ADR-044 contains
_SRGBvs UNORM/float handling, where layers blend, the DP handoff, and the release that shipped it.set_atlas_encoding, Model B, and the Leia CNSDK Android DP.DXR_ATLAS_CAPTURE_RAW_ALPHA, and trigger paths.vk_srgb_blend_probe;comp_multipaths are unaudited;Also in this PR
compositor-pipeline.md.Why now
On 2026-09-28 the demos were washed out:
Each of those legs picked UNORM and wrote display-referred bytes, which v2.21.7+ encodes a second time. Fixed app-side in:
The guide text and per-leg linter fix is #1760 (separate PR, independent of this one).
Checks run locally
gen_adr_index.py --check: OK.check_doc_paths.py: 894 links, OK.Docs-only, so CI short-circuits.
🤖 Generated with Claude Code