Commit Graph

868 Commits

Author SHA1 Message Date
Dmitriy Dyomin
038d909044 Support shading models for mobile deferred path when static lighting is disabled
#rb wei.liu
#jira none
#preflight 627b5f586842238976719cc3

[CL 20134438 by Dmitriy Dyomin in ue5-main branch]
2022-05-11 03:17:42 -04:00
zach bethel
a574adf6d5 Deprecated RHICreateTargetableShaderResource utility method, since it's not actually used to create multisampled resources. Removed instances where it appeared multiple textures were being created, but only one was actually created. Cleaned up FTextureRenderTargetResource derived classes to use TextureRHI and TextureRenderTargetRHI.
#preflight 62798ef94561731dbe14105b
#rb christopher.waters

[CL 20113900 by zach bethel in ue5-main branch]
2022-05-09 19:27:51 -04:00
john huelin
95c1680b6e Fix DrawCallCount per pass not working when multithreaded RHI command recording is enabled.
[REVIEW]
#rnx

#ROBOMERGE-OWNER: john.huelin
#ROBOMERGE-AUTHOR: john.huelin
#ROBOMERGE-SOURCE: CL 20105654 via CL 20105671 via CL 20107113 via CL 20107146
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20110543 by john huelin in ue5-main branch]
2022-05-09 16:35:01 -04:00
zach bethel
1a6dbc061d Deprecated FRDGBufferDesc::EUnderlyingType
#preflight 62756de8d8373707f22a6144
#rb christopher.waters

[CL 20082899 by zach bethel in ue5-main branch]
2022-05-06 15:44:23 -04:00
Simon Therriault
79fa990ba9 - Updating MediaCapture to use RDG
- Adding structured buffer output support to media capture

#jira UE-150229, UE-150230
#rb geoffrey.douglas, eric.renaudhoude, ruslan.idrisov

- Adding Rivermax output support wiht custom conversions to support

YCbCr10
RGB8
RGB10
RGB16f

- Fixing chunk configuration for output stream
- Fixing crash when dragging a rivermax player in the scene

#jira UE-146135, UE-150475

#preflight 627562a78a31599132bf87f2

[CL 20081599 by Simon Therriault in ue5-main branch]
2022-05-06 14:50:53 -04:00
zach bethel
ac11396729 Fixed test and validation regressions due to RDG changes.
#preflight 6272a1f12f6d177be3c60a53
#jira UE-150908

[CL 20043535 by zach bethel in ue5-main branch]
2022-05-04 12:41:19 -04:00
Stu McKenna
509ed6fe21 - Remove loose parameter bindings from main Niagara parameters
- Data Interface should now opt into the new binding path by setting UseLegacyShaderBindings to false
- BuildShaderParameters / SetShaderParameters replaces BindParameters / SetParameters / UnsetParameters
- CreateShaderStorage / GetShaderStorageType replaces CreateComputeParameters / GetComputeParametersTypeDesc.
- Shader storage should no longer be required for the majority of cases, only those which require data based on bound functions will need additional data, everything else should be statically set.

#rb michael.galetzka
#jira none
#preflight 627061b1220f89f0ad5aff22

[CL 20027313 by Stu McKenna in ue5-main branch]
2022-05-03 12:27:50 -04:00
guillaume abadie
3c50a8937d Added support for per-slice texture array UAV+SRV on some platforms
#rb luke.thatcher, zach.bethel, will.damon
[FYI] richard.wallis, mihnea.balta
#preflight 6261a519d929bc34a3ed5699, 6270c4cc006bd3ab9e83eb1d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 20023299 via CL 20023301 via CL 20023302
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20023804 by guillaume abadie in ue5-main branch]
2022-05-03 08:29:15 -04:00
zach bethel
2c9665b07f Added ResizeStructuredBufferSAOIfNeeded for GPU scene buffer refactor.
#preflight 627065c8592316675c2dc132

[CL 20018209 by zach bethel in ue5-main branch]
2022-05-02 19:28:19 -04:00
zach bethel
4eedc02f37 Fixes to external access RDG feature to handle async compute without validation failures.
#preflight 6270551191629533ec2b4bc9

