Commit Graph

35 Commits

Author SHA1 Message Date
Andrew Davidson
45edf67938 Merging //UE5/Dev-LargeWorldCoordinates @ 17581892 to //UE5/Main
[CL 17595295 by Andrew Davidson in ue5-main branch]
2021-09-22 10:00:43 -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
72db809300 Replace legacy LockVertexBuffer()/LockIndexBuffer()/LockStructuredBuffer() calls with the unified LockBuffer()
#rb kenzo.terelst

[CL 14898308 by Emil Persson in ue5-main branch]
2020-12-10 11:51:32 -04:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
Rolando Caloca
1a30325d6f Copying //UE4/Dev-RenderPlat-Staging@9551419 to //UE4/Main
#rb none
#rnx

[CL 9551447 by Rolando Caloca in Main branch]
2019-10-11 15:33:31 -04:00
Marcus Wassmer
6517c68ef5 Copying //UE4/Dev-RenderPlat-Staging@8684824 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 8684840 by Marcus Wassmer in Main branch]
2019-09-14 09:45:25 -04:00
Luke Thatcher
e4d603fe3e Refactored FSlateUpdatableInstanceBuffer to remove the render thread flush in its destructor. The buffer now maintains its own proxy object, the lifetime of which is handled by the render thread, removing the need for a flush in the destructor. This also simplifies the update functions to simply taking a TArray of FVector4, which is typedef'ed as FSlateInstanceBufferData.
This change also resolves the remaining issues from the recent //UE4/Main -> //UE4/Dev-Rendering merge involving the RHI Lock/Unlock buffer API changes.

#rb Matt.Kuhlenschmidt

[CL 7661147 by Luke Thatcher in Dev-Rendering branch]
2019-07-30 13:39:07 -04:00
mickael gilabert
dd9e588e21 Removed TSlateElementVertexBuffer reference in RHI command FSlateUpdateInstanceBufferCommand as the instance could be destroyed before it is used in execution of the command
Rollbacked FDeferredCleanUpInterface use to ensure it wont crash for the moment

[REVIEW] Matt.Kuhlenschmidt
#rnx


#ROBOMERGE-SOURCE: CL 7642056 via CL 7642098 via CL 7642101 via CL 7644279
#ROBOMERGE-BOT: (v372-7473910)

[CL 7644420 by mickael gilabert in Main branch]
2019-07-26 17:51:39 -04:00
mickael gilabert
ac3be1c1ea Fixed wrong size passed to lock in FSlateUpdateInstanceBufferCommand
Removed FlushRenderingCommands in destructor and defer destruction of BufferData and VertexBuffer
Keep a reference of VertexBufferRHI in RHI command in case VertexBufferRHI gets modified on RT by being resized

#rb matt.kuhlenschmidt
#rnx


#ROBOMERGE-SOURCE: CL 7617028 via CL 7617479 via CL 7617521 via CL 7625651
#ROBOMERGE-BOT: (v372-7473910)

[CL 7625726 by mickael gilabert in Main branch]
2019-07-25 10:42:24 -04:00
mickael gilabert
9c62638660 Copy array into FSlateUpdateInstanceBufferCommand instead of passing a reference to fix a potential race condition due to basic Free Buffer Array index rotating
#rb matt.kuhlenschmidt
#rnx


#ROBOMERGE-OWNER: mickael.gilabert
#ROBOMERGE-AUTHOR: mickael.gilabert
#ROBOMERGE-SOURCE: CL 7475025 via CL 7475067 via CL 7475823
#ROBOMERGE-BOT: (v372-7473910)

[CL 7475827 by mickael gilabert in Main branch]
2019-07-22 12:05:42 -04:00
Juan Canada
936d762373 Fixed post merge compilation issue.
#rb none

[CL 7443234 by Juan Canada in Dev-Rendering branch]
2019-07-18 17:41:25 -04:00
Juan Canada
ce2b5909c8 Merging //UE4/Dev-Main@7438020 to Dev-Rendering (//UE4/Dev-Rendering)
#rnx
#rb none

[CL 7442279 by Juan Canada in Dev-Rendering branch]
2019-07-18 16:19:57 -04:00
Lukas Hermanns
7d9afcc4f3 Fixed "-Wshadow" warnings of older clang version for Android.
#rb none
#rnx

[CL 7277899 by Lukas Hermanns in Dev-Rendering branch]
2019-07-11 14:12:48 -04:00
matt kuhlenschmidt
c64ca632c7 Slate Global Invalidation System
This change makes it possible to remove the layout and painting overhead that Slate performs every frame.  The system is off by default as we continue to iterate on it.

However, this includes massive changes to batching, rendering, hit testing, and invalidation panels which are permanent changes and cannot be disabled.

#rb chris.gagnon, nick.darnell
[CODEREVIEW] nick.darnell


#ROBOMERGE-OWNER: matt.kuhlenschmidt
#ROBOMERGE-AUTHOR: matt.kuhlenschmidt
#ROBOMERGE-SOURCE: CL 7232617 via CL 7235502
#ROBOMERGE-BOT: (v367-6836689)

