Commit Graph

47 Commits

Author SHA1 Message Date
christopher waters
1f21b73b25 Ran IWYU on RHI and RenderCore, private only.
#preflight 63d358c85c69f453c1f79c37

[CL 23889591 by christopher waters in ue5-main branch]
2023-01-27 14:54:10 -05:00
Luke Thatcher
75cee9fd43 Marked several functions on the immediate RHICmdList that do not use "this" as deprecated.
- Replaced uses of these functions in the engine with the global scope equivalents.
 - Added some missing global scope RHI...() functions.
 - LLM scopes have been moved into the global scope function, where necessary.

Removed several _RenderThread() RHICmdList functions
 - These were previously provided for the automatic RHI thread stall / flush mechanism, but now provide no benefit
 - Removing these also helps prevent use of FRHICommandListExecutor::GetImmediateCommandList() on threads other than the rendering thread.

Remove RHIExecuteCommandList
 - Unused, legacy code path. No platform RHIs provide an implementation. No need to deprecate since there's no way anyone would be calling it already.

#jira none
#rb Zach.Bethel
#preflight 63c86e2dfb1a8cf245f44469

[CL 23771476 by Luke Thatcher in ue5-main branch]
2023-01-19 06:13:08 -05:00
Kenzo Terelst
d2f1a92b2f Fixes to make ray tracing dynamic geometry and TLAS builds on async compute again
#jira UE-168252
#rb Luke.Thatcher, Zach.Bethel
#preflight 635a782ed86d91ca2c3ca925
#rnx

[CL 23625138 by Kenzo Terelst in ue5-main branch]
2023-01-10 06:28:18 -05:00
christopher waters
6bcc020b6c Removing deprecated code from Renderer and RenderCore.
#jira none
#rb zach.bethel
#preflight 636e8639232e3d12cbb610f9

[CL 23104907 by christopher waters in ue5-main branch]
2022-11-11 16:10:25 -05:00
luke thatcher
0a443d68c5 Improve performance of RHI GPU draw call / num primitive stats
- Old code relied on atomic increments in the RHI_DRAW_CALL_INC /  RHI_DRAW_CALL_STATS macros, which is expensive, particularly on platforms with poor atomic performance.
 - New system replaces the atomic writes with a context-specific stats structure, which is accumulated by the RHI thread into the global structure.
 - Contexts write stat data through a "Stats" pointer on the IRHIComputeContext, which is set automatically by the command list management code. The pointer is replaced whenever a new "draw call category" is pushed, to redirect the counts.
 - Also moved some macro definitions around so more of the system can be removed when HAS_GPU_STATS is 0. Removed dependencies on CSV_PROFILER.

Moved Begin/EndFrame, Begin/EndScene, Begin/EndDrawingViewport into the immediate RHICmdList
 - They were already immediate-only functions due to a check() they contain.

#rb Zach.Bethel
#preflight 635fed4af97758810b50cb06

[CL 22875455 by luke thatcher in ue5-main branch]
2022-10-31 20:02:27 -04:00
Yuriy ODonnell
2408cc1503 Allow FScopedGPUStatEvent and SCOPED_GPU_STAT to be used with any command list type.
* Stat push/pop will still only execute when running on immediate command list (no behavior change), but code that uses non-RDG mechanism for GPU stats will now always compile
* Remove rendering thread check from FScopedGPUStatEvent::Begin/End (it is implied by immediate command list)

#rb mihnea.balta
#preflight 62cda559492f42e20304bb3a

[CL 21058431 by Yuriy ODonnell in ue5-main branch]
2022-07-12 13:08:38 -04:00
jeannoe morissette
a55062b58e VulkanRHI: Temporarily disable gpu stat accumulation during modal dialog's 'long frame' to prevent OOM from staging buffer accumulation.
#rb Mihnea.Balta
#jira UE-148255
#preflight 62a89264cf54a658ee0e8316
#lockdown Mihnea.Balta

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 20674492 in //UE5/Release-5.0/... via CL 20675969
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20679016 by jeannoe morissette in ue5-main branch]
2022-06-15 19:31:56 -04:00
john huelin
95c1680b6e Fix DrawCallCount per pass not working when multithreaded RHI command recording is enabled.
[REVIEW]
#rnx

