Commit Graph

672 Commits

Author SHA1 Message Date
daniele pieroni
25261b382f Do not use the address of the return address by default with clang windows platforms for backtrace a captured stack.
Clang __builtin_frame_address(0) is not behaving like msvc _AddressOfReturnAddress() on all windows platforms causing issues in the stacktrace tracking.
More investigation is needed to see if we can use the fast unwind path on clang as well.

#jira UE-222509
#rb ben.woodhouse, Wojciech.Krywult

[CL 35796224 by daniele pieroni in ue5-main branch]
2024-08-26 08:24:16 -04:00
neil henning
afd736b072 Use the more codegen optimal ClangPlatformAtomics when using clang-cl on Windows.
[CL 35557701 by neil henning in ue5-main branch]
2024-08-15 03:43:51 -04:00
marc audy
b9ee788582 Apply CodeAnalysis modifications for all Microsoft platforms not just Windows
#rb Joe.Kirchoff
#rnx

[CL 35277438 by marc audy in ue5-main branch]
2024-08-02 12:10:15 -04:00
neil henning
248e899a17 Fix the returns_nonnull build breakage I introduced before coffee had flown through my veins.
[CL 35132334 by neil henning in ue5-main branch]
2024-07-29 03:09:25 -04:00
daniele pieroni
dfe3a95947 Input latency stat computation enabled for DX11/DX12 using IDXGISwapChain::GetFrameStatistics and correlate the input reading timestamp to when the frame is handed to the display
Note:
- not enabled in shipping, currently only used to compute the Input latency debug stat as in other RHIs
- computed stats are currently different from Nvidia Reflex PC latency timing reports
- needs extra work to support g-sync/free sync monitors

#rb ionut.matasaru, Luke.Thatcher
#jira none

[CL 35053471 by daniele pieroni in ue5-main branch]
2024-07-24 10:08:59 -04:00
laura hermanns
f53e37efe9 [Windows] Make IsWine() publicly accessible to fix build issue.
#rb Dan.Elksnitis
#rnx

[CL 35020475 by laura hermanns in ue5-main branch]
2024-07-23 11:31:14 -04:00
daniele pieroni
3c1b686ec2 Fixing non-unity build on WindowsPlatform.h
#jira none
#rb David.Harvey

[CL 34898893 by daniele pieroni in ue5-main branch]
2024-07-18 09:12:48 -04:00
marc audy
94f319872d Globally disable C5105 instead of just for direct header including
Include Platform.h before doing a single file header include (to set up the compiler correctly)
#rnx

[CL 33803971 by marc audy in ue5-main branch]
2024-05-21 14:42:39 -04:00
steve robb
4c66967f8b Removed deprecated FPlatformAtomics::AtomicRead64 functions.
[CL 33764853 by steve robb in ue5-main branch]
2024-05-20 08:50:22 -04:00
thomas mauer
643a19a441 Disabling the Windows Compiler warning C6393.
The Warning:
warning C6393: A lookup table of size 365 is not sufficient to handle leap years.

This is a warning that goes off if any static array is 365 members long.  The intent of the warning is to stop common misuse of static arrays to look up days of the year.

In practice someone hitting this could just disable the warning locally to approve the array and remove the warning.  In our case though the code generation step can easily generate arrays 365 members long and there is no (good) way to fix it.

So turning it off globally makes the most sense for us.


#rb Marc.Audy, Rob.Cannaday

[CL 33697690 by thomas mauer in ue5-main branch]
2024-05-16 15:48:39 -04:00
daniele vettorel
104e3acdc7 Add a command line switch to set process-wide affinity on Windows.
Now -processaffinity=<number of logical cores> can be used to restrict the process to use a specific number of logical cores, and -processaffinityphysical=<number of physical cores> can be used to restrict the process to use a specific number of physical (non-hyperthreaded) cores.

When using this option, explicitly setting thread affinities is disabled for simplicity.

#rb Arciel.Rekman, danny.couture

[CL 33691407 by daniele vettorel in ue5-main branch]
2024-05-16 12:48:39 -04:00
henrik karlsson
65cdcc885c [Core]
* Fixes to make headerunits/modules happy

