Commit Graph

851 Commits

Author SHA1 Message Date
christopher waters
4b57998013 Set all parameters and resources for SetShaderParameters in a single RHI command
- Expands all RDG and non-RDG bindings into a list of RHIResource bindings.
- Future work could batch up all non-SetShaderParameters calls into similar data structures.

#rb zach.bethel, jeannoe.morissette
#preflight 637320ad3248425305112b91

[CL 23147896 by christopher waters in ue5-main branch]
2022-11-15 19:41:53 -05:00
luke thatcher
67c1b93a5e Fix RT / RHIT stats
- The RHI and render threads are now blocking on FGraphEvents in various platform RHI implementations, but the timing stats did not take this time into account.
 - Some time was double counted (e.g. on the render thread, due to a FRenderThreadIdleScope plus a nested call to FEvent::Wait which includes a per-thread wait stat).

 - The fix is to remove use of GRenderThreadIdle / FRenderThreadIdleScope etc in places where the thread is going to wait on an FGraphEvent, to avoid the double counting. This fixes the odd spikes on the RHIT in CSV profiles.
 - Also removed the GWorkingRHIThreadStallTime global. RHI idle time is now tracked using standard thread stats (FThreadIdleStats::FScopeIdle, which is included in the FRenderThreadIdleScope when called from the RHI thread).

 - Simplified copy/paste instances of GRenderThreadIdle and GRenderThreadNumIdle by replacing them with a FRenderThreadIdleScope across platform RHIs.

After this change, the RT and RHIT unit stats are stable in Lyra game, when clicking away from the window to force the title into a low framerate mode. Before this change, the RT/RHIT stats would change significantly.

#rb Ben.Woodhouse
#preflight 636ad7c3450be1d9f849a34f

[CL 23069592 by luke thatcher in ue5-main branch]
2022-11-09 20:58:40 -05:00
zach bethel
7dd9de3f39 Refactored UpdateTexture2D, UpdateFromBufferTexture2D, and UpdateTexture3D to take a non-immediate command list.
- Added explicit SwitchPipeline calls to async command lists.
 - Moved pipeline push / pop calls from platform implementations to RHI command list.

#rb christopher.waters
#preflight 636937204d3c1d9d9264ce7b

[CL 23012810 by zach bethel in ue5-main branch]
2022-11-07 12:18:59 -05:00
christopher waters
fa029ac1c8 Removing ControlPointPatchList enum values. Tesselation support was removed in 5.0 so these don't need deprecation.
#jira UE-168859
#rb luke.thatcher, jeannoe.morissette
#preflight 63653402d308b70e66549067

[CL 22989634 by christopher waters in ue5-main branch]
2022-11-04 12:45:16 -04:00
jimmy smith
820ca14bfd Fix for CIS nopch error
#jira UE-168875
#preflight 6360c40dbf394ae078309d0a
#rbx

[CL 22893876 by jimmy smith in ue5-main branch]
2022-11-01 18:53:55 -04:00
richard wallis
8d24dcd6ee Add -fpreserve-invariance for Vertex shaders for Metal versions above 2.2. macOS only: Reinstate Metal versions 2.2 and 2.3 to work round what appears to be a M1 position invariance compiler bug.
#jira UE-164360
#preflight 63443b667045f13c96bda936
[REVIEW] [at]zack.neyland, [at]axel.riffard, [at]jack.porter, [at]adam.kinge

[CL 22509223 by richard wallis in ue5-main branch]
2022-10-13 14:40:48 -04:00
mihnea balta
3942675610 Perform driver version checks before initializing the RHI device.
The driver version is logged and checked after the RHI instance is created, before calling GDynamicRHI->Init(). This worked on D3D11 and 12 without many changes because those RHIs select the adapter before the Init call, so they can fill in the information necessary for GetGPUDriverInfo() before Init. However, the Vulkan RHI init code had to be restructured quite a bit to do the same thing.

Also removed some obsolete hardcoded driver version checks from the Vulkan RHI, since we have better checks in RHIDetectAndWarnOfBadDrivers().

