Commit Graph

38 Commits

Author SHA1 Message Date
jeremy moore
de3522e243 #jira UE-150031
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]
2022-04-25 19:13:25 -04:00
jeannoe morissette
6939189858 VulkanRHI: Fix occasional layout error in VT depending on which pass runs first after it's resized.
#rb Jeremy.Moore, Mihnea.Balta
#preflight 622a159303062eac59d0f9d0

[CL 19336166 by jeannoe morissette in ue5-main branch]
2022-03-10 10:28:17 -05:00
jeremy moore
9ba4a22386 #jira UE-121386
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]
2022-02-02 07:39:44 -05:00
robomerge
59cfb151d4 Use RendererOnScreenNotification for VirtualTextureSystem on screen messages.
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 18382062 in //UE5/Release-5.0/... via CL 18382068
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18382287 by robomerge in ue5-release-engine-test branch]
2021-12-06 10:13:07 -05:00
jeremy moore
20b68efb5f #jira UE-135506
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]
2021-12-03 16:20:55 -05:00
jeremy moore
30d9ab97ef Add Virtual Texture CSV stats.
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]
2021-12-03 13:27:21 -05:00
sebastien lussier
cbdda393e1 Prefetch render resources for HLODs before unloading a WP cell
* 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]
2021-12-03 10:22:29 -05:00
jeremy moore
877e51c5cc Add hash for allocated virtual textures that can persist across runs.
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]
2021-12-03 01:10:59 -05:00
jeremy moore
be05ec480b Disabled VT pool notifications by default.
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]
2021-08-10 10:51:03 -04:00
jeremy moore
e3b07e972d Add r.vt.DumpPoolUsage.
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]
2021-08-02 23:44:36 -04:00
jeremy moore
7124ab4a00 #jira UE-117953
#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]
2021-06-20 18:47:26 -04:00
ben ingram
439afdb8e9 Restore functionality to automatically map newly allocated VTs, but only for lowest resolution mip level
- 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]
2021-05-12 21:59:47 -04:00
Ben Ingram
9468976c1d Don't try to map all resident pages to newly allocated VTs. Too slow, especially for large VTs
- 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]
2021-05-05 13:09:24 -04:00
Ben Ingram
71d9de4675 Display on-screen message when VT pool is oversubscribed
#rb none
#jira none

[CL 16201143 by Ben Ingram in ue5-main branch]
2021-05-04 19:20:32 -04:00
Ben Ingram
e6c2c85df5 Fixes for UDIM VTs in texture editor
UDIMs use transformed UVs, account for these when computing visible regions
#rb none
#jira none

[CL 15926164 by Ben Ingram in ue5-main branch]
2021-04-05 21:56:26 -04:00
Ben Ingram
60478d3652 VT allocator improvements
- 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]
2021-03-25 12:40:35 -04:00
Jeremy Moore
8fe393561d Ensure that locked pages are still flushed after a virtual texture flush command.
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]
2020-11-12 16:08:00 -04:00
zach bethel
2bc88676d6 Converted virtual texture system and GPU lightmass to RDG.
#rb yujiang.wang, jeremy.moore
#jira none

[CL 14581416 by zach bethel in ue5-main branch]
2020-10-26 16:44:44 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
jeremy moore
71c2e4b2bf Add continuous update flag to RVT asset
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]
2020-05-05 12:03:31 -04:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#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]
2019-12-26 14:45:42 -05:00
jeremy moore
534d291e59 Fix virtual texture feedback for multiple views
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]
2019-11-12 15:02:14 -05:00
jeremy moore
a24eea9e6f Better CSV stat to track percentage of virtual texture physical space is being used
#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]
2019-10-07 13:25:21 -04:00