Commit Graph

1428 Commits

Author SHA1 Message Date
zach bethel
49a06cd724 Fixed crash due to invalid extracted transient render target allocation lifetime.
#jira UE-148034
#preflight trivial

[CL 19627706 by zach bethel in ue5-main branch]
2022-04-05 13:14:19 -04:00
carl lloyd
9bc1cec538 Enabling half precision floating point for Metal on iOS/tvOS
#rb Dmitriy.Dyomin, Laura.Hermanns
#jira UE-120588
#preflight 624c3b06f4217035fac65500

[CL 19626453 by carl lloyd in ue5-main branch]
2022-04-05 11:51:04 -04:00
Sebastien Hillaire
ab609c73b5 Add support for distance field shadow on water.
Storing water in gbuffer and runnign extra lighting pass would be too expenssiv. So instead, when in deferred, single layer water always output the main dir light luminance into a separate 111110 texture.
DF shadow is applied on that texture. DFShadow culling step is cached the first time for a given view in order to be able to reapply DFShadow later with a depth buffer containing water. This save 0.4ms on a base console.
DFShadow is naturaly skipped if the directional light does not have that feature enabled.
When DFShadow is executed, it is basically 0.24ms extra on a base console @ 1080p.
The separated light buffer is an extra 8MB allocated when in deferred.
This only works with deferred for now (forward does not run the reflection/composite pass).

Render target slot assignement is a bit fuzzy but this is a mostly static setup so should be fine. And could change with Strata down the line.

r.Water.SingleLayer.ShaderSupportDistanceFieldShadow is to enabled dfshadow on water for the shaders. Defaults to 1 and will only be enalbed when using deferred and when distance fields are enabled.
r.Water.SingleLayer.DistanceFieldShadow is a runtime toggle of the feature (if enabled the shaders still output to the separate light render target, but that is simply discarded).

Follow up: tile upsample, tile traceshadow, make it work with strata.

Tested shooter and console.

#rb Tiago.Costa, Kevin.Ortegren
#preflight https://horde.devtools.epicgames.com/job/62457ad79f404234145cd424

[CL 19613312 by Sebastien Hillaire in ue5-main branch]
2022-04-04 15:03:48 -04:00
Steve Robb
cc12aaac04 Math macro prefix fixes for CoreUObject and Engine.
#rb none
#jira UE-140139
#preflight 624af57b637925b5d3fb9fef

[CL 19609424 by Steve Robb in ue5-main branch]
2022-04-04 11:13:42 -04:00
Yuriy ODonnell
618e578293 Add validation for ray tracing geometry index buffer values
- Check that index values are within the D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC::VertexCount range.

#rb Tiago.Costa
#preflight 62478f89dc6183e3f526a7be

[CL 19607734 by Yuriy ODonnell in ue5-main branch]
2022-04-04 09:00:12 -04:00
Johan Torp
b94239e9e4 Optimize GetMaterialShaderMapKeyString
215s -> 11s together with previous DDC cache key optimization when cooking an internal project

* Moved to Append methods and changed printf to BytesToHex (added some new core append / BytseToHex methods in 19585530)
* Added local lookup cache around FShaderParametersMetadata::GetStructList()
* Added local lookup cache around Freeze::HashLayout()
* Fixed bug in FUniformBufferNameSortOrder that caused unnecessarily long keys, which means all material keys will change
* Optimized ReferencedUniformBuffers hash map merging

#rb arciel.rekman,ben.ingram,jason.nader,devin.doucette,zousar.shaker
#preflight 6246c18d292f228e0912c54a

[CL 19605396 by Johan Torp in ue5-main branch]
2022-04-04 04:12:15 -04:00
dmitriy dyomin
ccaaa385d8 Fixed: Use SceneDepthAux texture for depth capture on mobile
Fixed: Correct viewport computations in AddClearRenderTargetPass
#rb none
[FYI] jonathan.bard

#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 19605221 via CL 19605222 via CL 19605292 via CL 19605294
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19605375 by dmitriy dyomin in ue5-main branch]
2022-04-04 04:05:31 -04:00
Charles deRousiers
4ea338cef4 Change ViewRect rounding to be 8 pixels instead of 4 when strata is enabled.
This allows to align view rect onto Strata tile size, which easy multi-view handling with tile rendering.

#rb none
#jira none
#preflight 62498947b6084b98326e36c6
#fyi sebastien.hillaire

