IHolographicCameraRenderingParametersInterop::CommitDirect3D12ResourceWithDepthData method (windows.graphics.holographic.interop.h)

Commits a Direct3D 12 buffer for presentation on outputs associated with the HolographicCamera. The buffer must have been created by calling CreateDirect3D12BackBufferResource or CreateDirect3D12HardwareProtectedBackBufferResource on the same HolographicCamera that it is committed for.

This method also accepts an optional depth buffer parameter, along with fence and fence value for app work completion on that buffer. This depth buffer will be used for image stabilization when showing the frame it is committed to. The depth buffer must contain depth data correlated with geometry used to draw holograms in the color buffer, which is submitted at the same time. The depth buffer should not contain depth data for invisible content, such as depth data used for occlusion.

Syntax

HRESULT CommitDirect3D12ResourceWithDepthData(
  ID3D12Resource *pColorResourceToCommit,
  ID3D12Fence    *pColorResourceFence,
  UINT64         colorResourceFenceSignalValue,
  ID3D12Resource *pDepthResourceToCommit,
  ID3D12Fence    *pDepthResourceFence,
  UINT64         depthResourceFenceSignalValue
);

Parameters

pColorResourceToCommit

Type: ID3D12Resource*

The Direct3D 12 texture resource with content to display when presenting the HolographicFrame used to retrieve this rendering parameters object.

pColorResourceFence

Type: ID3D12Fence*

A fence used to signal app work completion on the color buffer resource indicated by pColorResourceToCommit. Completion of this fence at the value indicated by colorResourceFenceSignalValue signals transfer of control of the color resource from your application to the platform in the GPU work queue. The platform relies upon this fence, and the value indicated in colorResourceFenceSignalValue, to queue work on the GPU that reads from the color buffer.

colorResourceFenceSignalValue

Type: UINT64

The value used to signal work completion on pColorResourceFence. The platform relies upon this fence value to queue work on the GPU that reads from the color buffer.

pDepthResourceToCommit

Type: ID3D12Resource*

The Direct3D 12 depth buffer with depth data to use for image stabilization when presenting the HolographicFrame used to retrieve this rendering parameters object. Applications typically submit the depth stencil used when rendering to pColorResourceToCommit, or a depth buffer that is derived from the same rendering pass. The depth buffer should only include data corresponding to geometry used to render holograms in the color buffer; for example, occlusion data shouldn't be included, and may be ignored by the platform.

pDepthResourceFence

Type: ID3D12Fence*

A fence used to signal work completion on the depth buffer resource indicated by pDepthResourceToCommit. Completion of this fence at the value indicated by depthResourceFenceSignalValue signals transfer of control of the depth resource from your application to the platform in the GPU work queue. The platform relies upon this fence, and the value indicated in colorResourceFenceSignalValue, to queue work on the GPU that reads from the depth buffer.

depthResourceFenceSignalValue

Type: UINT64

The value used to signal work completion on pDepthResourceFence. The platform relies upon this fence value to queue work on the GPU that reads from the depth buffer.

Return value

S_OK if successful, otherwise returns an HRESULT error code indicating the reason for failure. Also see COM Error Codes (UI, Audio, DirectX, Codec).

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004 (10.0; Build 19041)
Minimum supported server Windows Server, version 2004 (10.0; Build 19041)
Header windows.graphics.holographic.interop.h