#rnx
#preflight https://horde.devtools.epicgames.com/job/632b408b7b582f58abce036e

[CL 22305628 by mihnea balta in ue5-main branch]
2022-10-03 11:35:55 -04:00
mihnea balta
2a476d9e08 Speculative fix for missing include in Metal.
#jira UE-165668
#preflight not available
#rb trivial
#rnx

[CL 22279711 by mihnea balta in ue5-main branch]
2022-09-30 16:16:24 -04:00
Luke Thatcher
6f27897c03 Restore changes lost in platform RHI implementations when the DevPR copy-up robomerged back to UE5 Main
#rb none
#preflight skip
#jira none

[CL 22245677 by Luke Thatcher in ue5-main branch]
2022-09-29 08:14:54 -04:00
luke thatcher
0c5c2b3e27 Merging //UE5/Dev-ParallelRendering (up to CL 22203289) to //UE5/Release-5.1
This change includes significant refactor work performed in //UE5/Dev-ParallelRendering. A brief summary of the work is as follows:

Refactored RHI command lists
 - Removal of the "immediate" async compute command list
 - Introduced an "active pipe" on each command list, allowing RHICmdLists to record work for either graphics or async compute. Pipes can be selected using the SwitchPipeline() function, or the FRHICommandListScopedPipeline helper.
 - New explicit command list submission RHI API (RHIFinalizeContext, RHISubmitCommandLists). The IRHICommandContextContainer type has been removed.
 - Explicit GPU submission is automatically appended to the immediate command list when it is dispatched to the RHI thread.

Platform RHI implementations
 - The new submission API has been implemented across all platforms. Some platforms required a significant refactor.

#rb Mihnea.Balta,Kenzo.Terelst
#jira UE-139550
#preflight 6332e3641003050806d802ef

[CL 22239063 by luke thatcher in ue5-main branch]
2022-09-28 21:40:05 -04:00
carl lloyd
f044acc980 Fix bug where SceneColor\DepthCreateFlags were not updated after initializing variables
Changed iOS to use Memoryless flag to match other platforms when creating MSAA targets

#jira UE-162047

#rb Dmitriy.Dyomin, Jack.Porter
[FYI] Wei.Liu
#preflight 632c351c7b582f58ab2c8563

[CL 22144723 by carl lloyd in ue5-main branch]
2022-09-22 16:53:44 -04:00
axel riffard
b701c98a7e Set Metal minimum flow for iOS and MacOS
#jira UE-163352
#rb adam.kinge
#preflight 632954d3fc7f1efbdf238155

[CL 22089354 by axel riffard in ue5-main branch]
2022-09-20 03:10:30 -04:00
maxwell hayes
a5a9a7e3c7 Adding debug info to AudioMixerThreadCommand to breadcrumb hangs.
#rb jimmy.smith
#preflight 6328eb2a0a4ad044de4b4b53

[CL 22088657 by maxwell hayes in ue5-main branch]
2022-09-20 00:49:42 -04:00
calvin zheng
d3922daf11 Fix scalability always low on Mac, this is caused by sg.ShadowQuality being incorrectedly set to low on Mac
#jira UE-149923
#rb Zack.Neyland
#preflight 632499b73752284a31856908

[CL 22064133 by calvin zheng in ue5-main branch]
2022-09-16 20:31:02 -04:00
Thomas Engel
4d0ddf711f Fixing up Mac Editor compile issue introduced in CL 22034307
#jira UE-163865
#preflight 6323772bc225e8be381367b0
#fyi jens.petersam
#rnx

[CL 22036304 by Thomas Engel in ue5-main branch]
2022-09-15 15:29:33 -04:00
axel riffard
c64aa2de93 Catalina, iOS 14 removal
Metal 2.3 removed, Metal 3.0 added for Mac

#jira UE-163352
#rb adam.kinge bertrand.carre
#preflight 631ea7eb94758d0bf2008668

