Id3d12device3::CreatePipelineStateOpenExistingHeapFromFileMapping method

Creates a special-purpose diagnostic heap in system memory from a file mapping handle. The created heap can persist even in the event of a GPU-fault or device-removed scenario.

Syntax

HRESULT CreatePipelineStateOpenExistingHeapFromFileMapping(
  [in]  HANDLE hFileMapping,
        REFIID riid,
  [out] void   **ppvHeap
);

Parameters

  • hFileMapping [in]
    Type: HANDLE

    The file mapping handle used to create the heap.

  • riid
    Type: REFIID

    The globally unique identifier (GUID) for the heap interface (ID3D12Heap).

    The REFIID, or GUID, of the interface to the heap can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12Heap) will retrieve the GUID of the interface to a heap.

  • ppvHeap [out]
    Type: void**

    SAL: _COM_Outptr_

    A pointer to a memory block; on success, returns a pointer to the ID3D12Heap interface for the pipeline state object.

    The pipeline state object is an immutable state object. It contains no methods.

Return value

Type: HRESULT

This method returns E_OUTOFMEMORY if there is insufficient memory to create the pipeline state object. See Direct3D 12 Return Codes for other possible return values.

Remarks

The heap is created in system memory and permits CPU access. It wraps the entire VirtualAlloc region.

Heaps can be used for placed and reserved resources, as orthogonally as other heaps. Restrictions may still exist based on the flags that cannot be app-chosen.

Requirements

Header

D3d12.h

Library

D3d12.lib

DLL

D3d12.dll

See also

Id3d12device3