ID3D11On12Device::CreateWrappedResource method (d3d11on12.h)

This method creates D3D11 resources for use with D3D 11on12.

Syntax

HRESULT CreateWrappedResource(
  [in]            IUnknown                   *pResource12,
  [in]            const D3D11_RESOURCE_FLAGS *pFlags11,
                  D3D12_RESOURCE_STATES      InState,
                  D3D12_RESOURCE_STATES      OutState,
                  REFIID                     riid,
  [out, optional] void                       **ppResource11
);

Parameters

[in] pResource12

Type: IUnknown*

A pointer to an already-created D3D12 resource or heap.

[in] pFlags11

Type: const D3D11_RESOURCE_FLAGS*

A D3D11_RESOURCE_FLAGS structure that enables an application to override flags that would be inferred by the resource/heap properties. The D3D11_RESOURCE_FLAGS structure contains bind flags, misc flags, and CPU access flags.

InState

Type: D3D12_RESOURCE_STATES

The use of the resource on input, as a bitwise-OR'd combination of D3D12_RESOURCE_STATES enumeration constants.

OutState

Type: D3D12_RESOURCE_STATES

The use of the resource on output, as a bitwise-OR'd combination of D3D12_RESOURCE_STATES enumeration constants.

riid

Type: REFIID

The globally unique identifier (GUID) for the wrapped resource interface. The REFIID, or GUID, of the interface to the wrapped resource can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12Resource) will get the GUID of the interface to a wrapped resource.

[out, optional] ppResource11

Type: void**

After the method returns, points to the newly created wrapped D3D11 resource or heap.

Return value

Type: HRESULT

This method returns one of the Direct3D 12 Return Codes.

Requirements

   
Target Platform Windows
Header d3d11on12.h
Library D3D11.lib
DLL D3D11.dll

See also

ID3D11On12Device