Commit Graph

82 Commits

Author SHA1 Message Date
michael balzer
fd6ff6a106 RenderCore: Fix AddDrawTexturePass() for specific mip level in different format
#rb zach.bethel

[CL 26618725 by michael balzer in ue5-main branch]
2023-07-26 15:54:42 -04:00
marc audy
1b8e7f29c4 Rework GPUScene support on mobile platforms.
Platforms that do support uniform buffer objects can now provide batched primitive data through UBO. There is a limit UBO range that can be accessed in shaders, so we group instances into batches that fit into this limit. Switch uses 64KB views, other platfroms16KB views. For each primitive we allocate 512Bytes and 256Bytes for instance. Mobile platforms that do not support UBO will use a desktop version of GPUScene.
There are a few things that still missing: Dynamic mesh passes,  static lighting
#rb ola.olsson, benjamin.rouveyrol

[CL 26354848 by marc audy in ue5-main branch]
2023-06-30 16:34:38 -04:00
jeannoe morissette
357f8f5ef0 Bindless: consider BindlessResourceParameters array when clearing unused graph resources for an array of shader bindings.
#rb Carl.Lloyd
#fyi Christopher.Waters,Zach.Bethel
#preflight 64497389f451a6221144eb7a
#rnx

[CL 25214328 by jeannoe morissette in ue5-main branch]
2023-04-27 10:31:34 -04:00
christopher waters
d584acebf0 Removing deprecated RHI and RenderCore code.
#rb luke.thatcher
#preflight 644709d5f030f684d5fff54b

[CL 25180143 by christopher waters in ue5-main branch]
2023-04-25 10:24:28 -04:00
christopher waters
4195401192 Removing CopyToResolveTarget.
#rb zach.bethel
#preflight 6435a813d03b1c87dd410835

[CL 24995829 by christopher waters in ue5-main branch]
2023-04-11 15:00:07 -04:00
Arciel Rekman
02d17ec186 Separate name for multisampled textures.
- A minor QoL improvement for captures.

#rb Rob.Srinivasiah, Erica.Stella
#jira none
#review @Robert.Srinivasiah, @Erica.Stella
#preflight 642f0eb6b306e98c632026f3

[CL 24965490 by Arciel Rekman in ue5-main branch]
2023-04-07 11:52:17 -04:00
christopher waters
e36f641e34 Non-comprehensive pass on removing dllexport's from global shader types. Shader types only need exports on their boilerplate macro (DECLARE_GLOBAL_SHADER -> DECLARE_EXPORTED_GLOBAL_SHADER) and any "setter" methods not defined inline.
#rb jason.nadro
#preflight 63f932b9b879197e73746415

[CL 24414091 by christopher waters in ue5-main branch]
2023-02-24 20:12: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
christopher waters
6e30ddb01e Dependency cleanup around DataDrivenShaderPlatformInfo and a few other headers.
#preflight 63921e6a67018b14b5925197

[CL 23454104 by christopher waters in ue5-main branch]
2022-12-08 15:35:35 -05:00
zach bethel
853e826dc1 Moved shadow GPU scene updates to happen before async Lumen, which removes the need transition resources from async compute back to graphics.
#preflight 63922becbb6fefa4728f05d6

[CL 23450632 by zach bethel in ue5-main branch]
2022-12-08 13:38:49 -05:00
zach bethel
250b92f8db Fixed several RHI validation transition issues.
- Fixed GPU scene resources not being available for the base pass. The external access queue is flushed only on the graphics pipe for the base pass and then later for both graphics | async compute. This is necessary to avoid
   having to immediately transition back from Graphics | AsyncCompute when updating shadow GPU scene buffers, which introduces an immediate stall on any in-flight async compute work on certain platforms.
 - Fixed issue where RHI transition validation log was being hashed including the stack breadcrumb, which was causing log spam.
 - Merged reflection capture / atmosphere external access queues together with the main scene rendering one to reduce passes.
 - Fixed incorrect  RHI validation assert in hardware ray tracing passes.
 - Fixed IES texture atlas assert due to not using external access mode on the texture.

#rb christopher.waters
#preflight 6387b1ba766a2aeed29463e0
#jira UE-170797

[CL 23339379 by zach bethel in ue5-main branch]
2022-11-30 15:32:50 -05:00
eric mcdaniel
502749c59a Fix for async compute on platforms with memory boundary restrictions on async compute dispatch indirect arguments
*** This change will incur a full shader invalidation across all platforms ***

Issues:
  - Some platforms require async compute dispatch indirect arguments to not cross specific memory boundaries
    - This places restrictions on the valid sizes for a dispatch indirect argument set.  We were not conforming to these restrictions which could result in GPU crashes on these async passes

Fixes:
  - FRHIDispatchIndirectParameters is padded out to meet per-platform memory boundary restrictions
    - This is driven via new per-platform preprocessor define PLATFORM_DISPATCH_INDIRECT_ARGUMENT_BOUNDARY_SIZE
    - Some platforms require FRHIDispatchIndirectParameters to align with their internal structure hence we cannot universally size to meet all platform's requirements

  - Introduce new FRHIDispatchIndirectParametersNoPadding for uses when we explicitly do not want the padding and otherwise avoid the memory boundary restrictions

  - Revise and expand indirect argument validation code to catch further such issues in the future

  - Update shaders which write to dispatch indirect argument buffers to account for optional per-platform padding
    - New utility function WriteDispatchIndirectArgs introduced to faciliate this
    - platforms which require other than the default nonpadded dispatch indirect arguments must define DISPATCH_INDIRECT_UINT_COUNT and their own WriteDispatchIndirectArgs in their CommonPlatform.ush

  - move creation of DispatchIndirectGraphicsCommandSignature command signature to be per-platform
    - DispatchIndirectGraphicsCommandSignature and DispatchIndirectComputeCommandSignature stride changed to account for additional padding on impacted platforms

