Commit Graph

113 Commits

Author SHA1 Message Date
zach bethel
7bda0efe14 Deprecated raw UAV access in VT API.
#preflight 628c07b7d8258814a9d8d882

[CL 20370291 by zach bethel in ue5-main branch]
2022-05-25 15:50:23 -04:00
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
eric renaudhoude
dec9758c1b VirtualTexture: Initial changes required for tiled media texture integration.
#jira UE-145503
#rb jeremy.moore
#fyi rod.bogart
#preflight 623a28fe89625f0612b6196f

[CL 19471356 by eric renaudhoude in ue5-main branch]
2022-03-22 16:05:58 -04:00
jeremy moore
216f02c7d6 #jira UE-119816
Check that producer is still valid before submitting a tile.
A producer will be invalid if it was freed while a deferred tile was waiting.
#preflight 62321c315932902f93555b22
#rb ben.ingram
#rnx

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 19408321 in //UE5/Release-5.0/... via CL 19409242
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19410445 by jeremy moore in ue5-main branch]
2022-03-16 15:30:58 -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
a37a76b9dc Throttle release of allocated virtual textures.
#rb jeanfrancois.dube
#preflight 6179b6d14c74960001ea6bca
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17962483 via CL 18008157 via CL 18370534 via CL 18370611
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18370672 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 13:52:39 -05:00
jon nabozny
6ba99692f9 When sampling VT use a fallback color held in a uniform if the root page isn't mapped.
#rb ben.ingram
#preflight 6175b24d875c1a0001aed3e4
#lockdown michal.valient

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17904945 via CL 18006803 via CL 18370387 via CL 18370436
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18370510 by jon nabozny in ue5-release-engine-test branch]
2021-12-03 13:43:10 -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
ce9a7ad0fd HLOD Warmup
* Enable warmup feature - No impact on memory (validated on XSS with 5 different runs with/without the feature)
* Fixed VT warmup - must perform the tile requests every frame so that it is effective
* Added scale factor & clamping (as cVars) for the VT requests
* Added debugging tools
* Fixed issue in FVirtualTextureSystem::RequestTilesInternal() where the same mip could be requested twice
* Fixed non-unity build

#preflight 61690678c46ae60001e4ebfc
#rb jeanfrancois.dube, rune.stubbe, jeremy.moore
#lockdown jeanfrancois.dube

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 17828400 via CL 18002889 via CL 18368839 via CL 18368865
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368877 by sebastien lussier in ue5-release-engine-test branch]
2021-12-03 10:48:26 -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
e17c769e22 Always sync locked VT tiles in Editor.
This waits correctly for DDC.
Fixes nightly render issues.
#rb jason.nadro
#preflight 61609ba898f25900019360d2
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17762847 via CL 17985640 via CL 18368077 via CL 18368129
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368150 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 09:57:17 -05:00
jeremy moore
d0b252cf4f Don't start waiting on produce tasks if we know that there is nothing to wait for.
#rb ben.ingram
#preflight 615f6d0451b6340001dfb866
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17757034 via CL 17985565 via CL 18368058 via CL 18368117
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368144 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 09:56:33 -05:00
jeremy moore
8754174a0d Fix VT page playback bias.
Was setting original LevelPlusOne instead of modified LevelPlusOne in the page id.
#rb ben.ingram
#preflight 615f29b0cec44a0001399a7b
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17752201 via CL 17985202 via CL 18368044 via CL 18368103
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368139 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 09:55:50 -05:00
jeremy moore
a9b70f7b5d Don't assert on case where locked tile is invalid to produce.
This must be happening after the change to defer producing locked tiles.
Needs some further investigation to understand why it is happening, but this quick fix should unblock.
#rb ben.ingram
#preflight trivial to unblock
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17736595 via CL 17982017 via CL 18367163 via CL 18367181
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18367188 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 03:23:08 -05:00
jeremy moore
e66533b874 Add support for mip bias of prestream VT page requests.
This includes a fixed per platform component and a dynamic component that takes into account the current pool residency mip bias.
#rb ben.ingram
#preflight 615c8efd184ecf0001211c86
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17725859 via CL 17979595 via CL 18366901 via CL 18366958
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366976 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 02:56:34 -05:00
jeremy moore
dae5645f4e Add r.VT.ProduceLockedTilesOnFlush to not sync when producing locked tiles.
#rb ben.ingram
#preflight 615c476d8c8edf00011b2a2a
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17720292 via CL 17979487 via CL 18366651 via CL 18366733
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366795 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 02:44:17 -05:00
jeremy moore
b9285121e7 Added a CVar to disable VT page playback.
#rb ben.ingram
#preflight 61563a656ed55a0001763a45
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17684931 via CL 17967447 via CL 18366105 via CL 18366199
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18366306 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 01:39:18 -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
748c4023e1 Allow multiple physical pools to be created for the same virtual texture format.
Producers will be randomly distributed between physical pools.
The maximum physical pool tile size is set by r.VT.SplitPhysicalPoolSize.
Setting a size of 64 will force all pools to be divided so that their page tables fit in 16 bits.
This makes it possible to use large physical pools without doubling the cost of page table memory.
#rb none
[FYI] ben.ingram
#preflight 611a616a8ff5540001cf6575

#ROBOMERGE-SOURCE: CL 17175504 via CL 17175510
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17175517 by jeremy moore in ue5-release-engine-test branch]
2021-08-16 09:38:03 -04: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
400aa717b0 Add stat scope for virtual texture finalize and page table update phases.
#rb none
#preflight 61083a1e4cd793000148efcb

#ROBOMERGE-SOURCE: CL 17019668 via CL 17019684
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17019696 by jeremy moore in ue5-release-engine-test branch]
2021-08-02 15:40:13 -04:00