[CL 19603857 by Charles deRousiers in ue5-main branch]
2022-04-03 13:14:29 -04:00
Yuriy ODonnell
87820dcc8b Groundwork for in-engine GPU-based DXR validation layer
This adds r.D3D12.RayTracing.GPUValidation that performs basic ray tracing geometry validation on the GPU.
Currently only the basic inactive triangle rules are checked. Additional checks will be built on this foundation.

#rb aleksander.netzel
#preflight 6244b30cdc6183e3f5f9b06f

[CL 19596627 by Yuriy ODonnell in ue5-main branch]
2022-04-01 18:07:43 -04:00
zach bethel
b2399555b2 Fix for crash in RDG due to bad aliasing transition.
#jira UE-147406
#preflight trivial

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 19589458 via CL 19589500 via CL 19589523
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19590972 by zach bethel in ue5-main branch]
2022-04-01 13:05:11 -04:00
rob krajcarski
996a907738 Disable parallel RDG if not running in a dedicated render thread - fix from zach.bethel
#jira none
#rb none
#preflight 624615c8e434babd8afa04b1

[CL 19578540 by rob krajcarski in ue5-main branch]
2022-03-31 17:06:59 -04:00
allan bentham
ed40d5a057 Background PSO compililation changes,
Add an option to use a thread pool instead of taskgraph for GFX PSO precompile tasks.
Disabled by default. Use r.pso.PrecompileThreadPoolSize=N to enable.
threadpool PSO precompile tasks are not added as dependencies of RHIcmd list and should not block RHIT.

#rb Andriy.Tylychko, Arne.Schober
[FYI] peter.sauerbrei, jack.porter, Arciel.Rekman

#ROBOMERGE-OWNER: allan.bentham
#ROBOMERGE-AUTHOR: allan.bentham
#ROBOMERGE-SOURCE: CL 19571102 via CL 19571115 via CL 19571272 via CL 19571286
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19575811 by allan bentham in ue5-main branch]
2022-03-31 14:25:15 -04:00
eric mcdaniel
9fd65080aa Fix for blocked cooks due to per-shader pre-processor defines targetting non-existant shader
- shader got renamed so retarget the associated pre-processor defines to the new shader
- also convert the errors incurred to warnings as they should not be fatal to cooks

#rb Jamie.Hayes
#jira none
#preflight 6245b71c981a2c8eb4808dda

[CL 19573197 by eric mcdaniel in ue5-main branch]
2022-03-31 11:11:54 -04:00
dmytro vovk
836eb44099 Fixed TSan warning in Shader Resource
#rb Andriy.Tylychko
#jira none
#preflight 6244f88df73c316f68ea74d3

[CL 19567472 by dmytro vovk in ue5-main branch]
2022-03-30 20:57:33 -04:00
arciel rekman
1c4d80a2ff Chunk PSO cache during the cook (FORT-443978).
- "Build" command of the PSO commandlet will split the cache, generating separate files for each chunk.
- Criterion is whether any shaders of the PSO can be used by the assets in that chunk (including after deduplication).
- Disabled by default because the runtime part to pick up those files isn't in yet.

#rb Allan.Bentham, Dmytro.Vovk
[REVIEW] [at]Allan.Bentham, [at]Pete.Sauerbrei, [at]Chris.Genova, [at]James.Doverspike, [at]Kenzo.TerElst, [at]Dmytro.Vovk
#preflight 62448dc2e434babd8ae73354

#ROBOMERGE-OWNER: arciel.rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19563493 via CL 19563649 via CL 19563674
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19565457 by arciel rekman in ue5-main branch]
2022-03-30 18:20:37 -04:00
charles bloom
817400610d fix GlobalShader crash in stompmalloc due to pointing at a member after a resize
#rb jason.nadro
#preflight 6244aebec667881bf4ecea1e

[CL 19563322 by charles bloom in ue5-main branch]
2022-03-30 15:58:02 -04:00
juan canada
40c97ded70 Fixed compilation error introduced by 19547074 colliding with 19546929
[FYI] Edwin.Maynard, guilaume.abadie
#jira UE-147462
#rb none
#preflight none

#ROBOMERGE-AUTHOR: juan.canada
#ROBOMERGE-SOURCE: CL 19550057 via CL 19550110 via CL 19550143
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19560930 by juan canada in ue5-main branch]
2022-03-30 14:18:00 -04:00
guillaume abadie
d5f3de4025 Have DumpGPU to dump a log on crash, as well as a Base/Status.txt to explicitly detect in the viewer if something went really wrong
#rb juan.canada
#preflight 62433f34927e60e34141e8dd

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 19547074 via CL 19547081 via CL 19547085
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19560863 by guillaume abadie in ue5-main branch]
2022-03-30 14:16:07 -04:00
christopher waters
f12afe6c73 Deprecating RHICreateTexture2DArray, RHICreateTexture3D, RHICreateTextureCube, RHICreateTextureCubeArray.
Converted a few additional RHICreateTexture2D calls to RHICreateTexture.
Adding a few more FRHITextureCreateDesc::CreateXXX variants to quickly specify extents and formats.
Merging FTextureRWBuffer2D and FTextureRWBuffer3D into a single class FTextureRWBuffer and deprecated the old ones.