[CL 7235503 by matt kuhlenschmidt in Main branch]
2019-07-08 23:50:34 -04:00
Rolando Caloca
aec77c5edf DR - Fix clang warnings
#fyi Luke.Thatcher
#rb none
#rnx

[CL 7092033 by Rolando Caloca in Dev-Rendering branch]
2019-06-19 10:17:28 -04:00
Rolando Caloca
3b88b3a8d3 DR - Fix deprecations from merge from main
#rb none
#rnx

[CL 7064896 by Rolando Caloca in Dev-Rendering branch]
2019-06-18 13:26:18 -04:00
Luke Thatcher
c0060d5796 [RENDERING] [+] New RHI buffer lock/unlock API. These changes were made to remove the need for the RHI to call functions such as IsInRenderingThread() and IsInRHIThread() in their buffer lock/unlock implementations to determine whether buffer renames etc should be deferred or not.
RHIs can now make use of the RHICmdList.IsTopOfPipe() and RHICmdList.IsBottomOfPipe() functions to determine if lock/unlock operations should be deferred or not:

 - If IsTopOfPipe() returns true, the code is executing on the rendering thread (RT), whilst the RT is recording commands into the immediate RHI command list. Buffer renames etc may need to be deferred down the pipe using RHICmdList.EnqueueLambda().

 - If IsBottomOfPipe() returns true, the code is replaying previously recorded commands (or we are Bypass()ing the command list recording). As such, we should behave like we are running on the RHI thread (RHIT) and access GPU resources directly. It is possible for IsBottomOfPipe() to return true whilst we are on the RT, if running in "-norhithread" mode, since the RT both records and plays back the immediate command list. This is why it is important to use the IsTopOfPipe/IsBottomOfPipe functions to provide the execution context in the RHI, rather than using threading functions like IsInRenderingThread(). It is also more optimal to use these new functions, as the IsIn*Thread() functions require accessing TLS data which can be slow on some platforms.

The rest of this change refactors the RHI lock/unlock API to allow the FRHICommandListImmediate to be passed all the way into the RHI implementation. RHIs now have a choice of which buffer lock functions to implement. Either:

 - Implement the FDynamicRHI::RHILock*Buffer and FDynamicRHI::RHIUnlock*Buffer functions. These can be called on *both* the top and bottom of pipe. The RHI is required to use the passed-in RHICmdList to determine execution context. This is the most optimal approach as it gives the RHI the opportunity to return GPU memory (e.g. upload heap memory) in the Lock function directly, minimizing the number of memcpy()s needed to update a buffer. It is however the more complex solution as the RHI needs to use the RHICmdList.IsTopOfPipe/IsBottomOfPipe functions to determine if lock operations should be deferred with EnqueueLambda().

 - Implement the FDynamicRHI::Lock*Buffer_BottomOfPipe and FDynamicRHI::Unlock*Buffer_BottomOfPipe functions. This is the simplest solution. RHIs can assume these functions will always be called at the bottom of the pipe (hence the name), and so can access GPU resources directly without having to defer operations via EnqueueLambda, nor check the IsTopOfPipe/IsBottomOfPipe functions. It is less optimal though, as its implementation relies on the base class implementation of FDynamicRHI::RHILock*Buffer, which returns temporary CPU memory on Lock(), and does a memcpy() and free on Unlock.

This change also modifies the global resolve shader. Various platform RHIs were doing what was effectively a manual draw user primitives, by creating, locking and unlocking a vertex buffer just to fill it with vertices for a full screen resolve. This is now handled with a global, immutable vertex buffer and uniform parameters.

#rb Rolando.Caloca, Marcus.Wassmer
#jira none

[CL 7039544 by Luke Thatcher in Dev-Rendering branch]
2019-06-17 07:25:10 -04:00
Rolando Caloca
932a718f97 DR - Merging //UE4/Dev-Main@5196773 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
#rnx

[CL 5208164 by Rolando Caloca in Dev-Rendering branch]
2019-02-26 16:43:29 -05:00
rolando caloca
2b8c415f74 UE4.22 - Remove almost all of ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER
#rb none
#jira
#rnx

#ROBOMERGE-OWNER: rolando.caloca
#ROBOMERGE-AUTHOR: rolando.caloca
#ROBOMERGE-SOURCE: CL 5054105 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5054376 by rolando caloca in Main branch]
2019-02-18 18:35:01 -05:00
Marcus Wassmer
cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00
Ben Marsh
7598af0532 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

[CL 4662404 by Ben Marsh in Main branch]
2018-12-14 13:41:00 -05:00
Marcus Wassmer
2b944cb943 Copying //UE4/Dev-Rendering@4626416 to Dev-Main (//UE4/Dev-Main)
#rb none
#lockdown nick.penwarden

[CL 4626501 by Marcus Wassmer in Main branch]
2018-12-03 22:25:23 -05:00
Emil Persson
8756d5545f Update various AllocCommand to safer version
#rb none

[CL 4561416 by Emil Persson in Dev-Rendering branch]
2018-11-13 07:13:19 -05:00
Ben Marsh
13d012685f Merging copyright update from 4.19 branch.
#rb none
#rnx
#jira

[CL 3818977 by Ben Marsh in Staging-4.19 branch]
2018-01-02 15:30:26 -05:00