Commit Graph

1764 Commits

Author SHA1 Message Date
tiago costa
d1cc91bf1d Added profiler event to FRayTracingGeometryManager::Tick()
#rb none
#preflight none

[CL 23219363 by tiago costa in ue5-main branch]
2022-11-21 07:24:06 -05:00
henrik karlsson
b5164ac775 Fixes to make modules compile with IWYU. We've added to IWYU toolchain so it compiles "orphaned" headers which does not have a owning cpp file. This identified lots of headers that couldn't be compiled by themselves (or if they were to included first)
Change consist of only forward declaration and additional includes

#preflight 63789c1de30d438849c48188
#rb none

[CL 23218412 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:23 -05:00
guillaume abadie
aa25205e7a Implements r.DynamicRes.DynamicFrameTime to increase dynamic res when CPU or VSync bound on desktop
This to ensure by default dynamic res still maxout the GPU feeding maximum pixel/s possible to TSR when user's frame cap or VSync settings are not optimally set.

#rb none
#preflight 6377efaee30d438849a0c061

[CL 23209573 by guillaume abadie in ue5-main branch]
2022-11-18 18:46:13 -05:00
christopher waters
4e779095ab Chaning more code to use SetShaderParameters
- MeshPassProcessor converted to use SetShaderParameters instead of setting individual resources. Caching of SRVs and Samplers was also removed.
- UnsetShaderSRVs and UnsetShaderUAVs now set all the null binds in a single SetShaderParameters command.
- Made some FRHIShaderParameterResource utilities more public.

#jira none
#rb jeannoe.morrisette, luke.thatcher
#preflight 637565eebf76990b71eb38d0

[CL 23197327 by christopher waters in ue5-main branch]
2022-11-18 12:10:55 -05:00
brandon johnson
d5b62f3c43 Fixing an issue with infinite load screen due to a flag in ShaderPipelineCache not being reset when the pending precompile queue gets flushed
#tests Had a reliable test case by launching a cooked build and then going into STW to matchmake. Applied this fix and verified I was able to load into a match correctly
[REVIEW] [at]James.Doverspike, [at]Arciel.Rekman, [at]Kenzo.Terelst
[FYI] Ian.Oleary, Jason.Attard, Stephan.Delmer

[CL 23191107 by brandon johnson in ue5-main branch]
2022-11-18 03:13:58 -05:00
arciel rekman
84798a8aea SCL: fix a deadlock by deleting library contents outside of the NamedLibrariesMutex's scope.
- 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]
2022-11-18 03:12:05 -05:00
christopher waters
c572922683 Bindless Resources prerequisites
- 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]
2022-11-17 11:17:40 -05:00
kenzo terelst
64b75f7589 Skip pso with mesh shader from file cache from file cache when GRHISupportsMeshShadersTier0 is not available
[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]
2022-11-16 18:00:02 -05:00
Sebastien Hillaire
b19df6202a Strata - fixed static variable shadowing.
#rb none
#preflight none

[CL 23158492 by Sebastien Hillaire in ue5-main branch]
2022-11-16 13:54:10 -05:00
Sebastien Hillaire
cd4aa07281 Strata - added high quality normal according to GBuffer format.
#rb none
#preflight https://horde.devtools.epicgames.com/job/6374f970b6636838280f3278
#fyi charles.derousiers

[CL 23155230 by Sebastien Hillaire in ue5-main branch]
2022-11-16 11:35:48 -05:00
christopher waters
4b57998013 Set all parameters and resources for SetShaderParameters in a single RHI command
- 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]
2022-11-15 19:41:53 -05:00
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* 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]
2022-11-14 19:59:41 -05:00
aleksander netzel
5fb13876bb Add proper support for streamed geometries (geometries initialized as StreamingDestination) when dynamic ray tracing is enabled:
* 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]
2022-11-14 08:48:54 -05:00
florin pascu
a945c1e0cb Remove ShaderPlatformToShaderFormatName
#rb Jason.Nadro, Jeremy.Moore
#preflight 637216e13248425305d19318

[CL 23116618 by florin pascu in ue5-main branch]
2022-11-14 07:59:15 -05:00
christopher waters
6bcc020b6c Removing deprecated code from Renderer and RenderCore.
#jira none
#rb zach.bethel
#preflight 636e8639232e3d12cbb610f9

[CL 23104907 by christopher waters in ue5-main branch]
2022-11-11 16:10:25 -05:00
Arciel Rekman
f5f6d47027 Make sure shader refcount cannot be 0 during the creation.
#rb Yuriy O'Donnell
#review @Arne.Schober
#jira
#preflight 636e9116953c19d435584df2

[CL 23101686 by Arciel Rekman in ue5-main branch]
2022-11-11 13:36:14 -05:00
zach bethel
df1568434e Optimized RDG async compute fence computation.
#preflight 636d34ef1c14fe4505fdfc0e
#jira none

#ushell-cherrypick of 23068227 by zach.bethel

[CL 23101437 by zach bethel in ue5-main branch]
2022-11-11 13:21:11 -05:00
yuriy odonnell
369f054047 Add CVar r.SceneDepthHZBAsyncCompute to run HZB generation on async compute
* 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]
2022-11-10 03:03:38 -05:00
christopher waters
977f66039e Removing uniform buffer name locks from FShaderType and FVertexFactory
- 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]
2022-11-09 16:39:32 -05:00
zach bethel
c7762df3f0 Added counters for tracking RDG stats and CSV counters for passes / resources.
#preflight 636ab090ed07daaa9a25dba6
[FYI] ben.woodhouse

[CL 23049849 by zach bethel in ue5-main branch]
2022-11-09 04:11:18 -05:00
steve robb
1e5cb9a75c Removed legacy TAllocatorTraits::SupportsMove, which is assumed to be always be true everywhere it is used.
#rb
#preflight 636ab1e6843e6ac794dae0dc

[CL 23041494 by steve robb in ue5-main branch]
2022-11-08 17:17:09 -05:00
arciel rekman
a042c334d4 Bring back RHI resource deletion when shader library is closed.
- 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]
2022-11-08 14:20:19 -05:00
zach bethel
37fe71e0d1 Latency improvements to RDG.
- 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]
2022-11-08 04:25:52 -05:00
charles bloom
f4f3b76663 FTexture : set debug shader bGreyScaleFormat ReplicateR property from CompressionSettings, not PixelFormat, so it matches what MaterialExpressions wil do
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]
2022-11-07 21:47:57 -05:00
zach bethel
9ab5293097 Fixed bug in RDG dependency tracking with multi-pipe skip-barrier UAVs.
[FYI] jian.ru

[CL 23019459 by zach bethel in ue5-main branch]
2022-11-07 17:23:06 -05:00