Commit Graph

31 Commits

Author SHA1 Message Date
Robert Manuszewski
8fe5db30e3 Merging UE4-Streaming to UE4
- Linkers are no longer UObjects. Renamed ULinker, ULinkerLoad and ULinkerSave to FLinker, FLinkerLoad, FLinkerSave respectively
- Linkers are now associated with their UPackages
- Linker version is now stored in UPackages
- Async loading is now performed on a separate thread (if platform supports it and only in cooked builds), with the exception of PostLoad which is still done on the game thread
- Added UObject::IsPostLoadThreadSafe() function to determine if PostLoad is thread safe and can be executed on the async loading thread (defaults to false)
- UObject creation is now thread safe and can be performed on any thread
- Move many of the linker/UObject globals into FUObjectThreadContext (TLS)
- GetAsyncLoadPercentage() now takes PostLoad into account
- More async loading stats
- Added AtomicallySetFlags/ClearFlags to UObject
- Made FModuleManager thread safe.
- Added FGCScopeGuard as means of preventing GC from executing from non-game thread
- It's possible to disable async loading thread through ini settings.
- Cancelling async loading will now also trigger GC
- Implemented a basic version of async streaming priorities.

Change 2410813 by Mikolaj Sieluzycki:
	Change Sleep in while loop to ConditionalSleep in FMultiReaderSingleWriterGT
Change 2410734 by Mikolaj Sieluzycki:
	Make FModuleManager thread safe.
Change 2399879 by Mikolaj Sieluzycki:
	Basic version of async streaming priorities.
Change 2410707 by Mikolaj Sieluzycki:
	Implement conditional and no stat versions of sleep.
Change 2371939 by Robert Manuszewski:
	Async Loading Improvements: adding more stats (accumulators)
Change 2372403 by Robert Manuszewski:
	Fixing compile errors when STATs are not enabled
Change 2371526 by Robert Manuszewski:
	AsyncLoading Improvements (WIP)
Change 2407198 by Robert Manuszewski:
	Re-implementing delegate fixes for Async Loading
Change 2407425 by Robert Manuszewski:
	Re-implementing cancelling async loading in the async loading branch.
Change 2484362 by Robert Manuszewski:
	Making it possible to disable async loading thread through ini settings.
Change 2484744 by Robert Manuszewski:
	Minimizing locks in GC and other threads when handling UObjects
Change 2480190 by Robert Manuszewski:
	Fixing infinite stall after canceling async loading in non-cooked builds
Change 2484268 by Robert Manuszewski:
	Fixing crash when allocating permanent object pool.
Change 2489761 by Robert Manuszewski:
	Fixing BulkData using linker archive on the main thread even if the linker was created on the async loading thread.
Change 2493624 by Robert Manuszewski:
	Cancelling async loading will now also trigger GC
Change 2487881 by Robert Manuszewski:
	Making ShaderIdMap operations thread safe.
Change 2488067 by Robert Manuszewski:
	Fixing GetAsyncLoadPercentage. It will now also respect PostLoad.
Change 2458640 by Robert Manuszewski:
	Fixing crash in PIE
Change 2458825 by Robert Manuszewski:
	Fixing a few crashes when streaming and the package is missing.
Change 2476935 by Robert Manuszewski:
	Fixing crash while async loading ANavigationData
Change 2477361 by Robert Manuszewski:
	Fixing crashes in cooked game
Change 2480095 by Robert Manuszewski:
	Making FUObjectArray more thread safe
Change 2475443 by Robert Manuszewski:
	Re-enabling single-threaded async loading path for the editor and platforms that don't support multithreading.
Change 2475458 by Robert Manuszewski:
	Making sure bulk data is only loaded on a separate thread if it's not being loaded on the async loading thread.
Change 2476661 by Robert Manuszewski:
	Fixing FlushAsyncLoading not flushing everything
Change 2401089 by Jaroslaw Surowiec:
	Core - Added AtomicallySetFlags/ClearFlags to UObject, added a comment to ThisThreadAtomicallyClearedRFUnreachable

[CL 2498249 by Robert Manuszewski in Main branch]
2015-04-01 03:03:18 -04:00
Gil Gribb
a6344aaf0b UE4 - remove several ifdefs related to parallel rendering making it available for DX12 and any PC RHI
[CL 2489182 by Gil Gribb in Main branch]
2015-03-24 08:49:41 -04:00
Jaroslaw Surowiec
9aee7dc31d Core - Runnable improvements
#codereview Robert.Manuszewski

[CL 2489120 by Jaroslaw Surowiec in Main branch]
2015-03-24 07:29:32 -04:00
Gil Gribb
35cf42566a UE4 - merge GDC branch, code @2465640 to main
[CL 2468685 by Gil Gribb in Main branch]
2015-03-04 08:31:40 -05:00
Jaroslaw Surowiec
1f2f30c7f3 Stats - Removed ExplicitFlush from the rendering thread, no longer needed
#codereview Robert.Manuszewski

[CL 2446758 by Jaroslaw Surowiec in Main branch]
2015-02-16 04:53:29 -05:00
Jaroslaw Surowiec
710c4da708 Core - Replaced FPlatformProcess::CreateSyncEvent with FPlatformProcess::GetSynchEventFromPool, CreateSyncEvent is not longer publicly available
#codereview Robert.Manuszewski