[CL 20017395 by zach bethel in ue5-main branch]
2022-05-02 18:31:37 -04:00
zach bethel
98a1477e78 Added RDG_USE_MALLOC debug macro to help find memory stomps with -stompmalloc.
#preflight trivial

[CL 20009596 by zach bethel in ue5-main branch]
2022-05-02 11:55:04 -04:00
Stu McKenna
f707c92be7 - Move ShaderParameterMetadataBuilder into RenderCore
#rb zach.bethel, jeremy.moore
#jira none
#rnx
#preflight 626ad0f4a5009ff191bb6bf6

[CL 19969680 by Stu McKenna in ue5-main branch]
2022-04-28 17:33:51 -04:00
Stu McKenna
b9dceafa98 - Add support for FUintVector3 & FQuat4f as shader parameters
#rb michael.galetzka
#jira none
#preflight 626ad1306461dd769ff1fc64

[CL 19969145 by Stu McKenna in ue5-main branch]
2022-04-28 17:12:47 -04:00
Yuriy ODonnell
9a1cc4c8af Add basic GPU based validation of ray tracing scene build parameters
#rb Aleksander.Netzel
#preflight 6269ba284510fc7faaf832c6

[CL 19962852 by Yuriy ODonnell in ue5-main branch]
2022-04-28 11:37:26 -04:00
Jon Olick
7ab430f96e Bink: merge from 4.27Plus. Bink now uses RHI backend.
#preflight

[CL 19947421 by Jon Olick in ue5-main branch]
2022-04-27 17:28:31 -04:00
zach bethel
10131e1285 Refactored RDG in preparation for UnifiedBuffer conversions.
- Refactord 'Finalized Access' feature into a more flexible 'External' vs. 'Internal' access mode per resource toggle.
      - Resources can transition between modes multiple times within the graph.
      - Supports async compute pipeline.
      - Supports queueing of requests to avoid back-to-back helper passes.
      - This feature is needed to support conversion of GPU scene buffers.

 - Deprecated the ReadOnly and ForceTracking resource flags and added a 'SkipTracking' flag instead.
      - Previous semantics were confusing and error prone.
      - New model requires a manual flag to tell RDG never to transition a resource.
      - This flag is used for read-only dummy resources as an optimization.

 - Renamed some of the auxiliary 'FinalizedResource' utilities since the name no longer matches the semantics.

#preflight 6266cc6d0634d0904ce4ba46

[CL 19904734 by zach bethel in ue5-main branch]
2022-04-25 13:00:12 -04:00
zach bethel
8016d5890e Added RDG versions of UnifiedBuffer utilities.
- TRefCountPtr<FRDGPooledBuffer> replaces FRW{Structured, ByteAddress}Buffer.
 - Resize{Structured, ByteAddress}BufferIfNeeded replaces ResizeResourceIfNeeded.
 - FRDGScatterUploadBuffer replaces FScatterUploadBuffer.

#preflight 6266c0d3e73e2573160aac00

[CL 19904054 by zach bethel in ue5-main branch]
2022-04-25 12:25:24 -04:00
zach bethel
3864629f00 Minor RDG improvements in preparation for UnifiedBuffer conversion.
- Added resource pool counters and events.
 - Added AllocatePooledBuffer method and refactored pool to no longer take a command list.
 - Refactored swap chain barrier logic to be a bit cleaner.
 - Added helper methods to cast between views.
 - Added power of two alignment option to buffer pool.
 - Added GetTypeHash implementations for RDG SRV | UAV descriptors.

#preflight 62631046006fa20b683d130f

[CL 19873407 by zach bethel in ue5-main branch]
2022-04-22 17:11:57 -04:00
Dmitriy Dyomin
f819c89c21 Support shading models in a mobile deferred shading path. Disabled by default
Requrements:
iOS: A8+
Android VK: more than 4 color attachements, more than 4 input attachments
Android GL: Unsuported - PLS seem to be limited to 128bits on most devices
#rb wei.liu
#preflight 625f866b9c09ef439db7612b

