Commit Graph

2469 Commits

Author SHA1 Message Date
patrick kelly
36380c6163 Heterogeneous Volumes: Initial shadow-casting support and integration with translucency pass.
#rb stu.mckenna krzysztof.narkowicz
#jira UE-190041

[CL 30914925 by patrick kelly in ue5-main branch]
2024-01-26 00:33:50 -05:00
jon olick
3a2895f321 Fixed null pointer deref crash on Android. DepthBeforeState was NULL.
#rb Tiantian.Xie

[CL 30893588 by jon olick in ue5-main branch]
2024-01-25 13:42:52 -05:00
dan elksnitis
8e1b6093b7 [shaders] Optimize the parameter metadata portion of DDC key construction. This is done by pre-computing a layout signature hash on initialization of each FShaderParameterMetadata struct and store it for use in DDC keys (rather than re-writing the layout to a memory buffer every time it's needed). This removes a massive amount of temporary allocations incurred by the unnecessarily complex FShaderSaveArchive mechanism, and has an outsized impact on editor startup time due to the usage of a portion of the DDC key string in constructing the unique name for materials (which is used in various places). In addition usage of the 32-bit LayoutHash has been removed from other places it was used in the shader DDC keys; this is a weak hash constructed by GetTypeHash which is not intended to be persisted. As part of this change the FShaderSaveArchive/SerializationHistory mechanism previously used here has been deprecated as this metadata hashing was the last place it was used.
#rb Laura.Hermanns, Yuriy.ODonnell
#jira UE-203989

[CL 30887360 by dan elksnitis in ue5-main branch]
2024-01-25 10:51:30 -05:00
Yuriy ODonnell
6931a0eb46 Various changes for cross-platform implementation of FDispatchShaderBundleCS
* Use explicit FShaderParameter-s instead of shader parameter struct macros, as this allows the shader to be more easily dispatched from low-level RHI code
* Add total record count parameter to ProcessShaderBundleRecord
* Add CFLAG_ForceBindful to the shader when required by a specific platform

#jira none
#rb christopher.waters, zach.bethel

[CL 30878011 by Yuriy ODonnell in ue5-main branch]
2024-01-25 00:23:59 -05:00
zach bethel
253c7eea71 Submit RDG setup command lists before flushing the RHI thread to avoid PSO refcounting issue.
[CL 30851378 by zach bethel in ue5-main branch]
2024-01-24 12:51:27 -05:00
zach bethel
5292094b2a Fixed build break in RDG allocator.
[CL 30846095 by zach bethel in ue5-main branch]
2024-01-24 11:10:24 -05:00
zach bethel
ddc40e25ff Fixed build break.
[CL 30803848 by zach bethel in ue5-main branch]
2024-01-23 09:58:19 -05:00
steve robb
fde2961f55 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30803608 by steve robb in ue5-main branch]
2024-01-23 09:51:10 -05:00
zach bethel
afa7e5d622 Fixed PSO cache refcount check. Flush RDG command list setup tasks to the RHI thread prior to flushing the PSO cache.
[CL 30795393 by zach bethel in ue5-main branch]
2024-01-22 22:42:55 -05:00
laura hermanns
fffc6b84e1 Enable DXC by default for remaining SPIR-V backends.
#jira UE-182488
#rb Jason.Nadro, serge.bernier

[CL 30784243 by laura hermanns in ue5-main branch]
2024-01-22 15:37:51 -05:00
jason hoerner
4843583c83 Render Graph: A couple simple development build RDG optimizations.
* Skip contents of Begin/EndUAVOverlap when GRHIValidationEnabled is false, avoiding expensive GatherPassUAVsForOverlapValidation call, saving around 1.4% frame wide.  Lower level function does nothing when validation isn't enabled.
* Optimize trivial RDG event names with no format specifiers.  Detects at compile time that there are no variadic parameters and calls a non-variadic version of the constructor, which references the string instead of generating a dynamically allocated copy through FCString::GetVarArgs.  Covers around 40% of RDG event names in my test case, saving around 1.2% frame wide.

#rnx
#rb mihnea.balta

[CL 30781413 by jason hoerner in ue5-main branch]
2024-01-22 13:51:08 -05:00
zach bethel
44d4a0afd6 Fixed build break in RDG due to missing DLL export.
[CL 30775526 by zach bethel in ue5-main branch]
2024-01-22 11:23:17 -05:00
zach bethel
522b0e9af3 RDG Refactor to Improve Parallelism
- Subresource state tracking manipulates less data by always using pointers instead of copying full states.
 - Offloaded pooled texture / buffer allocations to an async task.
 - Removed dependency between pooled resource allocations and collecting resource barriers. The 'finalize' phase now gathers both first and last barriers for a resource.
 - Refactors RDG allocator implementation to make things simpler.
 - Moved async tasks within RDG to use the setup task API.
 - Moved culling into the async setup queue.