[CL 2421974 by Jaroslaw Surowiec in Main branch]
2015-01-28 07:31:10 -05:00
Keith Judge
24a170d2bd Re-enable thread affinity on Xbox One, and set some better defaults core mappings.
[CL 2415384 by Keith Judge in Main branch]
2015-01-22 11:26:35 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Mark Satterthwaite
a6c5dd914e On 10.10.1 we don't need to flush after creating every texture, but we do need to flush before resuming the render thread after suspending it, so that any resource changes we have just made are guaranteed to be available to the render thread. Without the flush Apple's OpenGL *can* ignore resources created during the suspension on the shared context, because the commands to allocate their backing store has yet to be processed by the time the render context tries to use them.
#codereview michael.trepka

[CL 2368492 by Mark Satterthwaite in Main branch]
2014-11-24 12:51:18 -05:00
Jaroslaw Surowiec
00861eccda Core - Fix for a stats crash
[CL 2358599 by Jaroslaw Surowiec in Main branch]
2014-11-13 12:59:53 -05:00
Jaroslaw Surowiec
f060ddf99a Stats - Added explicit flush for stats after startup the rendering thread, to prevent fragmentation and creating a massive amout of stats packets
#codereview Robert.Manuszewski

[CL 2340902 by Jaroslaw Surowiec in Main branch]
2014-10-27 07:55:33 -04:00
Gil Gribb
3a1a608136 UE4 - make sure bypass is latched right away for RHI thread and don't clear stencil on PS4 if we don't have a write address
[CL 2324392 by Gil Gribb in Main branch]
2014-10-09 14:05:15 -04:00
Gil Gribb
598cbb659c UE4 - allow draw events to work in parallel rendering, some flush tweaks
[CL 2293700 by Gil Gribb in Main branch]
2014-09-11 09:38:38 -04:00
Gil Gribb
9978428b65 UE4 - RHI thread prototype (PS4 only so far)
[CL 2283021 by Gil Gribb in Main branch]
2014-09-03 10:52:00 -04:00
Jaroslaw Palczynski
eb49618ff2 Fix stat id redundant creation.
Change stat id creation to static declarations.

[CL 2281174 by Jaroslaw Palczynski in Main branch]
2014-09-02 05:19:25 -04:00
Gil Gribb
fe1b255d99 UE4 - defer deletes of RHI resources and some parallel prototyping
[CL 2218215 by Gil Gribb in Main branch]
2014-07-15 07:34:34 -04:00
Gil Gribb
1d50eae0de UE4 - rework RHI user-facing APIs to be safer and incorporate the desired sematics
[CL 2119499 by Gil Gribb in Main branch]
2014-06-27 11:07:13 -04:00
Josh Adams
b552e2d883 Urban->Main
#codereview jeff.campeau,nick.penwarden,rolando.caloca

[CL 2108642 by Josh Adams in Main branch]
2014-06-17 18:27:26 -04:00
Jaroslaw Surowiec
f3b04ddb1c Stats - Fixed a memory leak in the UFE, added better implementation for the stats advance frame
#codereview Robert.Manuszewski

[CL 2103266 by Jaroslaw Surowiec in Main branch]
2014-06-12 12:09:36 -04:00
Jaroslaw Palczynski
724ea452a5 Refactoring thread affinity settings.
There was a bug in setting affinity of a thread that assumed affinity from lookup table with key being a thread name. When names was appended with consecutive numbers (e.g. "RenderingThread 1") the mechanism failed. Refactored this to use special static consts describing affinity override'able by different platforms for different affinity types + possibility of setting affinity per thread.
#codereview Jaroslaw.Surowiec

[CL 2070197 by Jaroslaw Palczynski in Main branch]
2014-05-12 08:40:54 -04:00
Mikolaj Sieluzycki
7a1386bfc9 #ttp 331740 UE4: Core: Runnable thread clean-up
#proj core
#branch UE4
#summary Remove all bAutoDeleteSelf and bAutoDeleteRunnable usage from the runnable.
#codereview Robert.Manuszewski

[CL 2070165 by Mikolaj Sieluzycki in Main branch]
2014-05-12 08:39:12 -04:00
Michael Noland
258328b3d9 Editor: Fix a logic error in busy-waiting for the game thread to finish executing when a breakpoint is hit
[CL 2063708 by Michael Noland in Main branch]
2014-05-05 14:46:40 -04:00
Jaroslaw Surowiec
15f13fc6d1 Stats - Fix for STATS=0
[CL 2063518 by Jaroslaw Surowiec in Main branch]
2014-05-05 11:20:07 -04:00
Jaroslaw Surowiec
fd225b6412 Stats - Restored indexed rendering thread, but now it's based on NAME_RenderThread, removed all references to "RenderingThread", leaving only these required for backward compatibility
Stats - Added missing GetGroupCategory to the thread node in the GetRawStackStats

#codereview Robert.Manuszewski

[CL 2063512 by Jaroslaw Surowiec in Main branch]
2014-05-05 11:15:08 -04:00
Jaroslaw Surowiec
9c6c6da344 UE4.Core - Removed numbering of the rendering threads, subsequent rendering thread can be detected by comparing the thread id
#codereview Robert.Manuszewski

[CL 2059921 by Jaroslaw Surowiec in Main branch]
2014-04-30 10:33:22 -04:00