> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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*\
Type: D3D12\_RESIDENCY\_FLAGS

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

*NumObjects*\
Type: UINT

The number of objects  in the *ppObjects* array to make resident for the device.

*ppObjects \[in]*\
Type: ID3D12Pageable \*const \*

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

Even though most D3D12 objects inherit from [ID3D12Pageable](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public.md), 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]*\
Type: ID3D12Fence \*

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

*FenceValueToSignal*\
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](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_makeresident_public.md), 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\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device](https://docs.xbox.com/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device.md)

[ID3D12Device3](https://docs.xbox.com/reference/graphics/d3d12_x/interfaces/id3d12device3/id3d12device3.md)


## Related topics

- [D3D12_RESIDENCY_FLAGS](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_residency_flags_public.md)
- [MakeResident](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_makeresident_public.md)
- [ID3D12Pageable](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public.md)
- [EnqueueRequest](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuerequest.md)
- [EnqueueSignal](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuesignal.md)
