- FRHIRayTracingScene is created with NumCallableShaderSlots.
- Application can add entries to SBT using CallableCommands array.
- ShaderBindings are generated from CallableCommands in BindRayTracingMaterialPipeline(...) once the RTPSO is available so CallableShaderIndex is known.
- Shader Bindings are then merged and set during WaitForRayTracingScene.
#rb yuriy.odonnell
#preflight 628d4053b378b39d419afc4d
[CL 20356249 by tiago costa in ue5-main branch]
- useful to gather shader bindings to evaluate materials in callable shaders.
- similar to how it supports compute and hit group shaders.
#rb yuriy.odonnell
#preflight 6287503ac057ee6e23f2f8dc
[CL 20292265 by tiago costa in ue5-main branch]
- GetRayTracingCallableLibrary() similar to how we handle hitgroups.
FindRayTracingCallableIndex(...) to query callable shader index in RTPSO.
#rb yuriy.odonnell
#preflight 628620c99016c6dd8974b510
[CL 20278150 by tiago costa in ue5-main branch]
This method can be called before the render pass is executed, so the currently bound state is irrelevant. The calling code must extract the correct render target configuration from the pass parameters and send it. Relying on ApplyCachedRenderTargets could lead to incorrect sort keys or even crashes when the method was called in between passes, and the previously bound texture pointers were stale.
#jira none
#rnx
#rb Christopher.Waters
#preflight 61b3363313028c27d2928d57
#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 18430152 in //UE5/Release-5.0/... via CL 18435290
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18435514 by mihnea balta in ue5-release-engine-test branch]
* Updates to the VirtualShadowMapArrayCacheManager to support the invalidation of cache pages upon removal of dynamic primitives
* Various updates and fixes to support writing dynamic primitives' instance scene data and instance payload data from the GPU
* All these changes are needed by a few existing systems that will be using them soon to render via GPU Scene
(NOTE: This change is a resubmit of 18375369 with CIS fixes that caused it to be backed out)
#rb ola.olsson
#preflight 61ae4176353890ce23d75a95
#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 18384716 in //UE5/Release-5.0/... via CL 18384780
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)
[CL 18384814 by jamie hayes in ue5-release-engine-test branch]
[FYI] jamie.hayes
Original CL Desc
-----------------------------------------------------------------
* Updates to GPU Scene and the GPUSceneCollector to support handling the upload of multiple instances and instance payload data for dynamic primitives
* Updates to the VirtualShadowMapArrayCacheManager to support the invalidation of cache pages upon removal of dynamic primitives
* Various updates and fixes to support writing dynamic primitives' instance scene data and instance payload data from the GPU
* All these changes are needed by a few existing systems that will be using them soon to render via GPU Scene
#rb ola.olsson
#ROBOMERGE-AUTHOR: aurel.cordonnier
#ROBOMERGE-SOURCE: CL 18375767 via CL 18375771 via CL 18375781
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18375783 by aurel cordonnier in ue5-release-engine-test branch]
* Updates to the VirtualShadowMapArrayCacheManager to support the invalidation of cache pages upon removal of dynamic primitives
* Various updates and fixes to support writing dynamic primitives' instance scene data and instance payload data from the GPU
* All these changes are needed by a few existing systems that will be using them soon to render via GPU Scene
#rb ola.olsson
#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 18359911 via CL 18375369 via CL 18375397
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18375424 by jamie hayes in ue5-release-engine-test branch]
This is generally cheaper or the same under low-contention scenarios, but saves a large amount of time in high-contention scenarios.
#rb zach.bethel
#lockdown jeff.farris
#preflight 6172132095715b0001973c93
#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 17894788 via CL 18005601 via CL 18370337 via CL 18370420
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18370490 by jamie hayes in ue5-release-engine-test branch]
- Reduce alloc count from 15.4M to 13.3M for 24s of gameplay ~85K allocs/s
#rb Christopher.Waters
#preflight 619d1d12f934c1a291fd89e3
#ROBOMERGE-AUTHOR: danny.couture
#ROBOMERGE-SOURCE: CL 18285493 in //UE5/Release-5.0/... via CL 18285506
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18285514 by danny couture in ue5-release-engine-test branch]
- Added an optional default sort key override to FMeshDrawCommand::GetPipelineStateSortingKey() so Nanite material command ID could be used as a default instead of shader index, which results in much more effective context roll reduction in the absence of GRHISupportsPipelineStateSortKey
- Refactored Nanite base pass material draws to sort via MeshDrawCommand.GetPipelineStateSortingKey
- Removed "disable culling" path from Nanite base pass (no longer useful, and obviously much slower)
- Disabled depth compression on Nanite material depth if compute depth export is disabled (wasted bandwidth for an always cleared target without any contributing acceleration). - saves ~0.2ms to ~1.0ms in Nanite material pass, depending on scene complexity.
- Disabled NANITE_MATERIAL_STENCIL until RHIs no longer set stencil ref to 0 on a PSO change. This optimization is actually worse (forces a context roll per unique material draw, back to back). - saves ~0.3ms in Nanite material pass
#rb kryysztof.narkowicz
[FYI] brian.karis, rune.stubbe
#preflight 611e4267aabad100014f8441
#ROBOMERGE-SOURCE: CL 17238683 via CL 17257053
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17257293 by graham wihlidal in ue5-release-engine-test branch]
Implemented Lumen Nanite pass material apply pass sorting getting around 20% speedups on small draws.
[FYI] Graham.Wihlidal
#preflight 611532b019733b0001792b2f
#ROBOMERGE-SOURCE: CL 17152173 via CL 17152192
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17152202 by krzysztof narkowicz in ue5-release-engine-test branch]
* Use a shader code hash instead of sorting by shader pointer in CalculateBasePassMeshStaticSortKey()
* Added a serial number to UPrimitiveComponent, which is generated in OnRegister() and then used in FPrimitiveArraySortKey as an extra sort key.
Contributed by andrewtop-cruise.
#github 7934
#github 8273
#preflight 61128303afd67e0001e7a14b
#rb Arciel.Rekman
#ROBOMERGE-SOURCE: CL 17150851 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17150861 by yuriy odonnell in ue5-release-engine-test branch]
Run a compute job that packs most commonly used instance data (LocalToWorld matrix and some other bits - 80 bytes) into per-instance vertex buffer. Vertex shader does not have access to GPUScene and instead loads instance data from a per-instance vertex buffer. If it needs more primitive/instance data than available then it will load it from Primitive UB, binding unique uniform buffer and breaking auto-instancing. Pixel shader has a full access to a GPUScene
There are 3 ways how FSceneDataIntermediates gets populated
1. PrimitiveId + GPUScene (Desktop)
2. Per-Instance data + Primitive UB (Mobile)
3. Primitive UB (auto-instancing disabled)
Details for GPUScene specific vertex inputs and access to FSceneDataIntermediates are hidden behind a macro:
VF_GPUSCENE_DECLARE_INPUT_BLOCK
VF_GPUSCENE_GET_INTERMEDIATES
FSceneDataIntermediates is now stored in FVertexFactoryIntermediates, FMaterialVertexParameters. Added a few GetPrimitiveData() overloads that allows you to access PrimitiveData depending on current context. Removed most of the cases where GetPrimitiveData() gets used with PrimitiveId.
#rb Ola.Ollson
#ROBOMERGE-SOURCE: CL 17093848 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)
[CL 17093856 by dmitriy dyomin in ue5-release-engine-test branch]
- Intermediate step towards making renderer instance-first.
- Enables simplification of instance culling setup.
#rb Krzysztof.Narkowicz
#ROBOMERGE-SOURCE: CL 16729395 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16729413 by ola olsson in ue5-release-engine-test branch]
- Friendly name ignores material instances for historical reasons (it should really be using a debug name on the shadermap).
#rb Kevin.Ortegren
#jira none
#ROBOMERGE-SOURCE: CL 16606161 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)
[CL 16606165 by arciel rekman in ue5-release-engine-test branch]