Commit Graph

1954 Commits

Author SHA1 Message Date
steve robb
366afe8f47 Unshelved from pending changelist '24339224':
Added checks for invalid element counts in various allocators' ResizeAllocation() functions.

[REVIEW] [at]johan.torp
#preflight 63f4e4f1500c05a624a9fe5e
#localization none
#tests preflight, local runs to ensure everything is still fine, runs with deliberately engineered huge reallocations to show that bad resizes are caught.

[CL 24404851 by steve robb in ue5-main branch]
2023-02-24 13:43:13 -05:00
joakim trossvik
441c87337c Fixing PSO deadlocked in Pre loading screen.
#rb Allan.Bentham
#preflight 63f86da09009dd70d788850a

[CL 24398403 by joakim trossvik in ue5-main branch]
2023-02-24 04:57:20 -05:00
arciel rekman
1baa660036 Fix not having materials in DLC cooked against -fastcook builds.
- Fastcook disables chunking of the game content, so when a DLC is cooked against it and its content is split according to regular chunk IDs, the game can no longer find the shader libraries (that get chunk-specific names). To remedy this, chunking of the DLC shader libraries is disabled, especially given that currently the actual DLC pak file isn't split into chunks (if and when it becomes so, we will reconsider).
- Also improved logging to better understand how the libraries are getting opened, given the multitude of possibilities.

#rb Jason.Nadro
[REVIEW] [at]Jason.Nadro
#preflight 63f6ec877064074bd8e15684 , also 63f79cfdef1b24bf940d3624

[CL 24397829 by arciel rekman in ue5-main branch]
2023-02-24 04:00:37 -05:00
zach bethel
aa4493dd87 Moved Nanite packed view initialization off the render thread for Lumen / Shadows.
#rb ola.olsson
#preflight 63f6d6e7500c05a62483433f

[CL 24375401 by zach bethel in ue5-main branch]
2023-02-22 22:43:56 -05:00
christopher waters
be67f1c549 Changing GetBindlessConfiguration to not use FShaderSettingHelper for now since RHIParseBindlessConfiguration handles the non-empty CVar override correctly for these settings.
Turning bindless samplers back on for PC D3D RayTracing shaders.

#jira UE-171919
#preflight 63f6930826233b957f42b041
#rb chris.kulla

[CL 24372028 by christopher waters in ue5-main branch]
2023-02-22 18:02:28 -05:00
christopher waters
8676f608fc Moving DumpGPU to Public so that DumpGPUServices can access it correctly.
[CL 24352017 by christopher waters in ue5-main branch]
2023-02-21 17:55:28 -05:00
charles derousiers
0fad76c4d7 Rename all user/editor-facing Strata name into Substrate.
This CL address only user-facing part, i.e. Property field, view modes, tool tips, ...) mentioning Strata. All internal (host code, shaders code, CVars) still contains the 'Strata' name.

#rb sebastien.hillaire
#jira UE-175169
#preflight 63f4db68cf37615300e71db5
#lockdown juan.canada

[CL 24350396 by charles derousiers in ue5-main branch]
2023-02-21 16:52:23 -05:00
Arciel Rekman
99c6af002e Fix PSO cache mismatch when packaging a local build using precompiled binaries.
- Reported on UDN: when using precompiled editor binaries to package a project, their version will lag behind the game's engine version - resulting in the bundled file being rejected due to GameVersion field mismatch.
   - Let's say PCBs (precompiled binaries) were compiled at CL X,  you have now synced to X + 100, and you're packaging a game locally.  Cooker will embed X as GameVersion of the bundled cache, but the game will check against its X+100 CL.

#rb Allan.Bentham
#jira none
#review @Allan.Bentham
#preflight none

[CL 24345564 by Arciel Rekman in ue5-main branch]
2023-02-21 14:02:21 -05:00
yuriy odonnell
4d5a51b7c1 Split ray tracing instance counter stats into explicit active and total parts
* Previously only active instances were reported, which is sometimes misleading
* The total number of instances affects the TLAS memory allocation, instance buffer building compute shader and TLAS build itself

#rb ...
#preflight 63f3feda6a22bef8c0b1e9da
#jira UE-177938

