Skip to content

Color: declare EITHER + drive setShaderSRGBConversion from atlas encoding [ADR-021/#409]#27

Merged
dfattal merged 2 commits into
mainfrom
color-model-b-test
Jun 4, 2026
Merged

Color: declare EITHER + drive setShaderSRGBConversion from atlas encoding [ADR-021/#409]#27
dfattal merged 2 commits into
mainfrom
color-model-b-test

Conversation

@dfattal
Copy link
Copy Markdown
Contributor

@dfattal dfattal commented Jun 4, 2026

Pairs with displayxr-runtime #419 (ADR-021 color contract + Model B). Verified end-to-end on Leia hardware.

What changed

  • D3D11 DP declares XRT_DP_COLOR_EITHER (get_handoff_color_capability) and implements set_atlas_encoding. process_atlas drives leiasr_d3d11_set_srgb_conversion(read=false, write=(atlas == LINEAR)) so the SR weaver performs the matched output encode when the runtime composes in linear (Model B). The process_atlas format arg stays the real DXGI format (used for setInputViewTexture).
  • D3D12 / GL DPs: doc-only this PR — they stay Model-A/ENCODED passthrough. Exposing the weaver sRGB-conversion setter + declaring EITHER for those APIs is a tracked follow-up (the SDK provides it for every API variant).

⚠️ Coupling / merge order

This needs runtime headers that ship the appended get_handoff_color_capability + set_atlas_encoding DP-vtable slots (ABI major v2, append-only — no major bump). The pin here is still DXR_RUNTIME_GIT_TAG = v1.9.0, which predates those slots, so CI (FetchContent) will fail until runtime #419 is merged and a runtime release is tagged, then bump DXR_RUNTIME_GIT_TAG to that tag. Local builds succeed via DXR_RUNTIME_SOURCE_DIR.

Back-compat: because the slots are append-only and absent ⟹ ENCODED, an old runtime + this plugin = Model A, and a new runtime + old plugin = Model A. No lock-step required beyond the pin bump.

🤖 Generated with Claude Code

dfattal and others added 2 commits June 4, 2026 11:29
…s encoding [ADR-021/#409]

Pairs with displayxr-runtime #419 (ADR-021 color contract + Model B). Verified
end-to-end on Leia hardware.

- D3D11 DP declares XRT_DP_COLOR_EITHER and implements set_atlas_encoding;
  process_atlas drives leiasr_d3d11_set_srgb_conversion(read=false,
  write=(atlas == LINEAR)) so the weaver performs the matched output encode
  under Model B. The process_atlas `format` arg stays the real DXGI format.
- D3D12/GL DPs: doc-only (stay Model-A/ENCODED passthrough; exposing the
  weaver setter + declaring EITHER there is a tracked follow-up).

Requires runtime headers with the appended get_handoff_color_capability +
set_atlas_encoding slots (ABI major v2, append-only -- no major bump). Bump
DXR_RUNTIME_GIT_TAG to the runtime release that includes #419 before CI/merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ing)

Bump DXR_RUNTIME_GIT_TAG + workflow RUNTIME_REF from v1.9.0 to the merged
displayxr-runtime#419 commit (82b68ed1) so the plug-in builds against the
appended get_handoff_color_capability + set_atlas_encoding DP-vtable slots.
Re-pin to a runtime release tag at the next coupled versioned release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dfattal dfattal merged commit a045767 into main Jun 4, 2026
3 checks passed
@dfattal dfattal deleted the color-model-b-test branch June 4, 2026 21:21
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