Commit Graph

52 Commits

Author SHA1 Message Date
Laura Hermanns
cbc4db6343 Minor improvements in shader backends.
#rb Dan.Elksnitis
#jira none
#preflight 642ad56dc6769c6082ade6cf
#rnx

[CL 24892320 by Laura Hermanns in ue5-main branch]
2023-04-03 10:17:45 -04:00
wouter dek
3ae5c6c895 Convert shader type and parameter struct metadata from global variables to static locals to defer initialization. This allows us to create these types dynamically at startup, while keeping the rest of the infrastructure as is.
#rb jason.nadro
#preflight 63f352130803c73accb744f1

[CL 24311526 by wouter dek in ue5-main branch]
2023-02-20 06:10:39 -05:00
Arciel Rekman
84d3f99470 [Backout] - CL24227640
#fyi wouter.dek

The problem with this change is that late-created shader types will not be in the shadertype list and as such will not be included in the shader map even if their ShouldCompilePermutation() would return true.

Original CL Desc
-----------------------------------------------------------------
Convert shader type and parameter struct metadata from global variables to static locals to defer initialization. This allows us to create these types dynamically at startup, while keeping the rest of the infrastructure as is.

#preflight 63eca58e7d2ec3d2fd286d9a
#rb zach.bethel

[CL 24240825 by Arciel Rekman in ue5-main branch]
2023-02-15 15:57:24 -05:00
wouter dek
7a70fa6a8f Convert shader type and parameter struct metadata from global variables to static locals to defer initialization. This allows us to create these types dynamically at startup, while keeping the rest of the infrastructure as is.
#preflight 63eca58e7d2ec3d2fd286d9a
#rb zach.bethel

[CL 24227640 by wouter dek in ue5-main branch]
2023-02-15 05:55:29 -05:00
christopher waters
1f21b73b25 Ran IWYU on RHI and RenderCore, private only.
#preflight 63d358c85c69f453c1f79c37

[CL 23889591 by christopher waters in ue5-main branch]
2023-01-27 14:54:10 -05:00
bob tellez
971983eb65 [Backout] - CL23624045
[FYI] christopher.waters
Original CL Desc
-----------------------------------------------------------------
RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631957 by bob tellez in ue5-main branch]
2023-01-10 15:28:15 -05:00
christopher waters
3df5dae685 RHI header dependency cleanup
- Reducing other header dependencies from RHIDefinitions.h
- Moved a few functions to the new RHIStrings.h
- Uniform buffer layout initializer moved to its own file to reduce RHI dependency on MemoryLayout.

#preflight 63bca752577437afe604b097

[CL 23631946 by christopher waters in ue5-main branch]
2023-01-10 15:27:33 -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
christopher waters
c6e9015a91 Cache uniform buffer definitions
- Remove shader platform specific info from uniform buffers, we can generate code with macros that translates to what each platform needs.
- With the per-platform differences removed, uniform buffer declarations (read: generated text) can be created once per shader parameter type that needs them instead of once per shader type's shader parameter type usage.
- FShaderType and FVertexFactoryType now hold a TSet of used uniform buffer names instead of a TMap that held potentially duplicated FStrings of uniform buffer defintions.
- Lists of uniform buffers are *potentially* different per platform, so the annoying CachedUniformBufferPlatform variables need to stick around for now.
- GenerateReferencedUniformBuffers renamed to GenerateReferencedUniformBufferNames and now populates a TSet instead of a TMap.
- ShaderType::AddReferencedUniformBufferIncludes renamed to ShaderType::AddUniformBufferIncludesToEnvironment which calls the shared UE::ShaderParameters::AddUniformBufferIncludesToEnvironment.
- CreateUniformBufferShaderDeclaration moved to UE::ShaderParameters::CreateUniformBufferShaderDeclaration and now returns its FString.
- CacheUniformBufferIncludes was removed since it was only populated values from CreateUniformBufferShaderDeclaration.
- Deprecated FShaderCompilerInput::SourceFilePrefix since nothing has populated it in 9 years.

#jira none
#rb dan.elksnitis, yuriy.odonnell
#preflight 63643e5ff233f06a127c11c1

[CL 22988611 by christopher waters in ue5-main branch]
2022-11-04 12:04:48 -04:00
elizabeth baumel
5c94e27b3c Add missing LLM tracking tags. Went from >40000 untagged allocations to about 4400 in QA game. Most of the untagged allocations were CVars. The remaining untracked allocations are largely from dynamic initializers and static/const data.
#rb kenzo.terelst
#jira UE-155266
#jira UE-155196
#preflight 6334ab8eee7b13756dcee727

[CL 22240429 by elizabeth baumel in ue5-main branch]
2022-09-28 22:21:04 -04:00
carl lloyd
54e296cef5 Added support for forcing Real UB's when using emulated UB's
#rb Dmitriy.Dyomin, Laura.Hermanns, Mihnea.Balta
#preflight 62556f463f5641db59f06e8b

