Commit Graph

18 Commits

Author SHA1 Message Date
jeremy moore
e564bc08ca #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
#ROBOMERGE-BOT: (v835-16672529)

[CL 16724487 by jeremy moore in ue5-main branch]
2021-06-20 18:47:00 -04:00
christopher waters
2c3c5c5198 Adding GRHISupportsUAVFormatAliasing support to D3D12RHI.
When creating a BCn texture with UAV support, create a secondary ID3D12Resource that aliases the same memory and can be used as its UAV. This alias resource has to be considered during transitions to/from the UAV state where we insert an aliasing barrier and possibly another state transition for the 'real' resource.
Created FD3D12ResourceDesc which extends D3D12_RESOURCE_DESC. This type should allow us to pass around future UE-only creation info without modifying all the allocation function signatures. This is only implemented enough to cover Textures right now, can be extended in the future.

#jira UE-114150
#rb kenzo.terelst
#preflight 60b944100249c300015e7cd6


#ROBOMERGE-OWNER: christopher.waters
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 16555034
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16555067 by christopher waters in ue5-main branch]
2021-06-03 19:08:56 -04:00
Luke Thatcher
d9728437c1 Add UAVFormat field to FPooledRenderTargetDesc to allow selection of an aliasing format when retrieving surfaces from the pool
- Used by the VT system to alias DXT surfaces with integer formats.

#rb Zach.Bethel
#fyi Christopher.Waters
#jira UE-114726
#preflight 60a3aca422cce000018d88ad

[CL 16369514 by Luke Thatcher in ue5-main branch]
2021-05-18 12:34:02 -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
6b158562d7 Update names of render targets used for VT to actually include the word 'Virtual'
#rb none
#jira none

[CL 14837842 by Ben Ingram in ue5-main branch]
2020-12-02 15:35:05 -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
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
dmitriy dyomin
6d284b45a3 Fixed: Runtime Virtual Texture crash on mobile
#jira UE-90300
#rb none

#ROBOMERGE-SOURCE: CL 12057079 in //UE4/Release-4.25/... via CL 12057088
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v657-12064184)

[CL 12076323 by dmitriy dyomin in Main branch]
2020-03-09 13:21:37 -04:00
Rolando Caloca
5b82f15def Copying //UE4/Dev-RenderPlat-Staging@11388153 to //UE4/Main
#rb none
#rnx

[CL 11388545 by Rolando Caloca in Main branch]
2020-02-12 13:27:19 -05:00
dmitriy dyomin
32bb8acd0b Support virtual textures on mobile platforms. Requires Vulkan, OpenGL ES3.1 + SRV, iPhone8 and up.
Disabled by default, set r.Mobile.VirtualTextures=1 to enable
known issues: RVT compression is not implementted, Android OpenGL will have R and G channels swapped for uncompressed streaming VT, no sRGB support
#jira UE-79955
#rb jeremy.moore


#ROBOMERGE-SOURCE: CL 11070636 via CL 11070637
#ROBOMERGE-BOT: (v637-11041722)

[CL 11070638 by dmitriy dyomin in Main branch]
2020-01-20 22:16:23 -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
ffefadf9d5 Fix some missing texture creation flags.
Enable UAV creation for VT physical texture where supported.


#ROBOMERGE-SOURCE: CL 9804698 via CL 9804747 via CL 9804799
#ROBOMERGE-BOT: (v546-9757112)

[CL 9804825 by jeremy moore in Main branch]
2019-10-24 13:23:31 -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
1310cc4462 Fix for Windows 7 crash
#jira


#ROBOMERGE-SOURCE: CL 9389857 via CL 9389859 via CL 9389861 via CL 9389862 via CL 9389863
#ROBOMERGE-BOT: (v456-9359915)

[CL 9392182 by jeremy moore in Main branch]
2019-10-03 11:09:54 -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
bb9eb8e48a Make VT pools respect budget size
Use floor instead of ceil so that budget is our upper memory limit


#ROBOMERGE-SOURCE: CL 8970428 via CL 8970429 via CL 8970430
#ROBOMERGE-BOT: (v436-8951088)

[CL 8970431 by jeremy moore in Main branch]
2019-09-22 22:48:39 -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
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