Commit Graph

139 Commits

Author SHA1 Message Date
christopher waters
9ef9e2bf50 Removing the long-form create functions and constructors from FRHITextureCreateDesc in favor of the shorter versions.
#jira none
#rb luke.thatcher
#preflight 627d7c70a82f3adab8b3524e

[CL 20172685 by christopher waters in ue5-main branch]
2022-05-12 17:59:39 -04:00
benjamin rouveyrol
d54636baee remove RHIEnqueueDecompress from public API
#preflight 624de0f8a64871f1a1241cad
#jira UE-147283
#rb christopher.waters David.Harvey

[CL 19667294 by benjamin rouveyrol in ue5-main branch]
2022-04-07 08:37:20 -04:00
zach bethel
f457a69101 Added RHI tracked access API to remove Unknown transitions.
- New RHI command list SetTrackedAccess method for the user to supply a current whole-resource state.
 - New RHI command context GetTrackedAccess method for querying the tracked access in RHIBeginTransitions / RHIEndTransitions on the RHI thread.
 - Hooked RHICmdList.Transition and FRHICommandListExecutor::Transition to assign tracked state automatically.
 - Refactored RDG and resource pools to use new RHI tracking.
      - FRDGPooledBuffer / FRDGPooledTexture no longer contain tracked state. RDG temp-allocates state through the graph allocator instead.
      - All prologue transitions are 'Unknown', and all epilogue transitions coalesce into a whole resource state.
 - Implemented platform support for patching the 'before' state with the tracked state.
 - Implemented various RHI validation checks:
      - Asserts that the user assigned tracked state matches RHI validation tracked state, for all subresources.
      - Asserts that tracked state is not assigned or queried from a parallel translation context.
 - Added FRHIViewableResource and FRHIView base classes to RHI. FRHIView contains a pointer to an FRHIViewableResource. This is currently a raw pointer, but should be extended to a full reference in a later CL.

NOTE on RHI thread constraint:

Transition evaluation is now restricted to the RHI thread (i.e. no parallel translation contexts). Transitions aren't performed in parallel translate contexts anyway, so this is not a problem. If, however, we decide to refactor parallel translation to be more general, this implementation could be extended to track the state per context and update from the 'dispatch' thread.

#preflight 6233b4396666d7e753a16aaf
#rb kenzo.terelst

[CL 19513316 by zach bethel in ue5-main branch]
2022-03-25 11:19:10 -04:00
Luke Thatcher
ee64a28f30 Copying //UE5/Dev-ParallelRendering to //UE5/Main
This change is the copy-up of work from //UE5/Dev-ParallelRendering to unify the various RHI texture types
 - The separate RHI texture types (FRHITexture2D, FRHITexture2DArray, FRHITexture3D, FRHITextureCube, FRHITextureCubeArray) have been replaced with a single type: FRHITexture.
 - Includes the required refactoring / fixes for the various platform RHIs.

The old texture types are still supported via typedefs, but will soon be marked deprecated. Future rendering code should make use of the FRHITexture type instead.

#jira UE-139559
#rb Mihnea.Balta
#preflight 622f3af819287beb2c3047f6
#robomerge[FN_ENGINEMERGE] DEV-NC

[CL 19371962 by Luke Thatcher in ue5-main branch]
2022-03-14 09:14:58 -04:00
christopher waters
a2503f0872 Adding ERHIInterfaceType so the public RHIs can identify themselves.
Adding templated GetDynamicRHI that makes sure we don't cast the Validation DynamicRHI by accident.

#jira none
#rb jeannoe.morissette, zach.bethel
#preflight 62169c43104496cff8a1d9df

[CL 19100864 by christopher waters in ue5-main branch]
2022-02-23 16:13:31 -05:00
christopher waters
940e858169 Finishing move to ComputePipelineState objects
- Deprecating IRHIComputeContext::RHISetComputeShader.
- Moving the fallback version of  RHISetComputePipelineState to IRHICommandContextPSOFallback.
- Making IRHIComputeContext::RHISetComputePipelineState pure virtual.
- Moving the fallback versions of RHICreateGraphicsPipelineState and RHICreateComputePipelineState into the new FDynamicRHIPSOFallback for platforms that were already using IRHICommandContextPSOFallback.
- Making FDynamicRHI::RHICreateGraphicsPipelineState and FDynamicRHI::RHICreateComputePipelineState pure virtual.

#jira none
#rb luke.thatcher, florin.pascu, will.damon, jeannoe.morissette
#preflight 621660bcc152c67496d9cc75

[CL 19095306 by christopher waters in ue5-main branch]
2022-02-23 13:17:16 -05:00
christopher waters
239071b670 Deprecating RHIGetResourceInfo in favor of FRHIResource::GetResourceInfo
#jira none
#rb zach.bethel, kenzo.terelst, jeannoe.morissette
#preflight 61e0b550250b9537f786b332

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 18618143 in //UE5/Release-5.0/... via CL 18618166 via CL 18618188
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18618216 by christopher waters in ue5-main branch]
2022-01-14 10:59:44 -05:00
sebastien hillaire
3fa07b8184 Adding UAV view slice start index and size parameters to UAV creation.
RHIs interface update.
Not implemented on Switch, Mac and OpenGL yet.

