Skip to content

HDR10: FP16 adapter contract, per-mode wire depth, format-aware ring#12

Merged
NorthernLights merged 4 commits into
mainfrom
feat/hdr10
Jul 20, 2026
Merged

HDR10: FP16 adapter contract, per-mode wire depth, format-aware ring#12
NorthernLights merged 4 commits into
mainfrom
feat/hdr10

Conversation

@NorthernLights

Copy link
Copy Markdown
Member

Summary

Enables the HDR10 support that luminal-vgd-core has carried since the libvirtualdisplay fold-in:

  • SHELL_CAPS advertises HDR10 + SDR10_BIT; hdr=1/bit_depth=110 CREATE_MONITOR requests validate and the EDID grows its CTA-861.3 HDR static metadata block.
  • Full IDDCX_ADAPTER_FLAGS_CAN_PROCESS_FP16 contract per IddCx 1.10: FP16 adapter flag + high/wide color-space target caps + EvtIddCxMonitorSetGammaRamp registered (GammaSupport = SOFTWARE) + swapchain worker acquiring via IddCxSwapChainReleaseAndAcquireBuffer2 (METADATA2). The flag without the gamma DDI + Buffer2 fails AdapterInitAsync with STATUS_INVALID_PARAMETER — diagnosed via ETW breadcrumbs, recorded in CLAUDE.md.
  • Per-mode wire bit depth (8/10/12) in the *2 mode DDIs instead of pinned SDR-8.
  • Ring textures follow the acquired frame's DXGI format; advanced-color toggles (BGRA8 ⇄ FP16) retire textures with a generation bump like size changes.
  • FFI exports VGD_CAP_HDR10/VGD_CAP_SDR10_BIT (compile-time asserted against proto caps).
  • DRIVER_BUILD bumped to 2.

Verification (signed build 2 installed, RTX 5080, Moonlight HDR + YUV 4:4:4)

  • Device starts clean; handshake caps 0x185.
  • HDR monitor 3456×2160@240 created; Windows advanced color engages off our EDID (capture reports max 993.5 nits from the CTA block); exclusive topology applies with hdr_state: Enabled.
  • Ring publishes FP16 scRGB (DXGI_FORMAT_R16G16B16A16_FLOAT latched by the LuminalShine ring reader); HEVC Main10 yuv444 stream with Sent HDR mode: true; extended session incl. idle periods, stable ~5 ms frame latency.
  • 91 workspace tests pass.

🤖 Generated with Claude Code

NorthernLights and others added 4 commits July 20, 2026 05:35
Enable the HDR support that luminal-vgd-core has carried since the
libvirtualdisplay fold-in (HDR EDID with CTA-861.3 static metadata,
BitDepth::Hdr10 validation, caps::HDR10 gating):

- SHELL_CAPS advertises HDR10 + SDR10_BIT, unlocking hdr=1/bit_depth=10
  CREATE_MONITOR requests (core validates; EDID grows the HDR block).
- Adapter caps declare CAN_PROCESS_FP16 and QueryTargetInfo reports the
  high/wide color-space target caps so the OS offers advanced color.
- ParseMonitorDescription2/QueryTargetModes2 report the session's real
  wire bit depth per mode (8/10/12) instead of pinning SDR-8.
- Ring textures follow the acquired frame's DXGI format (BGRA8 <-> FP16
  on advanced-color toggles); a format change retires textures with a
  generation bump exactly like a size change, so the host re-opens and
  re-latches. RingTexturesCreated traces the format.
- SetDefaultHdrMetaData traces type/size instead of silently ignoring.
- FFI exports VGD_CAP_HDR10 / VGD_CAP_SDR10_BIT (literal mirrors of
  proto caps, compile-time asserted) for host capability gating.

91 workspace tests pass; live HDR verification needs a signed driver
install (eSigner round).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AdapterInitAsync failed STATUS_INVALID_PARAMETER (ETW breadcrumb) with
the FP16 flag alone: IddCx 1.10 defines the flag as a promise that the
driver implements the full HDR pipeline. Two obligations were missing:

- EvtIddCxMonitorSetGammaRamp (the HDR 3x4 matrix path) — now
  registered, with GammaSupport = SOFTWARE instead of the contradictory
  NONE. Our pipeline is pass-through (ring consumers get the composed
  FP16 scRGB desktop; the host encoder converts colorspace), so the
  matrix is acknowledged and traced, not applied to pixels.
- IddCxSwapChainReleaseAndAcquireBuffer2 — the worker now acquires via
  the v1.10 variant (IDDCX_METADATA2: per-frame HDR metadata, surface
  color space, SDR white level; same pSurface/QPC fields otherwise).
  Safe unconditionally: IddMinimumVersionRequired = 10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@NorthernLights
NorthernLights merged commit 6de0a9f into main Jul 20, 2026
1 check passed
@NorthernLights
NorthernLights deleted the feat/hdr10 branch July 20, 2026 18:08
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.

2 participants