[CL 33086017 by henrik karlsson in ue5-main branch]
2024-04-18 17:07:16 -04:00
marc audy
78c77fdf90 Upgrade PVS-Studio to 7.29
[CL 32747206 by marc audy in ue5-main branch]
2024-04-04 18:49:12 -04:00
chris varnsverry
9767b2c576 - Set EOSSDK Virtual Memory reservation / commit callback methods on the platforms that require them.
- Keep the generic FPlatformMemory implementation of those callbacks in a common place to avoid duplication
- Note the APIs are defined in each eos_<Platform>.h header separately (they're passed in the platform specific Initialization struct) but our implementation is the same on all but one platform so we keep it in a common place.
- Update ApiVersion in various places in line with EOSSDK 1.16.2 update

#jira UE-209192 UE-209549
[REVIEW] [at]Alejandro.Aguilar
#rb alejandro.aguilar
#tests local builds, preflight, tested on console

[CL 32403264 by chris varnsverry in ue5-main branch]
2024-03-21 12:18:10 -04:00
steve robb
8517c776db Added UE_DEPRECATED_HEADER which acts like UE_DEPRECATED and should be placed in headers that should no longer be included.
#rb devin.doucette

[CL 32297380 by steve robb in ue5-main branch]
2024-03-18 07:05:59 -04:00
joe kirchoff
8518d8bb5a Bump _MSC_VER check with updated Visual Studio 2022 versions
#rnx

[CL 32196792 by joe kirchoff in ue5-main branch]
2024-03-12 18:43:42 -04:00
nicolas mercier
79d1f2426f - Tentatively add detector for hybrid hard drives.
- Log error message when physical drives can't be enumerated.

#rb daniele.vettorel

[CL 31762102 by nicolas mercier in ue5-main branch]
2024-02-23 09:32:14 -05:00
Luke Thatcher
10cdd4a111 Merging //UE5/Dev-ParallelRendering/... (up to CL 30965645) to //UE5/Main/... (base CL 30962637)
Significant refactor of RHI command list management and submission, and RHI breadcrumbs / RenderGraph (RDG) scopes, to allow for parallel translation of most RHI command lists.
See individual changelists in //UE5/Dev-ParallelRendering for details. A summary of the changes is as follows:

This work's primary goal was to allow as many RHI command lists as possible to be parallel translated, to make more efficient use of many-core systems. To achieve this:
 - The submission code paths for the immediate and parallel RHI command lists have been merged into a single function: FRHICommandListExecutor::Submit().
 - A "dispatch thread" (which is simply a series of chained task graph tasks) is used to decide which command lists are batched together in a single parallel translate job.
 - Individual command lists can disable parallel translate, which forces them to be executed on the RHI thread. This happens automatically if an RHI command list performs an operation that is not thread safe (e.g. buffer lock, or low-level resource transition).

One of the primary blockers for parallel translation was the RHI breadcrumb system, and the way RDG builds scopes. This was also refactored to remove these limitations:
 - RDG could only push/pop events on the immediate command list, which resulted in parallel and immediate work being interleaved, breaking any opportunity for parallelism.
 - Platform RHI implementations of breadcrumbs (e.g. in D3D12 RHI) was not correct across multiple RHI contexts. Push/pop operations aren't necessarily balanced within any one RHI context given that RDG builds "parallel pass sets" containing arbitrary ranges of renderer passes.

A summary of the new RHI breadcrumb system is as follows:
 - A tree of breadcrumb nodes is built by the render thread and RDG. Each node contains the node name, and pointers to the parent and next nodes. When fully built, the nodes form a depth-first linked list which is used for traversing the tree for GPU crash debugging.
 - The memory for breadcrumb nodes is provided by ref-counted allocator objects. These allocators are pipelined through the RHI, allowing the platform RHI implementation to extend their lifetime for GPU crash debugging purposes.
 - RHIPushEvent / RHIPopEvent have been removed, replaced with RHIBeginBreadcrumbGPU / RHIEndBreadcrumbGPU. Platform RHIs implement these functions to perform GPU immediate writes using the unique ID of each node, for tracking GPU progress.
 - Format string arguments are captured by-value to remove the cost of string formatting while building the breadcrumb tree. String formatting only occurs when the actual formatted string is required (e.g. during GPU crash breadcrumb stack traversal, or when calling platform GPU profiling APIs).

RenderGraph scopes have been simplified:
 - The separate scope trees / arrays of ops have been combined. There is now a single tree of RDG scopes containing all types.
 - Each RDG pass holds a pointer to the scope it was created under.
 - BeginCPU / EndCPU is called on each RDG scope as the various RDG threads enter / exit them. This allows us to mark-up each worker thread with the relevant Unreal Insights scopes.

Other changes include:
 - Fixes for bugs uncovered when parallel translate was enabled.
 - Adjusted platform affinities necessary due to the new layout of thread tasks in the renderer.
 - Refactored RHI draw call stats to better fit the new pipeline design.

#rb jeannoe.morissette, zach.bethel
#jira UE-139543

[CL 30973133 by Luke Thatcher in ue5-main branch]
2024-01-29 12:47:28 -05:00
marc audy
86e771c653 Upgraded PVS-Studio to 7.28
[FYI] Joe.Kirchoff
#rnx

[CL 30664525 by marc audy in ue5-main branch]
2024-01-17 14:16:10 -05:00
steve robb
9a40daca8c Removed PLATFORM_COMPILER_HAS_IF_CONSTEXPR.
Deprecated CONSTEXPR, PLATFORM_COMPILER_HAS_DECLTYPE_AUTO, PLATFORM_COMPILER_HAS_FOLD_EXPRESSIONS and UE_NORETURN.
Made UE_NODISCARD mandatory (not yet deprecated as fixup is needed).

#rb devin.doucette

[CL 30617451 by steve robb in ue5-main branch]
2024-01-15 08:28:01 -05:00
sebastian schoner
6abe9bf298 Print out shader compile worker memory usage when main process goes OOM
When we encounter an OOM-crash in UEFN's cloud cooking, we would like to be able to quickly rule out different parts of the cooking process. One major part that we have poor visibility on at the moment is shader compilation. This CL adds a codepath that prints out the memory usage of the shader compile processes when such a crash occurs.

#rb Laura.Hermanns

[CL 30479044 by sebastian schoner in ue5-main branch]
2024-01-08 07:49:53 -05:00
joe kirchoff
2e344b6efa Intel ICX 2024.0 integration plus instrumented/sampled PGO support (via Jeff.Rous)
#rb Steve.Robb, Joe.Kirchoff

[CL 30383859 by joe kirchoff in ue5-main branch]
2023-12-18 17:29:33 -05:00
christopher waters
e9661bc768 Preparing for dependency cleanup.
[CL 30244022 by christopher waters in ue5-main branch]
2023-12-11 13:55:22 -05:00
joe kirchoff
b51e6cc19c Fix ClangPlatformCodeAnalysis.h include for windows platforms
#rnx

[CL 30218330 by joe kirchoff in ue5-main branch]
2023-12-08 15:18:55 -05:00
nicolas mercier
d8c1578063 Added disk/drive information in the crash context.
#rb daniele.vettorel
#tests BR matches

[CL 30153688 by nicolas mercier in ue5-main branch]
2023-12-06 09:16:52 -05:00