Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An indirect display driver calls IddCxSwapChainReleaseAndAcquireBuffer2 to release the current buffer in the swap chain and acquire a new one. A driver that supports HDR adapters must use IddCxSwapChainReleaseAndAcquireBuffer2 instead of IddCxSwapChainReleaseAndAcquireBuffer and IddCxSwapChainReleaseAndAcquireSystemBuffer.
Syntax
HRESULT IddCxSwapChainReleaseAndAcquireBuffer2(
IDDCX_SWAPCHAIN SwapChainObject,
IDARG_IN_RELEASEANDACQUIREBUFFER2 *pInArgs,
IDARG_OUT_RELEASEANDACQUIREBUFFER2 *pOutArgs
);
Parameters
SwapChainObject
[in] The swap-chain object previously passed by the OS to the driver in a EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN call.
pInArgs
[in] Pointer to an IDARG_IN_RELEASEANDACQUIREBUFFER2 structure containing the input arguments for the function.
pOutArgs
[out] Pointer to an IDARG_OUT_RELEASEANDACQUIREBUFFER2 structure in which the output arguments of the function are returned.
Return value
IddCxSwapChainReleaseAndAcquireBuffer2 returns S_OK on success; otherwise it returns an appropriate error code.
Remarks
The color space of the surface passed in the IDDCX_METADATA2 struct is also passed to the driver. This is because it may change on a per frame basis and not match the color space specified when a mode was committed.
Similarly, the pixel format of the provided surface can change on a frame-by-frame basis. For example, if an HDR mode is committed on a path, this does not guarantee that every surface will be an FP16 surface.
The white level for SDR content is also included to be applied to mouse cursors.
If IDDCX_METADATA2_VALID_FLAGS_HDR10METADATA is set in IDDCX_METADATA2::ValidFlags then IDDCX_METADATA2::Hdr10FrameMetaData contains valid data. This metadata can be one of three types:
- New data that the driver should use.
- An indication that the default metadata previously sent to the driver in a call to EVT_IDD_CX_MONITOR_SET_DEFAULT_HDR_METADATA should be used.
- An indication that whatever metadata was previously sent should be used again. When the type is default or unchanged then the values in IDDCX_HDR10_FRAME_METADATA::NewMetaData are invalid.
IddCxSwapChainReleaseAndAcquireBuffer2 also replaces IddCxSwapChainReleaseAndAcquireSystemBuffer. A driver that would have called IddCxSwapChainReleaseAndAcquireSystemBuffer can set IDARG_IN_RELEASEANDACQUIREBUFFER2::AcquireSystemMemoryBuffer to indicate it needs IDDCX_METADATA2::SystemBufferInfo filled in.
Version 1.10 drivers that don't report FP16 support can still call this function if it's available in the OS.
For more information about HDR support, see IddCx version 1.10 updates.
When D3D12 swap chain surfaces are provided to a driver, there's some extra data that must be passed to the OS to ensure access to the surface is synchronized correctly with the OS. The ID3D12CommandQueue object in the driver submits commands on that use the swap chain surface as an input must be indicated to the OS so it can correctly synchronize the driver reads with the OS writes.
At the point the driver calls IddCxSwapChainReleaseAndAcquireBuffer2, the OS uses this as an indication that the driver is ready to submit work that uses the swap chain surface. If the driver submits other work to the same command queue, this could be delayed unnecessarily.
Remote HDR metadata
The OS won't pass HDR metadata to remote drivers because the HDR metadata on the client system should be used, not any generated by the server. For remote drivers IDDCX_METADATA2_VALID_FLAGS_HDR10METADATA will never be set.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 11, 26H1 (IddCx 1.11) |
| Target Platform | Windows |
| Header | iddcx.h |
See also
IDARG_IN_RELEASEANDACQUIREBUFFER2