Tested with Strata on pc dx11/dx12, xb1 base, ps4 and ps5.
Tested wihtout Strata on pc and ps4.
ShooterGame test on PC
Mac preflight https://horde.devtools.epicgames.com/job/61b268709947f1ef980c602e
#preflight test https://horde.devtools.epicgames.com/job/61b26827b13fefb344312f11

#rb RHI, Console

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18508188 in //UE5/Release-5.0/... via CL 18508208
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18508217 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-04 11:08:22 -05:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -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
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
christopher waters
e78756230c Tessellation Removal: Removing Tessellation from NullRHI
#jira UE-94564
#rb mihnea.balta
#preflight 606f15d0ee9b4c0001a5a5ba

[CL 15956189 by christopher waters in ue5-main branch]
2021-04-08 11:34:39 -04:00
christopher waters
095570a7ec Tessellation Removal: CreateBoundShaderState changes to remove hull and domain shaders. Making CreateHullShader and CreateDomainShader optional.
#jira UE-94564
#rb will.damon, kenzo.terelst
#preflight 605e376d73db400001e8d814

[CL 15842909 by christopher waters in ue5-main branch]
2021-03-26 16:32:26 -04:00
zach bethel
8c1793ad5a Integration of RHI transient allocator into RDG.
- Replaced legacy transient support from RDG and replaced with new API.
 - Reworked acquire / discard operations a bit and added RHI validation to track correctness.
 - Reworked RDG barrier batching to include acquire / discard operations.
 - Hardened render pass merging logic and expanded to support lifetime extension of transient resources.
 - Added transient tag to RDG insights to track which resources are transient.

#rb luke.thatcher, kenzo.terelst

[CL 15726534 by zach bethel in ue5-main branch]
2021-03-17 12:44:59 -04:00
Luke Thatcher
5355f42a1a Remove FRHITextureReference from platform RHI implementations.
- FRHITextureReference is now implemented entirely within the base RHI module, and platform specific code from each RHI has been removed.
 - This also unifies how each platform deals with nullptr texture references. Some used GWhiteTexture, others used GBlackTexture, others probably just crash. Now, nullptr references will refer to GBlackTexture.
 - New implementation also handles RHI validation properly. Old code would crash when a nullptr reference is used in a draw.

#rb Kenzo.TerElst, Will.Damon
#jira none

[CL 15586248 by Luke Thatcher in ue5-main branch]
2021-03-03 15:18:32 -04:00
Marc Audy
9753392e2b Merge UE5/RES CL# 15462083 to UE5/Main
This represents UE4/Main @ 15414221

[CL 15463811 by Marc Audy in ue5-main branch]
2021-02-18 18:13:28 -04:00
Emil Persson
9d7f102824 Replace FRHIVertexBuffer, FRHIIndexBuffer and FRHIStructuredBuffer with FRHIBuffer, and some additional cleanup.
#rb kenzo.terelst

[CL 15143850 by Emil Persson in ue5-main branch]
2021-01-20 06:49:41 -04:00
Emil Persson
0d8d880752 Unified CreateBuffer() API.
Turn CreateAndLock*() functions into utility functions and remove all superfluous RHI implementations that only did Create+Lock anyway.

#rb kenzo.terelst, will.damon

[CL 15128492 by Emil Persson in ue5-main branch]
2021-01-18 09:38:34 -04:00
Emil Persson
a0ea8e4a80 Replace RHICopyVertexBuffer() with generic RHICopyBuffer() function
#rb kenzo.terelst

[CL 14954189 by Emil Persson in ue5-main branch]
2020-12-18 06:38:20 -04:00
Marcus Wassmer
2ef7721f4d Fix incorrectly ordered indexbuffer constructor params for NullRHI. Causes memory corruption in cooks. Cooker always uses NullRHI
#rb rune.stubbe
#fyi emil.persson

[CL 14880324 by Marcus Wassmer in ue5-main branch]
2020-12-08 13:55:42 -04:00
Emil Persson
4b46ed743d Merge LockBuffer functions
#rb kenzo.terelst

[CL 14877852 by Emil Persson in ue5-main branch]
2020-12-08 06:51:37 -04:00
Emil Persson
e5190a3c48 Buffer refactor merging Vertex, Index and Structured Buffer types into a single FRHIBuffer. No changes to APIs in this changelist other than those that naturally folded together when types merged. A few typedefs provide backward compatibility for the rendering code so that no changes outside of the RHI is needed at this point. There are plenty of API improvements and cleanups that can be imagined once buffer types are merged, but that's deferred to a later changelist. Currently buffers are still created with the old functions, but a unified CreateBuffer() could be imagined in the future.
#rb mihnea.balta, Kenzo.Terelst, Lukas.Hermanns

[CL 14762592 by Emil Persson in ue5-main branch]
2020-11-17 06:22:15 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
john white
991b33f728 Variable rate shading support
#jira MTHRL-41
#rb david.harvey

#ROBOMERGE-SOURCE: CL 12985283 in //UE4/Release-4.25Plus/... via CL 12985286
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12985291 by john white in Main branch]
2020-04-22 18:38:36 -04:00