Commit Graph

26 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
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
d362cef172 #jira UE-136254
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]
2022-02-02 01:49: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
09de98bfdf When destroying a VT producer only wait on its tasks, not on all transcoding tasks.
Removes regular 100ms spikes waiting on unrelated work.
#preflight 616dd0bdd48c46000171b5e2
#rb ben.ingram
#lockdown michal.valient

#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17851859 via CL 18003934 via CL 18369724 via CL 18369802
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18369839 by jeremy moore in ue5-release-engine-test branch]
2021-12-03 13:07:44 -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
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
6d7762a839 Fix compile error
#rb none
#jira none

[CL 16209859 by Ben Ingram in ue5-main branch]
2021-05-05 13:31:35 -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
8037278b3f Make sure we're always able to map the lowest resolution VT mips, otherwise the system will continue to try (and fail) to do this every frame, costing lots of perf
- 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]
2021-05-04 11:48:09 -04:00
Ben Ingram
916aa06a15 Remove VT UDIM page table wrapping
- It's not possible to make wrapping work correctly for lower mip levels, depending on the sizes of the VTs in the stack
- Now UDIMs that are smaller than stack dimensions will just map the lowest resolution mip to out-of-bounds addresses
- Entire stack will continue to wrap, based on the stack dimensions
- End result is UDIM wrapping should no longer by relied on
#rb none
#jira none

[CL 16184868 by Ben Ingram in ue5-main branch]
2021-05-03 12:21:08 -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
d4bba48214 Add name of material to AllocateVT as debug aid
- Rework hashing of FAllocatedVTDescription to be more explicit about hashing each individual member, don't hash the debug name
#rb none
#jira none

[CL 15732300 by Ben Ingram in ue5-main branch]
2021-03-17 19:47:18 -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
Ben Ingram
de1bc01ce9 Fix logic used to wrap UDIM VT coordinates during CPU update
- 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]
2020-10-26 15:28:18 -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
Michal Valient
95d19f95b1 [REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris

[CL 13834854 by Michal Valient in ue5-main branch]
2020-07-06 18:58:26 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
jeremy moore
c3f5dbad94 Moved definition of virtual texture log
#ROBOMERGE-SOURCE: CL 12764102 via CL 12764127 via CL 12764136 via CL 12764147
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v678-12743200)

[CL 12764160 by jeremy moore in Main branch]
2020-04-13 15:46:49 -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
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
jeremy moore
0c692a42bd Build fix: Add missing forward declare
#ROBOMERGE-SOURCE: CL 9291296 via CL 9291297 via CL 9291298 via CL 9291299
#ROBOMERGE-BOT: (v452-9288972)

[CL 9291300 by jeremy moore in Main branch]
2019-09-29 19:07:45 -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
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