Commit Graph

60 Commits

Author SHA1 Message Date
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
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
Dmitriy Dyomin
97eb3c7edd Fixed: clearing of structured buffers in GL
#rb none

[CL 16434878 by Dmitriy Dyomin in ue5-main branch]
2021-05-24 09:14:25 -04:00
christopher waters
87718de4a2 Adding commands to dump RHI resource info.
rhi.DumpResourceMemory dumps the memory usage of each RHI resource if the type is instrumented. Currently only fully implemented for Textures and Buffers in D3D11 and D3D12.
rhi.DumpResourceCounts dumps the counts of each resource type. Should work for all RHIs.
Repurposed FRHIResourceInfo to use for generic resource info. Removed older uses of it that didn't actually provide data.
Made ERHIResourceType required to construct an FRHIResource.
Adding Name to FRHIBuffer.
Removed the unused FVulkanBuffer.
Removed the unused FOpenGLTexture and FOpenGLBaseTexture.

#jira none
#rb kenzo.terelst
#preflight 60902efd7d9bf90001766572

[CL 16186890 by christopher waters in ue5-main branch]
2021-05-03 16:58:15 -04:00
dmitriy dyomin
3b8a8c7b1c Fixed: QA-Waterworks fails to Launch On Samsung S20+
Changed water to use typed buffers instead of StructuredBuffers, as MALI GPUs do not support access to StructuredBuffers in a vertex shaders
#jira UE-109527
#rb kevin.ortegren

#ROBOMERGE-SOURCE: CL 15623921 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15623927 by dmitriy dyomin in ue5-main branch]
2021-03-05 10:17:07 -04:00
dmitriy dyomin
83e8fcca28 Remove wrong check on GL SRV renaming
#rb none

#ROBOMERGE-SOURCE: CL 15538755 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15538761 by dmitriy dyomin in ue5-main branch]
2021-02-26 02:10:51 -04:00
Dmitriy Dyomin
edd0257c55 Remove Texture2D as a storage for GPUScene primitives, OpenGL will use StructuredBuffers supported through SSBOs
#rb jack.porter
#fyi ola.olsson

[CL 15415286 by Dmitriy Dyomin in ue5-main branch]
2021-02-16 00:46: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
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -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
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -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
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
dmitriy dyomin
ad7c974c97 Fixed: TM-RuntimeVirtualTextures with Mobile Virtual Texture Support enabled not rendering correctly
#jira UE-92359
#rb Mihnea.Balta
#lockdown Cristina.Riveron

#ROBOMERGE-SOURCE: CL 13063891 in //UE4/Release-4.25/... via CL 13063898 via CL 13063920
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v686-13045012)

[CL 13063923 by dmitriy dyomin in Main branch]
2020-04-29 07:59:22 -04:00
florin pascu
9110a0dc5f - Revert ssbo back to texturebuffer in hlslcc. We now also support vec4 & vec1 of type float & unsigned & signed
- Filtered out a Niagara Ray tracing compute(was causing cooking problems cause of float3x4)
- Fixed GPU Scene
#jira UE-92314
#rb Jack.Porter, Dmitriy.Dyomin, Rolando.Caloca, Mihnea.Balta

#ROBOMERGE-OWNER: florin.pascu
#ROBOMERGE-AUTHOR: florin.pascu
#ROBOMERGE-SOURCE: CL 12984452 in //UE4/Release-4.25/... via CL 12984457 via CL 12984596
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12984603 by florin pascu in Main branch]
2020-04-22 17:24:48 -04:00
allan bentham
225e47b2e6 remove unused (and incorrect) GL format line, fixes static analysis report.
UE-91483
#rb none

#ROBOMERGE-SOURCE: CL 12658286 via CL 12658322 via CL 12658331
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12658338 by allan bentham in Main branch]
2020-04-07 13:02:07 -04:00
allan bentham
e3a1559174 Add GL RHI support for creating VB/IBs WithoutNativeResources and switching of VB/IB underlying resources.
required to support mesh lod streaming.
#rb Jian.Ru

#ROBOMERGE-SOURCE: CL 12504946 via CL 12504948 via CL 12504949
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12504953 by allan bentham in Main branch]
2020-04-01 06:30:25 -04:00
dmitriy dyomin
3fb1b40436 Fixed: Runtime Virtual Textures crash on Mobile
#jira UE-91261
#rb none
#lockdown christina.riveron

#ROBOMERGE-SOURCE: CL 12493731 in //UE4/Release-4.25/... via CL 12493775 via CL 12493804
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v673-12478461)

[CL 12493857 by dmitriy dyomin in Main branch]
2020-03-31 05:49:05 -04:00
rolando caloca
fd1c7b0719 UE4.25 - Change SRV offset to bytes instead of elements to fix some issues/mismatch
#rb Arne.Schober
#rnx
#jira
[FYI] Luke.Thatcher, Will.Damon

#ROBOMERGE-SOURCE: CL 12014453 in //UE4/Release-4.25/... via CL 12014515
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 12014534 by rolando caloca in Main branch]
2020-03-06 15:04:09 -05:00
Rolando Caloca
5b82f15def Copying //UE4/Dev-RenderPlat-Staging@11388153 to //UE4/Main
#rb none
#rnx

[CL 11388545 by Rolando Caloca in Main branch]
2020-02-12 13:27:19 -05:00
lukas hermanns
848ba0cbd8 Fixed compile error about GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT for OpenGLES RHI.
#rb none
[FYI] Arne.Schober, Bob.Tellez
#rnx


#ROBOMERGE-SOURCE: CL 11110898 via CL 11110900
#ROBOMERGE-BOT: (v640-11091645)

[CL 11111739 by lukas hermanns in Main branch]
2020-01-24 19:57:38 -05:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
arne schober
421d6516ca FN - SRV refactor for a better interface for that is easier to extend and supports offsets. Thanks to everyone involved.
[FYI] Lukas.Hermanns, Matt.Collins, Luke.Thatcher, Uriel.Doyon, Shaun.Kime, Rolando.Caloca
#jira
#RB


#ROBOMERGE-SOURCE: CL 11108521 via CL 11108527
#ROBOMERGE-BOT: (v640-11091645)

[CL 11108528 by arne schober in Main branch]
2020-01-24 16:08:00 -05:00