HDR10: FP16 adapter contract, per-mode wire depth, format-aware ring#12
Merged
Conversation
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>
|
|
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
Enables the HDR10 support that luminal-vgd-core has carried since the libvirtualdisplay fold-in:
SHELL_CAPSadvertisesHDR10 + SDR10_BIT;hdr=1/bit_depth=110CREATE_MONITOR requests validate and the EDID grows its CTA-861.3 HDR static metadata block.IDDCX_ADAPTER_FLAGS_CAN_PROCESS_FP16contract per IddCx 1.10: FP16 adapter flag + high/wide color-space target caps +EvtIddCxMonitorSetGammaRampregistered (GammaSupport = SOFTWARE) + swapchain worker acquiring viaIddCxSwapChainReleaseAndAcquireBuffer2(METADATA2). The flag without the gamma DDI + Buffer2 failsAdapterInitAsyncwithSTATUS_INVALID_PARAMETER— diagnosed via ETW breadcrumbs, recorded in CLAUDE.md.VGD_CAP_HDR10/VGD_CAP_SDR10_BIT(compile-time asserted against proto caps).Verification (signed build 2 installed, RTX 5080, Moonlight HDR + YUV 4:4:4)
caps 0x185.hdr_state: Enabled.DXGI_FORMAT_R16G16B16A16_FLOATlatched by the LuminalShine ring reader); HEVC Main10 yuv444 stream withSent HDR mode: true; extended session incl. idle periods, stable ~5 ms frame latency.🤖 Generated with Claude Code