Creates a resource that is reserved, which is not yet mapped to any pages in a heap.
HRESULT CreateReservedResource( const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riid, void **ppvResource );
Type: const D3D12_RESOURCE_DESC*
A pointer to a D3D12_RESOURCE_DESC structure that describes the resource.
The initial state of the resource, as a bitwise-OR'd combination of D3D12_RESOURCE_STATES enumeration constants.
Type: const D3D12_CLEAR_VALUE*
Specifies a D3D12_CLEAR_VALUE that describes the default value for a clear color.
pOptimizedClearValue specifies a value for which clear operations are most optimal. When the created resource is a texture with either the D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET or D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL flags, applications should choose the value that the clear operation will most commonly be called with. Clear operations can be called with other values, but those operations will not be as efficient as when the value matches the one passed into resource creation. pOptimizedClearValue must be NULL when used with D3D12_RESOURCE_DIMENSION_BUFFER.
The globally unique identifier (GUID) for the resource interface. See Remarks. This is an input parameter.
The REFIID, or GUID, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12Resource) will get the GUID of the interface to a resource. Although riid is, most commonly, the GUID for ID3D12Resource, it may be any GUID for any interface. If the resource object doesn't support the interface for this GUID, creation will fail with E_NOINTERFACE.
A pointer to a memory block that receives a pointer to the resource. ppvResource can be NULL, to enable capability testing. When ppvResource is NULL, no object will be created and S_FALSE will be returned when pDesc is valid.
This method returns E_OUTOFMEMORY if there is insufficient memory to create the resource. See Direct3D 12 Return Codes for other possible return values.
CreateReservedResource is equivalent to D3D11_RESOURCE_MISC_TILED in D3D11. It creates a resource with virtual memory only, no backing store. The resource must be mapped to physical memory (that is, heaps) using CopyTileMappings and UpdateTileMappings.
These resource types can only be created when the adapter supports tiled resource tier 1 or greater. The tiled resource tier defines the behavior of accessing a resource that is not mapped to a heap.