Commit Graph

2289 Commits

Author SHA1 Message Date
dan elksnitis
ef20fbae3e [shaders] fix preprocessed cache versioning mechanism
#rb Yuriy.ODonnell

[CL 27904639 by dan elksnitis in ue5-main branch]
2023-09-14 21:38:57 -04:00
jamie hayes
28b0ed1010 Compute BasePass shader now always uses the ForceVelocity GBuffer layout and disables WRITES_VELOCITY_TO_GBUFFER if neither WPO nor base pass velocity are enabled.
This reduces the number of base pass compute shaders required, since there is currently no need for both to be compiled for a given material.
It also prevents us from having to separate cached material draws into two buckets the way we must for BasePassPS.

#rb graham.wihlidal

[CL 27904544 by jamie hayes in ue5-main branch]
2023-09-14 21:37:35 -04:00
tiago costa
83a67eb2c3 Register/unregister FRayTracingGeometry with FRayTracingGeometryManager in Init/ReleaseResource
- instead doing it in Init/ReleaseRHI
- fixes RegisteredGeometries being modified while iterating over it due to InitRHIForDynamicRayTracing(...) internally calling Init/ReleaseRHI

#jira UE-195457
#rb aleksander.netzel

[CL 27888598 by tiago costa in ue5-main branch]
2023-09-14 14:36:39 -04:00
zach bethel
14d84c3bb0 Re-enabled render command pipes by default.
[CL 27834049 by zach bethel in ue5-main branch]
2023-09-13 11:51:59 -04:00
zach bethel
1c6ffb85f7 Defer submission of AddCommandListSetupTask to batch calls to AsyncCommandListSubmit.
[CL 27833869 by zach bethel in ue5-main branch]
2023-09-13 11:48:20 -04:00
sebastien hillaire
a75c7a6e10 Substrate - Added closure count limit for performance control.
Also added in editor UI for that.

#rb none
see also https://horde.devtools.epicgames.com/job/65004b61563726dac8c16b5c
[FYI] charles.derousiers

[CL 27830870 by sebastien hillaire in ue5-main branch]
2023-09-13 10:37:47 -04:00
zach bethel
501f4cff04 Refactored mesh collector and dynamic vertex / index buffers in preparation for moving GDME off the render thread.
- Added GetRHICommandList() method to FMeshElementCollector.
 - Removed global dynamic vertex / index buffers in favor of local variants.
 - Added some locks to shared systems.

#rb stu.mckenna
#jira none

[CL 27800441 by zach bethel in ue5-main branch]
2023-09-12 14:10:58 -04:00
zach bethel
b036d46bef Fixed server build break.
[CL 27768599 by zach bethel in ue5-main branch]
2023-09-11 16:10:46 -04:00
zach bethel
63a64c0791 Reworked render command pipes sync scopes to only start recording when a pipe was previously recording.
- Fixes issue where pipes are stopped, then a sync occurs and pipes are erroneously started up again.
 - Removed start / stop from end of frame updates.

#jira UE-194553

[CL 27767719 by zach bethel in ue5-main branch]
2023-09-11 15:52:47 -04:00
graham wihlidal
1dc832e054 Added new SupportsLandscape() vertex factory flag, and removed hardcoded VF string checks determining if a landscape material should compile with a given VF.
#rb jonathan.bard
[FYI] yuriy.odonnell

[CL 27737345 by graham wihlidal in ue5-main branch]
2023-09-09 02:14:51 -04:00
zach bethel
fd5f008daf Disabled render command pipes to investigate crash.
#jira none

[CL 27716051 by zach bethel in ue5-main branch]
2023-09-08 12:47:52 -04:00
sebastien hillaire
5ca4969d74 LFV - sampling on straightforward on translucent.
#rb none
#prelfight https://horde.devtools.epicgames.com/job/64f9c66e190d96dd29c652fa

