> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EnqueueMakeResident

> Asynchronously makes objects resident for the device.

Asynchronously makes objects resident for the device.

## Syntax

```cpp theme={null}
HRESULT EnqueueMakeResident(
    D3D12_RESIDENCY_FLAGS Flags,
    UINT NumObjects,
    ID3D12Pageable const  ppObjects,
    ID3D12Fence  pFenceToSignal,
    UINT64 FenceValueToSignal
)
```

### Parameters

*Flags*<br />Type: D3D12\_RESIDENCY\_FLAGS

Controls whether the objects should be made resident if the application is over its memory budget.

*NumObjects*<br />Type: UINT

The number of objects  in the <i>ppObjects</i> array to make resident for the device.

*ppObjects \[in]*<br />Type: ID3D12Pageable \*const \*

A pointer to a memory block; contains an array of [ID3D12Pageable](/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public) interface pointers for the objects.

Even though most D3D12 objects inherit from [ID3D12Pageable](/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public), residency changes are only supported on the following:

<ul>
  <li>descriptor heaps</li>
  <li>heaps</li>
  <li>committed resources</li>
  <li>query heaps</li>
</ul>

*pFenceToSignal \[in]*<br />Type: ID3D12Fence \*

A pointer to the fence used to signal when the work is done.

*FenceValueToSignal*<br />Type: UINT64

An unsigned 64-bit value signaled to the fence when the work is done.

### Return value

Type: HRESULT

This method returns one of the [Direct3D 12 Return Codes](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12-graphics-reference-returnvalues).

## Remarks

**EnqueueMakeResident** performs the same actions as [MakeResident](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_makeresident_public), but does not wait for the resources to be made resident. Instead, **EnqueueMakeResident** signals a fence when the work is done.

The system will not allow work that references the resources that are being made resident by using **EnqueueMakeResident** before its fence is signaled. Instead, calls to this API are guaranteed to signal their corresponding fence in order, so the same fence can be used from call to call.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h<br />**Library:** d3d12\_xs.lib or d3d12\_x.lib<br />**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)

[ID3D12Device3](/reference/graphics/d3d12_x/interfaces/id3d12device3/id3d12device3)


## Related topics

- [D3D12_RESIDENCY_FLAGS](/reference/graphics/d3d12/enums/d3d12_residency_flags_public.md)
- [MakeResident](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_makeresident_public.md)
- [ID3D12Pageable](/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public.md)
- [Evict](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_evict_public.md)
- [XApuEnqueueCommand](/reference/audio/xapu/functions/xapuenqueuecommand.md)