#ROBOMERGE-OWNER: john.huelin
#ROBOMERGE-AUTHOR: john.huelin
#ROBOMERGE-SOURCE: CL 20105654 via CL 20105671 via CL 20107113 via CL 20107146
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20110543 by john huelin in ue5-main branch]
2022-05-09 16:35:01 -04:00
aurel cordonnier
a6fca32d43 Fix for content worker
#rnx
[FYI] jason.hoerner

#ROBOMERGE-AUTHOR: aurel.cordonnier
#ROBOMERGE-SOURCE: CL 18973286 via CL 18973292 via CL 18992571 via CL 18992948
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18997179 by aurel cordonnier in ue5-main branch]
2022-02-15 11:29:24 -05:00
alejandro arango
89a52a72d5 RealtimeGPUProfiler: Fix crash when toggling views.
Needed to clear description string buffer offsets when the description is empty (or invalid).

#jira UE-139319
#rb none
#rnx
[FYI] jason.hoerner
#preflight 61f1fd18c0033b39f8a65fc4

#ROBOMERGE-AUTHOR: alejandro.arango
#ROBOMERGE-SOURCE: CL 18749105 in //UE5/Release-5.0/... via CL 18749108 via CL 18749160
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18749174 by alejandro arango in ue5-main branch]
2022-01-26 21:23:15 -05:00
jason hoerner
ee8581d967 DisplayCluster: crash in GPU profiler when toggling views. Need to clear description string buffer offsets when reusing GPU profiler events, since constructor doesn't get called again.
#rnx
#rb alejandro.arango
#jira UE-139319
#preflight 61e88d27413325328f059ce8
#preflight 61e88d27413325328f059ce8

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 18667135 in //UE5/Release-5.0/... via CL 18667150 via CL 18668160
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v901-18665521)

[CL 18668322 by jason hoerner in ue5-main branch]
2022-01-19 18:27:45 -05:00
jason hoerner
294c5dd557 UE5_RELEASE: Virtual Production, improved profiling for multiple view family scenarios.
* Increased limit for GPU profiler events on D3D12.  A typical frame with 4 view families would easily exhaust the old limit of 1K events resulting in many events not showing up in the profile -- limit increased to 8K, and confirmed negligible difference in memory.  Fixed bug where we were only using half the queries allocated as well (unnecessary multiplication by 2 when calling RHICreateRenderQueryPool).
* Added optional "ProfileDescription" to FSceneViewFamily, which is appended to the Unreal Insights profile event names for both CPU and GPU, so you can differentiate view families.
* Infrastructure added to CPU profiler to allow a verbose name to be added to a Stat timing block.
* Infrastructure added to GPU profiler to allow verbose names to be added to timing blocks in general, both Event and Stat timing blocks.
* Added stats display for Display Cluster listing the CPU and GPU cost, and GPU assignment per view family by name, with the goal of allowing clients to tune features enabled per view family to adjust performance, without needing to gather performance information from Unreal Insights.
* FSceneRenderer::DoCrossGPUTransfers uses push transfer without lockstep (logic copied from 4.27), which significantly improves perf.

#rb zach.bethel marc.audy mihnea.balta
#jira none
#rnx
#preflight 61df4d23484d866ec01f17cf

#ROBOMERGE-AUTHOR: jason.hoerner
#ROBOMERGE-SOURCE: CL 18591295 in //UE5/Release-5.0/... via CL 18591308 via CL 18591324
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18591346 by jason hoerner in ue5-main branch]
2022-01-12 18:25:48 -05:00
andrew davidson
0715ebc996 Type truncation fixes - Renderer
#rb arne.schober
#preflight 61d85ab0932a02483ce13e7d

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18544411 in //UE5/Release-5.0/... via CL 18544434
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18544466 by andrew davidson in ue5-release-engine-test branch]
2022-01-07 10:39:08 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
zach bethel
c9511f4f7e Modify RHI query checks so they can be done in a parallel rendering task.
#rb none

#ROBOMERGE-SOURCE: CL 16924093 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16924122 by zach bethel in ue5-release-engine-test branch]
2021-07-22 11:18:52 -04:00
michael noland
e01e25b124 Rendering: Fixed mismatched PRAGMA_DISABLE_DEPRECATION_WARNINGS macros
#jira UE-119944