[CL 21960671 by axel riffard in ue5-main branch]
2022-09-11 23:47:08 -04:00
axel riffard
494b98c831 Remove Catalina support and Metal 2.2 from Mac.
#jira UE-149923
#rb jack.porter
#preflight 6315c60bf448dc6e58121822

[CL 21790515 by axel riffard in ue5-main branch]
2022-09-05 06:05:22 -04:00
Richard Wallis
961c554077 Fix for minor memory leak in TMetalBaseShader - release allocated mutable dictionary
#jira none
#preflight 630cd86df92416fb926523a8
#review-21676843 @will.damon, @zack.neyland
#rb zack.neyland

[CL 21756751 by Richard Wallis in ue5-main branch]
2022-09-02 04:28:03 -04:00
Richard Wallis
5f67dcf13c Apply patch from Apple. Enable WaveOps for macOS - tested on Vega 56 Monterey 12.5.1
#jira none
#rnx
#preflight 6310b4d7ea685939704c090a
#review-21739599 @zack.Neyland
#rb zack.Neyland

[CL 21756741 by Richard Wallis in ue5-main branch]
2022-09-02 04:26:05 -04:00
Richard Wallis
e966604947 Fix for potential crash in FMetalResourceViewBase buffer initialization constructor. Source Buffer can be NULL (see FStaticMeshVertexBuffer::InitRHI()).
From UDN: https://epicgames.lightning.force.com/lightning/r/5004z00001g2DMkAAM/view

#jira none
#rnx
#preflight 6305f600c85b7fef22af59ad
#review-21537375 @will.damon

[CL 21561084 by Richard Wallis in ue5-main branch]
2022-08-25 05:39:06 -04:00
benjamin rouveyrol
525e5678a5 Add R9G9B9E5 format on platforms that support it
#rb will.damon christopher.waters eric.mcdaniel
#jira UE-124898
#preflight 63048c94a45b007ea268fda3

[CL 21536768 by benjamin rouveyrol in ue5-main branch]
2022-08-24 04:20:06 -04:00
zach bethel
77db992ee9 Moved bulk of uniform expression updates off the render thread.
#preflight 62f45631b66d5d9313764c71
#rb christopher.waters, laura.hermanns

#ROBOMERGE-OWNER: zach.bethel
#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 21337201 via CL 21337213 via CL 21337837 via CL 21337993
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21341203 by zach bethel in ue5-main branch]
2022-08-11 14:24:55 -04:00
Sebastien Hillaire
376946ae13 Fixed bad bIs24BitUnormDepthStencil on some platforms to fix manual depth test.
#preflight https://horde.devtools.epicgames.com/job/62f4f7e2ad3bd8ad64106d26
#rb charles.derousiers
#fyi luke.thatcher

[CL 21334899 by Sebastien Hillaire in ue5-main branch]
2022-08-11 09:03:51 -04:00
luke thatcher
44046fe230 Re-delete AGXRHI files that were added in a bad merge
#rb none
#jira none
[FYI] Zach.Bethel, Will.Damon

#ROBOMERGE-AUTHOR: luke.thatcher
#ROBOMERGE-SOURCE: CL 20982032 in //UE5/Release-Engine-Staging/...
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 20984500 by luke thatcher in ue5-main branch]
2022-07-07 11:30:33 -04:00
Richard Wallis
802c67b731 Fix for texture CPU readback Lock. Previous logic assumed it was going through the RHICopyToResolveTarget() path but we have to support the CopyTexturePath [and any other paths] and maybe even GPU shader write and render target. If the texture storage mode is Managed then sync the requested Slice/Mip before continuing. Optimise Apple Silicon Mac - use Shared storage mode for these types of textures to save the cost of Syncing the texture GPU->CPU since its unified memory.
#jira UE-154433
#rnx
#preflight https://horde.devtools.epicgames.com/job/62c41437d94b57687c2bf7f1
#review-20940083 @will.damon
#rb will.damon

[CL 20981683 by Richard Wallis in ue5-main branch]
2022-07-07 04:53:50 -04:00