Commit Graph

54 Commits

Author SHA1 Message Date
arciel rekman
80c58ff63e Track (first) owners of FShaderMapResource_SharedCode to improve leak investigation.
#rb Jason.Nadro, Rob.Krajcarski, Jeremy.Moore, Eric.Renaud-Houde
#preflight 6402182a59017a559b7df6bd
[REVIEW] [at]Jason.Nadro, [at]Rob.Krajcarski, [at]Jeremy.Moore, [at]Eric.Renaudhoude
#rnx

[CL 24507827 by arciel rekman in ue5-main branch]
2023-03-03 17:02:58 -05:00
jeremy moore
ca0bbb5de5 #jira MH-8602
CPU performance improvements for using half edge buffers in deformer graph data interface.
The half edge buffer was being uploaded per frame. Now it is stored in a resource owned by the data provider and uploaded once.
This is still less than ideal. We want the resource to be owned by the skel mesh, so that it is cooked instead of created at runtime. But that is work for another day.
Also test if we have any compute worker jobs before kicking off RDG graph. This allows for a fairer CPU comparison between skin cache and deformer graph. (We don't want to add RDG overhead to skin cache only work).
Also added support for reordering the compute work so for optimal GPU execution. Ordering by kernel index instead of graph index allows greater overlap of work on GPU when multiple compute graphs are running.
Added a per graph sort priority so that work sorting doesn't cause any setup graphs to run later than execution graphs.
#preflight 63f40694977ceed915769bfe

[CL 24343458 by jeremy moore in ue5-main branch]
2023-02-21 13:06:29 -05:00
jeremy moore
f00268c32b #jira MH-8602
Fix bug where dispatch sizes were being added in all dimensions, causing way too many threads to launch.
Fix is fine for all current execution data interfaces which launch 1d thread groups. Will need refining in the future for 2d or 3d thread groups.
#preflight 63ed944b0a06073fef033645
#rbx

[CL 24253413 by jeremy moore in ue5-main branch]
2023-02-16 04:17:15 -05:00
jeremy moore
350e28810b #jira MH-8602
ComputeFramework: Support for unified dispatches.
When a kernel supports unified dispatch it combines any subinvocations into a single dispatch invocation.
This can only happen if all data interfaces support unified dispatch, and all subinvocation shaders are the same.
Some data interfaces, such as skeleton, don't support this because each section keeps its own bone buffer to keep bone count to a minimum.
In future we should look to change the underlying structures to support unified dispatch as much as possible, since it will be more performant.
#preflight 63ed39c7514832b242bce7a7
#rb jack.cai

[CL 24251753 by jeremy moore in ue5-main branch]
2023-02-16 01:59:01 -05:00
Jeremy Moore
80ab78c906 Optimus: Fix UObject generated shader source paths to fix some path validation warnings.
Change OptimusSource files to set virtual path through virtual file name instead of through (less robust) line directives.
#preflight 63cc5a8d574ab9cae49dc676

[CL 23803742 by Jeremy Moore in ue5-main branch]
2023-01-21 16:53:46 -05:00
Jeremy Moore
f6acd25a55 ComputeFramework: Put DataInterface code inside virtual generated files for shader compilation.
This allows us to jump to compile errors in source for data interfaces that have simple source templates.
#preflight 63cc5a0bd83c1837b1b02af6

[CL 23803741 by Jeremy Moore in ue5-main branch]
2023-01-21 16:51:58 -05:00
Jeremy Moore
90186ec0d0 ComputeFramework: Fix compile error links for UObject shader paths.
Tidied logging during shader compilation.
Optimus: Add support for opening file in visual studio from shader compile errors in Editor or VS log.
#preflight 63c8c39f8168e8b2526e1c66

[CL 23772051 by Jeremy Moore in ue5-main branch]
2023-01-19 08:13:15 -05:00
Jeremy Moore
f39adc465f Remove one unnecessary layer of file indirection in the compute framework shader compilation.
#preflight 63c6c65602024f93d85fc7fb

[CL 23739003 by Jeremy Moore in ue5-main branch]
2023-01-17 11:18:42 -05:00
Jeremy Moore
5fc0b7cc85 ComputeFramework: Don't compile compute graphs on PostLoad.
Defer compilation to first use.
#preflight 63c03df12e714f64ad968ad2

[CL 23665189 by Jeremy Moore in ue5-main branch]
2023-01-12 12:23:03 -05:00
Jeremy Moore
3e9126d0cb ComputeFramework: Move management of shader compilation to the core shader manager.
Existing system was single threaded. With this change we can make used of shader workers.
#preflight 63c01769d862fdd347e46cc0

[CL 23662505 by Jeremy Moore in ue5-main branch]
2023-01-12 09:45:31 -05:00
Jeremy Moore
8bc0c96b2b ComputeFramework: Virtual path changes for compute kernel and source library includes.
Move them to ComputeFramework virtual path by default and use valid paths with .ush suffix.
This is in preparation for migrating to the core shared compliler manager which validates these things.
Compile error path->object resolution for source libraries will be broken, but fixed in a second pass.
#preflight 63c0123e577437afe639b2f5

[CL 23662136 by Jeremy Moore in ue5-main branch]
2023-01-12 09:16:25 -05:00
Jeremy Moore
8eae23ec33 ComputeFramework: Use generic on-disk shader file as source for compute framework kernels.
Source is included from there in generically named generated file.
#preflight 63bf6109de27f9bc450b69b1

[CL 23658267 by Jeremy Moore in ue5-main branch]
2023-01-11 20:38:05 -05:00
Jeremy Moore
e9fe39d75a ComputeFramework: We no longer need to check full shadermap for each graph kernel before enqueuing work.
#preflight 63be0492c45a2c81e033db2d

[CL 23636436 by Jeremy Moore in ue5-main branch]
2023-01-10 19:46:46 -05:00
Jeremy Moore
95d088af44 Optimus: Deprecate UComputeDataProvider::IsValid() and remove concrete implementations that are no longer called.
#preflight 63bddfe1bf54fa7b369fff00

[CL 23634453 by Jeremy Moore in ue5-main branch]
2023-01-10 17:13:11 -05:00
Jeremy Moore
63fa7c1393 ComputeFramework: Add support for fallback delegate to be called whenever EnqueueWork fails.
Failure can happen immediately or later in the pipe (for example when we try to fetch shaders).
Optimus: Use fallback for mesh deformers. Fallback is to simply reset the gpu passthrough vertex factory so that we see the bind pose. This is the same behavior as before, but now can happen at top or bottom of the pipe.
#preflight 63bda31aaf3ebedd992348eb

[CL 23629300 by Jeremy Moore in ue5-main branch]
2023-01-10 12:57:49 -05:00
Jeremy Moore
a337ad02c0 ComputeFramework: Fix android build error.
#preflight 63bcd1f268068a8bd61f9ca2

[CL 23623834 by Jeremy Moore in ue5-main branch]
2023-01-09 21:57:01 -05:00
Jeremy Moore
ccb4fc8004 ComputeFramework: Change to DataProvider validation API, and update for engine DataProviders.
Aim of change is to allow validation later in the pipe on the render thread, so that we can validate shader compilation etc.
Late validation of shader compilation will allow us to implement on demand compilation for compute framework shaders in the editor.
#preflight 63bcc30e5d4ef8faf6678bf2

[CL 23623611 by Jeremy Moore in ue5-main branch]
2023-01-09 21:06:45 -05:00
henrik karlsson
0fab644dc0 [Engine]
- CoreMinimal.h include removal all the way to PlayerController.h not transitively including it

#preflight 63b927dbc927e34482e15e18
#rb none

[CL 23608545 by henrik karlsson in ue5-main branch]
2023-01-08 07:13:33 -05:00
jeremy moore
9d6f40580d ComputeFramework: When testing if plugin is enabled test for the module actually being loaded.
[CL 23475372 by jeremy moore in ue5-main branch]
2022-12-11 23:12:06 -05:00
christopher waters
0270a5f287 Moving FDeferredCleanupInterface and accompanying types to RenderDeferredCleanup.h to remove global dependencies on RenderThread.h
#preflight 6393481ebb6fefa472ddeae0

[CL 23475364 by christopher waters in ue5-main branch]
2022-12-11 23:11:39 -05:00
christopher waters
6e30ddb01e Dependency cleanup around DataDrivenShaderPlatformInfo and a few other headers.
#preflight 63921e6a67018b14b5925197

[CL 23454104 by christopher waters in ue5-main branch]
2022-12-08 15:35:35 -05:00
christopher waters
b986207a34 Moving some RHI types into their own headers:
- DataDrivenShaderPlatformInfo
- ERHIFeatureLevel
- EShaderPlatform

#rb florin.pascu
#preflight 638589464004f73f629ee0b0

[CL 23314007 by christopher waters in ue5-main branch]
2022-11-29 13:36:02 -05:00
bryan sefcik
4b8a83790a Updated to use UE_INLINE_GENERATED_CPP_BY_NAME.
#jira
#preflight 637c388f170bc34a93587526

[CL 23244381 by bryan sefcik in ue5-main branch]
2022-11-22 20:17:33 -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
jeremy moore
2c4d135916 ComputeFramework: Add execution groups so that workloads can be scheduled for different points in the frame.
Added an Immediate execution group which will immediately enqueue the work to the render thread.
Optimus: Use Immediate execution to submit a deformer update when mesh component render state is recreated.
This prevents potential issue with one frame not having any deformerd vertices.

[CL 23147807 by jeremy moore in ue5-main branch]
2022-11-15 19:39:51 -05:00