#jira none
#rb luke.thatcher
#preflight 62448deb927e60e3415508e5

[CL 19560161 by christopher waters in ue5-main branch]
2022-03-30 13:36:17 -04:00
zach bethel
373e1c32e7 Don't clobber RDG resources that were uploaded from host memory.
#jira UE-143179
#fyi charles.derousiers
#preflight trivial

[CL 19557943 by zach bethel in ue5-main branch]
2022-03-30 11:30:02 -04:00
Andriy Tylychko
3b82927aee removed unused NewTasks from TaskGraph's FGraphEvent::DispatchSubsequents() calls, as a preparation for deprecation
#preflight https://horde.devtools.epicgames.com/job/6244160fdc6183e3f5ef6650
#rb francis.hurteau, danny.couture

[CL 19554617 by Andriy Tylychko in ue5-main branch]
2022-03-30 04:53:52 -04:00
dmitriy dyomin
d5741f624b Added option to disable usage of a baked landscape mesh on mobile platforms (r.Mobile.LandscapeMesh)
#rb jack.porter

#ROBOMERGE-OWNER: dmitriy.dyomin
#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 19528072 via CL 19528235 via CL 19528695 via CL 19528703
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19532768 by dmitriy dyomin in ue5-main branch]
2022-03-28 16:28:57 -04:00
guillaume abadie
04d236812f Do not DumpGPU RDG resources that are read-only
#jira UE-146647
#rb trivial
#preflight 6241c8808330d27ee3908af4

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 19527390 via CL 19527520 via CL 19527536
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19532702 by guillaume abadie in ue5-main branch]
2022-03-28 16:26:45 -04:00
christopher waters
cb6ce0960c Easier FRHITextureCreateDesc construction and FRHITextureDesc static CreateXXX deprecation
- Deprecated all the Create functions in FRHITextureDesc
- Added Create functions to FRDGTextureDesc which now derives from FRHITextureDesc instead of just being an alias
- FRHITextureCreateDesc can now be constructed functionally via SetXXX functions that return a reference to the FRHITextureCreateDesc
- Fixed a couple bad uses of FRHITexture*Desc types that should have been using FRDGTextureDesc

#jira none
#rb zach.bethel, luke.thatcher, mihnea.balta
#preflight 623df2e16d39f6b5a057299e

[CL 19516773 by christopher waters in ue5-main branch]
2022-03-25 14:18:22 -04:00
zach bethel
f457a69101 Added RHI tracked access API to remove Unknown transitions.
- New RHI command list SetTrackedAccess method for the user to supply a current whole-resource state.
 - New RHI command context GetTrackedAccess method for querying the tracked access in RHIBeginTransitions / RHIEndTransitions on the RHI thread.
 - Hooked RHICmdList.Transition and FRHICommandListExecutor::Transition to assign tracked state automatically.
 - Refactored RDG and resource pools to use new RHI tracking.
      - FRDGPooledBuffer / FRDGPooledTexture no longer contain tracked state. RDG temp-allocates state through the graph allocator instead.
      - All prologue transitions are 'Unknown', and all epilogue transitions coalesce into a whole resource state.
 - Implemented platform support for patching the 'before' state with the tracked state.
 - Implemented various RHI validation checks:
      - Asserts that the user assigned tracked state matches RHI validation tracked state, for all subresources.
      - Asserts that tracked state is not assigned or queried from a parallel translation context.
 - Added FRHIViewableResource and FRHIView base classes to RHI. FRHIView contains a pointer to an FRHIViewableResource. This is currently a raw pointer, but should be extended to a full reference in a later CL.

NOTE on RHI thread constraint:

Transition evaluation is now restricted to the RHI thread (i.e. no parallel translation contexts). Transitions aren't performed in parallel translate contexts anyway, so this is not a problem. If, however, we decide to refactor parallel translation to be more general, this implementation could be extended to track the state per context and update from the 'dispatch' thread.

#preflight 6233b4396666d7e753a16aaf
#rb kenzo.terelst

[CL 19513316 by zach bethel in ue5-main branch]
2022-03-25 11:19:10 -04:00