Commit Graph

113 Commits

Author SHA1 Message Date
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
ben ingram
ee92d549cc #jira UESP-1466
Don't merge duplicate streaming VT producers when creating page table
- Keep merging in place for RVT
#rb none

#ROBOMERGE-SOURCE: CL 9758700 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v545-9751379)

[CL 9758704 by ben ingram in Main branch]
2019-10-23 14:06:00 -04:00
ben ingram
356970ea02 #jira none
Fix bug computing wrong sizes for mips of non-power-2 UDIM texture, when computing VT address wrapping
#rb none

#ROBOMERGE-SOURCE: CL 9758260 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v545-9751379)

[CL 9758263 by ben ingram in Main branch]
2019-10-23 13:28:05 -04:00
jeremy moore
331f7530de Time slice the VirtualTexture MaxUploadsPerFrame
This reduces the per frame uploads for very high frame rates
Disabled by default with a CVar to enable


#ROBOMERGE-SOURCE: CL 9707407 via CL 9707413 via CL 9707414 via CL 9707415 via CL 9707417
#ROBOMERGE-BOT: (v539-9700858)

[CL 9707418 by jeremy moore in Main branch]
2019-10-18 19:20:53 -04:00
chris bunner
75de6b37f5 Address some performance concerns with virtual texture on PC
Use event queries instead of the frame counting fence to ensure that we don't needlessly sync GPU and CPU
Reduce max load of virtual texure updates
Add some more CVS stats to help track down any problems in the live environment
#author Jeremy.Moore
#rb Chris.Bunner
[REVIEW]


#ROBOMERGE-OWNER: chris.bunner
#ROBOMERGE-AUTHOR: chris.bunner
#ROBOMERGE-SOURCE: CL 9687877 via CL 9688900 via CL 9689237 via CL 9690291 via CL 9690442
#ROBOMERGE-BOT: (v538-9681622)

[CL 9691677 by chris bunner in Main branch]
2019-10-18 12:39:13 -04:00
Marc Audy
196a735e70 Fix incoming changes in light of CL# 9306968
#rb
#rnx
#codereview Ben.Ingram, Jeremy.Moore

[CL 9455039 by Marc Audy in Main branch]
2019-10-07 14:33:40 -04: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
jeremy moore
636afa56b4 Add console variable scale factor for virtual texture physical pools
This allows per platform device overrides



#ROBOMERGE-SOURCE: CL 9428247 via CL 9428248 via CL 9444144 via CL 9449040 via CL 9449233
#ROBOMERGE-BOT: (v495-9448618)

[CL 9451398 by jeremy moore in Main branch]
2019-10-07 13:11:51 -04:00
jeremy moore
589bd1fb81 Memory leak fix
#ROBOMERGE-SOURCE: CL 9411601 via CL 9411602 via CL 9411603 via CL 9411604 via CL 9411605
#ROBOMERGE-BOT: (v456-9359915)

[CL 9411606 by jeremy moore in Main branch]
2019-10-03 22:53:02 -04:00
jeremy moore
ee74d5d55b Add stat for free virtual texture pages
#ROBOMERGE-SOURCE: CL 9405887 via CL 9405888 via CL 9405891 via CL 9405893 via CL 9405895
#ROBOMERGE-BOT: (v456-9359915)

[CL 9407916 by jeremy moore in Main branch]
2019-10-03 19:05:14 -04:00
jeremy moore
e94ff824a2 Add LLM tags for VirtualTextureSystem
From shelf taken from ChrisB
#rb Andrew.Ladenberger, Chris.Bunner


#ROBOMERGE-SOURCE: CL 9395897 via CL 9402548 via CL 9402619 via CL 9402810 via CL 9402862
#ROBOMERGE-BOT: (v456-9359915)

[CL 9402963 by jeremy moore in Main branch]
2019-10-03 13:43:34 -04:00
ben ingram
700341621f #jira UE-80474
Fix for non-power-2 UDIM virtual textures
#rb none
#lockdown nick.penwarden

#ROBOMERGE-SOURCE: CL 9306968 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v455-9298202)

[CL 9306975 by ben ingram in Main branch]
2019-09-30 16:28:40 -04:00
jeremy moore
55bb85a00d Support passing UAV of physical texture to RuntimeVirtualtexture::RenderPages
This will allow compressing direct to physical texture on platforms that support it
Some small RHI changes will have to be approved before turning on though


#ROBOMERGE-SOURCE: CL 9291051 via CL 9291054 via CL 9291057 via CL 9291060
#ROBOMERGE-BOT: (v452-9288972)

[CL 9291062 by jeremy moore in Main branch]
2019-09-29 17:29:22 -04:00
jeremy moore
62c68fd078 Fix virtual texture physical layer indexing bug
#ROBOMERGE-SOURCE: CL 8970283 via CL 8970284 via CL 8970285
#ROBOMERGE-BOT: (v436-8951088)