[CL 24344113 by yuriy odonnell in ue5-main branch]
2023-02-21 13:25:28 -05:00
allan bentham
db11ab5517 Add some logging when precompile PSO cache batch rate changes.
#rb none
#preflight 63f3b31561378b7ea01d2746

[CL 24323130 by allan bentham in ue5-main branch]
2023-02-20 15:43:36 -05:00
carl lloyd
ce3e8fe3fe Move Fortnite to OpenGL DXC
Fixed bug in Shader Key with OpenGL

#rb Allan.Bentham
[FYI] Pete.Sauerbrei

[CL 24312254 by carl lloyd in ue5-main branch]
2023-02-20 07:25:20 -05:00
wouter dek
3ae5c6c895 Convert shader type and parameter struct metadata from global variables to static locals to defer initialization. This allows us to create these types dynamically at startup, while keeping the rest of the infrastructure as is.
#rb jason.nadro
#preflight 63f352130803c73accb744f1

[CL 24311526 by wouter dek in ue5-main branch]
2023-02-20 06:10:39 -05:00
krzysztof narkowicz
44d70d7641 Lumen:
* Fix incorrect reflections when using r.Lumen.Reflections.SampleSceneColorAtHit. Screen space hit points are now also discarded based on the comparison between reconstructed geometric normal and ray hit geometric normal.
* Fix surface cache sampling with hit lighting due to using detail normal instead of a geometric normal

#rb Daniel.Wright, Charles.deRousiers
#preflight 63efca0961378b7ea0361104
#jira UE-177485
#lockdown Juan.Canada

[CL 24295260 by krzysztof narkowicz in ue5-main branch]
2023-02-17 19:38:38 -05:00
zach bethel
15d39e7bd3 Always dispatch RHI thread in RDG BeginFlushResourcesRHI. Avoids a CPU induced stall when flushing the RHI thread.
#preflight trivial

[CL 24292145 by zach bethel in ue5-main branch]
2023-02-17 17:02:47 -05:00
zach bethel
57703785a3 Precreate FRDGPooledBuffer default SRV for structured or byte address buffers. This is so GetSRV() can be safely called off the render thread.
#preflight 63ee96092d7011735a28ff40

[CL 24284534 by zach bethel in ue5-main branch]
2023-02-17 12:16:00 -05:00
christopher waters
87014d9ccf Allow configuration of Bindless on a per-format basis in configs.
- The config section is the DDSPI ShaderFormat of the shader platform
- BindlessResources and BindlessSamplers can be set independently
- The cvars still exist and will take precedence over the config settings.
- Renamed RHIGetBindlessResourcesConfiguration/RHIGetBindlessSamplersConfiguration to have the word "Runtime" in them to reflect that they should only be used at runtime and not when deciding if it's enabled for a shader.

#jira UE-171919
#rb jason.nadro, yuriy.odonnell, jeannoe.morissette
#preflight 63edaabd0a06073fef07655f

[CL 24282763 by christopher waters in ue5-main branch]
2023-02-17 11:01:24 -05:00
Luke Thatcher
8aa7a3ed44 Cleanup recursive shader initialization in platform RHIs
- Removed overrides of PostInit where applicable.
 - Added GRequiredRecursiveShaders as a flags enum set by the platform RHI, which indicates which group of global shaders will be used with recursive command lists.
 - Replaced calls to CreateClearReplacementShaders() in ShaderCompiler.cpp with CreateRecursiveShaders(), enqueued in a render thread command.

Fix ensure calling IsInRenderingThread() from scene renderer tasks
 - The tasks may be launched inline, meaning they're still running on the render thread, so shouldn't be tagged as EParallelRenderingThread.
 - Use FOptionalTaskTagScope instead of FTaskTagScope.

General cleanup of OpenGL threading.
 - Removed shader proxy objects. Proxies were used to defer creation of shaders to the RHI thread. This is can be achieved simply with RHICmdList.EnqueueLambda() to defer those operations.
 - The FOpenGL...RHIThreadFence types were used to fence deletion of resources on the RT. All RHI resources are deleted on the RHIT now, so there is no need to track lifetimes in this way.
 - Replaced multiple uses of ALLOC_COMMAND_CL / bCanRunOnThisThread with RHICmdList.EnqueueLambda().