[CL 27698199 by sebastien hillaire in ue5-main branch]
2023-09-07 20:36:59 -04:00
dan elksnitis
44c312ce97 [shaders] roll back input hash sanity check; this was making every job output necessarily one to one with input hashes (and so making the last layer of deduplication within the job cache ineffective; multiple input hashes could conceivably generate the same output due to code diffs that don't affect final output; these are the things we need to fix to improve cache hit rate).
#rb Jason.Nadro

[CL 27698188 by dan elksnitis in ue5-main branch]
2023-09-07 20:36:48 -04:00
jamie hayes
4a2eaa711f Spline mesh updates:
- Add system for spline meshes to cache their slice transforms into look-up textures to optimize spline evaluations in shaders.
- Optimize the Nanite cluster culling shader with spline mesh deformation enabled to limit the cost of this shader added to all Nanite culling.
- More tightly pack the spline mesh parameters into 7 float4s from 8 and rearrange them to optimize shader access.
- Add "Nanite Cluster Bounds Scale" to spline mesh parameters as a means of fixing rare artifacts caused by inaccurate cluster culling bounds.
- A few other various tweaks and fixes to Nanite spline meshes.
- With these improvements, r.Nanite.AllowSplineMeshes is now on by default

NOTE: This is a re-submission of a change that had been previously rolled back. It is now being resubmitted with fixes to the following issues:
- Gaps in spline meshes due to calculating endpoint tangents using finite differencing of the texture.
- Fixed an issue where spline mesh deformation was broken in RVT rendering.
- Fix to an assert that would trip in some commandlets that were using the scene uniform buffer without having first initialized FSystemTextures
- Handle extrapolation of spline sampling from manually specifying mesh extents that are smaller than the actual mesh boundaries.

#rb brian.karis
#jira UE-181795

[CL 27697936 by jamie hayes in ue5-main branch]
2023-09-07 20:32:42 -04:00
graham wihlidal
987e25e552 Renamed NoImplicitDerivatives -> NoDerivativeOps to also handle the explicit derivative cases, and cleaned up cflag naming
#rb rune.stubbe
[FYI] dan.elksnitis

[CL 27697881 by graham wihlidal in ue5-main branch]
2023-09-07 20:30:26 -04:00
graham wihlidal
3295fddd4f Implemented RDNA 1 & 2 ISA parser to optionally detect if a compute shader has any need for implicit derivatives (image sample, ddx, ddy, etc.). Certain shaders can be marked with CFLAG_ExplicitDerivatives, indicating the shaders prefer to handle derivatives explicitly, and this instructs the shader compiler - on supporting platforms - to parse the compiled ISA and look if any instructions requiring implicit derivatives are present. If none are found, the shader is decorated with NoImplicitDerivatives, indicating it is safe to ignore shading quads, etc..
#rb jason.nadro, luke.thatcher, dan.elksnitis
[FYI] brian.karis, rune.stubbe

[CL 27697142 by graham wihlidal in ue5-main branch]
2023-09-07 20:10:55 -04:00
zach bethel
715c4c3851 Fixed build break
[CL 27693415 by zach bethel in ue5-main branch]
2023-09-07 18:37:59 -04:00
zach bethel
6473b91df9 Hardened thread safety of render command pipe system and added ability to sync specific pipes.
- Added additional sync scopes to handle VT standalone path.

#jira UE-194136, FORT-648678, UE-194553, PLAY-12828

[CL 27691097 by zach bethel in ue5-main branch]
2023-09-07 17:51:23 -04:00
christopher waters
cc02406944 Handle namespaced types (Namespace::Type) when parsing shader types.
#jira UE-162016
#rb dan.elksnitis

[CL 27641229 by christopher waters in ue5-main branch]
2023-09-06 13:10:25 -04:00
dmitriy dyomin
2457350cc6 Change FGlobalDynamicReadBuffer to BUF_Dynamic instead of BUF_Volatile.
Only VulkanRHI has a special path for BUF_Volatile and it does not align with FGlobalDynamicReadBuffer expectations about buffer lifetime
#rb allan.bentham

[CL 27635352 by dmitriy dyomin in ue5-main branch]
2023-09-06 10:53:12 -04:00
carl lloyd
04363c772e Fix validation assert when attempting to validate RHI resources. Now only validate if RHI access is allowed
#jira UE-194488
#rb Mihnea.Balta

[CL 27595493 by carl lloyd in ue5-main branch]
2023-09-05 10:12:00 -04:00
tiago costa
15a21681e5 Resubmit check IsRayTracingAllowed() when creating or destroying FRayTracingGeometry.
- using ensureMsgf instead of checkf

#rb aleksander.netzel

[CL 27588192 by tiago costa in ue5-main branch]
2023-09-04 13:55:57 -04:00
sebastian werema
29cba79ec7 Adding missing scope tags for LLM statistics
#rb peter.sauerbrei, thomas.ross, allan.bentham, robert.manuszewski

[CL 27583337 by sebastian werema in ue5-main branch]
2023-09-04 05:49:26 -04:00
dan oconnor
233f5d8d82 Undo changelist 27564117 - This check is likely overzealous
#rb none

[CL 27574397 by dan oconnor in ue5-main branch]
2023-09-01 20:29:36 -04:00
marc audy
e40e92e484 Shader Compiler: Support for async per-shader DDC queries, and fixes for cancellation of jobs with submit job tasks or async DDC queries in flight. For the latter, a new linked list of pending jobs was added, which jobs are placed in between the time they are created and SubmitJob or DDC queries complete. Cancellation of jobs removes them from the pending list, which the SubmitJob task or DDC completion callback can detect, and skip further processing. It's necessary to ensure cancelled jobs (or in-flight DDC requests stored in those jobs) aren't deleted by going to zero refs when this happens, so the parameter to the SubmitJob task and JobInFlight reference in the job cache data need to be upgraded to reference pointers.
Per-shader DDC is now enabled for cooks by default when the preprocessed job cache is enabled, so only that one CVar needs to be toggled to get the full performance benefits.  CVars exist to toggle per-shader DDC during cooks, per-shader DDC for global shaders, and whether per-shader DDC runs async, all set to true.

#jira UE-193798
#rnx
#rb dan.elksnitis jason.nadro

[CL 27572108 by marc audy in ue5-main branch]
2023-09-01 19:34:37 -04:00