IHolographicCameraInterop::CreateDirect3D12HardwareProtectedBackBufferResource method (windows.graphics.holographic.interop.h)

The CreateDirect3D12HardwareProtectedBackBufferResource method creates a Direct3D 12 resource for use as a back buffer for the corresponding HolographicCamera API object, with optional hardware-based content protection.

The behavior of CreateDirect3D12HardwareProtectedBackBufferResource is the same as that of CreateDirect3D12BackBufferResource, except that it accepts an optional ID3D12ProtectedResourceSession API object interface pointer. Provide a Direct3D 12 protected resource session via this optional parameter to create a resource buffer with hardware-based content protection enabled.

Syntax

HRESULT CreateDirect3D12HardwareProtectedBackBufferResource(
  ID3D12Device                   *pDevice,
  D3D12_RESOURCE_DESC            *pTexture2DDesc,
  ID3D12ProtectedResourceSession *pProtectedResourceSession,
  ID3D12Resource                 **ppCreatedTexture2DResource
);

Parameters

pDevice

Type: ID3D12Device*

A Direct3D 12 device, which will be used to create the resource.

pTexture2DDesc

Type: D3D12_RESOURCE_DESC*

The Direct3D 12 resource description.

CreateDirect3D12HardwareProtectedBackBufferResource adjusts the description as needed to comply with platform requirements, such as buffer size or format restrictions, which are determined at runtime. Your application should inspect the descriptor for the texture returned in ppCreatedTexture2DResource and respond appropriately to any differences from what was specified.

pProtectedResourceSession

Type: ID3D12ProtectedResourceSession*

An optional Direct3D 12 protected resource session. Passing in a valid protected session will cause this method to create a Direct3D 12 hardware-protected resource.

ppCreatedTexture2DResource

Type: ID3D12Resource**

If successful, the hardware-protected Direct3D 12 2D texture resource for use as a back buffer. Otherwise, nullptr.

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