[CL 19861367 by Dmitriy Dyomin in ue5-main branch]
2022-04-22 01:15:27 -04:00
arciel rekman
2c4fba02af Fix hitching while precompiling PSO cache.
- Add a new API to release preloaded shader to provide a way to manage preloaded data (which was previously statically allocated).

#rb James.Doverspike, Richard.Wallis
[REVIEW] [at]Allan.Bentham, [at]Richard.Wallis
#preflight 625e11c4db15ac92db7ee858

#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 19832275 via CL 19833640 via CL 19837454 via CL 19854946 via CL 19855339
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19856713 by arciel rekman in ue5-main branch]
2022-04-21 17:47:12 -04:00
Josh Adams
58608fb18c - When FShaderPlatformCachedIniValue looks up a value for the current running ShaderPlatform, use the platform's own value, even if ShaderPlatformToPlatformName returned a different platform (like Vulkan will return Windows, even when running on Linux)
#jira UE-149568
#rb brandon.schaefer
#fyi jack.porter
#preflight 62605d3f73187d30d0c05192

[CL 19836675 by Josh Adams in ue5-main branch]
2022-04-20 15:48:43 -04:00
andrew lauritzen
5c18f11869 Fix up VSM compile permutation logic to not depend on the runtime variable
#preflight 625f48625f498a37c9360330
#rb jason.nadro

[CL 19832583 by andrew lauritzen in ue5-main branch]
2022-04-20 12:34:59 -04:00
christopher waters
8abb1959d8 Making a FShaderParameterMap::FindParameterAllocation method that returns the parameter struct instead of using reference parameters.
Cleaning up SetShaderParameters implementations using a new helper class to load parameters from the binary blobs passed in.

#jira none
#rb kenzo.terelst, zach.bethel
#preflight 625f009f9c09ef439d9e8089

[CL 19830463 by christopher waters in ue5-main branch]
2022-04-20 10:43:15 -04:00
eric mcdaniel
bf7658a0f6 [Backout] - CL19813742
- backing out due to assertions in Vulkan shader compiler
  - constant buffer renaming causes failures to lookup parameter name

#preflight 625f6ed5e239763df51ba585
#fyi christopher.waters

Original CL Desc
-----------------------------------------------------------------
Migrating back to using UniformBuffer structs.
Since the cbuffer uses the same name as the struct, we have to rename the cbuffer using a consistent prefix. The reflection handling also needs to reinterpret the renamed cbuffer as the correct UniformBuffer.

#jira none
#rb kenzo.terelst
#preflight 625edc5f034d8924cdcc35e2

[CL 19825755 by eric mcdaniel in ue5-main branch]
2022-04-19 22:40:31 -04:00
jason hoerner
b19bb6be2f UE5_MAIN: Multi-view-family scene renderer refactor, part 1. Major structural change to allow scene renderer to accept multiple view families, with otherwise negligible changes in internal behavior.
* Added "BeginRenderingViewFamilies" render interface call that accepts multiple view families.  Original "BeginRenderingViewFamily" falls through to this.
* FSceneRenderer modified to include an array of view families, plus an active view family and the Views for that family.
* Swap ViewFamily to ActiveViewFamily.
* Swap Views array from TArray<FViewInfo> to TArrayView<FViewInfo>, including where the Views array is passed to functions.
* FSceneRenderer iterates over the view families, rendering each one at a time, as separate render graph executions.
* Some frame setup and cleanup logic outside the render graph runs once.
* Moved stateful FSceneRenderer members to FViewFamilyInfo, to preserve existing one-at-a-time view family rendering behavior.
* Display Cluster (Virtual Production) uses new API.

Next step will push everything into one render graph, which requires handling per-family external resources and cleaning up singletons (like FSceneTextures and FSceneTexturesConfig).  Once that's done, we'll be in a position to further interleave rendering, properly handle once per frame work, and solve artifacts in various systems.

#jira none
#rnx
#rb zach.bethel
#preflight 625df821b21bb49791d377c9

[CL 19813996 by jason hoerner in ue5-main branch]
2022-04-19 14:45:26 -04:00