Commit Graph

1546 Commits

Author SHA1 Message Date
Dmitriy Dyomin
6cbf7a816d Always use UINT for NiagaraFX SortedIndices parameter.
To fix vulkan validation warning: Validation Error: [ VUID-vkCmdDrawIndexed-None-02699 ] Object 0: handle = 0xb60d06000004faeb, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; | MessageID = 0xa44449d4 | Descriptor set VkDescriptorSet 0xb60d06000004faeb[] encountered the following validation error at vkCmdDrawIndexed time: Descriptor in binding #11 index 0 requires UINT component type, but bound descriptor format is VK_FORMAT_R32_SINT. The Vulkan spec states: Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are statically used by the VkPipeline bound to the pipeline bind point used by this command (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-02699)
#rb stu.mckenna
#jira none
#preflight 62ba79a7e7734830fa8ed726

[CL 20845687 by Dmitriy Dyomin in ue5-main branch]
2022-06-28 00:01:11 -04:00
zach bethel
ddea412b12 Move RDG buffer uploads off the render thread.
#preflight 62b9f1ec4209c7c579df8fc2

[CL 20839110 by zach bethel in ue5-main branch]
2022-06-27 16:45:50 -04:00
zach bethel
f04a19a658 Fixed RHI validation error in cloud rendering.
#preflight 62b37fcac603be614811adcd
#jira UE-156470

[CL 20784050 by zach bethel in ue5-main branch]
2022-06-22 18:47:11 -04:00
Wei Liu
4859a28a6d Fix a bug that the MSAA is broken on android.
Clean obsolete codes in mobile postprocess.

#jira UE-156188

#rb Dmitriy.Dyomin
#preflight 62b274f08e5ee14ea77b8d10

[CL 20769595 by Wei Liu in ue5-main branch]
2022-06-21 21:54:03 -04:00
jeremy moore
18edc48a3e Undo the backout changelist 20750841
This resubmits the following original changelists (with fixes).

Original CL Desc for CL20737284 -----------------------------------------------------------------
Add a version of UseVirtualTexturing() that takes a shader platform.
A future goal is to deprecate the version that takes a feature level.

Original CL Desc for CL20738687 -----------------------------------------------------------------
Virtual texturing forces depth pass on.
This fixes bug when using any masked materials that sample VT.

#jira UE-157197
#jira UE-117783
#preflight 62b1cb8ac400b5ee2f517942

[CL 20757215 by jeremy moore in ue5-main branch]
2022-06-21 10:15:44 -04:00
Andriy Tylychko
5afd6aaf31 Fixed long-living tasks that drive total mem usage up. Tasks use ConcurrentLinearAllocator that doesn't like long-living allocs as a single alloc can hold an entire mem page occupied. A completion handle uses a different allocator that doesn't have this problem and it can be used for waiting for its parent task completion. A completion handle is used only in rare cases where it's difficult or impossible to shorten task handle lifetime, as in this CL. All other cases were fixed by resetting a task handle when it's completed and thus releasing its memory.
#rb francis.hurteau
#preflight 62b0ac5f2405b4ac9e6a1393

[CL 20754669 by Andriy Tylychko in ue5-main branch]
2022-06-21 04:17:59 -04:00
serge bernier
c2f6dffe7c Low Input latency mode fix
-Allow the frame sync to be kicked from the render thread when using the gtsync==2 (low input latency mode). On some platforms, the RHI thread will block on present. Putting the RHI as the trigger index will block the GameThread until the present is finished (vblank). In low input latency mode, some consoles uses the RHIOffsetThread to kick of the Gamethread, so we dont want it to block on present.
-Use the present mode to submit frame tokens in low input latency mode. Using GT_wait or GT_early introduce stuttering in the frame time since the gamethread will sync on the present when its double buffered. Even if we increase the frame interval (3 or 4), the WaitFrameEventX will eventually block the gamethread when the second display buffer is in used. Note that we delay the barrier transition(RT->Display) until we really use the backbuffer, so we dont technically need to throttle on the frame token, since we are in pseudo triple buffer mode. Issuing GT_Wait/GT_early mode in double buffer mode will always produce bad frame pacing when we use the FRHIFrameOffsetThread approach.
-Set the frame offset interval to zero to sync the os input pooling with the vblank.

[REVIEW] [at]Eric.McDaniel

#ROBOMERGE-OWNER: serge.bernier
#ROBOMERGE-AUTHOR: serge.bernier
#ROBOMERGE-SOURCE: CL 20749857 via CL 20750200 via CL 20750276 via CL 20750599 via CL 20750604
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v970-20704180)

[CL 20751490 by serge bernier in ue5-main branch]
2022-06-20 23:44:03 -04:00
eric mcdaniel
6735d65cf6 [Backout] - CL20737284 & CL20738687
- testing
  - compiled and cooked QAGame locally for Win64

