Fix MipLevel sample mode with Adaptive Virtual Texture.
#preflight 61f88a0bf657e25a590668d4
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18803237 in //UE5/Release-5.0/... via CL 18803254 via CL 18821582
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
[CL 18821667 by jeremy moore in ue5-main branch]
#preflight 616de66ed48c46000176b699
#lockdown michal.valient
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17852833 via CL 18003968 via CL 18369727 via CL 18369804
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18369845 by jeremy moore 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]
- 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]
- Need to include LocalMipBias, otherwise may not be any data at AllocatedVT's MaxLevel for sparse UDIMs
- Check for overflow when adding lock requests, keep overflow requests around to try again next frame
#rb none
#jira none
[CL 16194638 by Ben Ingram in ue5-main branch]
- If filtering is disabled, we'll still avoid using SampleGrad (which should still avoid most of the shader overhead)
- This way the computed VT mip level will match the non-VT mip level much more closely
Also tweak the way noise is mixed in to VT mip level, better match HW formular (also slightly cheaper)
#rb none
#jira UE-108270
[CL 15903344 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]
- Need to make sure wrapped vAddress is properly used in all cases, otherwise can end up with duplicate/inconsistent page mappings
#rb none
#jira UESP-4030, UESP-4017
[CL 14580045 by Ben Ingram in ue5-main branch]
This had been broken by a previous changelist (9751925)
#jira none
#rb none
#ROBOMERGE-SOURCE: CL 12382248 in //UE4/Release-4.25/... via CL 12382250
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v671-12333473)
[CL 12382257 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]