Testing:
  - ran Lyra with and without async compute Lumen on impacted platforms as well as Win64
  - ran FN replay on impacted platforms

#rb Krzysztof.Narkowicz, Ben.Woodhouse, Benjamin.Rouveyrol
#jira UE-167950
#preflight 6359563b2e6690262a11bc06

[CL 22862498 by eric mcdaniel in ue5-main branch]
2022-10-31 10:15:11 -04:00
tiago costa
66d0b19774 Implemented render graph util function to copy region of buffer.
- Specify source/destination offsets and number of bytes.

#rb christopher.waters
[FYI] zach.bethel
#preflight skip

[CL 22434285 by tiago costa in ue5-main branch]
2022-10-10 13:47:21 -04:00
luke thatcher
0c5c2b3e27 Merging //UE5/Dev-ParallelRendering (up to CL 22203289) to //UE5/Release-5.1
This change includes significant refactor work performed in //UE5/Dev-ParallelRendering. A brief summary of the work is as follows:

Refactored RHI command lists
 - Removal of the "immediate" async compute command list
 - Introduced an "active pipe" on each command list, allowing RHICmdLists to record work for either graphics or async compute. Pipes can be selected using the SwitchPipeline() function, or the FRHICommandListScopedPipeline helper.
 - New explicit command list submission RHI API (RHIFinalizeContext, RHISubmitCommandLists). The IRHICommandContextContainer type has been removed.
 - Explicit GPU submission is automatically appended to the immediate command list when it is dispatched to the RHI thread.

Platform RHI implementations
 - The new submission API has been implemented across all platforms. Some platforms required a significant refactor.

#rb Mihnea.Balta,Kenzo.Terelst
#jira UE-139550
#preflight 6332e3641003050806d802ef

[CL 22239063 by luke thatcher in ue5-main branch]
2022-09-28 21:40:05 -04:00
carl lloyd
f044acc980 Fix bug where SceneColor\DepthCreateFlags were not updated after initializing variables
Changed iOS to use Memoryless flag to match other platforms when creating MSAA targets

#jira UE-162047

#rb Dmitriy.Dyomin, Jack.Porter
[FYI] Wei.Liu
#preflight 632c351c7b582f58ab2c8563

[CL 22144723 by carl lloyd in ue5-main branch]
2022-09-22 16:53:44 -04:00
jian ru
b5608b7b5b Add options to run Lumen passes on async compute. Also added an option to disable async nanite rasterization for shadow depths only so lumen passes can overlap with shadow depths.
#rb krzysztof.narkowicz
[FYI] krzysztof.narkowicz, daniel.wright

[CL 21997760 by jian ru in ue5-main branch]
2022-09-13 21:47:35 -04:00
christopher waters
e9a48d6897 Removing more uses of GMaxRHIFeatureLevel.
Focus started on GenerateMips and AddClearUAVPass.

#jira none
#rb mihnea.balta
#preflight 62fe768d200ff87e07c5e1ad

[CL 21448320 by christopher waters in ue5-main branch]
2022-08-18 15:29:29 -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
zach bethel
53be0355a9 Deprecated CopyToResolveTarget method.
#rb luke.thatcher
#preflight 6285632d660b4a15be67ef57

[CL 20269210 by zach bethel in ue5-main branch]
2022-05-18 17:55:32 -04:00
christopher waters
1e01768e33 Bindless shader parameters
- Adding support for bindless resources/samplers. The loose resources have to be wrapped in a macro that generates an index and proxy resource when bindless is enabled. Reflection has to parse these differently from other resources since they're parsed as uint parameters. The runtime also has to bind these differently since they end up needing to find their real resource in the binding data and then update a constant buffer.
- To assist in conversions, the shader compiler will detect if a shader is compiled with both bindless and non-bindless resources/samplers and will emit errors if that is the case.
- Adding support for bindless Uniform Buffer resources/samplers. Because Uniform Buffers aren't per-shader, they'll always update their constants with the bindless indices of their resources.
- Adding more flags to FShaderCodePackedResourceCounts required changing all the array initializations to individual parameters since not all the new flags are used everywhere.
- No shaders have been configured to support bindless resources/samplers. Yet.

#jira UE-139616
#rb zach.bethel, arciel.rekman
#preflight 6282b8ec44349a6581a21a39

[CL 20250348 by christopher waters in ue5-main branch]
2022-05-17 16:30:48 -04:00
zach bethel
8963f09235 Deprecated RDG variant of texture readback.
#preflight 627c36f11e74993343b92723

[CL 20152540 by zach bethel in ue5-main branch]
2022-05-11 18:40:20 -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
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
christopher waters
31658ac660 Renderer dependency cleanup focused on removing RenderGraph.h from SceneRenderTargetParameters.h
#jira none
#rb zach.bethel
#preflight 62573bf61543022eed4bc2aa

[CL 19746250 by christopher waters in ue5-main branch]
2022-04-13 17:33:48 -04:00
zach bethel
3a2b13ceb1 Added draw texture utility to RenderGraphUtils (used for copying with format conversions).
#preflight 624efd042b29ecd3d7516cd2

[CL 19670171 by zach bethel in ue5-main branch]
2022-04-07 11:26:08 -04:00