#preflight 62b12d784c538079d66599da
#rnx
#fyi Jeremy.Moore


Original CL Desc for CL20737284
-----------------------------------------------------------------
Add a version of UseVirtualTexturing() that takes a shader platform.
A future goal is to deprecate the version that takes a feature level.
#preflight 62b080e1613434b77fa673d0


Original CL Desc for CL20738687
-----------------------------------------------------------------
#jira UE-117783
Virtual texturing forces depth pass on.
This fixes bug when using any masked materials that sample VT.
#preflight 62b08fceef1c984554505316

[CL 20750841 by eric mcdaniel in ue5-main branch]
2022-06-20 22:51:39 -04:00
Jeremy Moore
0d124778fb Add a version of UseVirtualTexturing() that takes a shader platform.
A future goal is to deprecate the version that takes a feature level.
#preflight 62b080e1613434b77fa673d0

[CL 20737284 by Jeremy Moore in ue5-main branch]
2022-06-20 10:31:56 -04:00
wei liu
87f2d95ada 1.Supports more shading models on mobile, including twoside foliage, cloth and eye shading models.
2.Uses the same shading models and dynamic lightings code path on desktop.

3.Remove the division of PI on mobile directional light's color in C++ to line up with desktop in shaders.

#jira UE-114145

#rb Dmitriy.Dyomin, Sebastien.Hillaire
#preflight 62b0411fd8082c5c200fa32a

[CL 20734991 by wei liu in ue5-main branch]
2022-06-20 06:02:51 -04:00
Florin Pascu
e6ae5eb431 Adding Getters for ShaderPlatform Name, the Shader Format of the ShaderPlatform and the ShaderPlatformPropertiesHash as defined in DDPI
#rb Jack.Porter
#jira UE-120561
#preflight 62b031a7d8082c5c200e7364

[CL 20734617 by Florin Pascu in ue5-main branch]
2022-06-20 05:21:42 -04:00
Stu McKenna
1130512cfe - Rigid Mesh Collision DI converted to RDG
#rb rob.krajcarski, devon.penney
#jira UE-151234
#preflight 62aa5acb102b5101ccdaaa8d
#preflight 62ab6712e9031caf98af7f6c

[CL 20690140 by Stu McKenna in ue5-main branch]
2022-06-16 13:35:46 -04:00
Florin Pascu
6b14075ce6 Adding Cvar Flags that will make them automatically modify the KeyString when modified
Cvars with this flag will modify the Shader Keystring for All Platforms
ECVF_GeneralShaderChange = 0x200,

Cvars with this flag will modify the Shader Keystring for Mobile Platforms
ECVF_MobileShaderChange = 0x400,

Cvars with this flag will modify the Shader Keystring for Desktop Platforms
ECVF_DesktopShaderChange = 0x800,

r.MobileHDR is using this system now. Others will follow.

#rb Jack.Porter, Mihnea.Balta
#jira UE-120561
#preflight 62aae0aeea213dadf0b36fdd

[CL 20684686 by Florin Pascu in ue5-main branch]
2022-06-16 04:38:20 -04:00
jeannoe morissette
a55062b58e VulkanRHI: Temporarily disable gpu stat accumulation during modal dialog's 'long frame' to prevent OOM from staging buffer accumulation.
#rb Mihnea.Balta
#jira UE-148255
#preflight 62a89264cf54a658ee0e8316
#lockdown Mihnea.Balta

#ROBOMERGE-AUTHOR: jeannoe.morissette
#ROBOMERGE-SOURCE: CL 20674492 in //UE5/Release-5.0/... via CL 20675969
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20679016 by jeannoe morissette in ue5-main branch]
2022-06-15 19:31:56 -04:00
zach bethel
8a9fd982e6 Sync RDG setup events prior to the PSO cache coalescing sync point.
#fyi dave.barrett
#preflight 62a95ee1293ff41d4957783a

[CL 20665487 by zach bethel in ue5-main branch]
2022-06-15 00:28:49 -04:00
zach bethel
058bdd7d2f Implemented support for parallel buffer creation and lock / unlock.
- Refactored relevant FDynamicRHI APIs to take an FRHICommandListBase reference. Platforms which require operations deferred to the RHI thread will enqueue commands into the command list.
 - Hardened platform implementations to use locks where needed.
 - Added unit tests to stress test creating and locking many buffers in parallel.

#preflight 62a2855c54169bd8aa114d29
#rb christopher.waters, jeannoe.morissette, luke.thatcher, will.damon, kenzo.terelst

