Metal 4: Proper usage of requestResidency() with unique per-frame textures at 120fps

Hello, I have some confusion regarding ResidencySet. Specifically, about the requestResidency() function: how often should we call it?

I have a captureOutput(_:didOutput:from:) method that is triggered at 60 or 120 fps. Inside this method, I am calling the following code every frame:

computeResidencySet.removeAllAllocations()
сomputeResidencySet.addAllocation(TextureA)
computeResidencySet.addAllocation(TextureB)
computeResidencySet.addAllocation(TextureC)
computeResidencySet.commit()
computeResidencySet.requestResidency() // Should we call it every frame?

Please keep in mind that TextureA, TextureB, and TextureC are unique for each call (new instances are provided on every frame)."

Metal 4: Proper usage of requestResidency() with unique per-frame textures at 120fps
 
 
Q