Syntax
Parameters
pHeapType: ID3D12Heap * A pointer to the ID3D12Heap interface that represents the heap in which the resource is placed. HeapOffset
Type: UINT64 The offset, in bytes, to the resource. The HeapOffset must be a multiple of the resource’s alignment, and HeapOffset plus the resource size must be smaller than or equal to the heap size. GetResourceAllocationInfo must be used to understand the sizes of texture resources. pDesc
Type: const D3D12_RESOURCE_DESC1 * A pointer to a D3D12_RESOURCE_DESC structure that describes the resource. InitialLayout
Type: D3D12_BARRIER_LAYOUT The initial layout of the texture resource; D3D12_BARRIER_LAYOUT::D3D12_BARRIER_LAYOUT_UNDEFINED for buffers. pOptimizedClearValue
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, your application 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. NumCastableFormats
Type: UINT32 The number of elements in pCastableFormats. pCastableFormats
Type: DXGI_FORMAT * A contiguous array of DXGI_FORMAT structures that this resource can be cast to. riid
Type: const IID & The globally unique identifier (GUID) for the resource interface. 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) gets 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, then creation fails with E_NOINTERFACE.
ppvResourceType: void ** 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 pResourceDesc and other parameters are valid.
Return value
Type: HRESULT This method returns E_OUTOFMEMORY if there is insufficient memory to create the resource. See Direct3D 12 Return Codes for other possible return values.Remarks
See Remarks for ID3D12Device::CreatePlacedResource.Requirements
Header: d3d12_xs.hLibrary: d3d12_xs.lib
Supported Platforms: XBOX Series consoles