[CL 20659113 by zach bethel in ue5-main branch]
2022-06-14 17:59:07 -04:00
christopher waters
f9e5f44dee Restoring functionality to r.ShaderCompiler.EmitWarningsOnLoad
#jira none
#rb jason.nadro
#preflight 62a8ab32d502a554367beb52

[CL 20657856 by christopher waters in ue5-main branch]
2022-06-14 17:03:34 -04:00
carl lloyd
4b6434cac6 Fix for Apple A8 device support
- Devices crashing when using Base_Vertex metal shader semantics
  - Runtime error when using Virtual Texturing on A8 devices which is unsupported.

#jira UE-131863, UE-132217
#rb Will.Damon
[FYI] Jack.Porter
#preflight 62a75ad63d0a713cf8caf486

#ROBOMERGE-AUTHOR: carl.lloyd
#ROBOMERGE-SOURCE: CL 20631592 in //UE5/Release-5.0/... via CL 20649245
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20656300 by carl lloyd in ue5-main branch]
2022-06-14 16:23:13 -04:00
robert srinivasiah
f2302251e4 Missing copyright boilerplate in StereoRenderUtils.cpp
#rb none
#jira none
#preflight trivial

[CL 20652500 by robert srinivasiah in ue5-main branch]
2022-06-14 13:12:57 -04:00
robert srinivasiah
511b73a9ef Bind InstancedViewUB independent of active stereo rendering
The shader compiler will enable ISR or Mobile Multi-View in shaders, independent of whether they are actively engaged in stereo rendering.
But we _bind_ the instanced view UB when we think stereo is active. We can bind the instanced view UB even while doing mono rendering.

#jira UE-145187
#rb Arciel.Rekman
#preflight 62a7d16df017fed6d25c6641 62a80b5c67522b9df01e96cc

[CL 20650995 by robert srinivasiah in ue5-main branch]
2022-06-14 12:14:38 -04:00
steve robb
28609e6f3c Removal of TEXT used in static_asserts (redundant in ANSI/wide modes, broken in UTF-8 mode).
#rb james.hopkin
#jira UE-132142
#preflight 62a87ef40b7bda795a7dfff0

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 20647361 via CL 20647632 via CL 20647654
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20650895 by steve robb in ue5-main branch]
2022-06-14 12:11:45 -04:00
zach bethel
eee5dbab99 Fix for engine test failure in DumpGPU on Vulkan
#preflight 62a60279b94c57409e81884f

[CL 20619061 by zach bethel in ue5-main branch]
2022-06-12 11:28:44 -04:00
jason hoerner
d15b1426d0 Scene Capture Cube: fix for severe artifacts in volumetric cloud rendering, and possibly other artifacts. The artifacts are caused by the temporal volumetric cloud effect not having a separate history per cube map face.
* Each cube map face gets its own FSceneViewState.  The downside is that it potentially could add a lot of extra memory.  So some memory optimizations were made to compensate.
* Global distance field data is shared for all cube map faces.  This data is only dependent on the view origin, which is invariant for the cube map faces.  A mechanism was added to allow cross view state data sharing for shared origin views.  This saves 8.5 MB, and improves perf.
* Disabled distance field lighting temporal AO for cube map capture.  The AO history texture in the view state is dependent on the Scene texture extents, which is typically the front buffer size, which then gets multiplied by 6.  For a 1080p front buffer, this is 24 MB, while for a 4K front buffer, this is 96 MB, regardless of the resolution of the cube map capture itself.  A 256x256 cube map capture, including all the auxiliary state, is otherwise only around 9 MB, so this is an order of magnitude increase.  A comment in the function "DistanceFieldAOUseHistory" has more details on how this could be fixed, by using the view rect rather than Scene texture extents for the history texture -- for the 256x256 case, it would reduce the incremental memory cost to 768K.

With the memory savings from disabling distance field lighting temporal AO, this change is more or less memory neutral if the Scene texture extent (front buffer) is 1080p.  A net increase of 590K.  With a higher resolution front buffer, it's a subsantial memory win.

#jira UE-151717
#rnx
#rb tiago.costa daniel.wright
#preflight 629f6a27233ae0a8f8f99932

[CL 20614815 by jason hoerner in ue5-main branch]
2022-06-11 19:06:03 -04:00
mihnea balta
b6bd0ea0ac Add missing task tag when FRDGBuilder::CreateUniformBuffers runs async.
#fyi Zach.Bethel
#preflight skip
#jira none
#rnx

[CL 20594531 by mihnea balta in ue5-main branch]
2022-06-10 09:39:51 -04:00
zach bethel
378ddb20ea Deprecated local uniform buffers now that RHICreateUniformBuffer works on any thread.
#rb kenzo.terelst
#preflight 62a224461a21ec565ca0fad9

[CL 20580156 by zach bethel in ue5-main branch]
2022-06-09 13:17:06 -04:00