[CL 19719192 by carl lloyd in ue5-main branch]
2022-04-12 08:41:13 -04:00
Charles deRousiers
546f1b27c6 Add ROV type support for shader binding.
#rb mihnea.balta
#jira none
#preflight 623b31aaca34ffd7bf7ca796

[CL 19481254 by Charles deRousiers in ue5-main branch]
2022-03-23 13:02:24 -04:00
charles derousiers
0195d6b7aa Add OIT per-pixel sorting support for translucent material
This technique is guarded with by a projected settings. It is currently only supported on PC Dx12. This is the initial step for fine grain/per-pixel sorting.

#rb sebastien.hillaire
#jira none
#preflight 623a1884bc1cf2803867d8f8

[CL 19470340 by charles derousiers in ue5-main branch]
2022-03-22 15:06:48 -04:00
Jeremy Moore
5c2bc8c5b2 Move ShaderMetaDataBuilder code into ComputeFramework which is the only place using it.
Preliminary to adding better support for nested structs.
#rnx
#preflight 62155451dc0170cfb36dfc69

[CL 19081188 by Jeremy Moore in ue5-main branch]
2022-02-22 16:34:35 -05:00
Jeremy Moore
49a6a9b49c Add a prebuilt nested struct to a ShaderParametersMetadataBuilder.
Will be useful for Optimus programatic metadata building.
#rnx
#preflight 620fbe9e6c6c638c07026314

[CL 19050461 by Jeremy Moore in ue5-main branch]
2022-02-18 10:56:11 -05:00
zach bethel
5c21fe70aa Fixed RDG culling behavior differences between Clang and MSVC due to static initialization of shader parameter metadata.
#rb trivial
#preflight trivial

[CL 18565342 by zach bethel in ue5-main branch]
2022-01-10 16:26:38 -05:00
christopher waters
5f8dab7623 Removing usage of DDSPI from ValidateShaderParameterTypes
#jira none
#rb lukas.hermanns, arciel.rekman
#preflight 6196a1ce89733d53862e1af8

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 18243604 in //UE5/Release-5.0/... via CL 18243617
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18243627 by christopher waters in ue5-release-engine-test branch]
2021-11-18 15:53:43 -05:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
christopher waters
5953546bfb Adding RHIUniformBufferLayoutInitializer and RHIUniformBufferLayout is a proper FRHIResource. This brings proper RHI lifetime support to RHIUniformBufferLayout so we don't delete the layouts while RHI commands that use them are still in flight.
This should fully address UniformBufferLayout/UniformBuffer crashes that randomly happen during shader compiling in the Editor.

#jira none
#rb arciel.rekman, ben.ingram, mihnea.balta, stu.mckenna, will.damon
#preflight 611eb6c6008be90001f8b031

#ROBOMERGE-SOURCE: CL 17243608 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17243630 by christopher waters in ue5-release-engine-test branch]
2021-08-19 23:56:04 -04:00
jeremy moore
2ecc156541 ComputeGraph graph based compilation.
More work to do but this is a minimal functional starting point.
#rb halfdan.ingvarsson
#preflight 609da63e046b9d00010b8246

#ROBOMERGE-SOURCE: CL 16321681 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16321699 by jeremy moore in ue5-release-engine-test branch]
2021-05-13 19:18:51 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
marc audy
bf2e06bca2 Added initial support for RDG_{TEXTURE, BUFFER}_ACCESS_ARRAY, which enables a dynamic number of inputs into an RDG pass. Removed unused / deprecated SHADER_PARAMETER_RDG_BUFFER.
#rb none

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 15905815 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15907353 by marc audy in ue5-main branch]
2021-04-02 20:35:50 -04:00
Guillaume Abadie
51824a3a5f Pipedown FShaderParametersMetadata to the shader compile worker
#rb yuriy.odonnell

[CL 15714856 by Guillaume Abadie in ue5-main branch]
2021-03-16 16:19:23 -04:00
zach bethel
0d7dc4d4ed Refactor of uniform buffer binding to allow for runtime selection of static or per-shader binding. This is a necessary precursor to moving the View uniform buffer to use static bindings on mesh passes; it is used in so many places that both binding models are required to preserve compatibility. Added validation to catch when a uniform buffer is bound using both methods at the same time. Added CVar to RHI transition validation to control whether to break in the debugger on a transition failure.
#rb christopher.waters

[CL 14873973 by zach bethel in ue5-main branch]
2020-12-07 17:42:32 -04:00
Arciel Rekman
0b33750c15 Fix shader binding type validation for external textures (UE-102423).
#rb Zach.Bethel
#review-14697340 @Zach.Bethel, @Chris.Phillips
#jira UE-102423

[CL 14707378 by Arciel Rekman in ue5-main branch]
2020-11-10 15:35:31 -04:00