microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
5.88k stars 2k forks source link

Several Residency Manager improvements/fixes from UE5/The Coalition #837

Open wallisc opened 11 months ago

wallisc commented 11 months ago

This adds several new functions to the residency manager as well as a bug fix:

New Functionality:

  1. The ability to query the amount of resident and evicted memory from the residency manager. The ability to view evicted memory has also been added to the sample.
    1. The ability to specify a custom local memory budget. In UE5, this is can be used with value 0 when the app is detected to be out of focus so that it can trigger extremely aggressive memory eviction. This is particularly important for when using the UE5 editor and you're launching the game as a separate process.

Bug Fix:

  1. Fixing the parameters for EnqueueMakeResident, according to the Epic change history this fix came from Microsoft originally so unclear why this isn't reflected in the github repo