Commit Graph

884 Commits

Author SHA1 Message Date
zach bethel
fba0d17713 Removed GetUAV from IPooledRenderTarget.
#preflight 628e8986af7a2e956bd802bc

[CL 20379501 by zach bethel in ue5-main branch]
2022-05-26 11:00:52 -04:00
Guillaume Abadie
bbb8d0e2c8 Rewrites dynamic resolution on top of the DynamicRenderScaling API
#rb none
#jira UE-152561
#preflight 628f43e6f622d972b5cb4f2f

[CL 20377247 by Guillaume Abadie in ue5-main branch]
2022-05-26 05:34:08 -04:00
Guillaume Abadie
0734868f53 Implements DynamicRenderScaling API with GPU timing measurement integrated within RDG
This allows to define a new dynamic scaling in the renderer with low amount of boiler plate:

DynamicRenderScaling::FHeuristicSettings GetDynamicTranslucencyResolutionSettings()
{
	RenderingDynamicScaling::FHeuristicSettings BucketSetting;
	BucketSetting.Model = RenderingDynamicScaling::EHeuristicModel::Quadratic;
	BucketSetting.bModelScalesWithPrimaryScreenPercentage = true;
	BucketSetting.MinResolutionFraction = ...
	...
	return BucketSetting;
}

DynamicRenderScaling::FBudget GDynamicTranslucencyResolution(TEXT("DynamicTranslucencyResolution"), &GetDynamicTranslucencyResolutionSettings);


And then simply define a scope to measure the GPU timing as such:

{
	DynamicRenderScaling::FRDGScope DynamicTranslucencyResolutionScope(GraphBuilder, GDynamicTranslucencyResolution);

	// add passes to GraphBuilder
}

#rb zach.bethel
#jira UE-152561
#preflight 628f1219bb14235aa38c904c

[CL 20376428 by Guillaume Abadie in ue5-main branch]
2022-05-26 01:58:36 -04:00
zach bethel
7bda0efe14 Deprecated raw UAV access in VT API.
#preflight 628c07b7d8258814a9d8d882

[CL 20370291 by zach bethel in ue5-main branch]
2022-05-25 15:50:23 -04:00
benjamin rouveyrol
7a21ea463f hdr multi window/display support
This improves how the editor deals with displays that have different capabilities (some with HDR, others without).
Centralize where the CVars are accessed
Have the swapchain created in SDR when shown on a SDR display
Make sure color gamut matches the one supported by the platform/swapchain.
Allow Movie scene capture to override the gamut/output format to keep existing behaviour (MovieSceneCapture relies on swapchain data)

#preflight 628baef5183c1e13462a504d
#jira UE-150952
#rb luke.thatcher

[CL 20347067 by benjamin rouveyrol in ue5-main branch]
2022-05-24 09:04:39 -04:00
tiago costa
30c8264346 Implemented ShouldCompileRayTracingCallableShadersForProject(ShaderPlatform)
- added bSupportsRayTracingCallableShaders to DDPI.
- only Windows D3D12 RHI supports callable shaders at the moment.

#rb yuriy.odonnell
#preflight 628bb493693c5e1de282983f

[CL 20331097 by tiago costa in ue5-main branch]
2022-05-23 12:52:55 -04:00
jamie hayes
857e02b9a0 Add ability to specify a camera distance cull range for instances of a primitive and add camera distance culling logic to Nanite.
Hooked the value used by instanced static meshes into it to get nanite ISMs to respect the cull distance.

#rb brian.karis
#preflight 6287d8a21e478b95c7345866

#ROBOMERGE-AUTHOR: jamie.hayes
#ROBOMERGE-SOURCE: CL 20301693 via CL 20301776 via CL 20301792
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20305738 by jamie hayes in ue5-main branch]
2022-05-20 19:15:15 -04:00
tiago costa
e98ce47a3b Keep track of all callable shaders to build RTPSO
- GetRayTracingCallableLibrary() similar to how we handle hitgroups.
FindRayTracingCallableIndex(...) to query callable shader index in RTPSO.

#rb yuriy.odonnell
#preflight 628620c99016c6dd8974b510

[CL 20278150 by tiago costa in ue5-main branch]
2022-05-19 07:03:30 -04:00
Stu McKenna
9513a1a072 - Move constant buffers into loose parameters, with the exception of the external cbuffer
- Parameter binding is now enabled when possible, i.e. no legacy data interfaces / external cbuffer / view uniform buffer

#rb rob.krajcarski
#jira UE-151234
#preflight 62844015f669ec5902688727

[CL 20266965 by Stu McKenna in ue5-main branch]
2022-05-18 15:48:43 -04:00
zach bethel
ac6e75533b Replaced AddCopyToResolveTarget pass with render target resolve.
#preflight 6283ea93520eb4f0a55a85c5

[CL 20262493 by zach bethel in ue5-main branch]
2022-05-18 12:31:54 -04:00
zach bethel
f6311d1011 Cleaned up FRHIRenderPassInfo cruft and forwarded resolve operations through a common RHI core method.
#preflight 62842b5982530182724612f6

[CL 20262457 by zach bethel in ue5-main branch]
2022-05-18 12:29:26 -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
b91ad347cf Removing unhelpful RDG assert as there are external buffers with incorrect flags causing it to fire, and the underlying issue is non-fatal.
#jira UE-152570
#preflight trivial

[CL 20228585 by zach bethel in ue5-main branch]
2022-05-16 14:33:14 -04:00
zach bethel
e5e30533e6 Loosened RDG validation to allow unformatted SRV / UAV when the structured buffer flag is set, rather than assert if the vertex buffer flag is present, in cases where both are set.
#preflight trivial
#jira UE-152500

[CL 20225864 by zach bethel in ue5-main branch]
2022-05-16 12:01:18 -04:00
zach bethel
fdc795f5b9 Implemented support for fused CopySrc | CopyDest transitions for Vulkan in RDG.
- Simplified RDG transition logic to only use subresource transitions.
 - Don't allow unmergeable states to be merged during pass setup.

#preflight 627ebfadca3b90fc14fb9b85
#fyi jeannoe.morissette

[CL 20224647 by zach bethel in ue5-main branch]
2022-05-16 11:02:52 -04:00
zach bethel
e37a08177c Submit async compute work prior to a fence from graphics -> async compute so that prior work isn't grouped with the submission to work around an issue in D3D12, which currently brute forces a fence from graphics to async compute any time graphics work is submitted.
#preflight 627c359a9f7ad2a14b8388d0
#fyi sebastien.hillaire

[CL 20152556 by zach bethel in ue5-main branch]
2022-05-11 18:40:35 -04:00
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