Commit Graph

32 Commits

Author SHA1 Message Date
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
jeremy moore
79f1258718 #jira UE-75980
Release VT physical pools when they are no longer referenced
Integrated from //UE4/Dev-Rendering
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 7140205 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v367-6836689)

[CL 7140214 by jeremy moore in Main branch]
2019-06-21 08:51:04 -04:00
jeremy moore
0f672253ab #jira UE-76174
Integrated from //UE4/Dev-Rendering
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 7107482 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v367-6836689)

[CL 7107487 by jeremy moore in Main branch]
2019-06-20 13:40:27 -04:00
jeremy moore
b6c334c490 #jira UE-75979
Fix missing memory stat decrements in VT system
Integrating from //UE4/Dev-Rendering
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 7105616 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v367-6836689)

[CL 7105618 by jeremy moore in Main branch]
2019-06-20 11:33:11 -04:00
Ben Ingram
baa2a4be55 Mark VT prefetch pages as recently used, otherwise they may be evicted later in frame, and break code that assumes they're resident
Copied from Dev-Rendering CL 6983865
#rb none

[CL 6984945 by Ben Ingram in Main branch]
2019-06-13 19:09:06 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
Marcus Wassmer
cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00