- Library deletion flushes render commands, but the rendering thread may be trying to access the libraries stack (for which it needs to acquire NamedLibrariesMutex), so holding that mutex during the deletion results in a deadlock. This change makes the deletion happen after the mutex is released.
- The mutex only guards the NamedLibrariesStack, not contents of any given library. It is still possible that a library being deleted is accessed by another thread that got a pointer to it beforehand, this change does not change anything in that regard. However, this should not happen if the higher level removes all the content from the unmounted plugin from memory prior to unmounting it (and closing the library), which it should do.
#rb CM Nordin, Justin Marcus
[REVIEW] [at]CarlMagnus.Nordin, [at]Mihnea.Balta, [at]Justin.Marcus
#preflight 637691b7b1509f1cc3094063
[CL 23190970 by arciel rekman in ue5-main branch]
- Making SetUAVParameter handle bindless UAVs.
- Changed uses of RHICommandList::SetUAVParameter to use the global SetUAVParameter.
- Changed uses of RHICommandList::SetShaderResourceViewParameter to use the global SetSRVParameter.
#jira UE-170439
#rb Stu.McKenna
#preflight 637565be0c74adb48b1bf7a2
[CL 23176960 by christopher waters in ue5-main branch]
[REVIEW] [at]arciel.rekman
#rb Arciel.Rekman
#localization none
#tests run local replays - needs to be tested on older GPUs which I don't have available here
[CL 23164748 by kenzo terelst in ue5-main branch]
- Expands all RDG and non-RDG bindings into a list of RHIResource bindings.
- Future work could batch up all non-SetShaderParameters calls into similar data structures.
#rb zach.bethel, jeannoe.morissette
#preflight 637320ad3248425305112b91
[CL 23147896 by christopher waters in ue5-main branch]
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file
#preflight 6372b3ac0c74adb48b49f313
#rb none
[CL 23130896 by henrik karlsson in ue5-main branch]
* Add FRayTracingGeometry::EGeometryStateFlags for tracking the state instead of several bools:
- Add new state for tracking if the geometry was streamed in - its primary use is for dynamic ray tracing.
- When ray tracing is toggled on at runtime we only recreate geometries that were marked as streamed in.
* Streamed geometries have to be created in a different way than regular geometries:
- Creating geometry with StreamingDestination type will not allocate any memory for BLAS buffers.
- Those can only be initialized by InitRHIForStreaming from temporary geometry with a StreamingSource type
- Added FRayTracingGeometry::InitRHIForDynamicRayTracing() to handle both StreamingDestination and Rendering
- For StreamingDestination it will do similar steps as normal mesh streaming does.
* Add missing RayTracingGeometry initialization when dynamic ray tracing was enabled but ray tracing was disabled.
#rb tiago.costa, yuriy.odonnell
#preflight 6372245ebf76990b71f5d021
[CL 23116977 by aleksander netzel in ue5-main branch]
* This avoids GPU under-utilization in scenes where a very large number of individual occlusion queries is issued
* Possible r.SceneDepthHZBAsyncCompute values:
* 0: Don't use async compute (default)
* 1: Use async compute, start as soon as possible
* 2: Use async compute, start after ComputeLightGrid.CompactLinks pass
#preflight 636c555f7c2b5051903a24ca
#rb Graham.Wihlidal
[CL 23072519 by yuriy odonnell in ue5-main branch]
- FlushShaderFileCache() used to be called to force all shader types to update their list of referenced uniform buffers, but they are only updated if they were ever used to compile in the current session. This would impact *any* shader type that had been used instead of just being limited to changed shader types.
- Moved the uniform buffer reference updating into a new function: UpdateReferencedUniformBufferNames.
- UpdateReferencedUniformBufferNames should be called before all shader recompiles but after FlushShaderFileCache does reset itself. This function requires a list of outdated types so we can reduce the shader type updates to only the types that need it.
#jira none
#rb jason.nadro, zach.bethel
#preflight 636a7a537c2b505190a464fb
[CL 23063334 by christopher waters in ue5-main branch]
- Also, add flushing the pending deletes in the attempt to make sure any leftover RHI resources from the assets that used that library (which should be already queued for deletion at this point) are deleted before we remove the backing storage.
#rb Rex.Hill, Justin.Marcus, Luke.Thatcher
[REVIEW] [at]Rex.Hill
#preflight 636a7adb376a9cd6a856decc
[CL 23034312 by arciel rekman in ue5-main branch]
- Moved dispatch busy-wait out of the command-list recording task. Allows the render thread to help with jobs once it's done.
- Added workload to pass to help load balancing.
[CL 23025379 by zach bethel in ue5-main branch]
bGreyScaleFormat is only used by debug/editor shaders, game runtime uses SamplerType from MaterialExpressions
bGreyScaleFormat bool is needed because FTexture does not have access to CompressionSettings
behavior is observably different with Grayscale G16 and cases like TC_Alpha non-multiple-of-4
#preflight 636968d6d0174259ccea87f5
#rb dan.thompson
[CL 23023252 by charles bloom in ue5-main branch]
This ends up reverting parts of my last changes here, including a deprecation.
#jira none
#rb zach.bethel, rob.krajcarski
#preflight 636952af7c2b505190525ed7
[CL 23018217 by christopher waters in ue5-main branch]
- Added explicit SwitchPipeline calls to async command lists.
- Moved pipeline push / pop calls from platform implementations to RHI command list.
#rb christopher.waters
#preflight 636937204d3c1d9d9264ce7b
[CL 23012810 by zach bethel 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]
Removal of includes to reduce transitive includes in high traffic headers to reduce compile times
Highlights
* Skeleton and BonePose not leaked out of commonly used animation headers
* AudioComponent leaking out less
* Brush not leaking Level.h (Brush is included indirectly a lot)
* VertexStreamComponent moved to its own file so Components.h can include that instead of VertexFactory (which would leak out all of RHI and others)
#preflight 6365dd15c53af2f47f8d8c40
#rb none
[CL 23003402 by henrik karlsson in ue5-main branch]