- The reason for the separate grouping was that PCD3D_SM5 is shared between SM5 and SM6 platforms and as such compressing raytracing shaders together with non-RT ones would affect memory footprint for D3D11.
- For PCD3D_SM6 users this is less of a concern. While this change can regress memory footprint for users who disable raytracing in the settings, it will improve memory footprint for those who do not (presumably, the majority). Also, it saves more in the disk space for everyone.
#rb Jason.Nadro, Dan.Elksnitis
[REVIEW] [at]Jason.Nadro, [at]Dan.Elksnitis
#preflight 6400bdcc5f3b94d2920ec788
#rnx
[CL 24508791 by arciel rekman in ue5-main branch]
- 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]
Due to the fact that UnrealPak doesn't load INIs, the cvar was always its default value. This, combined with the fact that shaders don't store what codec they are compressed with means that setting this cvar to anything other than default (oodle) causes a crash in UnrealPak as DecompressShader will try to decompress with Oodle independent of the actual codec. Rather than plumb this information down through ProjectParams, I felt it prudent to just always use Oodle.
Additionally, in order to facilitate faster iteration times for development build farm jobs, the shader compression level used during UnrealPak will inherit from the overall package compression level set via Project Settings (PackageCompressionLevel_*).
This tacitly avoids patch issues as the default shader compression level happens to be the default package compression level, except now it inherits any faster levels for iteration time.
Note that we still use Mermaid as the codec as it's faster for decompressing than Kraken, which we care about for shaders.
#rb Fabian.Giesen
#rb Arciel.Rekman
#preflight 63e2f94c786751d1e0ffb290
[CL 24092953 by dan thompson in ue5-main branch]
* Fixed inderministic sort order for shaders of the same size, leading to different shader group chunks being generated
* Fixed memory leak when generating shader groups
* Fixed indeterministic classification of shaders appearing in two shader maps with the same hash
#rb pj.kack
#preflight 63e36695797b029c0a96297d
[CL 24070666 by carlmagnus nordin in ue5-main branch]
- Avoids oversubscription deadlock when multiple background threads are creating shaders during the PSO precaching.
#rb CM Nordin, Yuriy O'Donnell
#jira UE-166109
#review
#preflight 6365bb2b4b0e01486a9753be
[CL 23010571 by Arciel Rekman in ue5-main branch]
* Split IsRayTracingEnabled() into 2 parts: IsRayTracingEnabled() which can be changed at runtime and IsRayTracingAllowed() for checking if ray tracing can be enabled.
* r.Raytracing can now have following values: 0 - disabled, 1 - enabled all the time, 2 - enabled dynamic
* When ray tracing is dynamic, RayTracingGeometryManager will collect all FRayTracingGeometry and allocate/release RHI objects as needed depending on if ray tracing is enabled or not.
* Ray tracing can be switched on/off with r.Raytracing.Enable (default is 1).
* Add support to most features used in CitySample/Lyra for switching ray tracing at runtime.
* TODO: Hair geometries are not yet released.
#rb yuriy.odonnell
#preflight 634feac68176062ea7da933f
[CL 22622885 by aleksander netzel in ue5-main branch]
- PCD3D_SM5 and PCD3D_SM6 had a unique situation of having identical (bytecode-wise and output hash-wise) shaders (raytracing is allowed in PCD3D_SM5). This resulted in those IoStore chunks being deduplicated, however, the actual contents were not identical due to optional data (which isn't included in the shader hash, see UE-166389).
- This fix makes sure we don't use just the shader hash alone to produce IoStore chunk hashes. Hash will now include the shader size and the shader format name.
- A few early guards added here and there to detect the problem early.
Also fixed a memory leak in UnrealPak pointed by CM.
#rb [at]Yuriy.ODonnell, [at]CarlMagnus.Nordin, [at]Christopher.Waters, [at]Jason.Nadro
#jira UE-165785
#preflight 633f3beed718720d2d58f37e
[CL 22402802 by arciel rekman in ue5-main branch]
- reduce the amount PSOs precached which won't be used during rendering
- fixes a few missing PSOs
- add some profile tags
- Minor fixes when running with PSO precaching turned on in the editor (won't do a lot right now but also won't fail or assert)
#jira UE-139584
#rb Mihnea.Balta
#preflight 6332c8c5c7791417aaae035d
#rnx
[CL 22203962 by kenzo terelst in ue5-main branch]
- Also, only issue the warning if we waited at least 1ms in that call.
#rb Kenzo ter Elst, Jason Nadro
#jira UE-163502
#review @Kenzo.Terelst, @Jason.Nadro
#preflight 632b0f15b40000c8f0c4705a
[CL 22116865 by Arciel Rekman in ue5-main branch]
Tweak some functions for reduction of duplication and readability.
#rb Jason.Nadro, Rob.Srinivasiah
#rnx
#preflight 630d0a4d501b64ba331b303f
[CL 21685434 by Matt Peters in ue5-main branch]
Changed ShaderArchive, GlobalShaderCache, ShaderDebugInfo and Autogen to use ShaderPlatformName and not ShaderFormat when naming their output files.
#rb Jack.Porter, Chris.Waters, Mihnea.Balta, Jason.Nadro
#jira UE-120561
#preflight 62c31f6fc9410537282296c6
[CL 20937870 by Florin Pascu in ue5-main branch]
- Add a new API to release preloaded shader to provide a way to manage preloaded data (which was previously statically allocated).
#rb James.Doverspike, Richard.Wallis
[REVIEW] [at]Allan.Bentham, [at]Richard.Wallis
#preflight 625e11c4db15ac92db7ee858
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19832275 via CL 19833640 via CL 19837454 via CL 19854946 via CL 19855339
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)
[CL 19856713 by arciel rekman in ue5-main branch]
Replace the map with an array for efficiency.
#jira UE-141110
#rb arciel.rekman
#rnx
#preflight 61fc374ca540d6e61bba7104
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 18886818 in //UE5/Release-5.0/... via CL 18886830 via CL 18887180
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18887383 by pj kack in ue5-main branch]