Force release of pages from the LRU virtual texture page pool if we are requesting a locked page.
This reduces case where new virtual texture producer can't map the root page.
Also only update adaptive VT indirection texture when the allocated VT root page is mapped.
#preflight 6266cb475037f70ba0ec6ffe
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 19905455 in //UE5/Release-5.0/... via CL 19910219
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 19911479 by jeremy moore in ue5-main branch]
Fix invalidation of Adaptive Virtual Textures.
We need to gather all of the Allocated VTs in the AVT and invalidate the pagaes associated with their individual producers.
#preflight 61f9aaa64404d5fadefdd8d4
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18816214 in //UE5/Release-5.0/... via CL 18816220 via CL 18822814
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18824368 by jeremy moore in ue5-main branch]
Flush virtual textures pending delete before allocating new virtual textures if we are about to exceed virtual texture space limit.
Avoids hitting space limit in some cases where pending queue is otherwise slow to flush (such as during cook).
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18272825 via CL 18373227 via CL 18373285
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18373440 by jeremy moore in ue5-release-engine-test branch]
Will help determine future VT pool size changes.
#rb andrew.firth
#preflight 616f0c8e6e12ff0001305f52
#lockdown Michal.Valient
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17865095 via CL 18004160 via CL 18370046 via CL 18370143
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18370163 by jeremy moore in ue5-release-engine-test branch]
* Warmup will trigger resource prefetching and delay unloading of cells for a number of frames
* Enable HLOD assets warmup: wp.Runtime.HLOD.WarmupEnabled 0|1
* Number of warmup frames: wp.Runtime.HLOD.WarmupNumFrames n
* Currently only prefetching VT, Nanite prefetching to be added in another CL
Currently disabled (see "wp.Runtime.HLOD.WarmupNumFrames=0" in the device profiles ini)
#rb jeanfrancois.dube, jeremy.moore, andrew.firth
[FYI] chance.ivey, rune.stubbe
#lockdown andrew.firth
#preflight 6165d2b3e296ed0001f9a53e
#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 17789214 via CL 17986920 via CL 18368433 via CL 18368532
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18368579 by sebastien lussier in ue5-release-engine-test branch]
Use this as id for recording and playback of virtual texture feedback.
Flesh out API for recording and playback of collected ids.
#preflight 61530aa080eba00001a511b6
#rb ben.ingram
#lockdown michal.valient
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17653384 via CL 17965453 via CL 18365635 via CL 18365739
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18365816 by jeremy moore in ue5-release-engine-test branch]
Enable with r.VT.Residency.Notify
Default VT residency mip map on for default pools.
This is overridable per project and per pool.
#rb none
#preflight 61128bb272fe2c00013a846c
#ROBOMERGE-SOURCE: CL 17116695 via CL 17116736
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17116751 by jeremy moore in ue5-release-engine-test branch]
This outputs the physical tile footprint of each VT producer.
Useful for finding producers that are using up most of the physical cache.
#rb none
#preflight 6108b0b72b00280001195a54
#ROBOMERGE-SOURCE: CL 17025048 via CL 17025049
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)
[CL 17025051 by jeremy moore in ue5-release-engine-test branch]
#jira UE-109349
Add mip map bias for virtual texture sampling.
Respects the existing r.MiipMapLodBias CVar.
Also add residency tracking for each virtual texture physical pool.
If the pool has been created from a config with the bEnableResidencyMipMapBias flag set then a mip map lod bias is applied to bring the pool back within budget.
The residency mip map lod bias is applied globally (combined with the global mip map lod bias).
In future it could be good to apply the mip map lod bias per physical pool, but this will require tracking all physical pool combinations for each page table.
Physical pool residency tracking can be shown on screen with r.vt.residency.show CVar.
#rb ben.ingram
#ROBOMERGE-SOURCE: CL 16724483 via CL 16724487
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16724488 by jeremy moore in ue5-release-engine-test branch]
- This should be much faster than previous code which attempted to map all mip levels
- Need to ensure at least lowest resolution mip is mapped, in order to avoid rendering frames with garbage data mapped
- Add warning for AllocatedVTs that never manage to complete this mappings
#rb none
#jira none
#ROBOMERGE-SOURCE: CL 16308484 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v800-16297934)
[CL 16308810 by ben ingram in ue5-release-engine-test branch]
- Instead, keep VT cached for a few frames after they are deleted, this way they can be re-used if they're deleted/recreated due to state changes
- This should solve the problem of material changes causing pages to become unmapped for a few frames
#rb none
#jira none
[CL 16209506 by Ben Ingram in ue5-main branch]
- Check partially allocated block for fit, don't need to start with a completely free block for allocations
- Try to use the lowest possible vAddress for new allocations, this reduces the texture area covered by allocations
- Page table is no longer required to be square power-2 texture, instead allow it to grow organically as allocated area increases
- Allocator starts with maximum-sized block and tracks allocated area, no longer needs special logic to 'grow'
- Rectangular allocated VTs now mip based on min-size rather than max-size, relaxes alignment requirements and allows better packing
#rb jeremy.moore
#jira none
[CL 15825578 by Ben Ingram in ue5-main branch]
Previously for streaming pages, the request would return pending, but because the page is mapped, no subsequent request would occur.
#rb none
[CL 14738087 by Jeremy Moore in ue5-main branch]
Add VT scalability setting for throttling continuous updates
#ROBOMERGE-SOURCE: CL 13181235 via CL 13181238 via CL 13181240 via CL 13181249
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)
[CL 13181259 by jeremy moore in Main branch]
#rnx
#rb none
#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870549 by ryan durand in Main branch]
Also remove virtual texture time slice option which was never used/needed
#ROBOMERGE-SOURCE: CL 10114449 via CL 10115537 via CL 10115579
#ROBOMERGE-BOT: (v587-10111126)
[CL 10115610 by jeremy moore in Main branch]
#rb none
#ROBOMERGE-OWNER: jeremy.moore
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 9428260 via CL 9428262 via CL 9444157 via CL 9449047 via CL 9449237
#ROBOMERGE-BOT: (v495-9448618)
[CL 9451783 by jeremy moore in Main branch]