[CL 30774932 by zach bethel in ue5-main branch]
2024-01-22 11:04:48 -05:00
zach bethel
bffaf2b599 Implemented recursive render command pipe command support. Render commands that are enqueued while replaying another command execute immediately. This mirrors the behavior of render thread commands. Also added an ensure to catch when a command is enqueued to pipe B while replaying pipe A, as this is not a supported scenario.
#jira UE-202416

[CL 30774800 by zach bethel in ue5-main branch]
2024-01-22 11:01:32 -05:00
wouter dek
8f310241b2 Use DoubleFloat instead of tile+offset in various systems on GPU to improve numerical precision.
#jira UE-171685
#rb Charles.deRousiers, tim.doerries

[CL 30763421 by wouter dek in ue5-main branch]
2024-01-21 21:02:35 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
jeannoe morissette
48beafa592 VulkanRHI: Allow R64 format to be viewed as R32G32 for utility functions like clears. Fixes validation error about component width mismatch (32bit vs 64bit).
#rb florian.penzkofer, Mihnea.Balta
#rnx

[CL 30716510 by jeannoe morissette in ue5-main branch]
2024-01-19 10:47:01 -05:00
pr0-zac
d3b8a9128a Add Vulkan Tonemap Subpass.
Provides a path for Quest devices to support Mobile HDR  in light of a future possible removal of Mobile LDR.

#rb Jack.Porter, jeannoe.morissette, Dmitriy.Dyomin
#jira UE-199319

[CL 30713373 by pr0-zac in ue5-main branch]
2024-01-19 07:05:41 -05:00
steve robb
f70478d4f0 Moved some bool-taking container wrappers over to using EAllowShrinking.
FGraphAStar::PopIndex() isn't passing on its argument to the container - that existing behavior has been retained.

#rb james.hopkin
[FYI] Yoan.StAmant

[CL 30712410 by steve robb in ue5-main branch]
2024-01-19 05:12:44 -05:00
dan elksnitis
89776aba21 [shaders] add ANSICHAR path for FShaderSource and enable by default
#rb Yuriy.ODonnell, Laura.Hermanns
#jira UE-196110

[CL 30632304 by dan elksnitis in ue5-main branch]
2024-01-16 09:15:51 -05:00
yuriy odonnell
01419a8913 Add strongly typed EShaderOptionalDataKey to access shader optional data instead of adhoc characters
#rb carl.lloyd, christopher.waters, Colton.Daniels

[CL 30572888 by yuriy odonnell in ue5-main branch]
2024-01-11 13:36:32 -05:00
dan elksnitis
3bada31355 [shaders] versioning/ddc key fixes
- include full hash of uniform buffer metadata in shadermap key instead of just hashing rows/columns/type (the latter doesn't properly account for nested struct layout changes)
- include shader format version in per-shader key (this is already included in the shadermap key, not including it in the per-shader key as well is a dangerous oversight)

#rb Yuriy.ODonnell

[CL 30567016 by dan elksnitis in ue5-main branch]
2024-01-11 09:09:41 -05:00
benjamin rouveyrol
23abcdeac8 add ability to clear the UAV cache instead of only the SRV cache. This fixes an issue where we would do dispatch,copy,dispatch,copy and the last 2 events would keep the UAV in the copy_source state because we only do transition when we detect a UAV slot is dirty
add slot clear when we copy a texture
#rb Kenzo.Terelst
#jira UE-201831

[CL 30563724 by benjamin rouveyrol in ue5-main branch]
2024-01-11 04:40:17 -05:00
mickael gilabert
80cd322c49 Fixed UseSplineMeshSceneResources to read cvar data from platform ini file when cooking
[REVIEW] [at]jamie.hayes
#rnx
#rb jamie.hayes

[CL 30552202 by mickael gilabert in ue5-main branch]
2024-01-10 17:25:14 -05:00
tim doerries
fa3ef2cdea Added new compiler flag to support compiling shaders with support for certain (rare) indirect draw setups on certain platforms. The flag is a generic "IndirectDraw" flag so that we can use it on all indirect draw shaders in the future.
#rb graham.wihlidal, Yuriy.ODonnell
#jira UE-202570
#rnx

[CL 30480714 by tim doerries in ue5-main branch]
2024-01-08 10:12:05 -05:00