IHolographicQuadLayerInterop::AcquireDirect3D12BufferResource method (windows.graphics.holographic.interop.h)
The AcquireDirect3D12BufferResource method transitions ownership of a Direct3D 12 content buffer resource from the platform to your application. If your application already owns control of the resource, then the acquisition is still considered to be a success.
After committing a resource to a HolographicFrame by calling IHolographicQuadLayerUpdateParametersInterop::CommitDirect3D12Resource, your application should consider control of that resource to be relinquished to the system until such a time as it is reacquired by your application using AcquireDirect3D12BufferResource. The system owns the buffer until it is no longer needed for presenting the quad layer. To determine whether the system has relinquished control of the buffer, call AcquireDirect3D12BufferResource or AcquireDirect3D12BufferResourceWithTimeout. If the buffer can't be acquired by the time your application is ready to start rendering a new update for the quad layer, then you should create a new resource and add it to the buffer queue, or limit the queue size by waiting for a buffer to become available.
If the buffer is not ready to be acquired when this method is called, the method call fails and immediately returns the error code E_NOTREADY.
Your application can limit the queue size by calling AcquireDirect3D12BufferResourceWithTimeout to wait until a resource becomes available before queuing more work.
Syntax
HRESULT AcquireDirect3D12BufferResource(
ID3D12Resource *pResourceToAcquire,
ID3D12CommandQueue *pCommandQueue
);
Parameters
pResourceToAcquire
Type: ID3D12Resource*
The Direct3D 12 resource to acquire. The resource will be in the D3D12_RESOURCE_STATE_COMMON state when it is acquired.
pCommandQueue
Type: ID3D12CommandQueue*
The Direct3D 12 command queue to use for transitioning the state of this resource when acquiring it for your application.
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 |