[CL 8970286 by jeremy moore in Main branch]
2019-09-22 21:32:35 -04:00
jeremy moore
fa4514c8f8 Decouple the concepts of VT texture layer and VT page table layer.
This allows us to put texture layers into physical groups that will be accessed through the same page table layer (and so must share the same UV in different physical textures).
Physical spaces can now contain multiple texture layers (one for each member of a physical group).
Changed the logic for the physical space pool descriptions so that we can support multiple texture layers. And also made the description work for Min and Max tile size values so that we don't need to specify pool sizes multiple times for each possible tile size.
Runtime virtual texture can select if it wants to use a single physical group. By default this is on so that RVT uses a single page table channel.
#rb none
[FYI] Ben.Ingram


#ROBOMERGE-OWNER: jeremy.moore
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 8747955 via CL 8748343 via CL 8782324
#ROBOMERGE-BOT: (v422-8689730)

[CL 8790675 by jeremy moore in Main branch]
2019-09-17 20:33:19 -04:00
jeremy moore
45639915ef Remove check() firing in FVirtualTextureSystem::FlushCache and test virtual texture producer handle is still valid before flush.
There are cases where the handle will not be valid.
For example when we have two RVT volumes pointing at the same RVT (not a good thing to do, but it can happen).
In that case the RVT will have two producers created and one discarded.


#ROBOMERGE-SOURCE: CL 8405281 via CL 8405515
#ROBOMERGE-BOT: (v404-8404397)

[CL 8405519 by jeremy moore in Main branch]
2019-09-02 12:38:52 -04:00
jeremy moore
14315143ac Check that we have a valid GPU feedback buffer ready to map before flushing runtime virtual texture caches.
This prevents reported bug when flushing at low frame rates (which can happen when sculpting many layer landscape).
If we flush without a feedback buffer, then we will have to wait for at least one frame before refilling the cache and this can cause the landscape to look constantly low res.


#ROBOMERGE-SOURCE: CL 8335474 via CL 8357963
#ROBOMERGE-BOT: (v401-8057353)

[CL 8359123 by jeremy moore in Main branch]
2019-08-27 21:24:54 -04:00
jeremy moore
899c1a35a7 Add support for max level to flush runtime virtual texture mips
#rb none

#ROBOMERGE-OWNER: jeremy.moore
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 8126366 via CL 8132083
#ROBOMERGE-BOT: (v401-8057353)

[CL 8157029 by jeremy moore in Main branch]
2019-08-21 08:56:44 -04:00
jeremy moore
0d233fce7a Add stat for Insights profiling
#ROBOMERGE-SOURCE: CL 8124378 via CL 8127024
#ROBOMERGE-BOT: (v401-8057353)

[CL 8127038 by jeremy moore in Main branch]
2019-08-20 13:04:35 -04:00
jeremy moore
b0327ab46e Don't pay cost of VT feedback analysis if no VTs are allocated
#ROBOMERGE-SOURCE: CL 8030179 via CL 8041679
#ROBOMERGE-BOT: (v400-8057353)

[CL 8062574 by jeremy moore in Main branch]
2019-08-15 13:51:35 -04:00
ben ingram
0247529d3c #jira UE-78586
- FVirtualTexturePhysicalSpace* now stored using TRefCountPtr<>, since code was changed to destroy previous unused physical spaces
- Otherwise we get into bad state since AllocatedVT could reference already deleted physical space, and cause system to get out of sync and/or crash
- Also defer deletion of unreferenced physical spaces until end of each render thread update, not strictly needed, but keeps large textures from getting destroyed/recreated in some cases
#rb none
[FYI] jeremy.moore

#ROBOMERGE-SOURCE: CL 8012534 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v396-7974030)

[CL 8012536 by ben ingram in Main branch]
2019-08-13 18:12:51 -04:00
jeremy moore
6a8f61025f Fix race condition in VT material updates that triggered check in FMaterialShader::GetShaderBindings()
The VT update can run concurrently with worker thread mesh command generation
VT system callbacks which can touch materials need to be complete before this phase
Moved VT callbacks to before InitViews to fix this
[FYI] Ben.Ingram


#ROBOMERGE-SOURCE: CL 7892548 via CL 7916688
#ROBOMERGE-BOT: (v389-7813075)

[CL 7916891 by jeremy moore in Main branch]
2019-08-08 23:50:35 -04:00
jeremy moore
0e1455505d Runtime virtual texture flush per VT and region instead of flushing everything
#ROBOMERGE-SOURCE: CL 7882089 via CL 7914929
#ROBOMERGE-BOT: (v389-7813075)

[CL 7915095 by jeremy moore in Main branch]
2019-08-08 23:35:07 -04:00
jeremy moore
2b00a4363f #jira UE-78422
Integrated from //UE4/Dev-Rendering
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 7788444 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v388-7785529)

[CL 7788460 by jeremy moore in Main branch]
2019-08-06 10:20:52 -04:00