Removed types and functions:
 - FOpenGLAssertRHIThreadFence
 - FOpenGLRHIThreadResourceFence
 - TOpenGLResourceProxy
 - TOpenGLShaderProxy
 - TIsGLProxyObject_V
 - TIsGLResourceWithFence
 - FOpenGLVertexShaderProxy
 - FOpenGLGeometryShaderProxy
 - FOpenGLPixelShaderProxy
 - FOpenGLComputeShaderProxy
 - CheckRHITFence()
 - FOpenGLDynamicRHI::ResourceCastProxy()
 - FOpenGLDynamicRHI::ResourceCast_Unfenced()

#rb Dmitriy.Dyomin, Carl.Lloyd,
#jira none
#preflight 63ee96dcd60e91569b60f743

[CL 24278699 by Luke Thatcher in ue5-main branch]
2023-02-17 04:18:07 -05:00
carl lloyd
bea9e08395 Added support to separately enable OpenGL deferred
#rb Florin.Pascu
[FYI] Allan.Bentham

#preflight 63ecd462b96a6b2718ac0ee6

[CL 24254770 by carl lloyd in ue5-main branch]
2023-02-16 05:50:42 -05:00
stu mckenna
de1e634f7d - Fix for ValidateIndirectArgsBuffer using buffer stride rather than the size of indirect arguments
- Buffer stride isn't guaranteed to cover the indirect args, can be zero, 4, etc, or larger which will result in false positive

#rb eric.mcdaniel
#jira UE-176981
#preflight 63ebb0027d2ec3d2fddefb94
#lockdown Mihnea.Balta

[CL 24251640 by stu mckenna in ue5-main branch]
2023-02-16 01:54:28 -05:00
arciel rekman
c751135be1 Speculative fix for inability to decompress the shaders.
- IoStore chunks must be getting recompressed along the way. Do not trust the header info and use the IoStore chunk info instead.

#rb CM.Nordin
[REVIEW] [at]Dan.Thompson, [at]Allan.Bentham, [at]CarlMagnus.Nordin
#preflight 63ed0204e558a2dbb278ff39

[CL 24251530 by arciel rekman in ue5-main branch]
2023-02-16 01:48:17 -05:00
Arciel Rekman
84d3f99470 [Backout] - CL24227640
#fyi wouter.dek

The problem with this change is that late-created shader types will not be in the shadertype list and as such will not be included in the shader map even if their ShouldCompilePermutation() would return true.

Original CL Desc
-----------------------------------------------------------------
Convert shader type and parameter struct metadata from global variables to static locals to defer initialization. This allows us to create these types dynamically at startup, while keeping the rest of the infrastructure as is.

#preflight 63eca58e7d2ec3d2fd286d9a
#rb zach.bethel

[CL 24240825 by Arciel Rekman in ue5-main branch]
2023-02-15 15:57:24 -05:00
dan elksnitis
790bc7a3d9 [shaders] move generation of OutputHash.txt debug file into common compile function (instead of being part of the worker output readback code); as a result it is executed both for the in-process and worker-based shader compilation paths.
#preflight 63ebf595b64ac0eccb0ce747
#rb Jason.Nadro
#rb Laura.Hermanns

[CL 24231256 by dan elksnitis in ue5-main branch]
2023-02-15 11:00:38 -05:00
dan elksnitis
a7db170d52 [shaders] strip out deprecated shader map functions
#preflight 63ebf592514832b242664166
#rb Jason.Nadro
#rb Laura.Hermanns

[CL 24231236 by dan elksnitis in ue5-main branch]
2023-02-15 10:59:22 -05:00
wouter dek
7a70fa6a8f Convert shader type and parameter struct metadata from global variables to static locals to defer initialization. This allows us to create these types dynamically at startup, while keeping the rest of the infrastructure as is.
#preflight 63eca58e7d2ec3d2fd286d9a
#rb zach.bethel

[CL 24227640 by wouter dek in ue5-main branch]
2023-02-15 05:55:29 -05:00
dmitriy dyomin
931d8b4c16 Properly cook out VT for mobile platforms if VT is not supported on mobile
[CL 24226715 by dmitriy dyomin in ue5-main branch]
2023-02-15 01:19:04 -05:00