#ROBOMERGE-SOURCE: CL 16906094 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16906095 by michael noland in ue5-release-engine-test branch]
2021-07-21 00:27:09 -04:00
michael noland
e768bd7b64 Rendering: Temporary fix for draw events asseting if called while the rendering thread is stopped (e.g., during a map rebuild)
#jira UE-119944
#rb zach.bethel

#ROBOMERGE-SOURCE: CL 16904282 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16904288 by michael noland in ue5-release-engine-test branch]
2021-07-20 19:56:24 -04:00
zach bethel
5ec769f91e RDG Parallel Execution (disabled by default)
- Refactored RDG to support free-threaded execution of passes.
 - Refactored renderer to use specific RHI command list variants in pass lambda. Immediate command list passes are forced to stay on the render thread, while other variants can be parallelized.

#rb christopher.waters

#ROBOMERGE-SOURCE: CL 16838717 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16838724 by zach bethel in ue5-release-engine-test branch]
2021-07-13 12:38:37 -04:00
martin ridgers
19ac87d284 Move RHI_API into the UE_TRACE_CHANNEL_EXTERN() macro so it compiles if the macro is a stub.
#ROBOMERGE-SOURCE: CL 16748765 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16749194 by martin ridgers in ue5-release-engine-test branch]
2021-06-22 17:02:43 -04:00
jonathan bard
d07b36ab0f Fixed crash when drawing landscape BP brushes :
* Added game thread-only version of draw events in order to avoid the mistake of pushing a draw event on the main thread using an immediate command list, and popping it on the main thread later on, while the original command list may have been destroyed already.
* FDrawEvent is now able to be started/stopped on the game thread (no command list provided : a render command using the current immediate command list will be issued on both start and end) or the rendering/RHI threads (same as now : the command list passed in the start function will be the one used in the end function)
* Fixed potential similar issue with Begin/EndDrawCanvasToRenderTarget and DrawMaterialToRenderTarget BP functions
* Fixed potential similar issue with FGPUSkinCache end of frame updates (+ fixed FGPUSkinCache::BeginBatchDispatch being ifdefed-out by #if WANTS_DRAW_MESH_EVENTS)

#rb mihnea.balta, chris.waters, josie.yang
#jira none
#tests editor, PF

#p4v-cherrypick 16311819

#ROBOMERGE-OWNER: jonathan.bard
#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-COMMAND: _robomerge UE5-Main
#ROBOMERGE-SOURCE: CL 16311809 in //Fortnite/Main/... via CL 16311812 via CL 16314912
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v804-16311228)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 16314932 by jonathan bard in ue5-release-engine-test branch]
2021-05-13 13:12:22 -04:00
jonathan bard
e4e254a204 * Fixed buffer overrun crash with FGpuProfiler
* Added CVar (r.GpuProfilerMaxEventBufferSizeKB) to control the GPU profiler scratch buffer's size (dynamically tweakable)

#rb ionut.mataseru
#jira none

#p4v-cherrypick 16221270

#ROBOMERGE-SOURCE: CL 16221260 in //Fortnite/Main/... via CL 16221263 via CL 16222503
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Main) (v796-16191650)

[CL 16222533 by jonathan bard in ue5-main branch]
2021-05-06 12:33:32 -04:00
Steve Robb
490ff52780 Deprecation of TStaticArray's multi-element init constructor, to avoid confusion of something like TStaticArray<FVector4>(NoInit) and TStaticArray<FVector4>(InPlace, NoInit) producing very different codegen (worse in the original case).
#rb yuriy.odonnell
#jira none

[CL 16053261 by Steve Robb in ue5-main branch]
2021-04-19 14:34:13 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
Yuriy ODonnell
6679906437 Fixed compile errors when static analyzer is enabled in Test configs.
Static analyzer always evaluates expressions in check(), despite DO_CHECK=0 due to implementation of check():

    #define check(expr) { CA_ASSUME(expr); }

If checked expression depends on something that's wrapped in `#if DO_CHECK`, it will produce a compile error. The fix is to add USING_CODE_ANALYSIS condition where applicable.

#robomerge Release-5.0-EarlyAccess
#rb Steve.Robb

[CL 15527660 by Yuriy ODonnell in ue5-main branch]
2021-02-25 08:57:17 -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