2016-01-07 08:17:16 -05:00
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
# include "LaunchPrivatePCH.h"
# include "Internationalization/Internationalization.h"
# include "Ticker.h"
# include "ConsoleManager.h"
# include "ExceptionHandling.h"
# include "FileManagerGeneric.h"
# include "TaskGraphInterfaces.h"
2015-04-14 05:21:25 -04:00
# include "StatsMallocProfilerProxy.h"
2014-03-14 14:13:41 -04:00
# include "Projects.h"
# include "UProjectInfo.h"
# include "EngineVersion.h"
2014-10-30 10:07:51 -04:00
# include "ModuleManager.h"
2015-08-03 08:47:15 -04:00
# include "../Resources/Version.h"
# include "VersionManifest.h"
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
# include "UObject/DevObjectVersion.h"
2016-04-05 11:25:00 -04:00
# include "HAL/ThreadHeartBeat.h"
# if WITH_COREUOBJECT
# include "Internationalization/PackageLocalizationManager.h"
# endif
2014-10-30 10:07:51 -04:00
2014-03-14 14:13:41 -04:00
# if WITH_EDITOR
# include "EditorStyle.h"
# include "ProfilerClient.h"
# include "RemoteConfigIni.h"
2014-11-17 15:04:07 -05:00
# include "EditorCommandLineUtils.h"
2014-03-14 14:13:41 -04:00
# if PLATFORM_WINDOWS
# include "AllowWindowsPlatformTypes.h"
# include <objbase.h>
# include "HideWindowsPlatformTypes.h"
# endif
# endif
# if WITH_ENGINE
2015-08-28 13:23:02 -04:00
# include "AutomationController.h"
2014-03-14 14:13:41 -04:00
# include "Database.h"
# include "DerivedDataCacheInterface.h"
# include "RenderCore.h"
# include "ShaderCompiler.h"
2014-08-28 13:54:31 -04:00
# include "DistanceFieldAtlas.h"
2014-03-14 14:13:41 -04:00
# include "GlobalShader.h"
# include "ParticleHelper.h"
# include "Online.h"
2014-05-29 17:36:51 -04:00
# include "PhysicsPublic.h"
2014-03-14 14:13:41 -04:00
# include "PlatformFeatures.h"
2014-05-29 17:11:10 -04:00
# include "DeviceProfiles/DeviceProfileManager.h"
2014-05-29 17:15:00 -04:00
# include "Commandlets/Commandlet.h"
2014-06-18 07:25:31 -04:00
# include "EngineService.h"
# include "ContentStreaming.h"
2014-08-13 06:12:21 -04:00
# include "HighResScreenshot.h"
2014-09-05 12:46:22 -04:00
# include "HotReloadInterface.h"
2014-12-12 17:38:18 -05:00
# include "ISessionService.h"
# include "ISessionServicesModule.h"
2015-02-23 15:58:14 -05:00
# include "Engine/GameInstance.h"
2016-04-05 11:25:00 -04:00
# include "Internationalization/EnginePackageLocalizationCache.h"
2014-05-29 17:15:00 -04:00
2014-03-14 14:13:41 -04:00
# if !UE_SERVER
2014-08-28 13:49:44 -04:00
# include "HeadMountedDisplay.h"
2014-06-09 14:36:21 -04:00
# include "ISlateRHIRendererModule.h"
2015-09-15 18:41:34 -04:00
# include "ISlateNullRendererModule.h"
2014-11-05 13:10:54 -05:00
# include "EngineFontServices.h"
2014-03-14 14:13:41 -04:00
# endif
# include "MoviePlayer.h"
# if !UE_BUILD_SHIPPING
# include "STaskGraph.h"
# include "ProfilerService.h"
# endif
# if WITH_AUTOMATION_WORKER
# include "AutomationWorker.h"
# endif
# endif //WITH_ENGINE
# if WITH_EDITOR
# include "FeedbackContextEditor.h"
static FFeedbackContextEditor UnrealEdWarn ;
# endif // WITH_EDITOR
2014-05-14 20:01:43 -04:00
# if UE_EDITOR
# include "DesktopPlatformModule.h"
# endif
2014-03-14 14:13:41 -04:00
# define LOCTEXT_NAMESPACE "LaunchEngineLoop"
# if PLATFORM_WINDOWS
# include "AllowWindowsPlatformTypes.h"
# include <ObjBase.h>
# include "HideWindowsPlatformTypes.h"
# endif
2014-10-14 10:29:46 -04:00
# if ENABLE_VISUAL_LOG
2016-04-05 11:25:00 -04:00
# include "VisualLogger/VisualLogger.h"
2014-10-14 10:29:46 -04:00
# endif
2016-04-05 11:25:00 -04:00
# if WITH_LAUNCHERCHECK
# include "LauncherCheck.h"
# endif
# if WITH_COREUOBJECT
# ifndef USE_LOCALIZED_PACKAGE_CACHE
# define USE_LOCALIZED_PACKAGE_CACHE 1
# endif
# else
# define USE_LOCALIZED_PACKAGE_CACHE 0
# endif
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
// Pipe output to std output
// This enables UBT to collect the output for it's own use
class FOutputDeviceStdOutput : public FOutputDevice
{
public :
FOutputDeviceStdOutput ( )
{
bAllowLogVerbosity = FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " AllowStdOutLogVerbosity " ) ) ;
}
virtual ~ FOutputDeviceStdOutput ( )
{
}
2014-06-13 06:14:46 -04:00
virtual void Serialize ( const TCHAR * V , ELogVerbosity : : Type Verbosity , const class FName & Category ) override
2014-03-14 14:13:41 -04:00
{
if ( ( bAllowLogVerbosity & & Verbosity < = ELogVerbosity : : Log ) | | ( Verbosity < = ELogVerbosity : : Display ) )
{
# if PLATFORM_USE_LS_SPEC_FOR_WIDECHAR
2016-04-28 13:50:05 -04:00
wprintf ( TEXT ( " \n %ls " ) , * FOutputDeviceHelper : : FormatLogLine ( Verbosity , Category , V , GPrintLogTimes ) ) ;
2014-03-14 14:13:41 -04:00
# else
2016-04-28 13:50:05 -04:00
wprintf ( TEXT ( " \n %s " ) , * FOutputDeviceHelper : : FormatLogLine ( Verbosity , Category , V , GPrintLogTimes ) ) ;
2014-03-14 14:13:41 -04:00
# endif
fflush ( stdout ) ;
}
}
private :
bool bAllowLogVerbosity ;
} ;
2015-09-29 15:30:25 -04:00
2014-05-09 13:52:29 -04:00
// Exits the game/editor if any of the specified phrases appears in the log output
class FOutputDeviceTestExit : public FOutputDevice
{
TArray < FString > ExitPhrases ;
public :
FOutputDeviceTestExit ( const TArray < FString > & InExitPhrases )
: ExitPhrases ( InExitPhrases )
{
}
virtual ~ FOutputDeviceTestExit ( )
{
}
2014-06-13 06:14:46 -04:00
virtual void Serialize ( const TCHAR * V , ELogVerbosity : : Type Verbosity , const class FName & Category ) override
2014-05-09 13:52:29 -04:00
{
if ( ! GIsRequestingExit )
{
for ( auto & Phrase : ExitPhrases )
{
if ( FCString : : Stristr ( V , * Phrase ) & & ! FCString : : Stristr ( V , TEXT ( " -testexit= " ) ) )
{
2014-05-09 14:17:38 -04:00
# if WITH_ENGINE
2015-09-29 15:30:25 -04:00
if ( GEngine ! = nullptr )
2014-05-09 13:52:29 -04:00
{
if ( GIsEditor )
{
GEngine - > DeferredCommands . Add ( TEXT ( " CLOSE_SLATE_MAINFRAME " ) ) ;
}
else
{
2015-09-29 15:30:25 -04:00
GEngine - > Exec ( nullptr , TEXT ( " QUIT " ) ) ;
2014-05-09 13:52:29 -04:00
}
}
2014-05-09 14:17:38 -04:00
# else
FPlatformMisc : : RequestExit ( true ) ;
# endif
2014-05-09 13:52:29 -04:00
break ;
}
}
}
}
} ;
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
static TScopedPointer < FOutputDeviceConsole > GScopedLogConsole ;
static TScopedPointer < FOutputDeviceStdOutput > GScopedStdOut ;
2014-05-09 13:52:29 -04:00
static TScopedPointer < FOutputDeviceTestExit > GScopedTestExit ;
2014-03-14 14:13:41 -04:00
2015-08-13 10:53:13 -04:00
2015-08-13 11:13:53 -04:00
# if WITH_ENGINE
2015-08-13 10:53:13 -04:00
static void RHIExitAndStopRHIThread ( )
{
RHIExit ( ) ;
// Stop the RHI Thread
if ( GUseRHIThread )
{
DECLARE_CYCLE_STAT ( TEXT ( " Wait For RHIThread Finish " ) , STAT_WaitForRHIThreadFinish , STATGROUP_TaskGraphTasks ) ;
FGraphEventRef QuitTask = TGraphTask < FReturnGraphTask > : : CreateTask ( nullptr , ENamedThreads : : GameThread ) . ConstructAndDispatchWhenReady ( ENamedThreads : : RHIThread ) ;
FTaskGraphInterface : : Get ( ) . WaitUntilTaskCompletes ( QuitTask , ENamedThreads : : GameThread_Local ) ;
}
}
2015-08-13 11:13:53 -04:00
# endif
2015-08-13 10:53:13 -04:00
2015-09-29 15:30:25 -04:00
2014-04-23 17:47:30 -04:00
/**
* Initializes std out device and adds it to GLog
* */
void InitializeStdOutDevice ( )
{
// Check if something is trying to initialize std out device twice.
check ( ! GScopedStdOut . IsValid ( ) ) ;
GScopedStdOut = new FOutputDeviceStdOutput ( ) ;
GLog - > AddOutputDevice ( GScopedStdOut . GetOwnedPointer ( ) ) ;
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
bool ParseGameProjectFromCommandLine ( const TCHAR * InCmdLine , FString & OutProjectFilePath , FString & OutGameName )
{
const TCHAR * CmdLine = InCmdLine ;
FString FirstCommandLineToken = FParse : : Token ( CmdLine , 0 ) ;
// trim any whitespace at edges of string - this can happen if the token was quoted with leading or trailing whitespace
// VC++ tends to do this in its "external tools" config
FirstCommandLineToken = FirstCommandLineToken . Trim ( ) ;
//
OutProjectFilePath = TEXT ( " " ) ;
OutGameName = TEXT ( " " ) ;
if ( FirstCommandLineToken . Len ( ) & & ! FirstCommandLineToken . StartsWith ( TEXT ( " - " ) ) )
{
// The first command line argument could be the project file if it exists or the game name if not launching with a project file
const FString ProjectFilePath = FString ( FirstCommandLineToken ) ;
2014-09-08 13:51:36 -04:00
if ( FPaths : : GetExtension ( ProjectFilePath ) = = FProjectDescriptor : : GetExtension ( ) )
2014-03-14 14:13:41 -04:00
{
OutProjectFilePath = FirstCommandLineToken ;
// Here we derive the game name from the project file
OutGameName = FPaths : : GetBaseFilename ( OutProjectFilePath ) ;
return true ;
}
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
else if ( FPaths : : IsRelative ( FirstCommandLineToken ) & & FPlatformProperties : : IsMonolithicBuild ( ) = = false )
2014-03-14 14:13:41 -04:00
{
// Full game name is assumed to be the first token
OutGameName = MoveTemp ( FirstCommandLineToken ) ;
// Derive the project path from the game name. All games must have a uproject file, even if they are in the root folder.
2014-09-08 13:51:36 -04:00
OutProjectFilePath = FPaths : : Combine ( * FPaths : : RootDir ( ) , * OutGameName , * FString ( OutGameName + TEXT ( " . " ) + FProjectDescriptor : : GetExtension ( ) ) ) ;
2014-03-14 14:13:41 -04:00
return true ;
}
}
2014-11-17 15:04:07 -05:00
# if WITH_EDITOR
if ( FEditorCommandLineUtils : : ParseGameProjectPath ( InCmdLine , OutProjectFilePath , OutGameName ) )
{
return true ;
}
# endif
2014-03-14 14:13:41 -04:00
return false ;
}
2015-09-29 15:30:25 -04:00
2015-05-05 04:06:03 -04:00
bool LaunchSetGameName ( const TCHAR * InCmdLine , FString & OutGameProjectFilePathUnnormalized )
2014-03-14 14:13:41 -04:00
{
if ( GIsGameAgnosticExe )
{
2014-10-14 10:31:43 -04:00
// Initialize GameName to an empty string. Populate it below.
FApp : : SetGameName ( TEXT ( " " ) ) ;
2014-03-14 14:13:41 -04:00
FString ProjFilePath ;
FString LocalGameName ;
if ( ParseGameProjectFromCommandLine ( InCmdLine , ProjFilePath , LocalGameName ) = = true )
{
// Only set the game name if this is NOT a program...
if ( FPlatformProperties : : IsProgram ( ) = = false )
{
2014-10-14 10:31:43 -04:00
FApp : : SetGameName ( * LocalGameName ) ;
2014-03-14 14:13:41 -04:00
}
2015-05-05 04:06:03 -04:00
OutGameProjectFilePathUnnormalized = ProjFilePath ;
2014-03-14 14:13:41 -04:00
FPaths : : SetProjectFilePath ( ProjFilePath ) ;
}
# if UE_GAME
else
{
// Try to use the executable name as the game name.
LocalGameName = FPlatformProcess : : ExecutableName ( ) ;
2016-04-08 09:12:14 -04:00
int32 FirstCharToRemove = INDEX_NONE ;
if ( LocalGameName . FindChar ( TCHAR ( ' - ' ) , FirstCharToRemove ) )
{
LocalGameName = LocalGameName . Left ( FirstCharToRemove ) ;
}
2014-10-14 10:31:43 -04:00
FApp : : SetGameName ( * LocalGameName ) ;
2014-03-14 14:13:41 -04:00
// Check it's not UE4Game, otherwise assume a uproject file relative to the game project directory
if ( LocalGameName ! = TEXT ( " UE4Game " ) )
{
2014-09-08 13:51:36 -04:00
ProjFilePath = FPaths : : Combine ( TEXT ( " .. " ) , TEXT ( " .. " ) , TEXT ( " .. " ) , * LocalGameName , * FString ( LocalGameName + TEXT ( " . " ) + FProjectDescriptor : : GetExtension ( ) ) ) ;
2015-05-05 04:06:03 -04:00
OutGameProjectFilePathUnnormalized = ProjFilePath ;
2014-03-14 14:13:41 -04:00
FPaths : : SetProjectFilePath ( ProjFilePath ) ;
}
}
# endif
static bool bPrinted = false ;
if ( ! bPrinted )
{
bPrinted = true ;
if ( FApp : : HasGameName ( ) )
{
2014-10-14 10:31:43 -04:00
UE_LOG ( LogInit , Display , TEXT ( " Running engine for game: %s " ) , FApp : : GetGameName ( ) ) ;
2014-03-14 14:13:41 -04:00
}
else
{
if ( FPlatformProperties : : RequiresCookedData ( ) )
{
UE_LOG ( LogInit , Fatal , TEXT ( " Non-agnostic games on cooked platforms require a uproject file be specified. " ) ) ;
}
else
{
UE_LOG ( LogInit , Display , TEXT ( " Running engine without a game " ) ) ;
}
}
}
}
else
{
FString ProjFilePath ;
FString LocalGameName ;
if ( ParseGameProjectFromCommandLine ( InCmdLine , ProjFilePath , LocalGameName ) = = true )
{
if ( FPlatformProperties : : RequiresCookedData ( ) )
{
2014-10-14 10:31:43 -04:00
// Non-agnostic exes that require cooked data cannot load projects, so make sure that the LocalGameName is the GameName
if ( LocalGameName ! = FApp : : GetGameName ( ) )
2014-03-14 14:13:41 -04:00
{
UE_LOG ( LogInit , Fatal , TEXT ( " Non-agnostic games cannot load projects on cooked platforms - try running UE4Game. " ) ) ;
}
}
// Only set the game name if this is NOT a program...
if ( FPlatformProperties : : IsProgram ( ) = = false )
{
2014-10-14 10:31:43 -04:00
FApp : : SetGameName ( * LocalGameName ) ;
2014-03-14 14:13:41 -04:00
}
2015-05-05 04:06:03 -04:00
OutGameProjectFilePathUnnormalized = ProjFilePath ;
2014-03-14 14:13:41 -04:00
FPaths : : SetProjectFilePath ( ProjFilePath ) ;
}
// In a non-game agnostic exe, the game name should already be assigned by now.
if ( ! FApp : : HasGameName ( ) )
{
UE_LOG ( LogInit , Fatal , TEXT ( " Could not set game name! " ) ) ;
}
}
return true ;
}
2015-09-29 15:30:25 -04:00
2014-10-14 10:31:43 -04:00
void LaunchFixGameNameCase ( )
{
# if PLATFORM_DESKTOP && !IS_PROGRAM
// This is to make sure this function is not misused and is only called when the game name is set
check ( FApp : : HasGameName ( ) ) ;
// correct the case of the game name, if possible (unless we're running a program and the game name is already set)
if ( FPaths : : IsProjectFilePathSet ( ) )
{
const FString GameName ( FPaths : : GetBaseFilename ( IFileManager : : Get ( ) . GetFilenameOnDisk ( * FPaths : : GetProjectFilePath ( ) ) ) ) ;
const bool bGameNameMatchesProjectCaseSensitive = ( FCString : : Strcmp ( * GameName , FApp : : GetGameName ( ) ) = = 0 ) ;
if ( ! bGameNameMatchesProjectCaseSensitive & & ( FApp : : IsGameNameEmpty ( ) | | GIsGameAgnosticExe | | ( GameName . Len ( ) > 0 & & GIsGameAgnosticExe ) ) )
{
if ( GameName = = FApp : : GetGameName ( ) ) // case insensitive compare
{
FApp : : SetGameName ( * GameName ) ;
}
else
{
const FText Message = FText : : Format (
2014-11-18 11:54:51 -05:00
NSLOCTEXT ( " Core " , " MismatchedGameNames " , " The name of the .uproject file ('{0}') must match the name of the project passed in the command line ('{1}'). " ) ,
FText : : FromString ( * GameName ) ,
FText : : FromString ( FApp : : GetGameName ( ) ) ) ;
2014-10-14 10:31:43 -04:00
if ( ! GIsBuildMachine )
{
UE_LOG ( LogInit , Warning , TEXT ( " %s " ) , * Message . ToString ( ) ) ;
FMessageDialog : : Open ( EAppMsgType : : Ok , Message ) ;
}
FApp : : SetGameName ( TEXT ( " " ) ) ; // this disables part of the crash reporter to avoid writing log files to a bogus directory
if ( ! GIsBuildMachine )
{
exit ( 1 ) ;
}
UE_LOG ( LogInit , Fatal , TEXT ( " %s " ) , * Message . ToString ( ) ) ;
}
}
}
# endif //PLATFORM_DESKTOP
}
2014-03-14 14:13:41 -04:00
2015-09-29 15:30:25 -04:00
static IPlatformFile * ConditionallyCreateFileWrapper ( const TCHAR * Name , IPlatformFile * CurrentPlatformFile , const TCHAR * CommandLine , bool * OutFailedToInitialize = nullptr , bool * bOutShouldBeUsed = nullptr )
2014-03-14 14:13:41 -04:00
{
if ( OutFailedToInitialize )
{
* OutFailedToInitialize = false ;
}
2015-03-06 13:30:49 -05:00
if ( bOutShouldBeUsed )
{
* bOutShouldBeUsed = false ;
}
2014-03-14 14:13:41 -04:00
IPlatformFile * WrapperFile = FPlatformFileManager : : Get ( ) . GetPlatformFile ( Name ) ;
2015-09-29 15:30:25 -04:00
if ( WrapperFile ! = nullptr & & WrapperFile - > ShouldBeUsed ( CurrentPlatformFile , CommandLine ) )
2014-03-14 14:13:41 -04:00
{
2015-03-06 13:30:49 -05:00
if ( bOutShouldBeUsed )
{
* bOutShouldBeUsed = true ;
}
2014-03-14 14:13:41 -04:00
if ( WrapperFile - > Initialize ( CurrentPlatformFile , CommandLine ) = = false )
{
if ( OutFailedToInitialize )
{
* OutFailedToInitialize = true ;
}
// Don't delete the platform file. It will be automatically deleted by its module.
2015-09-29 15:30:25 -04:00
WrapperFile = nullptr ;
2014-03-14 14:13:41 -04:00
}
}
else
{
// Make sure it won't be used.
2015-09-29 15:30:25 -04:00
WrapperFile = nullptr ;
2014-03-14 14:13:41 -04:00
}
return WrapperFile ;
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
/**
* Look for any file overrides on the command line ( i . e . network connection file handler )
*/
bool LaunchCheckForFileOverride ( const TCHAR * CmdLine , bool & OutFileOverrideFound )
{
OutFileOverrideFound = false ;
// Get the physical platform file.
IPlatformFile * CurrentPlatformFile = & FPlatformFileManager : : Get ( ) . GetPlatformFile ( ) ;
// Try to create pak file wrapper
{
2015-04-08 14:46:25 -04:00
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " PakFile " ) , CurrentPlatformFile , CmdLine ) ;
2014-03-14 14:13:41 -04:00
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " CachedReadFile " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
// Try to create sandbox wrapper
{
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " SandboxFile " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
# if !UE_BUILD_SHIPPING // UFS clients are not available in shipping builds.
// Streaming network wrapper (it has a priority over normal network wrapper)
bool bNetworkFailedToInitialize = false ;
do
{
2015-03-06 13:30:49 -05:00
bool bShouldUseStreamingFile = false ;
IPlatformFile * NetworkPlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " StreamingFile " ) , CurrentPlatformFile , CmdLine , & bNetworkFailedToInitialize , & bShouldUseStreamingFile ) ;
2014-03-14 14:13:41 -04:00
if ( NetworkPlatformFile )
{
CurrentPlatformFile = NetworkPlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
2015-03-06 13:30:49 -05:00
// if streaming network platform file was tried this loop don't try this one
2014-03-14 14:13:41 -04:00
// Network file wrapper (only create if the streaming wrapper hasn't been created)
2015-03-06 13:30:49 -05:00
if ( ! bShouldUseStreamingFile & & ! NetworkPlatformFile )
2014-03-14 14:13:41 -04:00
{
NetworkPlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " NetworkFile " ) , CurrentPlatformFile , CmdLine , & bNetworkFailedToInitialize ) ;
if ( NetworkPlatformFile )
{
CurrentPlatformFile = NetworkPlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
2015-03-06 13:30:49 -05:00
2014-03-14 14:13:41 -04:00
if ( bNetworkFailedToInitialize )
{
FString HostIpString ;
FParse : : Value ( CmdLine , TEXT ( " -FileHostIP= " ) , HostIpString ) ;
# if PLATFORM_REQUIRES_FILESERVER
2015-04-28 08:46:09 -04:00
FPlatformMisc : : LowLevelOutputDebugStringf ( TEXT ( " Failed to connect to file server at %s. RETRYING in 5s. \n " ) , * HostIpString ) ;
FPlatformProcess : : Sleep ( 5.0f ) ;
2014-03-14 14:13:41 -04:00
uint32 Result = 2 ;
# else //PLATFORM_REQUIRES_FILESERVER
2014-09-24 20:02:40 -04:00
// note that this can't be localized because it happens before we connect to a filserver - localizing would cause ICU to try to load.... from over the file server connection!
FString Error = FString : : Printf ( TEXT ( " Failed to connect to any of the following file servers: \n \n %s \n \n Would you like to try again? No will fallback to local disk files, Cancel will quit. " ) , * HostIpString . Replace ( TEXT ( " + " ) , TEXT ( " \n " ) ) ) ;
uint32 Result = FMessageDialog : : Open ( EAppMsgType : : YesNoCancel , FText : : FromString ( Error ) ) ;
2014-03-14 14:13:41 -04:00
# endif //PLATFORM_REQUIRES_FILESERVER
if ( Result = = EAppReturnType : : No )
{
break ;
}
else if ( Result = = EAppReturnType : : Cancel )
{
// Cancel - return a failure, and quit
return false ;
}
}
}
while ( bNetworkFailedToInitialize ) ;
# endif
# if !UE_BUILD_SHIPPING
// Try to create file profiling wrapper
{
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " ProfileFile " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
{
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " SimpleProfileFile " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
// Try and create file timings stats wrapper
{
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " FileReadStats " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
// Try and create file open log wrapper (lists the order files are first opened)
{
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " FileOpenLog " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
# endif //#if !UE_BUILD_SHIPPING
// Wrap the above in a file logging singleton if requested
{
IPlatformFile * PlatformFile = ConditionallyCreateFileWrapper ( TEXT ( " LogFile " ) , CurrentPlatformFile , CmdLine ) ;
if ( PlatformFile )
{
CurrentPlatformFile = PlatformFile ;
FPlatformFileManager : : Get ( ) . SetPlatformFile ( * CurrentPlatformFile ) ;
}
}
// If our platform file is different than it was when we started, then an override was used
OutFileOverrideFound = ( CurrentPlatformFile ! = & FPlatformFileManager : : Get ( ) . GetPlatformFile ( ) ) ;
return true ;
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
bool LaunchHasIncompleteGameName ( )
{
if ( FApp : : HasGameName ( ) & & ! FPaths : : IsProjectFilePathSet ( ) )
{
// Verify this is a legitimate game name
// Launched with a game name. See if the <GameName> folder exists. If it doesn't, it could instead be <GameName>Game
2014-10-14 10:31:43 -04:00
const FString NonSuffixedGameFolder = FPaths : : RootDir ( ) / FApp : : GetGameName ( ) ;
2014-03-14 14:13:41 -04:00
if ( FPlatformFileManager : : Get ( ) . GetPlatformFile ( ) . DirectoryExists ( * NonSuffixedGameFolder ) = = false )
{
const FString SuffixedGameFolder = NonSuffixedGameFolder + TEXT ( " Game " ) ;
if ( FPlatformFileManager : : Get ( ) . GetPlatformFile ( ) . DirectoryExists ( * SuffixedGameFolder ) )
{
return true ;
}
}
}
return false ;
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
void LaunchUpdateMostRecentProjectFile ( )
{
// If we are launching without a game name or project file, we should use the last used project file, if it exists
const FString & AutoLoadProjectFileName = IProjectManager : : Get ( ) . GetAutoLoadProjectFileName ( ) ;
FString RecentProjectFileContents ;
if ( FFileHelper : : LoadFileToString ( RecentProjectFileContents , * AutoLoadProjectFileName ) )
{
if ( RecentProjectFileContents . Len ( ) )
{
const FString AutoLoadInProgressFilename = AutoLoadProjectFileName + TEXT ( " .InProgress " ) ;
if ( FPlatformFileManager : : Get ( ) . GetPlatformFile ( ) . FileExists ( * AutoLoadInProgressFilename ) )
{
// We attempted to auto-load a project but the last run did not make it to UEditorEngine::InitEditor.
// This indicates that there was a problem loading the project.
// Do not auto-load the project, instead load normally until the next time the editor starts successfully.
UE_LOG ( LogInit , Display , TEXT ( " There was a problem auto-loading %s. Auto-load will be disabled until the editor successfully starts up with a project. " ) , * RecentProjectFileContents ) ;
}
else if ( FPlatformFileManager : : Get ( ) . GetPlatformFile ( ) . FileExists ( * RecentProjectFileContents ) )
{
// The previously loaded project file was found. Change the game name here and update the project file path
2014-10-14 10:31:43 -04:00
FApp : : SetGameName ( * FPaths : : GetBaseFilename ( RecentProjectFileContents ) ) ;
2014-03-14 14:13:41 -04:00
FPaths : : SetProjectFilePath ( RecentProjectFileContents ) ;
UE_LOG ( LogInit , Display , TEXT ( " Loading recent project file: %s " ) , * RecentProjectFileContents ) ;
// Write a file indicating that we are trying to auto-load a project.
// This file prevents auto-loading of projects for as long as it exists. It is a detection system for failed auto-loads.
// The file is deleted in UEditorEngine::InitEditor, thus if the load does not make it that far then the project will not be loaded again.
FFileHelper : : SaveStringToFile ( TEXT ( " " ) , * AutoLoadInProgressFilename ) ;
}
}
}
}
/*-----------------------------------------------------------------------------
FEngineLoop implementation .
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
FEngineLoop : : FEngineLoop ( )
# if WITH_ENGINE
2015-09-29 15:30:25 -04:00
: EngineService ( nullptr )
2014-03-14 14:13:41 -04:00
# endif
{ }
2014-04-23 20:10:59 -04:00
int32 FEngineLoop : : PreInit ( int32 ArgC , TCHAR * ArgV [ ] , const TCHAR * AdditionalCommandline )
2014-03-14 14:13:41 -04:00
{
2016-04-05 11:25:00 -04:00
FMemory : : SetupTLSCachesOnCurrentThread ( ) ;
2014-03-14 14:13:41 -04:00
FString CmdLine ;
// loop over the parameters, skipping the first one (which is the executable name)
for ( int32 Arg = 1 ; Arg < ArgC ; Arg + + )
{
FString ThisArg = ArgV [ Arg ] ;
if ( ThisArg . Contains ( TEXT ( " " ) ) & & ! ThisArg . Contains ( TEXT ( " \" " ) ) )
{
int32 EqualsAt = ThisArg . Find ( TEXT ( " = " ) ) ;
if ( EqualsAt > 0 & & ThisArg . Find ( TEXT ( " " ) ) > EqualsAt )
{
ThisArg = ThisArg . Left ( EqualsAt + 1 ) + FString ( " \" " ) + ThisArg . RightChop ( EqualsAt + 1 ) + FString ( " \" " ) ;
}
else
{
ThisArg = FString ( " \" " ) + ThisArg + FString ( " \" " ) ;
}
}
CmdLine + = ThisArg ;
// put a space between each argument (not needed after the end)
if ( Arg + 1 < ArgC )
{
CmdLine + = TEXT ( " " ) ;
}
}
// append the additional extra command line
if ( AdditionalCommandline )
{
CmdLine + = TEXT ( " " ) ;
CmdLine + = AdditionalCommandline ;
}
// send the command line without the exe name
return GEngineLoop . PreInit ( * CmdLine ) ;
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
# if WITH_ENGINE
2014-04-23 22:06:10 -04:00
bool IsServerDelegateForOSS ( FName WorldContextHandle )
2014-03-14 14:13:41 -04:00
{
2014-04-23 19:56:01 -04:00
if ( IsRunningDedicatedServer ( ) )
{
return true ;
}
2015-09-29 15:30:25 -04:00
UWorld * World = nullptr ;
2015-10-28 08:58:16 -04:00
# if WITH_EDITOR
2014-04-23 22:06:10 -04:00
if ( WorldContextHandle ! = NAME_None )
2014-04-23 19:56:01 -04:00
{
FWorldContext & WorldContext = GEngine - > GetWorldContextFromHandleChecked ( WorldContextHandle ) ;
check ( WorldContext . WorldType = = EWorldType : : Game | | WorldContext . WorldType = = EWorldType : : PIE ) ;
World = WorldContext . World ( ) ;
}
else
2015-10-28 08:58:16 -04:00
# endif
2014-04-23 19:56:01 -04:00
{
2015-10-28 08:58:16 -04:00
ensure ( WorldContextHandle = = NAME_None ) ;
2014-07-14 19:41:38 -04:00
UGameEngine * GameEngine = Cast < UGameEngine > ( GEngine ) ;
if ( GameEngine )
{
World = GameEngine - > GetGameWorld ( ) ;
}
else
{
UE_LOG ( LogInit , Error , TEXT ( " Failed to determine if OSS is server in PIE, OSS requests will fail " ) ) ;
return false ;
}
2014-04-23 19:56:01 -04:00
}
ENetMode NetMode = World ? World - > GetNetMode ( ) : NM_Standalone ;
return ( NetMode = = NM_ListenServer | | NetMode = = NM_DedicatedServer ) ;
2014-03-14 14:13:41 -04:00
}
# endif
2015-07-06 08:37:30 -04:00
DECLARE_CYCLE_STAT ( TEXT ( " FEngineLoop::PreInit.AfterStats " ) , STAT_FEngineLoop_PreInit_AfterStats , STATGROUP_LoadTime ) ;
2014-03-14 14:13:41 -04:00
int32 FEngineLoop : : PreInit ( const TCHAR * CmdLine )
{
2014-04-23 18:15:18 -04:00
if ( FParse : : Param ( CmdLine , TEXT ( " UTF8Output " ) ) )
{
FPlatformMisc : : SetUTF8Output ( ) ;
}
2014-03-14 14:13:41 -04:00
// Switch into executable's directory.
FPlatformProcess : : SetCurrentWorkingDirectoryToBaseDir ( ) ;
2014-07-31 07:38:19 -04:00
// this is set later with shorter command lines, but we want to make sure it is set ASAP as some subsystems will do the tests themselves...
// also realize that command lines can be pulled from the network at a slightly later time.
if ( ! FCommandLine : : Set ( CmdLine ) )
{
// Fail, shipping builds will crash if setting command line fails
return - 1 ;
}
2016-04-05 11:25:00 -04:00
# if WITH_LAUNCHERCHECK
if ( ILauncherCheckModule : : Get ( ) . WasRanFromLauncher ( ) = = false )
{
// Tell Launcher to run us instead
Copying //UE4/Orion-Staging to //UE4/Main (Source: //Orion/Dev-General @ 2949393)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2949393 on 2016/04/20 by Graeme.Thornton
Orion non-pak file security.
- Removed security bypass code from platform pak file
- Added a delegate to pak file code which allows the game to decide whether a file should be allowed or not
- Added an orion delegate which whitelists appropriate files
#rb robert.manuszewski
#tests win64 client + dedicated server. golden path.
Change 2949232 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Paragon: Added a distinct menu frame rate limit, currently set to 60 fps and not visible in settings (if the user sets a game frame rate limit of below 60, we also clamp the menu limit to that threshold, so they can go down but not up for menus)
#jira OR-18017
#rb marcus.wassmer
#tests Ran paragon and switched between gameplay, menus, and replays, observing t.MaxFPS at different points
#ROBOMERGE-SOURCE: CL 2949231 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2949032 on 2016/04/19 by Zak.Middleton
#orion - Lower default NetUpdateFrequency for minions (10->6). Avoid excessive latency for some knockback/knockup abilities that would have noticeable lag by forcing an update sooner when they are triggered.
This should have the following effects:
1. Reduce server CPU cost (we tick minions at the net frequency).
2. Reduce server bandwidth
3. Reduce client CPU cost (we move character capsules and perform overlaps when new positions are received).
#rb Bart.Bressler, John.Pollard
#codereview Dmitry.Rekman
#tests MultiPIE AI lane, Replays
Change 2948966 on 2016/04/19 by Lina.Halper
Added log (check) of the asset info for Anim Per Track contains invalid format key
#rb: Michael.Noland
#code review: Martin.Wilson, Laurent.Delayen, Michael.Noland
#tests: editor/ cooked and test with AI_Tests with 10 bots.
Change 2948876 on 2016/04/19 by Michael.Noland
PS4: Validate that the texture pool size is not set to automatic (-1, which will crash later on as an attempt to allocate too much memory)
#rb none
#codereview marcus.wassmer
#tests Ran Paragon on PS4
Change 2948765 on 2016/04/19 by Daniel.Lamb
Removed AssetImportData tag from cooked asset registry builds.
#rb Andrew.Grant
#test Cook orion
Change 2948691 on 2016/04/19 by Marcus.Wassmer
Fix copytoresolvetarget ensure
#rb none
#test pc agora
Change 2948633 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
[AUTOMERGE]
Fix copytoresolve crash and change validation to ensure.
#test PC editor / PC golden path
#rb none
--------
Integrated using branch //Orion/Main_to_//Orion/Release-Next (reversed) of change#2948169 by Marcus.Wassmer on 2016/04/19 10:50:32.
#ROBOMERGE-SOURCE: CL 2948632 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948507 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Merging 2937781 (Pak signing) using //Orion/Dev-General_to_Release
#rb none
#tests cooked client, checked game runs
#ROBOMERGE-SOURCE: CL 2948497 in //Orion/Release-0.24.1/... via CL 2948506
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948431 on 2016/04/19 by Steve.Robb
CL#s 2919775 and 2942793 integrated to prevent annotation map performance problems on shutdown and asserts in PIE.
#codereview robert.manuszewski,bob.tellez
#rb bob.tellez
#tests Ran editor
Change 2948408 on 2016/04/19 by Leslie.Nivison
Adding .tps
#rb none
#test none
Change 2948185 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: chris.bunner
Fix for HLOD visibility freeze.
#tests Golden Path, Editor
#rb rolando.caloca, michael.noland
#lockdown andrew.grant
#jira OR-19863
#ROBOMERGE-SOURCE: CL 2948182 in //Orion/Release-0.24.1/... via CL 2948183
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2948149 on 2016/04/19 by Simon.Tovey
Fixed crash. Collision rendering path was not dealing with mesh batch with 0 triangles where other paths do.
#rb none
#tests No more crash
#codereview Marcus.Wassmer
Change 2948129 on 2016/04/19 by Lukasz.Furman
fixed gameplay debugger getting stuck with outdated data pack on client,
changed names of AI related debug cvars
#rb none
#tests game, PIE
#codereview Mieszko.Zielinski
Change 2948027 on 2016/04/19 by david.nikdel
#ROBOMERGE-AUTHOR: graeme.thornton
Fix for OR-20033 - CRASH: Client will crash with FRCPassPostProcessCircleDOFSetup
#rb none
#tests checked game runs without crashing
#ROBOMERGE-SOURCE: CL 2948017 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947558 on 2016/04/18 by Matt.Kuhlenschmidt
Fix compile error
#rb none, #tests none
Change 2947509 on 2016/04/18 by Matt.Kuhlenschmidt
Added more logging to track down
https://jira.ol.epicgames.net/browse/OR-19841
#rb none, #tests none
Change 2947412 on 2016/04/18 by Ryan.Gerleve
Fix shadowed variable.
#rb none
#tests none
Change 2947377 on 2016/04/18 by Jamie.Dale
Gather paths are now sorted by fuzzy-ness, so that more specific includes beat less specific excludes
#rb Matt.Kuhlenschmidt
#tests Built for Windows. Ran a gather, and confirmed that explicitly included heroes were now gathered, and that generically excluded heroes were absent from the gather.
Change 2947351 on 2016/04/18 by Ryan.Gerleve
Allow overriding the demo.AsyncLoadWorld setting with a URL option when playing a replay.
Store the entire URL in the demo net driver instead of just the map name, so that the options can be accessed later.
#tests golden path, replays
#rb john.pollard
Change 2947103 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2947071
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2947102 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2947007 on 2016/04/18 by Zak.Middleton
#ue4 - Improve linear smoothing in the presence of low net frequency updates.
#rb Bart.Bressler
#tests MultiPIE AI with lanes
Change 2946994 on 2016/04/18 by Mieszko.Zielinski
Improvements to NavigationSystem's "abstract navigation data" support #UE4
#rb Lukasz.Furman
#test golden path
Change 2946760 on 2016/04/18 by Chris.Bunner
Fixing up bad merge, recommit of CL 2819472 - ForceLOD now clamps to available LODs on primitive, i.e. use MinLOD rather than not drawing at all.
#tests Editor
#rb None
Change 2946745 on 2016/04/18 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_MAIN - Merge 24.1 @ CL 2946637
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2946656 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2946645 on 2016/04/18 by Richard.Fawcett
When promoting a buidl to staged, prevent enumeration of files already in S3
Enumerating files in S3 is a slow process, and it turns out that simply uploading all chunks blindly is more efficient than enumerating existing chunks and selectively uploading only the new ones.
#rb Leigh.Swift
#tests This technique has already been used in launcher promotions for several months
Change 2946622 on 2016/04/18 by Richard.Fawcett
By default, when enumerating chunks from a manifest file, skip checking they exist on disk at enumeration time.
This will fail anyway further down the line if the files don't exist, but will improve speed of stage promotions by around five minutes. In practice, we have NEVER seen a job fail at this point because of the existence check.
#rb Leigh.Swift
#tests Ensure that output of ExtractDataFilenamesFromManifest method is identical both with and without bSkipExistsCheck specified.
Change 2945812 on 2016/04/15 by Daniel.Lamb
Fixed error in diff cooked build commandlet.
#rb ben.marsh
#test Compile.
Change 2945110 on 2016/04/15 by Matt.Kuhlenschmidt
Fix crash exporting actors with non-scene components to fbx
#rb none, #tests full scene exporting on maps that crashed
#codereview alexis.matte
Change 2945078 on 2016/04/15 by Simon.Tovey
Fix for OR-19778
When some pooled systems are reused, on init they have a non zero lod level but the emitter instances are created at LOD 0 initially.
So the component did not think it had to update it's LOD but the emitters were not at the correct LOD.
Have forced a LOD set on init when the component LOD is non-zero.
#rb none
#tests Works in editor and game.
#codereview Olaf.Piesche
Change 2944664 on 2016/04/14 by Uriel.Doyon
Fix to SM4 compilation issue
#jira OR-19706
#rb marcus.wassmer
#tests tested editor in SM4 and SM5
Change 2944642 on 2016/04/14 by Lukasz.Furman
changed waypoint switch conditions in meta nav paths
#rb none
#tests PIE
#codereview Mieszko.Zielinski
Change 2944599 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: andrew.grant
Added sha1 to UnrealPak list output
#rb none
#tests listed content of pakfile
#ROBOMERGE-SOURCE: CL 2944595 in //Orion/Release-0.24/... via CL 2944597 via CL 2944598
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944441 on 2016/04/14 by Marcus.Wassmer
Duplicate change to output shader compiler errors.
#rb none
#test run PC and see errors.
Change 2944437 on 2016/04/14 by John.Pollard
Possible fix for https://jira.ol.epicgames.net/browse/OR-19614
#rb JoshM
#codereview Josh.Markiewicz
#tests Golden path matchmaking
Change 2944430 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: michael.noland
Engine: Added support for more/fewer settings in individual categories to the editor scalability control widget
#rb david.ratti
#tests Tested in the editor
#ROBOMERGE-SOURCE: CL 2944428 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2944198 on 2016/04/14 by David.Ratti
Paragon - register for slow/stun/root/silence callbacks on any tag count change, not just add/remove. This is so the UI will update if you get another stack of a stackable slow GE.
Ability system - unify client stack count change code path with server. Client now properly update owner ASC's tag map and broadcasts all delegates there.
#rb dayY
#tests pie
Change 2944124 on 2016/04/14 by Wes.Hunt
Change the TPS redirects for DX modules to point to the proper DX redist TPS which is what packaged games will need.
#codereview:leslie.nivison
#rb none
#tests ran UAT ListThirdPartySoftware <for Orion>
Change 2944107 on 2016/04/14 by Wes.Hunt
MeshUtilities now depends on new module nvTessLib to better track the third party dependency.
#codereview:daniel.wright
#rb none
#tests build OrionClient/Editor for Win64
Change 2944102 on 2016/04/14 by Wes.Hunt
Tweak to UBT -ListBuildFolders to do a distinct in a better place to cut down on duplicate module searches.
#tests ran the UBT command
#rb none
Change 2943851 on 2016/04/14 by Ryan.Gerleve
Fix the ForEachNetDriver helper function to get the world context directly off the world instead of going through the game instance. Ensures the correct net drivers will be used when there are multiple worlds but only one game instance.
#rb john.pollard
#tests golden path, replays, PIE
Change 2943847 on 2016/04/14 by Ryan.Gerleve
Fixes to support client replay recording & playback in another world:
When recording a replay, only swap actor roles if the remote role is ROLE_Authority
When loading a replay checkpoint, call NetworkRemapPath to make sure paths have the correct name in the GuidCache
#rb john.pollard
#tests golden path, replays, PIE
Change 2943691 on 2016/04/14 by david.nikdel
#ROBOMERGE-AUTHOR: jason.bestimt
#ORION_24 - Fix for OR-19609, OR-19610, and OR-19611
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943687 in //Orion/Release-0.24/... via CL 2943688
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
Change 2943508 on 2016/04/14 by Richard.Fawcett
Automation: Add support for multipart file uploads to Amazon S3 to increase speed of large file uploads.
#jira OPPBUILD-44
#rb Leigh.Swift
#tests Uploaded files to S3 using the new routines, downlaoded via AWS management console and ensured downloaded files identical to uploaded ones
Change 2943274 on 2016/04/13 by jason.bestimt
#ORION_MAIN - Merge 24 @ CL 2943257
#RB:none
#Tests:none
#ROBOMERGE-SOURCE: CL 2943271 in //Orion/Main/...
#ROBOMERGE-BOT: ORION (Main -> Dev-General)
#ROBOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human.
#CodeReview: david.nikdel, jason.bestimt
Change 2943178 on 2016/04/13 by Olaf.Piesche
Bumping size of the particle curve texture to 512x512
#rb martin.mittring
#tests PC Editor, Game
Change 2943174 on 2016/04/13 by Aaron.McLeran
OR-19392 Ensure condition failed: (*RequiresInitialization == 0) on loading into PVP match
- Removing ensure since there is a rare edge case where it's possible for a sound looping node may get ResetChildren called twice.
- Condition is when a child random node o fa looping node has a blank entry and results in no sound chosen in a given frame (which results in ResetChildren getting called). Later in the frame, if a sound had previously been playing with an active sound, it will have stop called on it, which will call NotifyWaveInstanceFinished and hit the ensure. Simply using the branch to check if the looping node has been initialized will work fine in this and other cases.
#codereview Bob.Tellez
#rb Bob.Tellez
#tests ran orion with this change testing problematic sound cue
Change 2943042 on 2016/04/13 by Rob.Cannaday
Fix crash in HTTP completion delegates on shutdown
Stop ticking HTTP retry manager after FOnlineSubsystemImpl::Shutdown has been called
#rb josh.markiewicz
#tests shutting down multiple times
Change 2942913 on 2016/04/13 by Lukasz.Furman
added meta navmesh paths
#orion
#rb Mieszko.Zielinski
#tests PIE
Change 2942132 on 2016/04/13 by Wes.Hunt
Enable UBT -ListBuildFolders to operate on Mac and iOS platforms without having to fully set up the remote environment.
#codereview:leslie.nivison
#rb peter.sauerbrei
#tests running UBT with and without -listbuildfolders
Change 2941651 on 2016/04/12 by Jason.Bestimt
#ORION_DG - Merge MAIN @ CL 2941645
#RB:none
#Tests:none
Change 2941539 on 2016/04/12 by Laurent.Delayen
FABRIK: Normalize outgoing rotations.
Fixes Chains Q ability crashing.
#rb none
#tests Chains not crashing
Change 2941469 on 2016/04/12 by Wes.Hunt
Fix UBT -ListBuildFolders to not prep target for deployment.
#codereview:leslie.nivison
#rb none
#tests tested -ListBuildFolders for Android
Change 2941434 on 2016/04/12 by Leslie.Nivison
Adding/cleaning up .tps files
#rb none
#test none
Change 2941241 on 2016/04/12 by Daniel.Lamb
Removed shadername from the shader code to fix deterministic material cooking issue.
#jira UE-29320
#codereview Marcus.Wassmer
#rb Marcus.Wassmer
#test Running editor, cooking orion.
Change 2941046 on 2016/04/12 by Laurent.Delayen
Added safety net for non state AnimNotifies having a non-zero EndTriggerTimeOffset.
Fixes Twinblast double shot for the left primary attack.
#rb benn.gallagher
#codereview lina.halper, ray.arnett, aaron.eady
#tests twinblast's LMB
Change 2941032 on 2016/04/12 by Jason.Bestimt
#ORION_24 - Merge MAIN @ CL 2940950
#RB:none
#Tests:none
[CL 2952833 by Andrew Grant in Main branch]
2016-04-22 11:21:10 -04:00
ILauncherCheckModule : : Get ( ) . RunLauncher ( ELauncherAction : : AppLaunch ) ;
2016-04-05 11:25:00 -04:00
// We wish to exit
GIsRequestingExit = true ;
return 0 ;
}
# endif
2015-04-14 05:21:25 -04:00
# if STATS
// Create the stats malloc profiler proxy.
if ( FStatsMallocProfilerProxy : : HasMemoryProfilerToken ( ) )
{
2016-04-05 11:25:00 -04:00
if ( PLATFORM_USES_FIXED_GMalloc_CLASS )
{
UE_LOG ( LogMemory , Fatal , TEXT ( " Cannot do malloc profiling with PLATFORM_USES_FIXED_GMalloc_CLASS. " ) ) ;
}
2015-04-14 05:21:25 -04:00
// Assumes no concurrency here.
GMalloc = FStatsMallocProfilerProxy : : Get ( ) ;
}
# endif // STATS
2015-05-05 04:06:03 -04:00
// Name of project file before normalization (as specified in command line).
// Used to fixup project name if necessary.
FString GameProjectFilePathUnnormalized ;
2014-10-14 10:31:43 -04:00
// Set GameName, based on the command line
2015-05-05 04:06:03 -04:00
if ( LaunchSetGameName ( CmdLine , GameProjectFilePathUnnormalized ) = = false )
2014-07-31 07:38:19 -04:00
{
// If it failed, do not continue
return 1 ;
}
2014-03-14 14:13:41 -04:00
// Initialize log console here to avoid statics initialization issues when launched from the command line.
GScopedLogConsole = FPlatformOutputDevices : : GetLogConsole ( ) ;
// Always enable the backlog so we get all messages, we will disable and clear it in the game
// as soon as we determine whether GIsEditor == false
GLog - > EnableBacklog ( true ) ;
2014-04-23 17:47:30 -04:00
// Initialize std out device as early as possible if requested in the command line
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " stdout " ) ) )
{
InitializeStdOutDevice ( ) ;
}
2014-05-09 13:52:29 -04:00
# if !UE_BUILD_SHIPPING
if ( FPlatformProperties : : SupportsQuit ( ) )
{
FString ExitPhrases ;
if ( FParse : : Value ( FCommandLine : : Get ( ) , TEXT ( " testexit= " ) , ExitPhrases ) )
{
TArray < FString > ExitPhrasesList ;
2015-03-02 15:51:37 -05:00
if ( ExitPhrases . ParseIntoArray ( ExitPhrasesList , TEXT ( " + " ) , true ) > 0 )
2014-05-09 13:52:29 -04:00
{
GScopedTestExit = new FOutputDeviceTestExit ( ExitPhrasesList ) ;
GLog - > AddOutputDevice ( GScopedTestExit . GetOwnedPointer ( ) ) ;
}
}
}
# endif // !UE_BUILD_SHIPPING
2014-03-14 14:13:41 -04:00
// Switch into executable's directory (may be required by some of the platform file overrides)
FPlatformProcess : : SetCurrentWorkingDirectoryToBaseDir ( ) ;
2014-04-02 18:09:23 -04:00
// This fixes up the relative project path, needs to happen before we set platform file paths
2014-03-14 14:13:41 -04:00
if ( FPlatformProperties : : IsProgram ( ) = = false )
{
if ( FPaths : : IsProjectFilePathSet ( ) )
{
FString ProjPath = FPaths : : GetProjectFilePath ( ) ;
if ( FPaths : : FileExists ( ProjPath ) = = false )
{
UE_LOG ( LogInit , Display , TEXT ( " Project file not found: %s " ) , * ProjPath ) ;
UE_LOG ( LogInit , Display , TEXT ( " \t Attempting to find via project info helper. " ) ) ;
// Use the uprojectdirs
2014-10-14 10:31:43 -04:00
FString GameProjectFile = FUProjectDictionary : : GetDefault ( ) . GetRelativeProjectPathForGame ( FApp : : GetGameName ( ) , FPlatformProcess : : BaseDir ( ) ) ;
2014-03-14 14:13:41 -04:00
if ( GameProjectFile . IsEmpty ( ) = = false )
{
UE_LOG ( LogInit , Display , TEXT ( " \t Found project file %s. " ) , * GameProjectFile ) ;
FPaths : : SetProjectFilePath ( GameProjectFile ) ;
2015-05-05 04:06:03 -04:00
// Fixup command line if project file wasn't found in specified directory to properly parse next arguments.
FString OldCommandLine = FString ( FCommandLine : : Get ( ) ) ;
OldCommandLine . ReplaceInline ( * GameProjectFilePathUnnormalized , * GameProjectFile , ESearchCase : : CaseSensitive ) ;
FCommandLine : : Set ( * OldCommandLine ) ;
CmdLine = FCommandLine : : Get ( ) ;
2014-03-14 14:13:41 -04:00
}
}
}
}
2014-04-02 18:09:23 -04:00
// allow the command line to override the platform file singleton
bool bFileOverrideFound = false ;
if ( LaunchCheckForFileOverride ( CmdLine , bFileOverrideFound ) = = false )
{
// if it failed, we cannot continue
return 1 ;
}
// Initialize file manager
IFileManager : : Get ( ) . ProcessCommandLineOptions ( ) ;
2014-03-14 14:13:41 -04:00
if ( GIsGameAgnosticExe )
{
// If we launched without a project file, but with a game name that is incomplete, warn about the improper use of a Game suffix
if ( LaunchHasIncompleteGameName ( ) )
{
// We did not find a non-suffixed folder and we DID find the suffixed one.
// The engine MUST be launched with <GameName>Game.
2014-10-14 10:31:43 -04:00
const FText GameNameText = FText : : FromString ( FApp : : GetGameName ( ) ) ;
2014-03-14 14:13:41 -04:00
FMessageDialog : : Open ( EAppMsgType : : Ok , FText : : Format ( LOCTEXT ( " RequiresGamePrefix " , " Error: UE4Editor does not append 'Game' to the passed in game name. \n You must use the full name. \n You specified '{0}', use '{0}Game'. " ) , GameNameText ) ) ;
return 1 ;
}
}
// remember thread id of the main thread
GGameThreadId = FPlatformTLS : : GetCurrentThreadId ( ) ;
GIsGameThreadIdInitialized = true ;
2014-05-12 08:40:54 -04:00
FPlatformProcess : : SetThreadAffinityMask ( FPlatformAffinity : : GetMainGameMask ( ) ) ;
2014-06-17 18:27:26 -04:00
FPlatformProcess : : SetupGameOrRenderThread ( false ) ;
2014-03-14 14:13:41 -04:00
// Figure out whether we're the editor, ucc or the game.
const SIZE_T CommandLineSize = FCString : : Strlen ( CmdLine ) + 1 ;
TCHAR * CommandLineCopy = new TCHAR [ CommandLineSize ] ;
FCString : : Strcpy ( CommandLineCopy , CommandLineSize , CmdLine ) ;
const TCHAR * ParsedCmdLine = CommandLineCopy ;
FString Token = FParse : : Token ( ParsedCmdLine , 0 ) ;
2014-11-26 12:51:01 -05:00
# if WITH_ENGINE
2014-03-14 14:13:41 -04:00
TArray < FString > Tokens ;
TArray < FString > Switches ;
UCommandlet : : ParseCommandLine ( CommandLineCopy , Tokens , Switches ) ;
bool bHasCommandletToken = false ;
for ( int32 TokenIndex = 0 ; TokenIndex < Tokens . Num ( ) ; + + TokenIndex )
{
if ( Tokens [ TokenIndex ] . EndsWith ( TEXT ( " Commandlet " ) ) )
{
bHasCommandletToken = true ;
Token = Tokens [ TokenIndex ] ;
break ;
}
}
for ( int32 SwitchIndex = 0 ; SwitchIndex < Switches . Num ( ) & & ! bHasCommandletToken ; + + SwitchIndex )
{
if ( Switches [ SwitchIndex ] . StartsWith ( TEXT ( " RUN= " ) ) )
{
bHasCommandletToken = true ;
Token = Switches [ SwitchIndex ] ;
break ;
}
}
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
if ( bHasCommandletToken )
{
// will be reset later once the commandlet class loaded
PRIVATE_GIsRunningCommandlet = true ;
}
# endif // WITH_ENGINE
2014-03-14 14:13:41 -04:00
// trim any whitespace at edges of string - this can happen if the token was quoted with leading or trailing whitespace
// VC++ tends to do this in its "external tools" config
Token = Token . Trim ( ) ;
2014-06-12 17:02:29 -04:00
// Path returned by FPaths::GetProjectFilePath() is normalized, so may have symlinks and ~ resolved and may differ from the original path to .uproject passed in the command line
FString NormalizedToken = Token ;
FPaths : : NormalizeFilename ( NormalizedToken ) ;
2014-10-14 10:31:43 -04:00
const bool bFirstTokenIsGameName = ( FApp : : HasGameName ( ) & & Token = = FApp : : GetGameName ( ) ) ;
2014-06-12 17:02:29 -04:00
const bool bFirstTokenIsGameProjectFilePath = ( FPaths : : IsProjectFilePathSet ( ) & & NormalizedToken = = FPaths : : GetProjectFilePath ( ) ) ;
2014-04-23 17:35:03 -04:00
const bool bFirstTokenIsGameProjectFileShortName = ( FPaths : : IsProjectFilePathSet ( ) & & Token = = FPaths : : GetCleanFilename ( FPaths : : GetProjectFilePath ( ) ) ) ;
2014-03-14 14:13:41 -04:00
2014-04-02 18:09:23 -04:00
if ( bFirstTokenIsGameName | | bFirstTokenIsGameProjectFilePath | | bFirstTokenIsGameProjectFileShortName )
2014-03-14 14:13:41 -04:00
{
// first item on command line was the game name, remove it in all cases
FString RemainingCommandline = ParsedCmdLine ;
FCString : : Strcpy ( CommandLineCopy , CommandLineSize , * RemainingCommandline ) ;
ParsedCmdLine = CommandLineCopy ;
// Set a new command-line that doesn't include the game name as the first argument
FCommandLine : : Set ( ParsedCmdLine ) ;
Token = FParse : : Token ( ParsedCmdLine , 0 ) ;
Token = Token . Trim ( ) ;
2015-04-22 13:05:07 -04:00
// if the next token is a project file, then we skip it (which can happen on some platforms that combine
// commandlines... this handles extra .uprojects, but if you run with MyGame MyGame, we can't tell if
// the second MyGame is a map or not)
while ( FPaths : : GetExtension ( Token ) = = FProjectDescriptor : : GetExtension ( ) )
{
Token = FParse : : Token ( ParsedCmdLine , 0 ) ;
Token = Token . Trim ( ) ;
}
2014-04-02 18:09:23 -04:00
if ( bFirstTokenIsGameProjectFilePath | | bFirstTokenIsGameProjectFileShortName )
2014-03-14 14:13:41 -04:00
{
// Convert it to relative if possible...
FString RelativeGameProjectFilePath = FFileManagerGeneric : : DefaultConvertToRelativePath ( * FPaths : : GetProjectFilePath ( ) ) ;
if ( RelativeGameProjectFilePath ! = FPaths : : GetProjectFilePath ( ) )
{
FPaths : : SetProjectFilePath ( RelativeGameProjectFilePath ) ;
}
}
}
// look early for the editor token
bool bHasEditorToken = false ;
# if UE_EDITOR
// Check each token for '-game', '-server' or '-run='
bool bIsNotEditor = false ;
// This isn't necessarily pretty, but many requests have been made to allow
// UE4Editor.exe <GAMENAME> -game <map>
// or
// UE4Editor.exe <GAMENAME> -game 127.0.0.0
// We don't want to remove the -game from the commandline just yet in case
// we need it for something later. So, just move it to the end for now...
const bool bFirstTokenIsGame = ( Token = = TEXT ( " -GAME " ) ) ;
const bool bFirstTokenIsServer = ( Token = = TEXT ( " -SERVER " ) ) ;
const bool bFirstTokenIsModeOverride = bFirstTokenIsGame | | bFirstTokenIsServer | | bHasCommandletToken ;
2015-09-29 15:30:25 -04:00
const TCHAR * CommandletCommandLine = nullptr ;
2014-03-14 14:13:41 -04:00
if ( bFirstTokenIsModeOverride )
{
bIsNotEditor = true ;
if ( bFirstTokenIsGame | | bFirstTokenIsServer )
{
// Move the token to the end of the list...
FString RemainingCommandline = ParsedCmdLine ;
RemainingCommandline = RemainingCommandline . Trim ( ) ;
RemainingCommandline + = FString : : Printf ( TEXT ( " %s " ) , * Token ) ;
FCommandLine : : Set ( * RemainingCommandline ) ;
}
if ( bHasCommandletToken )
{
# if STATS
2015-07-06 08:37:30 -04:00
// Leave the stats enabled.
2015-07-07 15:26:42 -04:00
if ( ! FStats : : EnabledForCommandlet ( ) )
2015-07-06 08:37:30 -04:00
{
FThreadStats : : MasterDisableForever ( ) ;
}
2014-03-14 14:13:41 -04:00
# endif
if ( Token . StartsWith ( TEXT ( " run= " ) ) )
{
Token = Token . RightChop ( 4 ) ;
if ( ! Token . EndsWith ( TEXT ( " Commandlet " ) ) )
{
Token + = TEXT ( " Commandlet " ) ;
}
}
CommandletCommandLine = ParsedCmdLine ;
}
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
}
2014-03-14 14:13:41 -04:00
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
if ( bHasCommandletToken )
{
// will be reset later once the commandlet class loaded
PRIVATE_GIsRunningCommandlet = true ;
2014-03-14 14:13:41 -04:00
}
if ( ! bIsNotEditor & & GIsGameAgnosticExe )
{
// If we launched without a game name or project name, try to load the most recently loaded project file.
// We can not do this if we are using a FilePlatform override since the game directory may already be established.
const bool bIsBuildMachine = FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " BUILDMACHINE " ) ) ;
const bool bLoadMostRecentProjectFileIfItExists = ! FApp : : HasGameName ( ) & & ! bFileOverrideFound & & ! bIsBuildMachine & & ! FParse : : Param ( CmdLine , TEXT ( " norecentproject " ) ) ;
if ( bLoadMostRecentProjectFileIfItExists )
{
LaunchUpdateMostRecentProjectFile ( ) ;
}
}
FString CheckToken = Token ;
bool bFoundValidToken = false ;
while ( ! bFoundValidToken & & ( CheckToken . Len ( ) > 0 ) )
{
if ( ! bIsNotEditor )
{
bool bHasNonEditorToken = ( CheckToken = = TEXT ( " -GAME " ) ) | | ( CheckToken = = TEXT ( " -SERVER " ) ) | | ( CheckToken . StartsWith ( TEXT ( " RUN= " ) ) ) | | CheckToken . EndsWith ( TEXT ( " Commandlet " ) ) ;
if ( bHasNonEditorToken )
{
bIsNotEditor = true ;
bFoundValidToken = true ;
}
}
CheckToken = FParse : : Token ( ParsedCmdLine , 0 ) ;
}
bHasEditorToken = ! bIsNotEditor ;
2014-11-26 12:51:01 -05:00
# elif WITH_ENGINE
2015-09-29 15:30:25 -04:00
const TCHAR * CommandletCommandLine = nullptr ;
2014-11-26 12:51:01 -05:00
if ( bHasCommandletToken )
{
# if STATS
2015-07-06 08:37:30 -04:00
// Leave the stats enabled.
2015-07-07 15:26:42 -04:00
if ( ! FStats : : EnabledForCommandlet ( ) )
2015-07-06 08:37:30 -04:00
{
FThreadStats : : MasterDisableForever ( ) ;
}
2014-11-26 12:51:01 -05:00
# endif
if ( Token . StartsWith ( TEXT ( " run= " ) ) )
{
Token = Token . RightChop ( 4 ) ;
if ( ! Token . EndsWith ( TEXT ( " Commandlet " ) ) )
{
Token + = TEXT ( " Commandlet " ) ;
}
}
CommandletCommandLine = ParsedCmdLine ;
}
2014-03-14 14:13:41 -04:00
# if WITH_EDITOR && WITH_EDITORONLY_DATA
// If a non-editor target build w/ WITH_EDITOR and WITH_EDITORONLY_DATA, use the old token check...
//@todo. Is this something we need to support?
bHasEditorToken = Token = = TEXT ( " EDITOR " ) ;
# else
// Game, server and commandlets never set the editor token
bHasEditorToken = false ;
# endif
# endif //UE_EDITOR
Copying //UE4/Orion-Staging to Dev-Main (Originating from //Orion/Main at CL-2777663)
#lockdown Nick.Penwarden
Change 2777555 on 2015/11/23 by Antony.Carter
Friend List Sub Menu restyling to new designs
#RB Nicholas.Davies
#TESTS Check 3 sub menus of friends list (Online Status, Friends List, Settings) still function correctly with new styling.
Change 2777506 on 2015/11/23 by Andrew.Rodham
Sequencer: Copy/Paste command binding is no longer active if the seuqnece widget is not focused
This addresses UE-23423
#tests Tested copy/paste inside and outside of sequencer
#codereview Max.Chen
#rb Max.Chen
Change 2777505 on 2015/11/23 by Andrew.Rodham
Sequencer: Undoing the addition of a spawnable now ensures its actor instance is deleted correctly
This addresses UE-23450
#tests tested the repro steps on the bug
#codereview Max.Chen
#rb Max.Chen
Change 2777489 on 2015/11/23 by Andrew.Rodham
Sequencer: Workflow optimizations for spawnables
- Editing a property on an instance of a spawnable now automatically propagates to the spawnable defaults, provided the property is not keyed
- Fixed a few cases where spawnables were left lingering around while scrubbing or switching between sub-sequences
- Fixed the root sequence instance being evaluated when there was a sub-sequence focused.
- Selection states are now remembered for spawnable objects when they are destroyed/re-spawned
#codereview Max.Chen
#tests tested loks of object types as spawnables in PIE and in editor
#rb Max.Chen
Change 2777321 on 2015/11/23 by Terence.Burns
Updated the usage of World->UpdateStreamingLevels to FlushStreaming levels on the advice of Dmitriy. Need this to ensure that the streaming is completed before we send it off to lightmass.
#rb Dmitriy.Dyomin
#Tests Run the RebuildLightmaps UAT script.
Change 2777091 on 2015/11/22 by Andrew.Grant
Changed "inappropriate outmost" warning on package load to an error. At the very least we want this for a day or two on Orion to surface errors quickly, but may be a good thing to make a standard error since it indicates something that's likely broken.
#rb none
#tests Golden path in game, cooked content
#codereview Nick.Penwarden, Michael.Noland
Change 2777037 on 2015/11/22 by Laurent.Delayen
Additional debug info to track down https://jira.ol.epicgames.net/browse/OR-9675
#rb martin.wilson
#codereview martin.wilson
#tests Golden path (PIE) + compiled for PS4
Change 2777030 on 2015/11/22 by Sam.Zamani
#online,externalui,ps4
- added footer option for closing the embedded web browser
#rb none
#tests exec command to try on ps4
Change 2777019 on 2015/11/22 by Marcus.Wassmer
Possible fix for OR-9851
#rb none
#test GoldenPath, PS4
#codereview Nick.Darnell,Matt.Kuhlenschmidt
Change 2776932 on 2015/11/22 by Max.Chen
Sequencer: Fix editor selection so that it's not modified in response to the sequencer outliner tree node changing selection if the user is not explicitly selecting in the tree.
#RB none
#tests Select an actor that Sequencer doesn't control and it shouldn't deselect.
Change 2776900 on 2015/11/21 by Marcus.Wassmer
HighQuality particle lights.
#rb Brian.Karis
#test GoldenPath, HQ Particles w/wo ShadowCasting.
#codereview Olaf.Piesche, Simon.Tovey, Tim.Elek
Change 2776868 on 2015/11/21 by Brian.Karis
Reduced temporal aa responsiveness back where it was.
Change 2776867 on 2015/11/21 by Brian.Karis
Removed shading terminator bias meant for shadow map acne but it made character faces look worse.
Change 2776840 on 2015/11/21 by Brian.Karis
Hair indirect lighting implemented.
Improvements to hair shading model. No longer uses backlit parameter.
#rb marcus.wassmer
#tests editor
Change 2776748 on 2015/11/21 by Max.Preussner
Sequencer: Continued to implement track label editor
Note: still disabled, because there are a couple remaining issues
#codereview: max.chen
#rb: max.chen
#test: Editor, Runtime
Change 2776493 on 2015/11/20 by Max.Preussner
Sequencer: Wrapped the node tree context menu actions for editing in an 'Edit' section
#codereview: max.chen
#rb: max.chen
2015-11-24 16:45:24 -05:00
# if !UE_BUILD_SHIPPING
// Benchmarking.
FApp : : SetBenchmarking ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " BENCHMARK " ) ) ) ;
# else
FApp : : SetBenchmarking ( false ) ;
# endif // !UE_BUILD_SHIPPING
FApp : : SetUseFixedTimeStep ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " UseFixedTimeStep " ) ) ) ;
2015-05-03 17:43:49 -04:00
// Initialize random number generator.
if ( FApp : : IsBenchmarking ( ) | | FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " FIXEDSEED " ) ) )
{
FMath : : RandInit ( 0 ) ;
FMath : : SRandInit ( 0 ) ;
UE_LOG ( LogInit , Display , TEXT ( " RandInit(0) SRandInit(0). " ) ) ;
}
else
{
uint32 Cycles1 = FPlatformTime : : Cycles ( ) ;
FMath : : RandInit ( Cycles1 ) ;
uint32 Cycles2 = FPlatformTime : : Cycles ( ) ;
FMath : : SRandInit ( Cycles2 ) ;
UE_LOG ( LogInit , Display , TEXT ( " RandInit(%d) SRandInit(%d). " ) , Cycles1 , Cycles2 ) ;
}
2015-08-03 08:47:15 -04:00
// Set up the module list and version information, if it's not compiled-in
2015-08-04 10:13:20 -04:00
# if !IS_MONOLITHIC && BUILT_FROM_CHANGELIST == 0
2015-08-03 08:47:15 -04:00
static FVersionedModuleEnumerator ModuleEnumerator ;
if ( ModuleEnumerator . RegisterWithModuleManager ( ) )
{
const FVersionManifest & Manifest = ModuleEnumerator . GetInitialManifest ( ) ;
2015-08-14 15:11:19 -04:00
if ( Manifest . Changelist ! = 0 & & ! FEngineVersion : : OverrideCurrentVersionChangelist ( Manifest . Changelist ) )
{
UE_LOG ( LogInit , Fatal , TEXT ( " Couldn't update engine changelist to %d. " ) , Manifest . Changelist ) ;
}
2015-08-03 08:47:15 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Using version manifest at CL %d with build ID '%s' " ) , Manifest . Changelist , * Manifest . BuildId ) ;
}
# endif
2014-03-14 14:13:41 -04:00
# if !IS_PROGRAM
if ( ! GIsGameAgnosticExe & & FApp : : HasGameName ( ) & & ! FPaths : : IsProjectFilePathSet ( ) )
{
// If we are using a non-agnostic exe where a name was specified but we did not specify a project path. Assemble one based on the game name.
2014-09-08 13:51:36 -04:00
const FString ProjectFilePath = FPaths : : Combine ( * FPaths : : GameDir ( ) , * FString : : Printf ( TEXT ( " %s.%s " ) , FApp : : GetGameName ( ) , * FProjectDescriptor : : GetExtension ( ) ) ) ;
2014-03-14 14:13:41 -04:00
FPaths : : SetProjectFilePath ( ProjectFilePath ) ;
}
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
# endif
2014-03-14 14:13:41 -04:00
// Now verify the project file if we have one
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
if ( FPaths : : IsProjectFilePathSet ( )
# if IS_PROGRAM
// Programs don't need uproject files to exist, but some do specify them and if they exist we should load them
& & FPaths : : FileExists ( FPaths : : GetProjectFilePath ( ) )
# endif
)
2014-03-14 14:13:41 -04:00
{
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
if ( ! IProjectManager : : Get ( ) . LoadProjectFile ( FPaths : : GetProjectFilePath ( ) ) )
2014-03-14 14:13:41 -04:00
{
// The project file was invalid or saved with a newer version of the engine. Exit.
2014-05-20 07:48:06 -04:00
UE_LOG ( LogInit , Warning , TEXT ( " Could not find a valid project file, the engine will exit now. " ) ) ;
2014-03-14 14:13:41 -04:00
return 1 ;
}
}
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
# if !IS_PROGRAM
2014-03-14 14:13:41 -04:00
if ( FApp : : HasGameName ( ) )
{
// Tell the module manager what the game binaries folder is
const FString GameBinariesDirectory = FPaths : : Combine ( FPlatformMisc : : GameDir ( ) , TEXT ( " Binaries " ) , FPlatformProcess : : GetBinariesSubdirectory ( ) ) ;
FModuleManager : : Get ( ) . SetGameBinariesDirectory ( * GameBinariesDirectory ) ;
2014-10-14 10:31:43 -04:00
LaunchFixGameNameCase ( ) ;
2014-03-14 14:13:41 -04:00
}
# endif
2015-06-24 09:48:05 -04:00
// initialize task graph sub-system with potential multiple threads
FTaskGraphInterface : : Startup ( FPlatformMisc : : NumberOfCores ( ) ) ;
FTaskGraphInterface : : Get ( ) . AttachToThread ( ENamedThreads : : GameThread ) ;
# if STATS
FThreadStats : : StartThread ( ) ;
# endif
2015-07-06 08:37:30 -04:00
FScopeCycleCounter CycleCount_AfterStats ( GET_STATID ( STAT_FEngineLoop_PreInit_AfterStats ) ) ;
2015-06-24 09:48:05 -04:00
2014-08-05 10:55:00 -04:00
// Load Core modules required for everything else to work (needs to be loaded before InitializeRenderingCVarsCaching)
LoadCoreModules ( ) ;
# if WITH_ENGINE
extern ENGINE_API void InitializeRenderingCVarsCaching ( ) ;
InitializeRenderingCVarsCaching ( ) ;
# endif
2014-03-14 14:13:41 -04:00
bool bTokenDoesNotHaveDash = Token . Len ( ) & & FCString : : Strnicmp ( * Token , TEXT ( " - " ) , 1 ) ! = 0 ;
# if WITH_EDITOR
// If we're running as an game but don't have a project, inform the user and exit.
if ( bHasEditorToken = = false & & bHasCommandletToken = = false )
{
if ( ! FPaths : : IsProjectFilePathSet ( ) )
{
//@todo this is too early to localize
FMessageDialog : : Open ( EAppMsgType : : Ok , NSLOCTEXT ( " Engine " , " UE4RequiresProjectFiles " , " UE4 games require a project file as the first parameter. " ) ) ;
return 1 ;
}
}
if ( GIsUCCMakeStandaloneHeaderGenerator )
{
// Rebuilding script requires some hacks in the engine so we flag that.
PRIVATE_GIsRunningCommandlet = true ;
}
# endif //WITH_EDITOR
if ( FPlatformProcess : : SupportsMultithreading ( ) )
{
GThreadPool = FQueuedThreadPool : : Allocate ( ) ;
int32 NumThreadsInThreadPool = FPlatformMisc : : NumberOfWorkerThreadsToSpawn ( ) ;
// we are only going to give dedicated servers one pool thread
if ( FPlatformProperties : : IsServerOnly ( ) )
{
NumThreadsInThreadPool = 1 ;
}
verify ( GThreadPool - > Create ( NumThreadsInThreadPool ) ) ;
Copying //UE4/Orion-Staging (Orion Main @ CL-2792706 to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2792706 on 2015/12/07 by Terence.Burns
Rebuild lightmaps automation changes
- Sync and Build binary files for execution
- Much improved error handling
- Email notification support added.
#Note - This should massively simplify the batch script we use to rebuild lightmaps.
#rb none
#Tests Run the RebuildLightmaps commandlet many times to ensure it runs and errors correctly.
Change 2791950 on 2015/12/05 by Matt.Kuhlenschmidt
Added settings to toggle on and off display of Ping and FPS values.
Server FPS will be disabled before ship
#rb none #test pc/ps4 golden path, pie
Change 2791827 on 2015/12/05 by Marcus.Wassmer
Fix texture memory leak. Fixes automation using too much memory.
#rb Brad.Angelcyk
#codereview bob.ferreira
#test automation runs, editor.
Change 2791313 on 2015/12/04 by Martin.Mittring
fixed PS4 compiling
#rb:Michael.Noland
#test:not
Change 2791014 on 2015/12/04 by Martin.Mittring
nicer cvar help for r.PS4ContinuousSubmits
#rb:Olaf.Piesche
#code_review:Marcus.Wassmer
#test:PC
Change 2791011 on 2015/12/04 by Martin.Mittring
fixed compile error when disabling ENABLE_TEXTURE_TRACKING
#rb:Olaf.Piesche
#test:run Paragon on PC
Change 2790848 on 2015/12/04 by Martin.Mittring
missing changes
nicer cvar help, optimized unneccessary referencecounting, removed redundant code
#rb:Olaf.Piesche
#test:PC Paragon
Change 2790840 on 2015/12/04 by Martin.Mittring
nicer cvar help, optimized unneccessary referencecounting, removed redundant code
#rb:Olaf.Piesche
#test:PC Paragon
Change 2791585 on 2015/12/04 by Michael.Noland
Rendering: Added a more actionable error message to a check() failure for a FStaticLightingMesh that has already been processed when building lighting in a map that contains HLOD
#rb None
#tests Built lighting in a map that was crashing at this check() and verified that the message indicated the problematic mesh
Change 2791244 on 2015/12/04 by Ryan.Brucks
Submitting all my Paragon Content before the new Agora Branch.
Change 2791240 on 2015/12/04 by Marcus.Wassmer
Bump to .061 patch and new pub tools to pass cert
#rb non
#test compile ps4
Change 2791132 on 2015/12/04 by ryan.brucks
RenderToTextureMacros: fixed issue with polygon index being +1 on accident
Change 2790747 on 2015/12/04 by Terence.Burns
Rebuild Lightmaps Automation Script - Adding the -unattended switch for build machines.
#rb None
#tests Run through the Rebuild Lightmaps UAT script process.
Change 2790589 on 2015/12/04 by Bart.Bressler
- Invite PS4 friend option for add party member button now works properly, also fixes crash. Fixes OR-10359.
#rb sam.zamani
#tests invited ps4 player using Invite PS4 Friend option, confirmed that player joined mcp party and ps4 session
Change 2790418 on 2015/12/04 by James.Golding
Roll back HLOD lightmap UV change, Oz reporting issues when building lighting, need more investigation
#rb none
#tests none
Change 2790333 on 2015/12/04 by James.Golding
Add fallback to FMeshUtilities::PropagatePaintedColorsToRawMesh when mesh has been reduced in engine and WedgeMap is missing
#rb martin.wilson
#codereview jurre.debaare
#tests Built HLOD meshes in the editor
Change 2790292 on 2015/12/04 by Olaf.Piesche
Free the new particle array at the beginning of the tick for each instance; that way, even if we're not rendering the array will be cleared and we don't keep injecting new particles that never get killed until rendering resumes
#rb marcus.wassmer
#tests Editor, PIE
Change 2790003 on 2015/12/04 by James.Golding
Fix possible crash in ALODActor::RemoveSubActor
#rb keith.judge
#codereview jurre.debaare
#tests Generated HLOD proxy in editor
Change 2789998 on 2015/12/04 by James.Golding
2015-12-08 09:25:02 -05:00
# if WITH_EDITOR
// when we are in the editor we like to do things like build lighting and such
// this thread pool can be used for those purposes
GLargeThreadPool = FQueuedThreadPool : : Allocate ( ) ;
2016-04-28 13:50:05 -04:00
int32 NumThreadsInLargeThreadPool = FMath : : Max ( FPlatformMisc : : NumberOfCoresIncludingHyperthreads ( ) - 2 , 1 ) ;
Copying //UE4/Orion-Staging (Orion Main @ CL-2792706 to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2792706 on 2015/12/07 by Terence.Burns
Rebuild lightmaps automation changes
- Sync and Build binary files for execution
- Much improved error handling
- Email notification support added.
#Note - This should massively simplify the batch script we use to rebuild lightmaps.
#rb none
#Tests Run the RebuildLightmaps commandlet many times to ensure it runs and errors correctly.
Change 2791950 on 2015/12/05 by Matt.Kuhlenschmidt
Added settings to toggle on and off display of Ping and FPS values.
Server FPS will be disabled before ship
#rb none #test pc/ps4 golden path, pie
Change 2791827 on 2015/12/05 by Marcus.Wassmer
Fix texture memory leak. Fixes automation using too much memory.
#rb Brad.Angelcyk
#codereview bob.ferreira
#test automation runs, editor.
Change 2791313 on 2015/12/04 by Martin.Mittring
fixed PS4 compiling
#rb:Michael.Noland
#test:not
Change 2791014 on 2015/12/04 by Martin.Mittring
nicer cvar help for r.PS4ContinuousSubmits
#rb:Olaf.Piesche
#code_review:Marcus.Wassmer
#test:PC
Change 2791011 on 2015/12/04 by Martin.Mittring
fixed compile error when disabling ENABLE_TEXTURE_TRACKING
#rb:Olaf.Piesche
#test:run Paragon on PC
Change 2790848 on 2015/12/04 by Martin.Mittring
missing changes
nicer cvar help, optimized unneccessary referencecounting, removed redundant code
#rb:Olaf.Piesche
#test:PC Paragon
Change 2790840 on 2015/12/04 by Martin.Mittring
nicer cvar help, optimized unneccessary referencecounting, removed redundant code
#rb:Olaf.Piesche
#test:PC Paragon
Change 2791585 on 2015/12/04 by Michael.Noland
Rendering: Added a more actionable error message to a check() failure for a FStaticLightingMesh that has already been processed when building lighting in a map that contains HLOD
#rb None
#tests Built lighting in a map that was crashing at this check() and verified that the message indicated the problematic mesh
Change 2791244 on 2015/12/04 by Ryan.Brucks
Submitting all my Paragon Content before the new Agora Branch.
Change 2791240 on 2015/12/04 by Marcus.Wassmer
Bump to .061 patch and new pub tools to pass cert
#rb non
#test compile ps4
Change 2791132 on 2015/12/04 by ryan.brucks
RenderToTextureMacros: fixed issue with polygon index being +1 on accident
Change 2790747 on 2015/12/04 by Terence.Burns
Rebuild Lightmaps Automation Script - Adding the -unattended switch for build machines.
#rb None
#tests Run through the Rebuild Lightmaps UAT script process.
Change 2790589 on 2015/12/04 by Bart.Bressler
- Invite PS4 friend option for add party member button now works properly, also fixes crash. Fixes OR-10359.
#rb sam.zamani
#tests invited ps4 player using Invite PS4 Friend option, confirmed that player joined mcp party and ps4 session
Change 2790418 on 2015/12/04 by James.Golding
Roll back HLOD lightmap UV change, Oz reporting issues when building lighting, need more investigation
#rb none
#tests none
Change 2790333 on 2015/12/04 by James.Golding
Add fallback to FMeshUtilities::PropagatePaintedColorsToRawMesh when mesh has been reduced in engine and WedgeMap is missing
#rb martin.wilson
#codereview jurre.debaare
#tests Built HLOD meshes in the editor
Change 2790292 on 2015/12/04 by Olaf.Piesche
Free the new particle array at the beginning of the tick for each instance; that way, even if we're not rendering the array will be cleared and we don't keep injecting new particles that never get killed until rendering resumes
#rb marcus.wassmer
#tests Editor, PIE
Change 2790003 on 2015/12/04 by James.Golding
Fix possible crash in ALODActor::RemoveSubActor
#rb keith.judge
#codereview jurre.debaare
#tests Generated HLOD proxy in editor
Change 2789998 on 2015/12/04 by James.Golding
2015-12-08 09:25:02 -05:00
verify ( GLargeThreadPool - > Create ( NumThreadsInLargeThreadPool ) ) ;
# endif
2014-03-14 14:13:41 -04:00
}
// Get a pointer to the log output device
GLogConsole = GScopedLogConsole . GetOwnedPointer ( ) ;
LoadPreInitModules ( ) ;
2014-05-14 20:01:43 -04:00
// Start the application
if ( ! AppInit ( ) )
{
return 1 ;
}
2014-03-14 14:13:41 -04:00
# if WITH_ENGINE
// Initialize system settings before anyone tries to use it...
GSystemSettings . Initialize ( bHasEditorToken ) ;
// Apply renderer settings from console variables stored in the INI.
2014-10-27 14:02:50 -04:00
ApplyCVarSettingsFromIni ( TEXT ( " /Script/Engine.RendererSettings " ) , * GEngineIni , ECVF_SetByProjectSetting ) ;
2015-06-11 10:42:18 -04:00
ApplyCVarSettingsFromIni ( TEXT ( " /Script/Engine.StreamingSettings " ) , * GEngineIni , ECVF_SetByProjectSetting ) ;
ApplyCVarSettingsFromIni ( TEXT ( " /Script/Engine.GarbageCollectionSettings " ) , * GEngineIni , ECVF_SetByProjectSetting ) ;
2014-03-14 14:13:41 -04:00
2014-08-13 11:28:31 -04:00
# if !UE_SERVER
if ( ! IsRunningDedicatedServer ( ) )
{
if ( ! IsRunningCommandlet ( ) )
{
// Note: It is critical that resolution settings are loaded before the movie starts playing so that the window size and fullscreen state is known
UGameUserSettings : : PreloadResolutionSettings ( ) ;
}
}
# endif
2014-03-14 14:13:41 -04:00
// As early as possible to avoid expensive re-init of subsystems,
// after SystemSettings.ini file loading so we get the right state,
// before ConsoleVariables.ini so the local developer can always override.
// before InitializeCVarsForActiveDeviceProfile() so the platform can override user settings
2015-04-20 10:12:55 -04:00
Scalability : : LoadState ( ( bHasEditorToken & & ! GEditorSettingsIni . IsEmpty ( ) ) ? GEditorSettingsIni : GGameUserSettingsIni ) ;
2014-03-14 14:13:41 -04:00
// Set all CVars which have been setup in the device profiles.
UDeviceProfileManager : : InitializeCVarsForActiveDeviceProfile ( ) ;
2014-09-02 19:18:22 -04:00
if ( FApp : : ShouldUseThreadingForPerformance ( ) & & FPlatformMisc : : AllowRenderThread ( ) )
2014-03-14 14:13:41 -04:00
{
GUseThreadedRendering = true ;
}
# endif
FConfigCacheIni : : LoadConsoleVariablesFromINI ( ) ;
{
DECLARE_SCOPE_CYCLE_COUNTER ( TEXT ( " Platform Initialization " ) , STAT_PlatformInit , STATGROUP_LoadTime ) ;
// platform specific initialization now that the SystemSettings are loaded
FPlatformMisc : : PlatformInit ( ) ;
FPlatformMemory : : Init ( ) ;
}
// Let LogConsole know what ini file it should use to save its setting on exit.
// We can't use GGameIni inside log console because it's destroyed in the global
// scoped pointer and at that moment GGameIni may already be gone.
2015-09-29 15:30:25 -04:00
if ( GLogConsole ! = nullptr )
2014-03-14 14:13:41 -04:00
{
GLogConsole - > SetIniFilename ( * GGameIni ) ;
}
# if CHECK_PUREVIRTUALS
FMessageDialog : : Open ( EAppMsgType : : Ok , * NSLOCTEXT ( " Engine " , " Error_PureVirtualsEnabled " , " The game cannot run with CHECK_PUREVIRTUALS enabled. Please disable CHECK_PUREVIRTUALS and rebuild the executable. " ) . ToString ( ) ) ;
FPlatformMisc : : RequestExit ( false ) ;
# endif
# if WITH_ENGINE
// allow for game explorer processing (including parental controls) and firewalls installation
if ( ! FPlatformMisc : : CommandLineCommands ( ) )
{
FPlatformMisc : : RequestExit ( false ) ;
}
bool bIsSeekFreeDedicatedServer = false ;
bool bIsRegularClient = false ;
if ( ! bHasEditorToken )
{
// See whether the first token on the command line is a commandlet.
//@hack: We need to set these before calling StaticLoadClass so all required data gets loaded for the commandlets.
GIsClient = true ;
GIsServer = true ;
# if WITH_EDITOR
GIsEditor = true ;
# endif //WITH_EDITOR
2014-11-26 12:51:01 -05:00
PRIVATE_GIsRunningCommandlet = true ;
2014-03-14 14:13:41 -04:00
2015-04-23 18:09:01 -04:00
// Allow commandlet rendering based on command line switch (too early to let the commandlet itself override this).
PRIVATE_GAllowCommandletRendering = FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " AllowCommandletRendering " ) ) ;
2014-03-14 14:13:41 -04:00
// We need to disregard the empty token as we try finding Token + "Commandlet" which would result in finding the
// UCommandlet class if Token is empty.
bool bDefinitelyCommandlet = ( bTokenDoesNotHaveDash & & Token . EndsWith ( TEXT ( " Commandlet " ) ) ) ;
if ( ! bTokenDoesNotHaveDash )
{
if ( Token . StartsWith ( TEXT ( " run= " ) ) )
{
Token = Token . RightChop ( 4 ) ;
bDefinitelyCommandlet = true ;
if ( ! Token . EndsWith ( TEXT ( " Commandlet " ) ) )
{
Token + = TEXT ( " Commandlet " ) ;
}
}
}
else
{
if ( ! bDefinitelyCommandlet )
{
UClass * TempCommandletClass = FindObject < UClass > ( ANY_PACKAGE , * ( Token + TEXT ( " Commandlet " ) ) , false ) ;
if ( TempCommandletClass )
{
check ( TempCommandletClass - > IsChildOf ( UCommandlet : : StaticClass ( ) ) ) ; // ok so you have a class that ends with commandlet that is not a commandlet
Token + = TEXT ( " Commandlet " ) ;
bDefinitelyCommandlet = true ;
}
}
}
if ( ! bDefinitelyCommandlet )
{
bIsRegularClient = true ;
GIsClient = true ;
GIsServer = false ;
# if WITH_EDITORONLY_DATA
GIsEditor = false ;
# endif
2014-11-26 12:51:01 -05:00
PRIVATE_GIsRunningCommandlet = false ;
2014-03-14 14:13:41 -04:00
}
}
if ( IsRunningDedicatedServer ( ) )
{
GIsClient = false ;
GIsServer = true ;
PRIVATE_GIsRunningCommandlet = false ;
2014-11-26 12:51:01 -05:00
# if WITH_EDITOR
2014-03-14 14:13:41 -04:00
GIsEditor = false ;
# endif
bIsSeekFreeDedicatedServer = FPlatformProperties : : RequiresCookedData ( ) ;
}
2014-04-23 19:56:01 -04:00
// If std out device hasn't been initialized yet (there was no -stdout param in the command line) and
2014-04-23 17:47:30 -04:00
// we meet all the criteria, initialize it now.
if ( ! GScopedStdOut . IsValid ( ) & & ! bHasEditorToken & & ! bIsRegularClient & & ! IsRunningDedicatedServer ( ) )
{
InitializeStdOutDevice ( ) ;
}
2014-03-14 14:13:41 -04:00
FIOSystem : : Get ( ) ; // force it to be created if it isn't already
// allow the platform to start up any features it may need
IPlatformFeaturesModule : : Get ( ) ;
// Init physics engine before loading anything, in case we want to do things like cook during post-load.
InitGamePhys ( ) ;
// Delete temporary files in cache.
FPlatformProcess : : CleanFileCache ( ) ;
# if !UE_BUILD_SHIPPING
GIsDemoMode = FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " DEMOMODE " ) ) ;
# endif
if ( bHasEditorToken )
{
# if WITH_EDITOR
// We're the editor.
GIsClient = true ;
GIsServer = true ;
GIsEditor = true ;
PRIVATE_GIsRunningCommandlet = false ;
GWarn = & UnrealEdWarn ;
# else
FMessageDialog : : Open ( EAppMsgType : : Ok , NSLOCTEXT ( " Engine " , " EditorNotSupported " , " Editor not supported in this mode. " ) ) ;
FPlatformMisc : : RequestExit ( false ) ;
return 1 ;
# endif //WITH_EDITOR
}
2014-09-09 12:18:29 -04:00
# endif // WITH_ENGINE
2014-03-14 14:13:41 -04:00
// If we're not in the editor stop collecting the backlog now that we know
if ( ! GIsEditor )
{
GLog - > EnableBacklog ( false ) ;
}
2014-09-09 12:18:29 -04:00
# if WITH_ENGINE
2014-03-14 14:13:41 -04:00
EndInitTextLocalization ( ) ;
if ( FPlatformProcess : : SupportsMultithreading ( ) & & ! IsRunningDedicatedServer ( ) & & ( bIsRegularClient | | bHasEditorToken ) )
{
FPlatformSplash : : Show ( ) ;
}
2014-07-07 10:11:07 -04:00
if ( ! IsRunningDedicatedServer ( ) & & ( bHasEditorToken | | bIsRegularClient ) )
2014-03-14 14:13:41 -04:00
{
2014-07-07 10:11:07 -04:00
// Init platform application
FSlateApplication : : Create ( ) ;
2014-03-14 14:13:41 -04:00
}
2014-07-08 07:53:13 -04:00
else
{
// If we're not creating the slate application there is some basic initialization
// that it does that still must be done
EKeys : : Initialize ( ) ;
FCoreStyle : : ResetToDefault ( ) ;
}
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown ben.marsh
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2733540 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Capsule shadows
* Capsule shadows excel at extremely soft area shadows caused by a large light source angle, but don't support accurate self-shadowing
* Artists can setup a physics asset containing Spheres and Sphyls (capsules) for a skeletal mesh that will be used to represent the mesh's occlusion
* These shapes can then be used for direct shadowing (bCastCapsuleDirectShadow) on a skeletal mesh component, whose softness depends on the light source angle / radius
* The shapes can also be used to create an indirect shadow (bCastCapsuleIndirectShadow), whose direction and softness is derived from the precomputed sky occlusion (stationary sky light) or primary indirect lighting (static sky light)
* Capsule shadowing is computed at half res and uses tiled deferred culling for efficiency - only implemented for PC SM5 + PS4 so far
* Shadowing of movable skylights is not yet supported
Change 2735460 on 2015/10/20 by Uriel.Doyon@uriel.doyon_office_data
Basepass drawlist are now merged within a single drawlist.
Lighting policy parameters are now accessed through a uniform buffer.
Changed the global resource initialization so that InitRHI now comes before InitDynamicRHI
#codereview nick.penwarden
Change 2744741 on 2015/10/28 by Nick.Penwarden@nickp_streams
Remove unused RHI methods:
RHIIsDrawingViewport
RHIGpuTimeBegin
RHIGpuTimeEnd
Made default/empty versions of these calls and removed stubs from RHIs that don't use them:
RHISuspendRendering
RHIResumeRendering
RHIIsRenderingSuspended
Change 2745714 on 2015/10/28 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Lighting channels - each component and light can choose from 3 channels
* Primitives output their channel mask to stencil during the base pass, the masks are copied to a texture after the base pass, deferred lighting passes compare the primitive mask against the light's mask
* Dynamic shadow casting also respects the channels
* Only works on opaque materials, direct lighting, dynamic lighting
* Not implemented for tiled deferred atm
* This will replace CastsShadowsFromCinematicObjectsOnly in the future
#rb Martin.Mittring
Change 2746243 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New
First pass at separate Async Compute Context
#codereview Lee.Clark,Daniel.Wright
#rb Gil.Gribb
Change 2746989 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering
Removed a lot of complexity of the skeletal mesh motionblur code (better for multithreading, simpler, faster) but going from one large buffer to per mesh buffers. Upload of bones only needed once.
* GPUSkinCache didn't even work before (in this branch)
* tested BasePass velocity
* tested split screen
* tested editor pause
* matinee camera cut (no need, invalidates velocity)
* tested CPU Skin? (never has motionblur)
* tested CreateSceneProxy (recreation is prevented in CreteSceneProxy unless bone count changes)
* test ES2 -featureleveles2
#rb: Rolando.Caloca
Change 2750734 on 2015/11/02 by Uriel.Doyon@uriel.doyon_office_data
Embree integration into Lightmass
Can be enabled through Lightmass.ini [DevOptions.StaticLighting]bUseEmbree.
Also [DevOptions.StaticLighting]bVerifyEmbree will compare ray casting results.
Only usable on Win64 with this submit.
#review daniel.wright
Change 2752730 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering
added SSAO CS version, can be enabled with
r.AmbientOcclusion.Compute 1
Not optimized yet
#rb:Olaf.Piesche
Change 2752766 on 2015/11/03 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Lightmass solver quality improvements
* IndirectLightingScale is no longer applied to photons, avoids splotchy artifacts when using small scales
* New 'Lightmass Portal' actor / component which tells the solver where to look for significant lighting. When lighting with a Static Skylight only, in a mostly indoor environment, setting up these portals is the only way to get high quality.
* Skylight bounce lighting is now much more accurate and leverages adaptive sampling
* Fixed a bug that effectively disabled adaptive sampling on high IndirectLightingQualities
* Shadow penumbras are also improved by IndirectLightingQuality
* Texel debugging is now a cvar 'r.TexelDebugging', instead of requiring a full recompile
Change 2754018 on 2015/11/04 by Uriel.Doyon@uriel.doyon_office_data
Quad Complexity ViewMode (PCD3D_SM5 only).
Shader Complexity with Quad Overhead ViewMode (PCD3D_SM5 only). Require ShaderComplexity ViewMode & Show.Visualize.QuadOverhead
#review brian.karis
Change 2754760 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering
improved SSAO quality (less high frequency noise) to avoid TemporalAA smearing
Change 2756308 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S
DevRendering - Enable removing unused outputs on PS4 shader pipelines, disable by default removing unused on D3D (toggable with r.D3DRemoveUnusedInterpolators)
#codereview Marcus.Wassmer
Change 2757063 on 2015/11/06 by Simon.Tovey@Simon.Tovey_Dev
Submitting pull request from user Pierdek.
Early out of particle collision module update if there are no active particles.
#github
#1614
Change 2757340 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering
UE4 - Fixed the experimental r.RHICmdBalanceParallelLists 2 mode and renabled it for orion.
Change 2757343 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering
UE4 - Added a path so that texture streaming can avoid flushing the RHI thread.
Change 2757985 on 2015/11/06 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Added new PrimitiveComponent setting bSingleSampleShadowFromStationaryLights
* When enabled, shadowing of a movable component from a stationary directional light will come from the Volume Lighting Samples precomputed by Lightmass
* This provides essentially free on/off shadow receiving on dynamic objects, with a fade over time between states
* Lighting has to be rebuilt once for this to work
#rb Rolando.Caloca
Change 2759058 on 2015/11/09 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering
UE4 - Dynamically set stream source to avoid creating a separate drawing policy for each static mesh with vertex colors.
#rb Daniel.Wright
Change 2760523 on 2015/11/10 by Uriel.Doyon@uriel.doyon_office_data
Enabled Embree by default
#review daniel.wright
==========================
ALL CHANGELISTS
==========================
Change 2720123 on 2015/10/07 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - 'integrate' Tem'
Change 2721682 on 2015/10/08 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Eliminated a fatal error '
Change 2721815 on 2015/10/08 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - Fix crash exiti'
Change 2724755 on 2015/10/12 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - D3D12 Fix Tier'
Change 2724781 on 2015/10/12 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - D3D12 Fix offse'
Change 2728317 on 2015/10/14 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - hlslcc - Fix fo'
Change 2729170 on 2015/10/14 by Chris.Bunner@Chris.Bunner_Dev_Stream 'Force Lightmass volume sample g'
Change 2732131 on 2015/10/16 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'fixed resource transition issue'
Change 2732218 on 2015/10/16 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor code cleanup '
Change 2733533 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Clear stencil to 0 after decals'
Change 2733540 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Capsule shadows * Capsule shado'
Change 2733546 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Light shaft targets are only al'
Change 2733602 on 2015/10/19 by Uriel.Doyon@uriel.doyon_office_data 'Decals not writing to Normal ca'
Change 2733627 on 2015/10/19 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix for transition ensure. '
Change 2735292 on 2015/10/20 by Brian.Karis@Brian.Karis_T3247_Rendering 'Fix for dark lightmap precision'
Change 2735298 on 2015/10/20 by Brian.Karis@Brian.Karis_T3247_Rendering 'Fix for speedtree LOD transitio'
Change 2735460 on 2015/10/20 by Uriel.Doyon@uriel.doyon_office_data 'Basepass drawlist are now merge'
Change 2737214 on 2015/10/21 by Chris.Bunner@Chris.Bunner_Dev_Stream 'Expanded a warning when importi'
Change 2738581 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Updated comment on stencil usag'
Change 2738583 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Changed bound but not set scene'
Change 2738584 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fixed skylight occlusion maps b'
Change 2738589 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Lightmap streaming fixes * Chan'
Change 2738593 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fix from licensee for race cond'
Change 2738982 on 2015/10/22 by Olaf.Piesche@Olaf.Piesche_roaming 'Activating CanTickOnAnyThread f'
Change 2739032 on 2015/10/22 by Olaf.Piesche@Olaf.Piesche_roaming 'Fixing compiler barf with Clang'
Change 2741517 on 2015/10/26 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRindering - D3D12 - Integrat'
Change 2743790 on 2015/10/27 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fixed texel debugging on static'
Change 2743958 on 2015/10/27 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comments '
Change 2744153 on 2015/10/27 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Unity compile fix '
Change 2744741 on 2015/10/28 by Nick.Penwarden@nickp_streams 'Remove unused RHI methods: RHI'
Change 2745714 on 2015/10/28 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Lighting channels - each compon'
Change 2746242 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix crashes on init by swapping'
Change 2746243 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'First pass at separate Async Co'
Change 2746296 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Buffer label frees so we don't '
Change 2746297 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'updated comment '
Change 2746343 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comment '
Change 2746347 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comment '
Change 2746811 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Draw event for compute commandl'
Change 2746989 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'Removed a lot of complexity of '
Change 2747127 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'Improved game console printout '
Change 2747702 on 2015/10/30 by Chris.Bunner@Chris.Bunner_Dev_Stream 'Bumped Lightmass StaticMesh imp'
Change 2747954 on 2015/10/30 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix SubmitDone not called TRC e'
Change 2747979 on 2015/10/30 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'polish console autocomplete tex'
Change 2750719 on 2015/11/02 by Uriel.Doyon@uriel.doyon_office_data 'Add Embree 2.7.0 for Win64 and '
Change 2750734 on 2015/11/02 by Uriel.Doyon@uriel.doyon_office_data 'Embree integration into Lightma'
Change 2750872 on 2015/11/02 by Nick.Penwarden@nickp_streams 'Merging //UE4/Dev-Main to Dev-R'
Change 2751934 on 2015/11/03 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Disambiguate template function '
Change 2752190 on 2015/11/03 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed assert relating to '
Change 2752333 on 2015/11/03 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Shader pipeline '
Change 2752655 on 2015/11/03 by Rolando.Caloca@Rolando.Caloca_T3903_S 'DevRendering - Fix Materials pa'
Change 2752710 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comment '
Change 2752711 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added better comment/help text '
Change 2752730 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added SSAO CS version, can be e'
Change 2752766 on 2015/11/03 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Lightmass solver quality improv'
Change 2752869 on 2015/11/03 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Add shader pipel'
Change 2752882 on 2015/11/03 by Rolando.Caloca@Rolando.Caloca_T3903_S 'DevRendering - hlslcc - Metal -'
Change 2752899 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'small SSAO GPU optimization mov'
Change 2752934 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor GPU optimization for SSAO'
Change 2753109 on 2015/11/03 by Uriel.Doyon@uriel.doyon_office_data 'Fixed final build '
Change 2753669 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'fixed SM4 compiling '
Change 2754002 on 2015/11/04 by Nick.Penwarden@nickp_streams 'test change '
Change 2754018 on 2015/11/04 by Uriel.Doyon@uriel.doyon_office_data 'Quad Complexity ViewMode (PCD3D'
Change 2754115 on 2015/11/04 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed end of frame update'
Change 2754297 on 2015/11/04 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'PS4 compile fixes #codereview U'
Change 2754405 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor SSAO ALU optimizations fi'
Change 2754512 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'adjusted clamp for cvar '
Change 2754760 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'improved SSAO quality (less hig'
Change 2755572 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - PS4 warning fix '
Change 2755667 on 2015/11/05 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed UE-22742, leak in t'
Change 2755722 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Remove unused co'
Change 2755814 on 2015/11/05 by Nick.Penwarden@nickp_streams 'Merging //UE4/Dev-Main to Dev-R'
Change 2755935 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Rebuild static m'
Change 2756003 on 2015/11/05 by Uriel.Doyon@uriel.doyon_office_data 'Reduce the number of precompute'
Change 2756145 on 2015/11/05 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Temp fix for GPU crash #rb none'
Change 2756308 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Enable removing '
Change 2756435 on 2015/11/05 by Olaf.Piesche@Olaf.Piesche_roaming 'Disabling a check, to fix OR-85'
Change 2757063 on 2015/11/06 by Simon.Tovey@Simon.Tovey_Dev 'Submitting pull request from us'
Change 2757340 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed the experimental r.'
Change 2757341 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Changed the RHI thread di'
Change 2757342 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed lazy uniform buffer'
Change 2757343 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Added a path so that text'
Change 2757500 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Add FrameSync to externalprofil'
Change 2757650 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'GBuffer should only be consider'
Change 2757665 on 2015/11/06 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'UE-22816 Instruction count is n'
Change 2757834 on 2015/11/06 by Michael.Trepka@Michael.Trepka_a4202_Dev-Rendering 'Embree integration into Lightma'
Change 2757930 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix UT ensure #rb Peter.Knepley'
Change 2757931 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix Ocean ensure #rb josh.ander'
Change 2757946 on 2015/11/06 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Removed invalid Lightmass asser'
Change 2757985 on 2015/11/06 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Added new PrimitiveComponent se'
Change 2758049 on 2015/11/06 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'OR-8600 CRASH: AllocationLeveli'
Change 2758059 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'r.DumpTransitionsForResource #r'
Change 2758082 on 2015/11/06 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Fix resource tra'
Change 2758879 on 2015/11/09 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Fix PSSL names f'
Change 2758911 on 2015/11/09 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed accidental force di'
Change 2758968 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Disabled single frame buffer us'
Change 2758991 on 2015/11/09 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix togglerhithread crash #rb G'
Change 2759058 on 2015/11/09 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Dynamically set stream so'
Change 2759063 on 2015/11/09 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'fixed UE-22368 CLONE - GitHub 1'
Change 2759073 on 2015/11/09 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor code quality improvements'
Change 2759501 on 2015/11/09 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix particle ensure. '
Change 2759522 on 2015/11/09 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix decals using CustomStencil.'
Change 2759610 on 2015/11/09 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fixed line light source shadows'
Change 2759634 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Refined GBufferA resolving when'
Change 2759657 on 2015/11/09 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'Fixed ResourceTransition with r'
Change 2759693 on 2015/11/09 by Rolando.Caloca@Rolando.Caloca_T4688_S 'DevRendering - Fixed global sha'
Change 2759771 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Fixed editor hit proxy renderin'
Change 2760188 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Disabled some more deferred dec'
Change 2760523 on 2015/11/10 by Uriel.Doyon@uriel.doyon_office_data 'Enabled Embree by default #revi'
[CL 2761339 by Nick Penwarden in Main branch]
2015-11-10 17:11:09 -05:00
2014-10-08 04:42:34 -04:00
FScopedSlowTask SlowTask ( 100 , NSLOCTEXT ( " EngineLoop " , " EngineLoop_Initializing " , " Initializing... " ) ) ;
SlowTask . EnterProgressFrame ( 10 ) ;
2016-04-05 11:25:00 -04:00
# if USE_LOCALIZED_PACKAGE_CACHE
// this loads a UObject, so we do this now after objects are brought up (otherwise, it can't load properties from config)
FPackageLocalizationManager : : Get ( ) . InitializeFromDefaultCache ( ) ;
# endif // USE_LOCALIZED_PACKAGE_CACHE
2015-03-17 09:50:32 -04:00
// Initialize the RHI.
RHIInit ( bHasEditorToken ) ;
if ( ! FPlatformProperties : : RequiresCookedData ( ) )
{
check ( ! GShaderCompilingManager ) ;
GShaderCompilingManager = new FShaderCompilingManager ( ) ;
check ( ! GDistanceFieldAsyncQueue ) ;
GDistanceFieldAsyncQueue = new FDistanceFieldAsyncQueue ( ) ;
}
2014-03-14 14:13:41 -04:00
{
DECLARE_SCOPE_CYCLE_COUNTER ( TEXT ( " Initial UObject load " ) , STAT_InitialUObjectLoad , STATGROUP_LoadTime ) ;
// Initialize shader types before loading any shaders
InitializeShaderTypes ( ) ;
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 30 ) ;
2014-03-14 14:13:41 -04:00
// Load the global shaders.
2015-09-08 11:31:46 -04:00
// if (!IsRunningCommandlet())
// hack: don't load global shaders if we are cooking we will load the shaders for the correct platform later
FString Commandline = FCommandLine : : Get ( ) ;
2016-04-05 11:25:00 -04:00
if ( ! IsRunningDedicatedServer ( ) & &
Commandline . Contains ( TEXT ( " cookcommandlet " ) ) = = false & &
2015-09-08 11:31:46 -04:00
Commandline . Contains ( TEXT ( " run=cook " ) ) = = false )
// if (FParse::Param(FCommandLine::Get(), TEXT("Multiprocess")) == false)
2014-03-14 14:13:41 -04:00
{
2015-09-29 15:30:25 -04:00
if ( GetGlobalShaderMap ( GMaxRHIFeatureLevel ) = = nullptr & & GIsRequestingExit )
2015-09-08 11:31:46 -04:00
{
// This means we can't continue without the global shader map.
return 1 ;
}
}
else if ( FPlatformProperties : : RequiresCookedData ( ) = = false )
{
GetDerivedDataCacheRef ( ) ;
2014-03-14 14:13:41 -04:00
}
// In order to be able to use short script package names get all script
// package names from ini files and register them with FPackageName system.
FPackageName : : RegisterShortPackageNamesForUObjectModules ( ) ;
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 5 ) ;
2014-03-14 14:13:41 -04:00
// Make sure all UObject classes are registered and default properties have been initialized
ProcessNewlyLoadedUObjects ( ) ;
// Default materials may have been loaded due to dependencies when loading
// classes and class default objects. If not, do so now.
UMaterialInterface : : InitDefaultMaterials ( ) ;
UMaterialInterface : : AssertDefaultMaterialsExist ( ) ;
UMaterialInterface : : AssertDefaultMaterialsPostLoaded ( ) ;
}
2016-04-05 11:25:00 -04:00
2015-08-04 17:07:57 -04:00
// Initialize the texture streaming system (needs to happen after RHIInit and ProcessNewlyLoadedUObjects).
IStreamingManager : : Get ( ) ;
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 5 ) ;
2014-10-08 04:42:34 -04:00
2014-03-14 14:13:41 -04:00
// Tell the module manager is may now process newly-loaded UObjects when new C++ modules are loaded
FModuleManager : : Get ( ) . StartProcessingNewlyLoadedObjects ( ) ;
// Setup GC optimizations
if ( bIsSeekFreeDedicatedServer | | bHasEditorToken )
{
2015-09-10 11:58:41 -04:00
GUObjectArray . DisableDisregardForGC ( ) ;
2014-03-14 14:13:41 -04:00
}
2014-10-08 04:42:34 -04:00
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
if ( ! LoadStartupCoreModules ( ) )
{
// At least one startup module failed to load, return 1 to indicate an error
return 1 ;
}
# if !UE_SERVER // && !UE_EDITOR
if ( ! IsRunningDedicatedServer ( ) & & ! IsRunningCommandlet ( ) )
{
2015-09-15 18:41:34 -04:00
TSharedRef < FSlateRenderer > SlateRenderer = GUsingNullRHI ?
FModuleManager : : Get ( ) . LoadModuleChecked < ISlateNullRendererModule > ( " SlateNullRenderer " ) . CreateSlateNullRenderer ( ) :
FModuleManager : : Get ( ) . GetModuleChecked < ISlateRHIRendererModule > ( " SlateRHIRenderer " ) . CreateSlateRHIRenderer ( ) ;
2014-03-14 14:13:41 -04:00
// If Slate is being used, initialize the renderer after RHIInit
FSlateApplication & CurrentSlateApp = FSlateApplication : : Get ( ) ;
CurrentSlateApp . InitializeRenderer ( SlateRenderer ) ;
2014-09-09 12:12:38 -04:00
2014-03-14 14:13:41 -04:00
GetMoviePlayer ( ) - > SetSlateRenderer ( SlateRenderer ) ;
}
2015-11-04 16:14:13 -05:00
// Create the engine font services now that the Slate renderer is ready
FEngineFontServices : : Create ( ) ;
2014-03-14 14:13:41 -04:00
# endif
2014-10-08 04:42:34 -04:00
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
// Load up all modules that need to hook into the loading screen
2014-07-30 13:16:05 -04:00
if ( ! IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : PreLoadingScreen ) | | ! IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : PreLoadingScreen ) )
2014-03-14 14:13:41 -04:00
{
return 1 ;
}
# if !UE_SERVER
if ( ! IsRunningDedicatedServer ( ) )
{
// @todo ps4: If a loading movie starts earlier, which it probably should, then please see PS4's PlatformPostInit() implementation!
// allow the movie player to load a sequence from the .inis (a PreLoadingScreen module could have already initialized a sequence, in which case
// it wouldn't have anything in it's .ini file)
GetMoviePlayer ( ) - > SetupLoadingScreenFromIni ( ) ;
GetMoviePlayer ( ) - > Initialize ( ) ;
GetMoviePlayer ( ) - > PlayMovie ( ) ;
2015-03-09 09:57:44 -04:00
// do any post appInit processing, before the render thread is started.
FPlatformMisc : : PlatformPostInit ( ! GetMoviePlayer ( ) - > IsMovieCurrentlyPlaying ( ) ) ;
}
else
2014-06-18 16:38:05 -04:00
# endif
2015-03-09 09:57:44 -04:00
{
// do any post appInit processing, before the render thread is started.
FPlatformMisc : : PlatformPostInit ( true ) ;
}
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 5 ) ;
2014-10-08 04:42:34 -04:00
2015-07-17 17:28:57 -04:00
RHIPostInit ( ) ;
2014-03-14 14:13:41 -04:00
if ( GUseThreadedRendering )
{
2015-03-24 08:49:41 -04:00
if ( GRHISupportsRHIThread )
2014-09-04 11:35:18 -04:00
{
2015-03-24 08:49:41 -04:00
const bool DefaultUseRHIThread = true ;
GUseRHIThread = DefaultUseRHIThread ;
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " rhithread " ) ) )
{
GUseRHIThread = true ;
}
else if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " norhithread " ) ) )
{
GUseRHIThread = false ;
}
2014-09-04 11:35:18 -04:00
}
2014-03-14 14:13:41 -04:00
StartRenderingThread ( ) ;
}
2015-06-22 05:09:13 -04:00
# if WITH_EDITOR
// We need to mount the shared resources for templates (if there are any) before we try and load and game classes
FUnrealEdMisc : : Get ( ) . MountTemplateSharedPaths ( ) ;
# endif
2014-03-14 14:13:41 -04:00
if ( ! LoadStartupModules ( ) )
{
// At least one startup module failed to load, return 1 to indicate an error
return 1 ;
}
2016-02-09 09:44:54 -05:00
// load up the seek-free startup packages
if ( ! FStartupPackages : : LoadAll ( ) )
{
// At least one startup package failed to load, return 1 to indicate an error
return 1 ;
}
2016-04-05 11:25:00 -04:00
if ( GUObjectArray . IsOpenForDisregardForGC ( ) )
{
GUObjectArray . CloseDisregardForGC ( ) ;
}
2014-03-14 14:13:41 -04:00
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
if ( IOnlineSubsystem : : IsLoaded ( ) )
{
SetIsServerForOnlineSubsystemsDelegate ( FQueryIsRunningServer : : CreateStatic ( & IsServerDelegateForOSS ) ) ;
}
2014-03-14 14:13:41 -04:00
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 5 ) ;
2014-10-08 04:42:34 -04:00
2014-03-14 14:13:41 -04:00
if ( ! bHasEditorToken )
{
2015-09-29 15:30:25 -04:00
UClass * CommandletClass = nullptr ;
2014-03-14 14:13:41 -04:00
if ( ! bIsRegularClient )
{
CommandletClass = FindObject < UClass > ( ANY_PACKAGE , * Token , false ) ;
if ( ! CommandletClass )
{
2014-06-11 04:21:48 -04:00
if ( GLogConsole & & ! GIsSilent )
{
GLogConsole - > Show ( true ) ;
}
UE_LOG ( LogInit , Error , TEXT ( " %s looked like a commandlet, but we could not find the class. " ) , * Token ) ;
GIsRequestingExit = true ;
return 1 ;
2014-03-14 14:13:41 -04:00
}
2014-11-26 14:56:09 -05:00
# if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX
2014-03-14 14:13:41 -04:00
extern bool GIsConsoleExecutable ;
if ( GIsConsoleExecutable )
{
2015-09-29 15:30:25 -04:00
if ( GLogConsole ! = nullptr & & GLogConsole - > IsAttached ( ) )
2014-03-14 14:13:41 -04:00
{
GLog - > RemoveOutputDevice ( GLogConsole ) ;
}
// Setup Ctrl-C handler for console application
FPlatformMisc : : SetGracefulTerminationHandler ( ) ;
}
else
2014-11-26 14:56:09 -05:00
# endif
2014-03-14 14:13:41 -04:00
{
// Bring up console unless we're a silent build.
if ( GLogConsole & & ! GIsSilent )
{
GLogConsole - > Show ( true ) ;
}
}
// print output immediately
2015-09-29 15:30:25 -04:00
setvbuf ( stdout , nullptr , _IONBF , 0 ) ;
2014-03-14 14:13:41 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Executing %s " ) , * CommandletClass - > GetFullName ( ) ) ;
// Allow commandlets to individually override those settings.
UCommandlet * Default = CastChecked < UCommandlet > ( CommandletClass - > GetDefaultObject ( ) ) ;
if ( GIsRequestingExit )
{
// commandlet set GIsRequestingExit during construction
return 1 ;
}
GIsClient = Default - > IsClient ;
GIsServer = Default - > IsServer ;
2014-11-26 12:51:01 -05:00
# if WITH_EDITOR
2014-03-14 14:13:41 -04:00
GIsEditor = Default - > IsEditor ;
2014-11-26 12:51:01 -05:00
# else
if ( Default - > IsEditor )
{
UE_LOG ( LogInit , Error , TEXT ( " Cannot run editor commandlet %s with game executable. " ) , * CommandletClass - > GetFullName ( ) ) ;
GIsRequestingExit = true ;
return 1 ;
}
# endif
2014-03-14 14:13:41 -04:00
PRIVATE_GIsRunningCommandlet = true ;
// Reset aux log if we don't want to log to the console window.
if ( ! Default - > LogToConsole )
{
GLog - > RemoveOutputDevice ( GLogConsole ) ;
}
GIsRequestingExit = true ; // so CTRL-C will exit immediately
// allow the commandlet the opportunity to create a custom engine
CommandletClass - > GetDefaultObject < UCommandlet > ( ) - > CreateCustomEngine ( CommandletCommandLine ) ;
2015-09-29 15:30:25 -04:00
if ( GEngine = = nullptr )
2014-03-14 14:13:41 -04:00
{
2014-11-26 12:51:01 -05:00
# if WITH_EDITOR
2014-03-14 14:13:41 -04:00
if ( GIsEditor )
{
2015-09-29 15:30:25 -04:00
UClass * EditorEngineClass = StaticLoadClass ( UEditorEngine : : StaticClass ( ) , nullptr , TEXT ( " engine-ini:/Script/Engine.Engine.EditorEngine " ) , nullptr , LOAD_None , nullptr ) ;
2014-03-14 14:13:41 -04:00
2015-02-03 05:40:57 -05:00
GEngine = GEditor = NewObject < UEditorEngine > ( GetTransientPackage ( ) , EditorEngineClass ) ;
2014-03-14 14:13:41 -04:00
2014-06-12 10:34:19 -04:00
GEngine - > ParseCommandline ( ) ;
2014-03-14 14:13:41 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Initializing Editor Engine... " ) ) ;
GEditor - > InitEditor ( this ) ;
UE_LOG ( LogInit , Log , TEXT ( " Initializing Editor Engine Completed " ) ) ;
}
else
2014-11-26 12:51:01 -05:00
# endif
2014-03-14 14:13:41 -04:00
{
2015-09-29 15:30:25 -04:00
UClass * EngineClass = StaticLoadClass ( UEngine : : StaticClass ( ) , nullptr , TEXT ( " engine-ini:/Script/Engine.Engine.GameEngine " ) , nullptr , LOAD_None , nullptr ) ;
2014-03-14 14:13:41 -04:00
// must do this here so that the engine object that we create on the next line receives the correct property values
2015-02-03 05:40:57 -05:00
GEngine = NewObject < UEngine > ( GetTransientPackage ( ) , EngineClass ) ;
2014-03-14 14:13:41 -04:00
check ( GEngine ) ;
GEngine - > ParseCommandline ( ) ;
UE_LOG ( LogInit , Log , TEXT ( " Initializing Game Engine... " ) ) ;
GEngine - > Init ( this ) ;
UE_LOG ( LogInit , Log , TEXT ( " Initializing Game Engine Completed " ) ) ;
}
}
2015-09-08 22:00:36 -04:00
// Load all the post-engine init modules
ensure ( IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : PostEngineInit ) ) ;
ensure ( IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : PostEngineInit ) ) ;
2014-03-14 14:13:41 -04:00
//run automation smoke tests now that the commandlet has had a chance to override the above flags and GEngine is available
# if !PLATFORM_HTML5 && !PLATFORM_HTML5_WIN32
FAutomationTestFramework : : GetInstance ( ) . RunSmokeTests ( ) ;
# endif
2015-02-03 05:40:57 -05:00
UCommandlet * Commandlet = NewObject < UCommandlet > ( GetTransientPackage ( ) , CommandletClass ) ;
2014-03-14 14:13:41 -04:00
check ( Commandlet ) ;
Commandlet - > AddToRoot ( ) ;
// Execute the commandlet.
double CommandletExecutionStartTime = FPlatformTime : : Seconds ( ) ;
// Commandlets don't always handle -run= properly in the commandline so we'll provide them
// with a custom version that doesn't have it.
2015-07-06 08:37:30 -04:00
Commandlet - > ParseParms ( CommandletCommandLine ) ;
2015-07-06 09:46:47 -04:00
# if STATS
2015-07-06 08:37:30 -04:00
// We have to close the scope, otherwise we will end with broken stats.
CycleCount_AfterStats . StopAndResetStatId ( ) ;
2015-07-06 09:46:47 -04:00
# endif // STATS
2015-07-06 08:37:30 -04:00
FStats : : TickCommandletStats ( ) ;
2014-03-14 14:13:41 -04:00
int32 ErrorLevel = Commandlet - > Main ( CommandletCommandLine ) ;
2015-07-06 08:37:30 -04:00
FStats : : TickCommandletStats ( ) ;
2014-03-14 14:13:41 -04:00
// Log warning/ error summary.
if ( Commandlet - > ShowErrorCount )
{
if ( GWarn - > Errors . Num ( ) | | GWarn - > Warnings . Num ( ) )
{
SET_WARN_COLOR ( COLOR_WHITE ) ;
UE_LOG ( LogInit , Display , TEXT ( " " ) ) ;
2015-10-02 12:49:57 -04:00
UE_LOG ( LogInit , Display , TEXT ( " Warning/Error Summary (Unique only) " ) ) ;
UE_LOG ( LogInit , Display , TEXT ( " ----------------------------------- " ) ) ;
const int32 MaxMessagesToShow = ( GIsBuildMachine | | FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " DUMPALLWARNINGS " ) ) ) ?
FMath : : Max ( GWarn - > Errors . Num ( ) , GWarn - > Warnings . Num ( ) ) : 50 ;
2014-03-14 14:13:41 -04:00
TSet < FString > ShownMessages ;
SET_WARN_COLOR ( COLOR_RED ) ;
ShownMessages . Empty ( MaxMessagesToShow ) ;
2015-10-02 12:49:57 -04:00
for ( const FString & ErrorMessage : GWarn - > Errors )
2014-03-14 14:13:41 -04:00
{
bool bAlreadyShown = false ;
2015-10-02 12:49:57 -04:00
ShownMessages . Add ( ErrorMessage , & bAlreadyShown ) ;
2014-03-14 14:13:41 -04:00
if ( ! bAlreadyShown )
{
if ( ShownMessages . Num ( ) > MaxMessagesToShow )
{
SET_WARN_COLOR ( COLOR_WHITE ) ;
2015-10-02 12:49:57 -04:00
UE_CLOG ( MaxMessagesToShow < GWarn - > Errors . Num ( ) , LogInit , Display , TEXT ( " NOTE: Only first %d errors displayed. " ) , MaxMessagesToShow ) ;
2014-03-14 14:13:41 -04:00
break ;
}
2015-10-02 12:49:57 -04:00
UE_LOG ( LogInit , Display , TEXT ( " %s " ) , * ErrorMessage ) ;
2014-03-14 14:13:41 -04:00
}
}
SET_WARN_COLOR ( COLOR_YELLOW ) ;
ShownMessages . Empty ( MaxMessagesToShow ) ;
2015-10-02 12:49:57 -04:00
for ( const FString & WarningMessage : GWarn - > Warnings )
2014-03-14 14:13:41 -04:00
{
bool bAlreadyShown = false ;
2015-10-02 12:49:57 -04:00
ShownMessages . Add ( WarningMessage , & bAlreadyShown ) ;
2014-03-14 14:13:41 -04:00
if ( ! bAlreadyShown )
{
if ( ShownMessages . Num ( ) > MaxMessagesToShow )
{
SET_WARN_COLOR ( COLOR_WHITE ) ;
2015-10-02 12:49:57 -04:00
UE_CLOG ( MaxMessagesToShow < GWarn - > Warnings . Num ( ) , LogInit , Display , TEXT ( " NOTE: Only first %d warnings displayed. " ) , MaxMessagesToShow ) ;
2014-03-14 14:13:41 -04:00
break ;
}
2015-10-02 12:49:57 -04:00
UE_LOG ( LogInit , Display , TEXT ( " %s " ) , * WarningMessage ) ;
2014-03-14 14:13:41 -04:00
}
}
}
UE_LOG ( LogInit , Display , TEXT ( " " ) ) ;
if ( ErrorLevel ! = 0 )
{
SET_WARN_COLOR ( COLOR_RED ) ;
UE_LOG ( LogInit , Display , TEXT ( " Commandlet->Main return this error code: %d " ) , ErrorLevel ) ;
UE_LOG ( LogInit , Display , TEXT ( " With %d error(s), %d warning(s) " ) , GWarn - > Errors . Num ( ) , GWarn - > Warnings . Num ( ) ) ;
}
else if ( ( GWarn - > Errors . Num ( ) = = 0 ) )
{
SET_WARN_COLOR ( GWarn - > Warnings . Num ( ) ? COLOR_YELLOW : COLOR_GREEN ) ;
UE_LOG ( LogInit , Display , TEXT ( " Success - %d error(s), %d warning(s) " ) , GWarn - > Errors . Num ( ) , GWarn - > Warnings . Num ( ) ) ;
}
else
{
SET_WARN_COLOR ( COLOR_RED ) ;
UE_LOG ( LogInit , Display , TEXT ( " Failure - %d error(s), %d warning(s) " ) , GWarn - > Errors . Num ( ) , GWarn - > Warnings . Num ( ) ) ;
ErrorLevel = 1 ;
}
CLEAR_WARN_COLOR ( ) ;
}
else
{
UE_LOG ( LogInit , Display , TEXT ( " Finished. " ) ) ;
}
double CommandletExecutionTime = FPlatformTime : : Seconds ( ) - CommandletExecutionStartTime ;
UE_LOG ( LogInit , Display , LINE_TERMINATOR TEXT ( " Execution of commandlet took: %.2f seconds " ) , CommandletExecutionTime ) ;
// We're ready to exit!
return ErrorLevel ;
}
else
{
// We're a regular client.
check ( bIsRegularClient ) ;
if ( bTokenDoesNotHaveDash )
{
// here we give people a reasonable warning if they tried to use the short name of a commandlet
UClass * TempCommandletClass = FindObject < UClass > ( ANY_PACKAGE , * ( Token + TEXT ( " Commandlet " ) ) , false ) ;
if ( TempCommandletClass )
{
UE_LOG ( LogInit , Fatal , TEXT ( " You probably meant to call a commandlet. Please use the full name %s. " ) , * ( Token + TEXT ( " Commandlet " ) ) ) ;
}
}
}
}
// exit if wanted.
if ( GIsRequestingExit )
{
2015-09-29 15:30:25 -04:00
if ( GEngine ! = nullptr )
2014-03-14 14:13:41 -04:00
{
GEngine - > PreExit ( ) ;
}
AppPreExit ( ) ;
// appExit is called outside guarded block.
return 1 ;
}
FString MatineeName ;
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " DUMPMOVIE " ) ) | | FParse : : Value ( FCommandLine : : Get ( ) , TEXT ( " -MATINEESSCAPTURE= " ) , MatineeName ) )
{
// -1: remain on
GIsDumpingMovie = - 1 ;
}
// If dumping movie then we do NOT want on-screen messages
GAreScreenMessagesEnabled = ! GIsDumpingMovie & & ! GIsDemoMode ;
# if !UE_BUILD_SHIPPING
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " NOSCREENMESSAGES " ) ) )
{
GAreScreenMessagesEnabled = false ;
}
// Don't update INI files if benchmarking or -noini
2014-04-23 18:12:58 -04:00
if ( FApp : : IsBenchmarking ( ) | | FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " NOINI " ) ) )
2014-03-14 14:13:41 -04:00
{
GConfig - > Detach ( GEngineIni ) ;
GConfig - > Detach ( GInputIni ) ;
GConfig - > Detach ( GGameIni ) ;
GConfig - > Detach ( GEditorIni ) ;
}
# endif // !UE_BUILD_SHIPPING
delete [ ] CommandLineCopy ;
// initialize the pointer, as it is deleted before being assigned in the first frame
2015-09-29 15:30:25 -04:00
PendingCleanupObjects = nullptr ;
2014-03-14 14:13:41 -04:00
// Initialize profile visualizers.
# if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " TaskGraph " ) ) ;
if ( FPlatformProcess : : SupportsMultithreading ( ) )
{
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " ProfilerService " ) ) ;
FModuleManager : : Get ( ) . GetModuleChecked < IProfilerServiceModule > ( " ProfilerService " ) . CreateProfilerServiceManager ( ) ;
}
# endif
2015-09-11 21:50:51 -04:00
// Init HighRes screenshot system, unless running on server
if ( ! IsRunningDedicatedServer ( ) )
{
GetHighResScreenshotConfig ( ) . Init ( ) ;
}
2014-04-23 18:26:02 -04:00
2014-05-29 17:32:09 -04:00
# else // WITH_ENGINE
2014-04-23 18:26:02 -04:00
EndInitTextLocalization ( ) ;
2016-04-05 11:25:00 -04:00
# if USE_LOCALIZED_PACKAGE_CACHE
FPackageLocalizationManager : : Get ( ) . InitializeFromDefaultCache ( ) ;
# endif // USE_LOCALIZED_PACKAGE_CACHE
2014-05-29 17:32:09 -04:00
FPlatformMisc : : PlatformPostInit ( ) ;
# endif // WITH_ENGINE
2014-04-23 18:26:02 -04:00
2014-03-14 14:13:41 -04:00
//run automation smoke tests now that everything is setup to run
FAutomationTestFramework : : GetInstance ( ) . RunSmokeTests ( ) ;
2014-08-06 16:48:03 -04:00
2014-12-17 02:15:23 -05:00
// Note we still have 20% remaining on the slow task: this will be used by the Editor/Engine initialization next
2014-03-14 14:13:41 -04:00
return 0 ;
}
2015-09-29 15:30:25 -04:00
2014-07-31 07:38:19 -04:00
void FEngineLoop : : LoadCoreModules ( )
{
// Always attempt to load CoreUObject. It requires additional pre-init which is called from its module's StartupModule method.
# if WITH_COREUOBJECT
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " CoreUObject " ) ) ;
# endif
}
2014-03-14 14:13:41 -04:00
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
void FEngineLoop : : LoadPreInitModules ( )
{
DECLARE_SCOPE_CYCLE_COUNTER ( TEXT ( " Loading PreInit Modules " ) , STAT_PreInitModules , STATGROUP_LoadTime ) ;
// GGetMapNameDelegate is initialized here
# if WITH_ENGINE
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " Engine " ) ) ;
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " Renderer " ) ) ;
2015-06-10 10:57:15 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " AnimGraphRuntime " ) ) ;
2014-09-22 09:43:40 -04:00
FPlatformMisc : : LoadPreInitModules ( ) ;
2014-03-14 14:13:41 -04:00
# if !UE_SERVER
if ( ! IsRunningDedicatedServer ( ) )
{
2015-09-15 18:41:34 -04:00
if ( ! GUsingNullRHI )
{
// This needs to be loaded before InitializeShaderTypes is called
FModuleManager : : Get ( ) . LoadModuleChecked < ISlateRHIRendererModule > ( " SlateRHIRenderer " ) ;
}
2014-03-14 14:13:41 -04:00
}
# endif
2014-11-19 13:56:48 -05:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " Landscape " ) ) ;
2014-03-14 14:13:41 -04:00
// Initialize ShaderCore before loading or compiling any shaders,
// But after Renderer and any other modules which implement shader types.
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " ShaderCore " ) ) ;
2014-11-19 13:56:48 -05:00
2014-03-14 14:13:41 -04:00
# if WITH_EDITORONLY_DATA
// Load the texture compressor module before any textures load. They may
// compress asynchronously and that can lead to a race condition.
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " TextureCompressor " ) ) ;
# endif
# endif // WITH_ENGINE
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
# if WITH_ENGINE
bool FEngineLoop : : LoadStartupCoreModules ( )
{
2014-12-17 02:15:23 -05:00
FScopedSlowTask SlowTask ( 100 ) ;
2014-03-14 14:13:41 -04:00
DECLARE_SCOPE_CYCLE_COUNTER ( TEXT ( " Loading Startup Modules " ) , STAT_StartupModules , STATGROUP_LoadTime ) ;
bool bSuccess = true ;
// Load all Runtime modules
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
{
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " Core " ) ) ;
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " Networking " ) ) ;
}
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
FPlatformMisc : : LoadStartupModules ( ) ;
// initialize messaging
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
if ( FPlatformProcess : : SupportsMultithreading ( ) )
{
FModuleManager : : LoadModuleChecked < IMessagingModule > ( " Messaging " ) ;
}
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
# if WITH_EDITOR
FModuleManager : : LoadModuleChecked < IEditorStyleModule > ( " EditorStyle " ) ;
# endif //WITH_EDITOR
2015-03-09 09:57:44 -04:00
// Load UI modules
SlowTask . EnterProgressFrame ( 10 ) ;
if ( ! IsRunningDedicatedServer ( ) )
2014-03-14 14:13:41 -04:00
{
FModuleManager : : Get ( ) . LoadModule ( " Slate " ) ;
2015-09-29 10:47:38 -04:00
# if !UE_BUILD_SHIPPING
// Need to load up the SlateReflector module to initialize the WidgetSnapshotService
FModuleManager : : Get ( ) . LoadModule ( " SlateReflector " ) ;
# endif // !UE_BUILD_SHIPPING
2015-03-09 09:57:44 -04:00
}
# if WITH_EDITOR
// In dedicated server builds with the editor, we need to load UMG/UMGEditor for compiling blueprints.
// UMG must be loaded for runtime and cooking.
FModuleManager : : Get ( ) . LoadModule ( " UMG " ) ;
# else
if ( ! IsRunningDedicatedServer ( ) )
{
2014-06-30 18:17:51 -04:00
// UMG must be loaded for runtime and cooking.
FModuleManager : : Get ( ) . LoadModule ( " UMG " ) ;
2015-03-09 09:57:44 -04:00
}
# endif //WITH_EDITOR
2014-03-14 14:13:41 -04:00
2015-03-09 09:57:44 -04:00
// Load all Development modules
SlowTask . EnterProgressFrame ( 20 ) ;
if ( ! IsRunningDedicatedServer ( ) )
{
2014-03-14 14:13:41 -04:00
# if WITH_UNREAL_DEVELOPER_TOOLS
FModuleManager : : Get ( ) . LoadModule ( " MessageLog " ) ;
FModuleManager : : Get ( ) . LoadModule ( " CollisionAnalyzer " ) ;
# endif //WITH_UNREAL_DEVELOPER_TOOLS
}
# if WITH_UNREAL_DEVELOPER_TOOLS
FModuleManager : : Get ( ) . LoadModule ( " FunctionalTesting " ) ;
# endif //WITH_UNREAL_DEVELOPER_TOOLS
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 30 ) ;
2014-03-14 14:13:41 -04:00
# if (WITH_EDITOR && !(UE_BUILD_SHIPPING || UE_BUILD_TEST))
// HACK: load BT editor as early as possible for statically initialized assets (non cooked BT assets needs it)
// cooking needs this module too
2014-10-15 05:26:17 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " BehaviorTreeEditor " ) ) ;
2014-03-14 14:13:41 -04:00
2015-06-02 11:44:27 -04:00
// Ability tasks are based on GameplayTasks, so we need to make sure that module is loaded as well
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " GameplayTasksEditor " ) ) ;
2016-04-14 14:23:01 -04:00
if ( ! IsRunningDedicatedServer ( ) )
{
// VREditor needs to be loaded in non-server editor builds early, so engine content Blueprints can be loaded during DDC generation
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " VREditor " ) ) ;
}
2014-05-29 16:56:15 -04:00
// -----------------------------------------------------
2014-06-04 17:06:44 -04:00
// HACK: load AbilitySystem editor as early as possible for statically initialized assets (non cooked BT assets needs it)
2014-05-29 16:56:15 -04:00
// cooking needs this module too
2014-06-04 17:06:44 -04:00
bool bGameplayAbilitiesEnabled = false ;
2014-09-16 21:07:55 -04:00
GConfig - > GetBool ( TEXT ( " GameplayAbilities " ) , TEXT ( " GameplayAbilitiesEditorEnabled " ) , bGameplayAbilitiesEnabled , GEngineIni ) ;
2014-06-04 17:06:44 -04:00
if ( bGameplayAbilitiesEnabled )
2014-05-29 16:56:15 -04:00
{
2014-06-04 17:06:44 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " GameplayAbilitiesEditor " ) ) ;
2014-05-29 16:56:15 -04:00
}
// -----------------------------------------------------
2014-03-14 14:13:41 -04:00
// HACK: load EQS editor as early as possible for statically initialized assets (non cooked EQS assets needs it)
// cooking needs this module too
bool bEnvironmentQueryEditor = false ;
GConfig - > GetBool ( TEXT ( " EnvironmentQueryEd " ) , TEXT ( " EnableEnvironmentQueryEd " ) , bEnvironmentQueryEditor , GEngineIni ) ;
2014-10-24 17:47:36 -04:00
if ( bEnvironmentQueryEditor
# if WITH_EDITOR
| | GetDefault < UEditorExperimentalSettings > ( ) - > bEQSEditor
# endif // WITH_EDITOR
)
2014-03-14 14:13:41 -04:00
{
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " EnvironmentQueryEditor " ) ) ;
}
2014-05-29 16:58:50 -04:00
// We need this for blueprint projects that have online functionality.
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " OnlineBlueprintSupport " ) ) ;
2015-06-26 16:58:18 -04:00
if ( IsRunningCommandlet ( ) )
{
2015-08-17 12:32:51 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " IntroTutorials " ) ) ;
2015-06-26 16:58:18 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " Blutility " ) ) ;
}
2015-10-06 15:59:09 -04:00
2016-01-07 11:21:22 -05:00
// Needed for extra Blueprint nodes that can be used in standalone.
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " GameplayTagsEditor " ) ) ;
2014-03-14 14:13:41 -04:00
# endif //(WITH_EDITOR && !(UE_BUILD_SHIPPING || UE_BUILD_TEST))
2015-10-06 15:59:09 -04:00
# if WITH_ENGINE
// Load runtime client modules (which are also needed at cook-time)
if ( ! IsRunningDedicatedServer ( ) )
{
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " GameLiveStreaming " ) ) ;
}
# endif
2014-03-14 14:13:41 -04:00
return bSuccess ;
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
bool FEngineLoop : : LoadStartupModules ( )
{
2014-12-17 02:15:23 -05:00
FScopedSlowTask SlowTask ( 3 ) ;
SlowTask . EnterProgressFrame ( 1 ) ;
2014-03-14 14:13:41 -04:00
// Load any modules that want to be loaded before default modules are loaded up.
2014-07-30 13:16:05 -04:00
if ( ! IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : PreDefault ) | | ! IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : PreDefault ) )
2014-03-14 14:13:41 -04:00
{
return false ;
}
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 1 ) ;
2014-03-14 14:13:41 -04:00
// Load modules that are configured to load in the default phase
2014-07-30 13:16:05 -04:00
if ( ! IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : Default ) | | ! IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : Default ) )
2014-03-14 14:13:41 -04:00
{
return false ;
}
2014-12-17 02:15:23 -05:00
SlowTask . EnterProgressFrame ( 1 ) ;
2014-03-14 14:13:41 -04:00
// Load any modules that want to be loaded after default modules are loaded up.
2014-07-30 13:16:05 -04:00
if ( ! IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : PostDefault ) | | ! IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : PostDefault ) )
2014-03-14 14:13:41 -04:00
{
return false ;
}
return true ;
}
void FEngineLoop : : InitTime ( )
{
// Init variables used for benchmarking and ticking.
2014-04-23 18:12:58 -04:00
FApp : : SetCurrentTime ( FPlatformTime : : Seconds ( ) ) ;
2014-03-14 14:13:41 -04:00
MaxFrameCounter = 0 ;
MaxTickTime = 0 ;
TotalTickTime = 0 ;
LastFrameCycles = FPlatformTime : : Cycles ( ) ;
float FloatMaxTickTime = 0 ;
# if !UE_BUILD_SHIPPING
FParse : : Value ( FCommandLine : : Get ( ) , TEXT ( " SECONDS= " ) , FloatMaxTickTime ) ;
MaxTickTime = FloatMaxTickTime ;
2014-04-23 18:12:58 -04:00
// look of a version of seconds that only is applied if FApp::IsBenchmarking() is set. This makes it easier on
2014-03-14 14:13:41 -04:00
// say, iOS, where we have a toggle setting to enable benchmarking, but don't want to have to make user
// also disable the seconds setting as well. -seconds= will exit the app after time even if benchmarking
// is not enabled
// NOTE: This will override -seconds= if it's specified
2014-04-23 18:12:58 -04:00
if ( FApp : : IsBenchmarking ( ) )
2014-03-14 14:13:41 -04:00
{
if ( FParse : : Value ( FCommandLine : : Get ( ) , TEXT ( " BENCHMARKSECONDS= " ) , FloatMaxTickTime ) & & FloatMaxTickTime )
{
MaxTickTime = FloatMaxTickTime ;
}
}
// Use -FPS=X to override fixed tick rate if e.g. -BENCHMARK is used.
float FixedFPS = 0 ;
FParse : : Value ( FCommandLine : : Get ( ) , TEXT ( " FPS= " ) , FixedFPS ) ;
if ( FixedFPS > 0 )
{
2014-04-23 18:12:58 -04:00
FApp : : SetFixedDeltaTime ( 1 / FixedFPS ) ;
2014-03-14 14:13:41 -04:00
}
2014-04-02 18:09:23 -04:00
2014-03-14 14:13:41 -04:00
# endif // !UE_BUILD_SHIPPING
2014-04-23 18:12:58 -04:00
// convert FloatMaxTickTime into number of frames (using 1 / FApp::GetFixedDeltaTime() to convert fps to seconds )
2014-05-06 06:26:25 -04:00
MaxFrameCounter = FMath : : TruncToInt ( MaxTickTime / FApp : : GetFixedDeltaTime ( ) ) ;
2014-03-14 14:13:41 -04:00
}
//called via FCoreDelegates::StarvedGameLoop
void GameLoopIsStarved ( )
{
2014-07-15 07:34:34 -04:00
FlushPendingDeleteRHIResources_GameThread ( ) ;
2014-06-12 12:09:36 -04:00
FStats : : AdvanceFrame ( true , FStats : : FOnAdvanceRenderingThreadStats : : CreateStatic ( & AdvanceRenderingThreadStatsGT ) ) ;
2014-03-14 14:13:41 -04:00
}
int32 FEngineLoop : : Init ( )
{
2016-04-05 11:25:00 -04:00
CheckImageIntegrity ( ) ;
2015-06-19 14:09:20 -04:00
DECLARE_SCOPE_CYCLE_COUNTER ( TEXT ( " FEngineLoop::Init " ) , STAT_FEngineLoop_Init , STATGROUP_LoadTime ) ;
2014-10-08 04:42:34 -04:00
FScopedSlowTask SlowTask ( 100 ) ;
SlowTask . EnterProgressFrame ( 10 ) ;
2014-03-14 14:13:41 -04:00
// Figure out which UEngine variant to use.
2015-09-29 15:30:25 -04:00
UClass * EngineClass = nullptr ;
2014-03-14 14:13:41 -04:00
if ( ! GIsEditor )
{
// We're the game.
2015-09-29 15:30:25 -04:00
EngineClass = StaticLoadClass ( UGameEngine : : StaticClass ( ) , nullptr , TEXT ( " engine-ini:/Script/Engine.Engine.GameEngine " ) , nullptr , LOAD_None , nullptr ) ;
2015-02-03 05:40:57 -05:00
GEngine = NewObject < UEngine > ( GetTransientPackage ( ) , EngineClass ) ;
2014-03-14 14:13:41 -04:00
}
else
{
# if WITH_EDITOR
// We're UnrealEd.
2015-09-29 15:30:25 -04:00
EngineClass = StaticLoadClass ( UUnrealEdEngine : : StaticClass ( ) , nullptr , TEXT ( " engine-ini:/Script/Engine.Engine.UnrealEdEngine " ) , nullptr , LOAD_None , nullptr ) ;
2015-02-03 05:40:57 -05:00
GEngine = GEditor = GUnrealEd = NewObject < UUnrealEdEngine > ( GetTransientPackage ( ) , EngineClass ) ;
2014-03-14 14:13:41 -04:00
# else
check ( 0 ) ;
# endif
}
check ( GEngine ) ;
GetMoviePlayer ( ) - > PassLoadingScreenWindowBackToGame ( ) ;
GEngine - > ParseCommandline ( ) ;
InitTime ( ) ;
2014-10-08 04:42:34 -04:00
SlowTask . EnterProgressFrame ( 60 ) ;
2014-03-14 14:13:41 -04:00
GEngine - > Init ( this ) ;
2014-10-08 04:42:34 -04:00
SlowTask . EnterProgressFrame ( 30 ) ;
2016-02-08 13:35:28 -05:00
// initialize engine instance discovery
if ( FPlatformProcess : : SupportsMultithreading ( ) )
{
if ( ! IsRunningCommandlet ( ) )
{
SessionService = FModuleManager : : LoadModuleChecked < ISessionServicesModule > ( " SessionServices " ) . GetSessionService ( ) ;
SessionService - > Start ( ) ;
}
EngineService = new FEngineService ( ) ;
}
2014-07-10 21:04:34 -04:00
// Load all the post-engine init modules
2014-07-30 13:16:05 -04:00
if ( ! IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : PostEngineInit ) | | ! IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : PostEngineInit ) )
2014-07-10 21:04:34 -04:00
{
GIsRequestingExit = true ;
return 1 ;
}
2014-11-07 09:48:16 -05:00
2014-03-14 14:13:41 -04:00
GetMoviePlayer ( ) - > WaitForMovieToFinish ( ) ;
// initialize automation worker
# if WITH_AUTOMATION_WORKER
FModuleManager : : Get ( ) . LoadModule ( " AutomationWorker " ) ;
# endif
2015-08-28 13:23:02 -04:00
// Automation tests can be invoked locally in non-editor builds configuration (e.g. performance profiling in Test configuration)
# if WITH_ENGINE && !UE_BUILD_SHIPPING
2015-05-08 08:36:05 -04:00
FModuleManager : : Get ( ) . LoadModule ( " AutomationController " ) ;
FModuleManager : : GetModuleChecked < IAutomationControllerModule > ( " AutomationController " ) . Init ( ) ;
2015-08-28 13:23:02 -04:00
# endif
# if WITH_EDITOR
2015-05-08 08:36:05 -04:00
if ( GIsEditor )
2014-03-14 14:13:41 -04:00
{
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " ProfilerClient " ) ) ;
}
2016-04-05 11:25:00 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " SequenceRecorder " ) ) ;
Copying //UE4/Dev-Sequencer to //UE4/Main (Source: //UE4/Dev-Sequencer @ 2945541)
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2837601 on 2016/01/20 by Thomas.Sarkanen
Sequencer: Exposed bool, byte, event, fade, float, slomo, and visibility section keys in context menu
Change 2840895 on 2016/01/23 by Thomas.Sarkanen
Sequencer: Moved key proxy handling from section into key area; added support for grouped keys; exposed color properties in context menu.
Change 2901092 on 2016/03/09 by Thomas.Sarkanen
Sequencer: Fixed ensure() and crash when exiting PIE & then playing back in editor
Made sure that instances that are playing that have active montages can re-connect to a playing montage if it is already active. We dont stop/start preview/non-
preview playback when switching modes right now so I've just made the system robust to the switch when playing back animation.
Ensured that instances are kept up to date by hooking into EndPlayMapDelegate. This fires slightly later than OnEndPIE, so it allows us to pick up when instances
have been deleted from the world. OnEndPIE is fired before the worlds are shutdown so instances can still be bound to valid (but nearly dead) actors at this point.
#jira UE-27898
#jira UE-27899
Change 2901159 on 2016/03/09 by Chris.Bunner
Allow EXR frames from SaveHighResScreenshot to be uncompressed (r.SaveUncompressedEXRFrames).
Change 2903123 on 2016/03/10 by Max.Chen
Sequencer: Add snapping for the in/out range.
Change 2903126 on 2016/03/10 by Max.Chen
Sequencer: Fix split and trim for cinematic shot sections so that the start offset value is set.
Change 2903132 on 2016/03/10 by Max.Chen
Sequencer: Create camera here and set it as the current camera cut.
Change 2903138 on 2016/03/10 by Max.Chen
Sequencer: Improve mechanism for adding objects to Sequencer. Hold down shift while dragging from content browser to add as a spawnable. Hold down ctrl while
dragging from content browser to add as a possessable.
Change 2903143 on 2016/03/10 by Max.Chen
Sequencer: Add 4k to movie capture dialog.
#jira UE-28147
Change 2903157 on 2016/03/10 by Max.Chen
Sequencer: Pop out of locked camera when popping out of the sequence.
#jira UE-27662
Change 2908097 on 2016/03/14 by Andrew.Rodham
Sequencer: Added default viewport type onto the viewport types menu
- The activation command for a given viewport type no longer toggles it if it's already active, it will just do nothing.
- Switching back to the default viewport type can be achieved with SHIFT+D
Change 2911869 on 2016/03/16 by Max.Preussner
Editor: Caching device proxy manager, so the UI doesn't constantly poll for the TargetDeviceServices module
Change 2917943 on 2016/03/22 by Thomas.Sarkanen
Sequence Recording: Added "Record New Sequence From Current Player" to sub-sequence track menu
This option is only available in PIE. When selected it primes a new seciton for recording against the pawn that is currently being controlled by the player.
Change 2917946 on 2016/03/22 by Max.Chen
Sequencer: Automatically add and attach a cine camera when dropping a crane or rail.
Change 2917954 on 2016/03/22 by Thomas.Sarkanen
Fix anim dynamics going crazy on time skips
Added new API to FAnimNode_Base: NeedsDynamicReset and ResetDynamics.
This allows nodes that subscribe to this interface to be reset on teleport/time skips.
Call through to ResetDynamics on zero timestep (ie. skips) in the preview path in Sequencer.
Change 2917961 on 2016/03/22 by Frank.Fella
Sequencer - Sequencer - Update the color track code to match the behavior in matinee, also remove empty light color tracks from the sequence, and add a missing
particle parameter track.
Change 2917984 on 2016/03/22 by Max.Chen
Sequencer: Fix crash on deleting object binding nodes multiple times.
Change 2917986 on 2016/03/22 by Max.Chen
Sequencer: Fix if adding multiple camera cuts at the same time with the same duration as an existing camera cut. The camera is replaced in this case.
Change 2917994 on 2016/03/22 by Jeff.Farris
Support for scene depth picker. Used for focus depth sampling in cine cams.
Change 2918003 on 2016/03/22 by Max.Chen
Sequencer - Fix selection issues related to keying an undo by moving the selection clear on rebuild to after the tree selection state has been cached by path.
Change 2920371 on 2016/03/23 by Max.Preussner
UnrealEd: Added a file import path that doesn't load the entire file into memory prior to importing
UFactory::StaticImport will now call FactoryCreateFile for both text and binary files. The default implementation will load the file into a buffer/string and call
FactoryCreateBinary/FactoryCreateText to preserve legacy behavior. New factories may override FactoryCreateFile to perform their own file processing instead.
Change 2923359 on 2016/03/25 by Max.Preussner
UnrealEd: Refactored out StaticImportObject code into ImportObject
Change 2924887 on 2016/03/28 by Jeff.Farris
Sequencer: Camera Anim and Camera Shake tracks now support PostProcess changes in the CameraAnim
Change 2927283 on 2016/03/30 by Max.Chen
Sequencer: Fix crash resetting default in audio track in sequencer. Fix audio track rename when adding another audio.
#jira UE-28836, UE-28859
Change 2928290 on 2016/03/30 by Max.Preussner
ContentBrowser: Disabling 'Show in Explorer' context menu option for newly created/unsaved asset(s)
Change 2928480 on 2016/03/30 by Max.Preussner
AssetTools: Added built-in type category for Media assets
Change 2928498 on 2016/03/30 by Max.Preussner
AssetTools: Sorting asset type categories alphabetically
Change 2932326 on 2016/04/04 by Frank.Fella
Sequencer - Add "paste from matinee" support for audio tracks, and add volume support to audio sections in sequencer.
Change 2933917 on 2016/04/05 by Max.Preussner
Core: Added microseconds support to FTimespan
Change 2933920 on 2016/04/05 by Max.Preussner
Sockets: Simplified socket timeout assignments
Change 2935434 on 2016/04/06 by Max.Chen
Sequencer: Deselect possessable before converting it to a spawnable and deleting it. Also, make sure the newly converted spawnables are selected. This fixes a bug
where the transform gizmo remains after adding a spawnable.
Also, consolidate code for adding possessables to sequencer so that the newly added possessable node will be selected in the widget tree.
#jira UE-28215
Change 2935590 on 2016/04/06 by Jeff.Farris
Made crane rig preview mesh at the tip move as expected and appear in a reasonable place.
Change 2936082 on 2016/04/07 by Max.Chen
Sequencer: Attach should use default attach component of the actor if it exists. This fixes a bug where trying to attach to a camera crane rig attaches to the
proper component.
Change 2936118 on 2016/04/07 by Max.Chen
Sequencer: Adding crane/rail with shift now adds the crane/rig as a spawnable and the attached cine camera as a spawnable. An attach track is created for the cine
camera spawnable.
#jira UE-28308
Change 2937226 on 2016/04/07 by Max.Chen
Sequencer: Add invalidation when levels are added or removed.This fixes a bug were if you have a level sequence open and then add a sublevel that the level
sequence operates on, it correctly updates the actors from the new sub level.
#jira UE-27595
Change 2937263 on 2016/04/07 by Frank.Fella
Sequencer - Changed the matinee to sequencer conversion tools so that curve keys set to "clamped auto" import as user tangents since we don't support clamped auto
in sequencer.
Change 2937273 on 2016/04/07 by Max.Chen
Sequencer: No longer experimental/betal and now enabled by default.
#jira UETOOl-625
Change 2937694 on 2016/04/08 by Max.Chen
Curve Editor: Separate out input and output snapping.
#jira UE-27209
Change 2937852 on 2016/04/08 by Andrew.Rodham
Sequencer: Spawnables no longer use generated classes
- Spawnables now store a template actor instance, rather than a generated class
- All relevant code has been converted to use this new approach
- Spawnable defaults are now harvested directly from any spawned instances when the movie scene is saved, or when the object is de-spawned. We only do this for
spawnables *in the currently active sequence instance*. This approach ensures that instance components and other properties persist.
- Currently we don't mark the package as dirty when the defaults are changed. This needs to be addressed.
- Some fixes have been made to AActor and Actor Iterators to ensure that actors not contained within a level do not crash.
- Spawning optimisations to follow
Change 2937956 on 2016/04/08 by Max.Preussner
Sequencer: Added selection range commands to general toolbar menu
Change 2937981 on 2016/04/08 by Max.Preussner
Sequencer: Refactored GetKeyHandles to take a time range for filtering keys
Change 2938007 on 2016/04/08 by Max.Preussner
Sequencer: Implemented selection range key selection
Change 2938184 on 2016/04/08 by Max.Chen
Sequencer: Find in Content Browser is now in the top level menubar.
#jira UE-21598
Change 2938665 on 2016/04/08 by Frank.Fella
UMG - Add support for material animation.
Change 2939048 on 2016/04/10 by Max.Chen
CineCamera: Change current position on rail to normalize position.
Change 2939067 on 2016/04/10 by Max.Chen
Sequencer: Add paste color from matinee
Change 2939587 on 2016/04/11 by Andrew.Rodham
Sequencer: Fixes to spawnable rework
- Removed commented out code.
- Fixed particle system components not disabling auto activate.
- Instance Components are now correctly registered on spawn.
- Removed ability to set the editable flag on actors in favor of a delegate assigned to SActorDetails to disable property editing on actors spawned from outside
of the currently focused sequence.
Change 2939666 on 2016/04/11 by Andrew.Rodham
Sequencer: Fixed active sequence ID not being set on creation
Change 2940663 on 2016/04/12 by Andrew.Rodham
Sequencer: Spawnable object templates now always have the RF_ArchetypeObject flag
#jira UE-29337, UE-29339
Change 2940742 on 2016/04/12 by Thomas.Sarkanen
Improvements to sequence recording API
Sequence recording is now more extensible.
Moved the majority of recorders into a seperate module.
Cleaned up recorder API, removed bRecord that was only really used once.
Added factory class as a modular feature that allows users to register and implement their own recorders.
Recorders can supply their own settings classes. These are incorporated into the UI via a details customization so they appear to be seamlessly integrated.
Exposed components to record as an advanced setting. Users can use this to gate the components and actors that are recorded.
#jira UE-28850 - Update sequence recording API for better extensibility
Change 2940828 on 2016/04/12 by Max.Chen
Level Editor: Clear the camera preview if the level viewport is locked to the same camera.
#jira UE-27489
Change 2941090 on 2016/04/12 by Frank.Fella
Sequencer - Fix inconsistencies with the level visibility track.
+ Add an option to update a track instance when it stops playing due to it's parent movie scene being deactivated as a sub-scene.
+ Reset level visibility state when the section ends, or when it's parent subsection ends.
Change 2941427 on 2016/04/12 by Andrew.Rodham
Sequencer: Fixes for recorded dynamic components
- Dynamic components are now named uniquely within their owner actor, and are no longer re-bound to new object tracks when detached/re-attached
- New dynamic components are created every time a new component is detected on an actor, regardless of whether it was once attached before. This affords
recording externally managed components from a component pool.
- Section recorders for components that are no longer attached to the actor are now disabled correctly.
Change 2941760 on 2016/04/12 by Max.Preussner
Editor: Setting up correct material expresions when creating material from normal map texture
Change 2941819 on 2016/04/13 by Max.Chen
Sequencer: Fire named events in all sublevels.
#jira UE-28843
Change 2942052 on 2016/04/13 by Andrew.Rodham
Sequencer: Fixed not being able to add dynamic material parameter tracks to spawnables when the object is not spawned
#jira UE-24287
Change 2942223 on 2016/04/13 by Max.Preussner
Editor: Using built-in function to assign sampler format
Change 2942833 on 2016/04/13 by Max.Chen
Sequencer: More copy matinee helpers.
- Make some sections infinite.
- Fix FindPossessableObjectId
- Expose FindGroupByName
Change 2942944 on 2016/04/13 by Max.Chen
Sequencer: Fix anim copy so that it doesn't create an animation clip longer than the next clip's start position.
Change 2943313 on 2016/04/14 by Max.Chen
Sequencer: Initial matinee to level sequence asset converter. Right click on a matinee actor in the level and choose "Convert to Level Sequence"
Current supports:
- movement tracks
- generic property tracks
- particle tracks
- anim control tracks
- event tracks
- audio tracks
- visibility track
- director track (fade, slomo, camera cuts)
Possible todos:
- Relative scale3D
- Option to create spawnables instead of possessables
- Create shots per director track camera cut instead of a direct translation to the camera cut track
#jira UETOOL-467
Change 2943596 on 2016/04/14 by Andrew.Rodham
Editor: Fixed placement mode scrollbar visibility not working for custom content
#jira UE-27191
Change 2943651 on 2016/04/14 by Max.Chen
Sequencer: Invalidate the audio waveform when the source changes.
#jira UE-29394
Change 2943674 on 2016/04/14 by Max.Chen
Sequencer: Store/restore playback state when rebuilding.
#jira UE-29452
Change 2943993 on 2016/04/14 by Max.Chen
Sequencer: Convert slot name from matinee to level sequence.
Change 2944156 on 2016/04/14 by Frank.Fella
Sequencer - Fix undo when moving items into folders, and when deleting folder.
#jira UE-27368
Change 2944227 on 2016/04/14 by Max.Chen
Sequencer: Show curves in the curve editor if one of the parent nodes is selected. For example, if Location is selected, show Location.X, Location.Y, and
Location.Z
Change 2945057 on 2016/04/15 by Andrew.Rodham
Editor: Fixed placement mode scrollbar visibility not working for custom content
#jira UE-27191
#lockdown nick.penwarden
[CL 2945551 by Max Chen in Main branch]
2016-04-15 14:50:58 -04:00
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " SequenceRecorderSections " ) ) ;
2015-05-08 10:54:00 -04:00
# endif
2014-03-14 14:13:41 -04:00
GIsRunning = true ;
if ( ! GIsEditor )
{
// hide a couple frames worth of rendering
FViewport : : SetGameRenderingEnabled ( true , 3 ) ;
}
// Begin the async platform hardware survey
2016-04-05 11:25:00 -04:00
GEngine - > StartHardwareSurvey ( ) ;
2014-03-14 14:13:41 -04:00
FCoreDelegates : : StarvedGameLoop . BindStatic ( & GameLoopIsStarved ) ;
2016-04-05 11:25:00 -04:00
// Ready to measure thread heartbeat
FThreadHeartBeat : : Get ( ) . Start ( ) ;
2014-03-14 14:13:41 -04:00
return 0 ;
}
void FEngineLoop : : Exit ( )
{
2015-06-24 09:48:05 -04:00
STAT_ADD_CUSTOMMESSAGE_NAME ( STAT_NamedMarker , TEXT ( " EngineLoop.Exit " ) ) ;
2014-03-14 14:13:41 -04:00
GIsRunning = 0 ;
2015-09-29 15:30:25 -04:00
GLogConsole = nullptr ;
2014-03-14 14:13:41 -04:00
2014-10-14 10:29:46 -04:00
// shutdown visual logger and flush all data
# if ENABLE_VISUAL_LOG
FVisualLogger : : Get ( ) . Shutdown ( ) ;
# endif
2014-09-30 15:44:12 -04:00
GetMoviePlayer ( ) - > Shutdown ( ) ;
2014-03-14 14:13:41 -04:00
// Make sure we're not in the middle of loading something.
FlushAsyncLoading ( ) ;
// Block till all outstanding resource streaming requests are fulfilled.
2014-05-07 09:39:27 -04:00
if ( ! IStreamingManager : : HasShutdown ( ) )
2014-03-14 14:13:41 -04:00
{
UTexture2D : : CancelPendingTextureStreaming ( ) ;
2014-05-07 09:39:27 -04:00
IStreamingManager : : Get ( ) . BlockTillAllRequestsFinished ( ) ;
2014-03-14 14:13:41 -04:00
}
# if WITH_ENGINE
// shut down messaging
delete EngineService ;
2015-09-29 15:30:25 -04:00
EngineService = nullptr ;
2014-03-14 14:13:41 -04:00
if ( SessionService . IsValid ( ) )
{
SessionService - > Stop ( ) ;
SessionService . Reset ( ) ;
}
2014-08-28 13:54:31 -04:00
if ( GDistanceFieldAsyncQueue )
{
GDistanceFieldAsyncQueue - > Shutdown ( ) ;
delete GDistanceFieldAsyncQueue ;
}
2014-03-14 14:13:41 -04:00
# endif // WITH_ENGINE
2015-09-29 15:30:25 -04:00
MALLOC_PROFILER ( GEngine - > Exec ( nullptr , TEXT ( " MPROF STOP " ) ) ; )
2014-03-14 14:13:41 -04:00
2015-09-29 15:30:25 -04:00
if ( GEngine ! = nullptr )
2014-03-14 14:13:41 -04:00
{
2015-03-12 12:59:33 -04:00
GEngine - > ShutdownAudioDeviceManager ( ) ;
2014-03-14 14:13:41 -04:00
}
2015-09-29 15:30:25 -04:00
if ( GEngine ! = nullptr )
2014-03-14 14:13:41 -04:00
{
GEngine - > PreExit ( ) ;
}
2014-11-05 13:10:54 -05:00
# if !UE_SERVER
2014-11-10 13:33:10 -05:00
if ( FEngineFontServices : : IsInitialized ( ) )
{
FEngineFontServices : : Destroy ( ) ;
}
2014-11-05 13:10:54 -05:00
# endif
2014-10-21 13:39:30 -04:00
// close all windows
FSlateApplication : : Shutdown ( ) ;
2016-02-19 13:49:13 -05:00
# if !PLATFORM_ANDROID // AppPreExit doesn't work on Android
2014-10-30 12:29:17 -04:00
AppPreExit ( ) ;
2014-03-14 14:13:41 -04:00
TermGamePhys ( ) ;
ParticleVertexFactoryPool_FreePool ( ) ;
2016-02-19 13:49:13 -05:00
# endif // !ANDROID
2014-03-14 14:13:41 -04:00
// Stop the rendering thread.
StopRenderingThread ( ) ;
// Tear down the RHI.
2015-08-13 10:53:13 -04:00
RHIExitAndStopRHIThread ( ) ;
2014-03-14 14:13:41 -04:00
2016-02-19 13:49:13 -05:00
# if !PLATFORM_ANDROID // UnloadModules doesn't work on Android
2014-09-05 12:46:22 -04:00
# if WITH_ENGINE
// Save the hot reload state
IHotReloadInterface * HotReload = IHotReloadInterface : : GetPtr ( ) ;
if ( HotReload ! = nullptr )
{
HotReload - > SaveConfig ( ) ;
}
# endif
2014-03-14 14:13:41 -04:00
// Unload all modules. Note that this doesn't actually unload the module DLLs (that happens at
// process exit by the OS), but it does call ShutdownModule() on all loaded modules in the reverse
// order they were loaded in, so that systems can unregister and perform general clean up.
FModuleManager : : Get ( ) . UnloadModulesAtShutdown ( ) ;
2016-02-19 13:49:13 -05:00
# endif // !ANDROID
2014-03-14 14:13:41 -04:00
2015-06-19 14:09:20 -04:00
// Move earlier?
2014-03-14 14:13:41 -04:00
# if STATS
FThreadStats : : StopThread ( ) ;
# endif
FTaskGraphInterface : : Shutdown ( ) ;
2014-05-07 09:39:27 -04:00
IStreamingManager : : Shutdown ( ) ;
2014-03-14 14:13:41 -04:00
FIOSystem : : Shutdown ( ) ;
}
2015-09-29 15:30:25 -04:00
2015-02-23 15:58:14 -05:00
void FEngineLoop : : ProcessLocalPlayerSlateOperations ( ) const
2014-09-18 17:01:00 -04:00
{
FSlateApplication & SlateApp = FSlateApplication : : Get ( ) ;
// For all the game worlds drill down to the player controller for each game viewport and process it's slate operation
2015-02-23 15:58:14 -05:00
for ( const FWorldContext & Context : GEngine - > GetWorldContexts ( ) )
2014-09-18 17:01:00 -04:00
{
UWorld * CurWorld = Context . World ( ) ;
2015-02-23 15:58:14 -05:00
if ( CurWorld & & CurWorld - > IsGameWorld ( ) )
2014-09-18 17:01:00 -04:00
{
UGameViewportClient * GameViewportClient = CurWorld - > GetGameViewport ( ) ;
2015-02-23 15:58:14 -05:00
TSharedPtr < SViewport > ViewportWidget = GameViewportClient ? GameViewportClient - > GetGameViewportWidget ( ) : nullptr ;
if ( ViewportWidget . IsValid ( ) )
2014-09-18 17:01:00 -04:00
{
2015-02-23 15:58:14 -05:00
for ( FConstPlayerControllerIterator Iterator = CurWorld - > GetPlayerControllerIterator ( ) ; Iterator ; + + Iterator )
2014-09-18 17:01:00 -04:00
{
2015-02-23 15:58:14 -05:00
APlayerController * PlayerController = * Iterator ;
if ( PlayerController )
2014-09-18 17:01:00 -04:00
{
2015-02-23 15:58:14 -05:00
ULocalPlayer * LocalPlayer = Cast < ULocalPlayer > ( PlayerController - > Player ) ;
if ( LocalPlayer )
{
FReply & TheReply = LocalPlayer - > GetSlateOperations ( ) ;
2014-09-18 17:01:00 -04:00
2015-02-23 15:58:14 -05:00
FWidgetPath PathToWidget ;
SlateApp . GeneratePathToWidgetUnchecked ( ViewportWidget . ToSharedRef ( ) , PathToWidget ) ;
2014-09-18 17:01:00 -04:00
2015-02-23 15:58:14 -05:00
SlateApp . ProcessReply ( PathToWidget , TheReply , nullptr , nullptr , LocalPlayer - > GetControllerId ( ) ) ;
2014-09-18 17:01:00 -04:00
2015-02-23 15:58:14 -05:00
TheReply = FReply : : Unhandled ( ) ;
}
2014-09-18 17:01:00 -04:00
}
}
}
}
}
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
bool FEngineLoop : : ShouldUseIdleMode ( ) const
{
static const auto CVarIdleWhenNotForeground = IConsoleManager : : Get ( ) . FindTConsoleVariableDataInt ( TEXT ( " t.IdleWhenNotForeground " ) ) ;
bool bIdleMode = false ;
2014-05-16 11:42:50 -04:00
// Yield cpu usage if desired
if ( FApp : : IsGame ( )
2014-03-14 14:13:41 -04:00
& & FPlatformProperties : : SupportsWindowedMode ( )
2014-05-16 11:42:50 -04:00
& & CVarIdleWhenNotForeground - > GetValueOnGameThread ( )
2014-03-14 14:13:41 -04:00
& & ! FPlatformProcess : : IsThisApplicationForeground ( ) )
{
bIdleMode = true ;
2014-06-27 15:53:24 -04:00
for ( const FWorldContext & Context : GEngine - > GetWorldContexts ( ) )
2014-03-14 14:13:41 -04:00
{
2014-06-27 15:53:24 -04:00
if ( ! Context . World ( ) - > AreAlwaysLoadedLevelsLoaded ( ) )
2014-03-14 14:13:41 -04:00
{
bIdleMode = false ;
break ;
}
}
}
return bIdleMode ;
}
2015-09-16 10:18:31 -04:00
# if !UE_BUILD_SHIPPING && !UE_BUILD_TEST
# include "StackTracker.h"
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn (
TEXT ( " LogGameThreadMallocChurn.Enable " ) ,
0 ,
TEXT ( " If > 0, then collect sample game thread malloc, realloc and free, periodically print a report of the worst offenders. " ) ) ;
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn_PrintFrequency (
TEXT ( " LogGameThreadMallocChurn.PrintFrequency " ) ,
300 ,
TEXT ( " Number of frames between churn reports. " ) ) ;
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn_Threshhold (
TEXT ( " LogGameThreadMallocChurn.Threshhold " ) ,
10 ,
TEXT ( " Minimum average number of allocs per frame to include in the report. " ) ) ;
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn_SampleFrequency (
TEXT ( " LogGameThreadMallocChurn.SampleFrequency " ) ,
100 ,
TEXT ( " Number of allocs to skip between samples. This is used to prevent churn sampling from slowing the game down too much. " ) ) ;
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn_StackIgnore (
TEXT ( " LogGameThreadMallocChurn.StackIgnore " ) ,
2 ,
TEXT ( " Number of items to discard from the top of a stack frame. " ) ) ;
2015-10-28 08:58:16 -04:00
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn_RemoveAliases (
TEXT ( " LogGameThreadMallocChurn.RemoveAliases " ) ,
1 ,
TEXT ( " If > 0 then remove aliases from the counting process. This essentialy merges addresses that have the same human readable string. It is slower. " ) ) ;
2015-09-16 10:18:31 -04:00
static TAutoConsoleVariable < int32 > CVarLogGameThreadMallocChurn_StackLen (
TEXT ( " LogGameThreadMallocChurn.StackLen " ) ,
3 ,
TEXT ( " Maximum number of stack frame items to keep. This improves aggregation because calls that originate from multiple places but end up in the same place will be accounted together. " ) ) ;
extern CORE_API TFunction < void ( int32 ) > * GGameThreadMallocHook ;
struct FScopedSampleMallocChurn
{
static FStackTracker GGameThreadMallocChurnTracker ;
static uint64 DumpFrame ;
bool bEnabled ;
int32 CountDown ;
TFunction < void ( int32 ) > Hook ;
FScopedSampleMallocChurn ( )
: bEnabled ( CVarLogGameThreadMallocChurn . GetValueOnGameThread ( ) > 0 )
, CountDown ( CVarLogGameThreadMallocChurn_SampleFrequency . GetValueOnGameThread ( ) )
, Hook (
[ this ] ( int32 Index )
{
if ( - - CountDown < = 0 )
{
CountDown = CVarLogGameThreadMallocChurn_SampleFrequency . GetValueOnGameThread ( ) ;
CollectSample ( ) ;
}
}
)
{
if ( bEnabled )
{
check ( IsInGameThread ( ) ) ;
check ( ! GGameThreadMallocHook ) ;
if ( ! DumpFrame )
{
DumpFrame = GFrameCounter + CVarLogGameThreadMallocChurn_PrintFrequency . GetValueOnGameThread ( ) ;
GGameThreadMallocChurnTracker . ResetTracking ( ) ;
}
GGameThreadMallocChurnTracker . ToggleTracking ( true , true ) ;
GGameThreadMallocHook = & Hook ;
}
else
{
check ( IsInGameThread ( ) ) ;
GGameThreadMallocChurnTracker . ToggleTracking ( false , true ) ;
if ( DumpFrame )
{
DumpFrame = 0 ;
GGameThreadMallocChurnTracker . ResetTracking ( ) ;
}
}
}
~ FScopedSampleMallocChurn ( )
{
if ( bEnabled )
{
check ( IsInGameThread ( ) ) ;
check ( GGameThreadMallocHook = = & Hook ) ;
GGameThreadMallocHook = nullptr ;
GGameThreadMallocChurnTracker . ToggleTracking ( false , true ) ;
check ( DumpFrame ) ;
if ( GFrameCounter > DumpFrame )
{
PrintResultsAndReset ( ) ;
}
}
}
void CollectSample ( )
{
check ( IsInGameThread ( ) ) ;
2015-10-28 08:58:16 -04:00
GGameThreadMallocChurnTracker . CaptureStackTrace ( CVarLogGameThreadMallocChurn_StackIgnore . GetValueOnGameThread ( ) , nullptr , CVarLogGameThreadMallocChurn_StackLen . GetValueOnGameThread ( ) , CVarLogGameThreadMallocChurn_RemoveAliases . GetValueOnGameThread ( ) > 0 ) ;
2015-09-16 10:18:31 -04:00
}
void PrintResultsAndReset ( )
{
DumpFrame = GFrameCounter + CVarLogGameThreadMallocChurn_PrintFrequency . GetValueOnGameThread ( ) ;
FOutputDeviceRedirector * Log = FOutputDeviceRedirector : : Get ( ) ;
float SampleAndFrameCorrection = float ( CVarLogGameThreadMallocChurn_SampleFrequency . GetValueOnGameThread ( ) ) / float ( CVarLogGameThreadMallocChurn_PrintFrequency . GetValueOnGameThread ( ) ) ;
GGameThreadMallocChurnTracker . DumpStackTraces ( CVarLogGameThreadMallocChurn_Threshhold . GetValueOnGameThread ( ) , * Log , SampleAndFrameCorrection ) ;
GGameThreadMallocChurnTracker . ResetTracking ( ) ;
}
} ;
FStackTracker FScopedSampleMallocChurn : : GGameThreadMallocChurnTracker ;
uint64 FScopedSampleMallocChurn : : DumpFrame = 0 ;
# endif
2014-03-14 14:13:41 -04:00
void FEngineLoop : : Tick ( )
{
2015-09-16 10:18:31 -04:00
# if !UE_BUILD_SHIPPING && !UE_BUILD_TEST
FScopedSampleMallocChurn ChurnTracker ;
# endif
2016-04-05 11:25:00 -04:00
// Send a heartbeat for the diagnostics thread
FThreadHeartBeat : : Get ( ) . HeartBeat ( ) ;
2014-11-14 14:38:40 -05:00
// Ensure we aren't starting a frame while loading or playing a loading movie
ensure ( GetMoviePlayer ( ) - > IsLoadingFinished ( ) & & ! GetMoviePlayer ( ) - > IsMovieCurrentlyPlaying ( ) ) ;
2014-03-14 14:13:41 -04:00
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown ben.marsh
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2733540 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Capsule shadows
* Capsule shadows excel at extremely soft area shadows caused by a large light source angle, but don't support accurate self-shadowing
* Artists can setup a physics asset containing Spheres and Sphyls (capsules) for a skeletal mesh that will be used to represent the mesh's occlusion
* These shapes can then be used for direct shadowing (bCastCapsuleDirectShadow) on a skeletal mesh component, whose softness depends on the light source angle / radius
* The shapes can also be used to create an indirect shadow (bCastCapsuleIndirectShadow), whose direction and softness is derived from the precomputed sky occlusion (stationary sky light) or primary indirect lighting (static sky light)
* Capsule shadowing is computed at half res and uses tiled deferred culling for efficiency - only implemented for PC SM5 + PS4 so far
* Shadowing of movable skylights is not yet supported
Change 2735460 on 2015/10/20 by Uriel.Doyon@uriel.doyon_office_data
Basepass drawlist are now merged within a single drawlist.
Lighting policy parameters are now accessed through a uniform buffer.
Changed the global resource initialization so that InitRHI now comes before InitDynamicRHI
#codereview nick.penwarden
Change 2744741 on 2015/10/28 by Nick.Penwarden@nickp_streams
Remove unused RHI methods:
RHIIsDrawingViewport
RHIGpuTimeBegin
RHIGpuTimeEnd
Made default/empty versions of these calls and removed stubs from RHIs that don't use them:
RHISuspendRendering
RHIResumeRendering
RHIIsRenderingSuspended
Change 2745714 on 2015/10/28 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Lighting channels - each component and light can choose from 3 channels
* Primitives output their channel mask to stencil during the base pass, the masks are copied to a texture after the base pass, deferred lighting passes compare the primitive mask against the light's mask
* Dynamic shadow casting also respects the channels
* Only works on opaque materials, direct lighting, dynamic lighting
* Not implemented for tiled deferred atm
* This will replace CastsShadowsFromCinematicObjectsOnly in the future
#rb Martin.Mittring
Change 2746243 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New
First pass at separate Async Compute Context
#codereview Lee.Clark,Daniel.Wright
#rb Gil.Gribb
Change 2746989 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering
Removed a lot of complexity of the skeletal mesh motionblur code (better for multithreading, simpler, faster) but going from one large buffer to per mesh buffers. Upload of bones only needed once.
* GPUSkinCache didn't even work before (in this branch)
* tested BasePass velocity
* tested split screen
* tested editor pause
* matinee camera cut (no need, invalidates velocity)
* tested CPU Skin? (never has motionblur)
* tested CreateSceneProxy (recreation is prevented in CreteSceneProxy unless bone count changes)
* test ES2 -featureleveles2
#rb: Rolando.Caloca
Change 2750734 on 2015/11/02 by Uriel.Doyon@uriel.doyon_office_data
Embree integration into Lightmass
Can be enabled through Lightmass.ini [DevOptions.StaticLighting]bUseEmbree.
Also [DevOptions.StaticLighting]bVerifyEmbree will compare ray casting results.
Only usable on Win64 with this submit.
#review daniel.wright
Change 2752730 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering
added SSAO CS version, can be enabled with
r.AmbientOcclusion.Compute 1
Not optimized yet
#rb:Olaf.Piesche
Change 2752766 on 2015/11/03 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Lightmass solver quality improvements
* IndirectLightingScale is no longer applied to photons, avoids splotchy artifacts when using small scales
* New 'Lightmass Portal' actor / component which tells the solver where to look for significant lighting. When lighting with a Static Skylight only, in a mostly indoor environment, setting up these portals is the only way to get high quality.
* Skylight bounce lighting is now much more accurate and leverages adaptive sampling
* Fixed a bug that effectively disabled adaptive sampling on high IndirectLightingQualities
* Shadow penumbras are also improved by IndirectLightingQuality
* Texel debugging is now a cvar 'r.TexelDebugging', instead of requiring a full recompile
Change 2754018 on 2015/11/04 by Uriel.Doyon@uriel.doyon_office_data
Quad Complexity ViewMode (PCD3D_SM5 only).
Shader Complexity with Quad Overhead ViewMode (PCD3D_SM5 only). Require ShaderComplexity ViewMode & Show.Visualize.QuadOverhead
#review brian.karis
Change 2754760 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering
improved SSAO quality (less high frequency noise) to avoid TemporalAA smearing
Change 2756308 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S
DevRendering - Enable removing unused outputs on PS4 shader pipelines, disable by default removing unused on D3D (toggable with r.D3DRemoveUnusedInterpolators)
#codereview Marcus.Wassmer
Change 2757063 on 2015/11/06 by Simon.Tovey@Simon.Tovey_Dev
Submitting pull request from user Pierdek.
Early out of particle collision module update if there are no active particles.
#github
#1614
Change 2757340 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering
UE4 - Fixed the experimental r.RHICmdBalanceParallelLists 2 mode and renabled it for orion.
Change 2757343 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering
UE4 - Added a path so that texture streaming can avoid flushing the RHI thread.
Change 2757985 on 2015/11/06 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream
Added new PrimitiveComponent setting bSingleSampleShadowFromStationaryLights
* When enabled, shadowing of a movable component from a stationary directional light will come from the Volume Lighting Samples precomputed by Lightmass
* This provides essentially free on/off shadow receiving on dynamic objects, with a fade over time between states
* Lighting has to be rebuilt once for this to work
#rb Rolando.Caloca
Change 2759058 on 2015/11/09 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering
UE4 - Dynamically set stream source to avoid creating a separate drawing policy for each static mesh with vertex colors.
#rb Daniel.Wright
Change 2760523 on 2015/11/10 by Uriel.Doyon@uriel.doyon_office_data
Enabled Embree by default
#review daniel.wright
==========================
ALL CHANGELISTS
==========================
Change 2720123 on 2015/10/07 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - 'integrate' Tem'
Change 2721682 on 2015/10/08 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Eliminated a fatal error '
Change 2721815 on 2015/10/08 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - Fix crash exiti'
Change 2724755 on 2015/10/12 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - D3D12 Fix Tier'
Change 2724781 on 2015/10/12 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - D3D12 Fix offse'
Change 2728317 on 2015/10/14 by Rolando.Caloca@Rolando.Caloca_T4688_5331 'Dev-Rendering - hlslcc - Fix fo'
Change 2729170 on 2015/10/14 by Chris.Bunner@Chris.Bunner_Dev_Stream 'Force Lightmass volume sample g'
Change 2732131 on 2015/10/16 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'fixed resource transition issue'
Change 2732218 on 2015/10/16 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor code cleanup '
Change 2733533 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Clear stencil to 0 after decals'
Change 2733540 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Capsule shadows * Capsule shado'
Change 2733546 on 2015/10/19 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Light shaft targets are only al'
Change 2733602 on 2015/10/19 by Uriel.Doyon@uriel.doyon_office_data 'Decals not writing to Normal ca'
Change 2733627 on 2015/10/19 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix for transition ensure. '
Change 2735292 on 2015/10/20 by Brian.Karis@Brian.Karis_T3247_Rendering 'Fix for dark lightmap precision'
Change 2735298 on 2015/10/20 by Brian.Karis@Brian.Karis_T3247_Rendering 'Fix for speedtree LOD transitio'
Change 2735460 on 2015/10/20 by Uriel.Doyon@uriel.doyon_office_data 'Basepass drawlist are now merge'
Change 2737214 on 2015/10/21 by Chris.Bunner@Chris.Bunner_Dev_Stream 'Expanded a warning when importi'
Change 2738581 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Updated comment on stencil usag'
Change 2738583 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Changed bound but not set scene'
Change 2738584 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fixed skylight occlusion maps b'
Change 2738589 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Lightmap streaming fixes * Chan'
Change 2738593 on 2015/10/22 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fix from licensee for race cond'
Change 2738982 on 2015/10/22 by Olaf.Piesche@Olaf.Piesche_roaming 'Activating CanTickOnAnyThread f'
Change 2739032 on 2015/10/22 by Olaf.Piesche@Olaf.Piesche_roaming 'Fixing compiler barf with Clang'
Change 2741517 on 2015/10/26 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRindering - D3D12 - Integrat'
Change 2743790 on 2015/10/27 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fixed texel debugging on static'
Change 2743958 on 2015/10/27 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comments '
Change 2744153 on 2015/10/27 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Unity compile fix '
Change 2744741 on 2015/10/28 by Nick.Penwarden@nickp_streams 'Remove unused RHI methods: RHI'
Change 2745714 on 2015/10/28 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Lighting channels - each compon'
Change 2746242 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix crashes on init by swapping'
Change 2746243 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'First pass at separate Async Co'
Change 2746296 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Buffer label frees so we don't '
Change 2746297 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'updated comment '
Change 2746343 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comment '
Change 2746347 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comment '
Change 2746811 on 2015/10/29 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Draw event for compute commandl'
Change 2746989 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'Removed a lot of complexity of '
Change 2747127 on 2015/10/29 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'Improved game console printout '
Change 2747702 on 2015/10/30 by Chris.Bunner@Chris.Bunner_Dev_Stream 'Bumped Lightmass StaticMesh imp'
Change 2747954 on 2015/10/30 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix SubmitDone not called TRC e'
Change 2747979 on 2015/10/30 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'polish console autocomplete tex'
Change 2750719 on 2015/11/02 by Uriel.Doyon@uriel.doyon_office_data 'Add Embree 2.7.0 for Win64 and '
Change 2750734 on 2015/11/02 by Uriel.Doyon@uriel.doyon_office_data 'Embree integration into Lightma'
Change 2750872 on 2015/11/02 by Nick.Penwarden@nickp_streams 'Merging //UE4/Dev-Main to Dev-R'
Change 2751934 on 2015/11/03 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Disambiguate template function '
Change 2752190 on 2015/11/03 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed assert relating to '
Change 2752333 on 2015/11/03 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Shader pipeline '
Change 2752655 on 2015/11/03 by Rolando.Caloca@Rolando.Caloca_T3903_S 'DevRendering - Fix Materials pa'
Change 2752710 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added comment '
Change 2752711 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added better comment/help text '
Change 2752730 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'added SSAO CS version, can be e'
Change 2752766 on 2015/11/03 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Lightmass solver quality improv'
Change 2752869 on 2015/11/03 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Add shader pipel'
Change 2752882 on 2015/11/03 by Rolando.Caloca@Rolando.Caloca_T3903_S 'DevRendering - hlslcc - Metal -'
Change 2752899 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'small SSAO GPU optimization mov'
Change 2752934 on 2015/11/03 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor GPU optimization for SSAO'
Change 2753109 on 2015/11/03 by Uriel.Doyon@uriel.doyon_office_data 'Fixed final build '
Change 2753669 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'fixed SM4 compiling '
Change 2754002 on 2015/11/04 by Nick.Penwarden@nickp_streams 'test change '
Change 2754018 on 2015/11/04 by Uriel.Doyon@uriel.doyon_office_data 'Quad Complexity ViewMode (PCD3D'
Change 2754115 on 2015/11/04 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed end of frame update'
Change 2754297 on 2015/11/04 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'PS4 compile fixes #codereview U'
Change 2754405 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor SSAO ALU optimizations fi'
Change 2754512 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'adjusted clamp for cvar '
Change 2754760 on 2015/11/04 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'improved SSAO quality (less hig'
Change 2755572 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - PS4 warning fix '
Change 2755667 on 2015/11/05 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed UE-22742, leak in t'
Change 2755722 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Remove unused co'
Change 2755814 on 2015/11/05 by Nick.Penwarden@nickp_streams 'Merging //UE4/Dev-Main to Dev-R'
Change 2755935 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Rebuild static m'
Change 2756003 on 2015/11/05 by Uriel.Doyon@uriel.doyon_office_data 'Reduce the number of precompute'
Change 2756145 on 2015/11/05 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Temp fix for GPU crash #rb none'
Change 2756308 on 2015/11/05 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Enable removing '
Change 2756435 on 2015/11/05 by Olaf.Piesche@Olaf.Piesche_roaming 'Disabling a check, to fix OR-85'
Change 2757063 on 2015/11/06 by Simon.Tovey@Simon.Tovey_Dev 'Submitting pull request from us'
Change 2757340 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed the experimental r.'
Change 2757341 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Changed the RHI thread di'
Change 2757342 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed lazy uniform buffer'
Change 2757343 on 2015/11/06 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Added a path so that text'
Change 2757500 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Add FrameSync to externalprofil'
Change 2757650 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'GBuffer should only be consider'
Change 2757665 on 2015/11/06 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'UE-22816 Instruction count is n'
Change 2757834 on 2015/11/06 by Michael.Trepka@Michael.Trepka_a4202_Dev-Rendering 'Embree integration into Lightma'
Change 2757930 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix UT ensure #rb Peter.Knepley'
Change 2757931 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix Ocean ensure #rb josh.ander'
Change 2757946 on 2015/11/06 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Removed invalid Lightmass asser'
Change 2757985 on 2015/11/06 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Added new PrimitiveComponent se'
Change 2758049 on 2015/11/06 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'OR-8600 CRASH: AllocationLeveli'
Change 2758059 on 2015/11/06 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'r.DumpTransitionsForResource #r'
Change 2758082 on 2015/11/06 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Fix resource tra'
Change 2758879 on 2015/11/09 by Rolando.Caloca@rolando.caloca_T3903_S 'DevRendering - Fix PSSL names f'
Change 2758911 on 2015/11/09 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Fixed accidental force di'
Change 2758968 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Disabled single frame buffer us'
Change 2758991 on 2015/11/09 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix togglerhithread crash #rb G'
Change 2759058 on 2015/11/09 by Gil.Gribb@Gil.Gribb_Z2439_Dev-Rendering 'UE4 - Dynamically set stream so'
Change 2759063 on 2015/11/09 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'fixed UE-22368 CLONE - GitHub 1'
Change 2759073 on 2015/11/09 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'minor code quality improvements'
Change 2759501 on 2015/11/09 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix particle ensure. '
Change 2759522 on 2015/11/09 by Marcus.Wassmer@Marcus.Wassmer_DevRendering_New 'Fix decals using CustomStencil.'
Change 2759610 on 2015/11/09 by Daniel.Wright@Daniel.Wright_G5038_RenderingStream 'Fixed line light source shadows'
Change 2759634 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Refined GBufferA resolving when'
Change 2759657 on 2015/11/09 by Martin.Mittring@Martin.Mittring_Z3941_Dev_Rendering 'Fixed ResourceTransition with r'
Change 2759693 on 2015/11/09 by Rolando.Caloca@Rolando.Caloca_T4688_S 'DevRendering - Fixed global sha'
Change 2759771 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Fixed editor hit proxy renderin'
Change 2760188 on 2015/11/09 by Uriel.Doyon@uriel.doyon_office_data 'Disabled some more deferred dec'
Change 2760523 on 2015/11/10 by Uriel.Doyon@uriel.doyon_office_data 'Enabled Embree by default #revi'
[CL 2761339 by Nick Penwarden in Main branch]
2015-11-10 17:11:09 -05:00
FExternalProfiler * ActiveProfiler = FActiveExternalProfilerBase : : GetActiveProfiler ( ) ;
if ( ActiveProfiler )
{
ActiveProfiler - > FrameSync ( ) ;
}
SCOPED_NAMED_EVENT ( FEngineLoopTick , FColor : : Red ) ;
2014-03-14 14:13:41 -04:00
// early in the Tick() to get the callbacks for cvar changes called
2015-03-04 08:31:40 -05:00
{
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Tick_CallAllConsoleVariableSinks ) ;
IConsoleManager : : Get ( ) . CallAllConsoleVariableSinks ( ) ;
}
2014-03-14 14:13:41 -04:00
{
SCOPE_CYCLE_COUNTER ( STAT_FrameTime ) ;
ENQUEUE_UNIQUE_RENDER_COMMAND (
2014-09-03 10:52:00 -04:00
BeginFrame ,
{
GRHICommandList . LatchBypass ( ) ;
GFrameNumberRenderThread + + ;
Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main)
#lockdown ben.marsh
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2774277 on 2015/11/19 by Gil.Gribb
UE4 - Did minor optimizations to the PS4 RHI and drawlists.
Change 2791226 on 2015/12/04 by Uriel.Doyon
Added source code for Embree 2.7.0
Removed duplicate files from the /doc folder.
Change 2800193 on 2015/12/11 by Marcus.Wassmer
SSAO AsyncCompute support.
#rb Martin.Mittring
Change 2801631 on 2015/12/14 by Olaf.Piesche
Making auto deactivate true by default, moving checks to HasCompleted, eliminating some unnecessary logic
#rb martin.mittring
Change 2803240 on 2015/12/15 by Gil.Gribb
UE4 - Added command to collect stats on spammy stats.
Change 2803476 on 2015/12/15 by Rolando.Caloca
DR - Allow toggling compute skin dispatch at runtime
- r.SkinCacheShaders Now enable the shaders and feature
- r.SkinCaching enables toggling at runtime
- r.SkinCache.BufferSize Sets the size in bytes of buffer for outputting
- Now uses 3 UAV buffers instead of one (avoid RenderDoc crashes)
#codereview Marcus.Wassmer, Martin.Mittring
Change 2803940 on 2015/12/15 by Marcus.Wassmer
Add r.PS4.AsyncComputeBudgetMode to switch between CUMasking and WaveLimit modes. So far it looks like WaveLimits behave better in UE4.
Also rearrange AsyncSSAO to run immediately after HZB to overlap with occlusion queries. In my testing this takes SSAO cost from .5ms -> .2ms. However it had to be hacked to run without normals. Hopefully Martin can get some real AsyncSSAO in.
#rb Martin.Mittring
#codereview Martin.Mittring
Change 2803999 on 2015/12/15 by Uriel.Doyon
Refactored the shader complexity material override logic to allow other viewmodes shader overrides.
TexelFactorAccuracy ViewMode : shows the accuracy of the static mesh texel factors, used for streaming.
WantedMipsAccuracy ViewMode : shows the accuracy of the static mesh wanted mips accuracy, used for streaming.
Added an option to stream textures based on the AABB distance instead of using the sphere approximation.
Added an option to only keep a the wanted mips.
Moved optimization related viewmodes into a submenu to avoid polluting the interface.
#jira UE-24502
#jira UE-24503
#jira UERNDR-89
Change 2804150 on 2015/12/15 by Olaf.Piesche
make separate translucency screen percentage a bit more robust; add numsamples to the render target creation functions in preparation for MSAA support for higher quality with low res separate translucency
#rb martin.mittring
Change 2804367 on 2015/12/15 by Daniel.Wright
Capsule shadow primitives are tracked separately on registration - saves 2.6ms of RT time doing the view frustum culling in a medium sized map
Change 2805293 on 2015/12/16 by Olaf.Piesche
logging if potentially immortal emitters are spawned from gameplay; this should catch if we spawn burst only emitters with indefinite life spans (muzzle flashes, hit impacts, etc.)
#rb martin.mittring
Change 2805586 on 2015/12/16 by Zabir.Hoque
Adding support for decals to fade and destroy themselves automatically.
#CodeReview: Martin.Mittring, Daniel.Wright, Olaf.Piesche
Change 2807663 on 2015/12/17 by Rolando.Caloca
DR - Remove expensive logging
#codereview Marcus.Wassmer
Change 2807903 on 2015/12/17 by Zabir.Hoque
Refactored DecalComponent's lifetime management such that it can be set and reset from Blueprints.
#CodeReview Daniel.Wright, Martin.Mittring, Olaf.Piesche
Change 2809261 on 2015/12/18 by Martin.Mittring
Added VisualizeShadingModels to track down issues like that:
FORT-16913 Textures on Hero Mesh is not shown
#rb:David.Hill
#code_review:Bob.Tellez
Change 2810136 on 2015/12/21 by Rolando.Caloca
DR - Added back draw event colors
PR #1602
#jira UE-21526
#codereview Mark.Satterthwaite, Keith.Judge, Marcus.Wassmer, Josh.Adams
Change 2810680 on 2015/12/21 by Martin.Mittring
moved SSAO ComputeShader running without per pixel normal (for AsyncCompute) into DevRendering
#test:editor
Change 2811205 on 2015/12/22 by Brian.Karis
Pulled clear coat out of the reflection compute shader. Added permutation for skylight.
Clear coat base layer now done in base pass. It only picks up the closest capture. This will cause popping when the object moves. Still needs a cross fade.
Change 2811275 on 2015/12/22 by David.Hill
UE-24675
#rb martin.mittring
Corrected buffer-size related problem with fringe.
Change 2811397 on 2015/12/22 by Brian.Karis
2016-01-08 11:12:28 -05:00
RHICmdList . PushEvent ( * FString : : Printf ( TEXT ( " Frame%d " ) , GFrameNumberRenderThread ) , FColor ( 0 , 255 , 0 , 255 ) ) ;
2014-09-03 10:52:00 -04:00
RHICmdList . BeginFrame ( ) ;
} ) ;
2014-03-14 14:13:41 -04:00
2015-03-04 08:31:40 -05:00
{
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_FlushThreadedLogs ) ;
// Flush debug output which has been buffered by other threads.
GLog - > FlushThreadedLogs ( ) ;
}
2014-03-14 14:13:41 -04:00
// Exit if frame limit is reached in benchmark mode.
2014-04-23 18:12:58 -04:00
if ( ( FApp : : IsBenchmarking ( ) & & MaxFrameCounter & & ( GFrameCounter > MaxFrameCounter ) )
2014-03-14 14:13:41 -04:00
// or time limit is reached if set.
| | ( MaxTickTime & & ( TotalTickTime > MaxTickTime ) ) )
{
FPlatformMisc : : RequestExit ( 0 ) ;
}
2015-03-04 08:31:40 -05:00
{
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_UpdateTimeAndHandleMaxTickRate ) ;
// Set FApp::CurrentTime, FApp::DeltaTime and potentially wait to enforce max tick rate.
GEngine - > UpdateTimeAndHandleMaxTickRate ( ) ;
}
2014-03-14 14:13:41 -04:00
2015-03-04 08:31:40 -05:00
{
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_TickFPSChart ) ;
GEngine - > TickFPSChart ( FApp : : GetDeltaTime ( ) ) ;
}
2014-03-14 14:13:41 -04:00
2015-03-04 08:31:40 -05:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Malloc_UpdateStats ) ;
2015-11-18 16:20:49 -05:00
// Update memory allocator stats.
2014-04-23 16:37:37 -04:00
GMalloc - > UpdateStats ( ) ;
2014-03-14 14:13:41 -04:00
}
2014-06-12 12:09:36 -04:00
FStats : : AdvanceFrame ( false , FStats : : FOnAdvanceRenderingThreadStats : : CreateStatic ( & AdvanceRenderingThreadStatsGT ) ) ;
2014-03-14 14:13:41 -04:00
{
SCOPE_CYCLE_COUNTER ( STAT_FrameTime ) ;
// Calculates average FPS/MS (outside STATS on purpose)
CalculateFPSTimings ( ) ;
// Note the start of a new frame
2015-09-29 15:30:25 -04:00
MALLOC_PROFILER ( GMalloc - > Exec ( nullptr , * FString : : Printf ( TEXT ( " SNAPSHOTMEMORYFRAME " ) ) , * GLog ) ) ;
2014-03-14 14:13:41 -04:00
// handle some per-frame tasks on the rendering thread
ENQUEUE_UNIQUE_RENDER_COMMAND (
ResetDeferredUpdates ,
{
FDeferredUpdateResource : : ResetNeedsUpdate ( ) ;
2014-07-15 07:34:34 -04:00
FlushPendingDeleteRHIResources_RenderThread ( ) ;
2014-03-14 14:13:41 -04:00
} ) ;
{
SCOPE_CYCLE_COUNTER ( STAT_PumpMessages ) ;
FPlatformMisc : : PumpMessages ( true ) ;
}
2015-03-04 08:31:40 -05:00
bool bIdleMode ;
2014-03-14 14:13:41 -04:00
{
2015-03-04 08:31:40 -05:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Idle ) ;
2015-11-18 16:20:49 -05:00
2015-03-04 08:31:40 -05:00
// Idle mode prevents ticking and rendering completely
bIdleMode = ShouldUseIdleMode ( ) ;
if ( bIdleMode )
{
// Yield CPU time
FPlatformProcess : : Sleep ( .1f ) ;
}
2014-03-14 14:13:41 -04:00
}
2016-03-11 17:29:00 -05:00
// @todo vreditor urgent: Temporary hack to allow world-to-meters to be set before
// input is polled for motion controller devices each frame.
2016-04-08 15:18:36 -04:00
# if WITH_ENGINE
extern ENGINE_API float GNewWorldToMetersScale ;
2016-03-11 17:29:00 -05:00
if ( GNewWorldToMetersScale ! = 0.0f & & GWorld ! = nullptr )
{
if ( GNewWorldToMetersScale ! = GWorld - > GetWorldSettings ( ) - > WorldToMeters )
{
GWorld - > GetWorldSettings ( ) - > WorldToMeters = GNewWorldToMetersScale ;
}
}
2016-04-08 15:18:36 -04:00
# endif // WITH_ENGINE
2016-03-11 17:29:00 -05:00
2014-03-14 14:13:41 -04:00
if ( FSlateApplication : : IsInitialized ( ) & & ! bIdleMode )
{
2015-03-04 08:31:40 -05:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Tick_SlateInput ) ;
2015-11-18 16:20:49 -05:00
2014-10-15 13:53:01 -04:00
FSlateApplication & SlateApp = FSlateApplication : : Get ( ) ;
SlateApp . PollGameDeviceState ( ) ;
// Gives widgets a chance to process any accumulated input
SlateApp . FinishedInputThisFrame ( ) ;
2014-03-14 14:13:41 -04:00
}
2014-04-23 18:12:58 -04:00
GEngine - > Tick ( FApp : : GetDeltaTime ( ) , bIdleMode ) ;
2014-11-14 14:38:40 -05:00
// If a movie that is blocking the game thread has been playing,
// wait for it to finish before we continue to tick or tick again
// We do this right after GEngine->Tick() because that is where user code would initiate a load / movie.
2015-03-04 08:31:40 -05:00
{
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_WaitForMovieToFinish ) ;
2015-11-18 16:20:49 -05:00
2015-03-04 08:31:40 -05:00
GetMoviePlayer ( ) - > WaitForMovieToFinish ( ) ;
}
2014-11-14 14:38:40 -05:00
2014-03-14 14:13:41 -04:00
if ( GShaderCompilingManager )
{
// Process any asynchronous shader compile results that are ready, limit execution time
2015-03-04 08:31:40 -05:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Tick_GShaderCompilingManager ) ;
2014-03-14 14:13:41 -04:00
GShaderCompilingManager - > ProcessAsyncResults ( true , false ) ;
}
2014-08-28 13:54:31 -04:00
if ( GDistanceFieldAsyncQueue )
{
2015-03-04 08:31:40 -05:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Tick_GDistanceFieldAsyncQueue ) ;
2014-08-28 13:54:31 -04:00
GDistanceFieldAsyncQueue - > ProcessAsyncTasks ( ) ;
}
2014-03-14 14:13:41 -04:00
if ( FSlateApplication : : IsInitialized ( ) & & ! bIdleMode )
{
2015-08-14 14:28:11 -04:00
{
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_ProcessPlayerControllersSlateOperations ) ;
check ( ! IsRunningDedicatedServer ( ) ) ;
// Process slate operations accumulated in the world ticks.
ProcessLocalPlayerSlateOperations ( ) ;
}
2014-03-14 14:13:41 -04:00
// Tick Slate application
FSlateApplication : : Get ( ) . Tick ( ) ;
}
Simple and Group Stat Exec commands can now be triggered from the level viewport Show menu directly.
#ttp 306334 - ROCKET: TASK: PUNTABLE: Stats: FN: Make diagnostic stats discoverable and available in the UI (don't require console to toggle)
#branch UE4
#change
DECLARE_STATS_GROUP û Added additional param GroupCategory, for subfolder use in the UI. Fixedup all Stats Group usage so the category is now propagated through where it needs to be.
Currently all Group stats have the Category æAdvancedÆ, and all engine stats have the Category æSimpleÆ û this is just to differentiate them for now, better categories will come along in future.
Modified FindOrAddMetaData as it now broadcasts a delegate (via a TaskGraph) whenever a new stat meta data is added û this was needed as not all the stat groups are æregisteredÆ when the level viewports are created (they are drip loaded), so the viewports need to listen for any additions thereafter...
GroupDescription is displayed as a tooltip in the UI for the stat entry and we may want to localize these.
RenderStats & RenderGroupedWithHierarchy: Modified so that it now takes the viewport that it should render to as a param (which is also used to determine if each stat should be visible).
Removed StatsEnabled delegate in favour of StatCheckEnabled, StatEnabled, StatDisabled, StatDisableAll for more finite usage and feedback when toggling them.
Modified FHUDGroupManager HandleCommand It now uses the new delegates to work out whether it needs to enable or disable for the current viewport, so itÆs more involved than a simple toggle, itÆs more ôis the stat enabled for the current viewport, and is it enabled for any viewportö delegate querying so it can react accordingly.
Added struct FSimpleStatFuncs: Which contains info on each æSimple StatÆ such as; name, category, description, renderfunc, togglefunc and the side of the viewport it should be rendered to
ExecSimpleStat û Calls Exec for a registered Simple Stat, ensuring the correct viewport is set
IsSimpleStat û Checks to see if a stat is a registered Simple Stat or not
SetSimpleStat û Sets the state of a specified Simple Stats
SetSimpleStats - Sets the state of the specified Simple Stats
RenderSimpleStats û Renders the Simple Stats if they are enabled, and have Render functions assigned.
Each Exec function had the code it executes which itÆs toggled and rendered into functions
Added FStatUnitData & FStatHitchesData: Moved all the globals/static variables used when enabling Stat Unit/Hitches into a struct as itÆs now used by multiple viewports and they needed their own copies. Also moved their draw functions here too.
FSceneViewport:
SwapStatCommands û Exchanges the enabled stats between two viewports, this is so when PIEing the stats which were enabled on the Level Viewport (if playing in active viewport only) get transposed to the Game Viewport, and then restored when PIE ends.
SEditorViewport:
ToggleStatCommand û Called when a stat is enabled/disabled from the UI
IsStatCommandVisible û Checks to see if a stat command should appear as visible in the UI
SEditorViewportViewMenu:
GenerateViewMenuContent û Made protected and virtual so it could be called externally.
FLevelViewportCommands: Added the code needed to generate commands for each of the Stat menu entries, however because not all stats are registered when this happens, it also creates some delegates to listen out for others that are registered later
Destructor û Needed to reset delegates
HandleNewGroupStat û Creates the new group stat commands
HandleNewStat û Creates the new stat command
FindStatIndex û Looks for where a stat should be inserted in the menu in order to maintain alphabetical order
SLevelViewport:
Modified the code so that the states of all the SimpleStats are saved so they can be restored next time the editor is ran (previously just handled FPS).
OnFloatingButtonClicked û Called whenever any of the level viewports floating buttons are clicked in order to correctly set the ælastÆ viewport global
OnToggleAllStatCommands û Called when the user selects æHide AllÆ from the viewport.
ToggleStatCommand û Called when the user selects any other stat option from the viewport.
BindStatCommand û Used to bind the menu action to the command name (used by delegate)
Added SLevelEditorViewportViewMenu (extends SEditorViewportViewMenu), and overrode GenerateViewMenuContent so that OnFloatingButtonClicked can be called whenever the menu is clicked on. This is also called during GenerateOptionsMenu, GenerateCameraMenu, GenerateShowMenu & OnToggleMaximize
Added global ptr GStatProcessingViewportClient (sim to Current, Last) used to keep track of which viewport the stat should be applied too (only valid within the scope of the Exec call).
FViewportClient:
Moved global ESoundShowFlags enum list into this class.
FCommonViewportClient:
Destructor û Needed to reset GStatProcessingViewportClient
FLevelEditorViewportClient
SetCurrentViewport û moved code responsible for setting the global æcurrentÆ viewport ptr into a func
SetLastKeyViewport û moved the code responsible for settings the global ælastÆ viewport ptr into a func
UGameViewportClient:
Destructor û Needed to cleanup delegate usage.
FViewportClient & FLevelEditorViewportClient & UGameViewportClient*
GetStatUnitData û The viewports copy of the variables needed when running the Stat Unit Exec
GetStatHitchesData û The viewports copy of the variables needed when running the Stat Hitches Exec
GetEnabledStats û Gets a list of all the stats which are enabled for the viewport
SetEnabledStats û Sets a list of all the stats which should be enabled for the viewport
IsStatEnabled û Checks to see if a specific stat is enabled for the viewport
SetStatEnabled û Sets a specifics stats state to enabled or disabled
GetSoundShowFlags û Gets which flags are enabled for the Stat Sounds Exec
SetSoundShowFlags û Sets which flags are enabled for the Stat Sounds Exec
HandleViewportStatCheckEnabled (delegate) û checks to see if a specific stat is enabled on this viewport
HandleViewportStatEnabled (delegate) û enables a specific stat for the viewport
HandleViewportStatDisabled (delegate) û disables a specific stat for the viewport
HandleViewportStatDisableAll (delegate) û disables all stats for the viewport
*FViewportClient has dummy virtual funcs and LevelEditor/Game both have the same implementations, the only differences is the GameViewports member variables are static so that the stat info persists between runs.
FLevelEditorViewportInstanceSettings deprecated bShowFPS in favour of an EnabledStats array (so we can track the state of all stats, not just FPS).
Added new config var bSaveSimpleStats: if enabled, restores previously enabled level viewport simple stats the next time the editor runs (defaults to false).
Modified FillShowFlagMenu so that thereÆs just one func and you specify where (if any) youÆd like a separator to occur.
Added FillShowStatsSubMenus so that menus can be generated which have submenus
Added the Stats sub menu to the View menu
Modified Execs so that the GStatProcessingViewportClient is set to the correct default viewport (if it wasnÆt specified), and clears again after itÆs been processed
HandleStatCommand now takes World and ViewportClient as params too û needed when Execs enabled other Execs so the world/viewport persists.
SetAverageUnitTimes û Added as a Setter func for GetAverageUnitTimes (moved code out of Stat Unit renderer and modified so that it only updates once per frame).
Stripped out all unneeded globals
[CL 2058522 by Andrew Brown in Main branch]
2014-04-29 04:04:27 -04:00
# if STATS
// Clear any stat group notifications we have pending just incase they weren't claimed during FSlateApplication::Get().Tick
extern CORE_API void ClearPendingStatGroups ( ) ;
ClearPendingStatGroups ( ) ;
# endif
2014-03-14 14:13:41 -04:00
# if WITH_EDITOR
2015-05-08 08:36:05 -04:00
{
2015-06-24 10:57:40 -04:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Tick_AutomationController ) ;
static FName AutomationController ( " AutomationController " ) ;
//Check if module loaded to support the change to allow this to be hot compilable.
if ( FModuleManager : : Get ( ) . IsModuleLoaded ( AutomationController ) )
{
FModuleManager : : GetModuleChecked < IAutomationControllerModule > ( AutomationController ) . Tick ( ) ;
}
2014-03-14 14:13:41 -04:00
}
# endif
# if WITH_ENGINE
# if WITH_AUTOMATION_WORKER
{
2015-03-04 08:31:40 -05:00
QUICK_SCOPE_CYCLE_COUNTER ( STAT_FEngineLoop_Tick_AutomationWorker ) ;
//Check if module loaded to support the change to allow this to be hot compilable.
static const FName AutomationWorkerModuleName = TEXT ( " AutomationWorker " ) ;
if ( FModuleManager : : Get ( ) . IsModuleLoaded ( AutomationWorkerModuleName ) )
{
FModuleManager : : GetModuleChecked < IAutomationWorkerModule > ( AutomationWorkerModuleName ) . Tick ( ) ;
}
2014-03-14 14:13:41 -04:00
}
# endif
# endif //WITH_ENGINE
{
SCOPE_CYCLE_COUNTER ( STAT_RHITickTime ) ;
2014-04-23 18:12:58 -04:00
RHITick ( FApp : : GetDeltaTime ( ) ) ; // Update RHI.
2014-03-14 14:13:41 -04:00
}
// Increment global frame counter. Once for each engine tick.
GFrameCounter + + ;
// Disregard first few ticks for total tick time as it includes loading and such.
if ( GFrameCounter > 6 )
{
2014-04-23 18:12:58 -04:00
TotalTickTime + = FApp : : GetDeltaTime ( ) ;
2014-03-14 14:13:41 -04:00
}
// Find the objects which need to be cleaned up the next frame.
FPendingCleanupObjects * PreviousPendingCleanupObjects = PendingCleanupObjects ;
PendingCleanupObjects = GetPendingCleanupObjects ( ) ;
{
SCOPE_CYCLE_COUNTER ( STAT_FrameSyncTime ) ;
// this could be perhaps moved down to get greater parallelizm
// Sync game and render thread. Either total sync or allowing one frame lag.
static FFrameEndSync FrameEndSync ;
static auto CVarAllowOneFrameThreadLag = IConsoleManager : : Get ( ) . FindTConsoleVariableDataInt ( TEXT ( " r.OneFrameThreadLag " ) ) ;
FrameEndSync . Sync ( CVarAllowOneFrameThreadLag - > GetValueOnGameThread ( ) ! = 0 ) ;
}
{
SCOPE_CYCLE_COUNTER ( STAT_DeferredTickTime ) ;
// Delete the objects which were enqueued for deferred cleanup before the previous frame.
delete PreviousPendingCleanupObjects ;
2015-06-16 15:08:39 -04:00
// Destroy all linkers pending delete
# if WITH_COREUOBJECT
DeleteLoaders ( ) ;
# endif
2014-04-23 18:12:58 -04:00
FTicker : : GetCoreTicker ( ) . Tick ( FApp : : GetDeltaTime ( ) ) ;
2014-03-14 14:13:41 -04:00
2016-04-05 11:25:00 -04:00
FThreadManager : : Get ( ) . Tick ( ) ;
2014-03-14 14:13:41 -04:00
GEngine - > TickDeferredCommands ( ) ;
}
ENQUEUE_UNIQUE_RENDER_COMMAND (
EndFrame ,
{
2014-06-27 11:07:13 -04:00
RHICmdList . EndFrame ( ) ;
2014-09-11 09:38:38 -04:00
RHICmdList . PopEvent ( ) ;
2014-03-14 14:13:41 -04:00
} ) ;
2015-06-24 09:48:05 -04:00
// Set CPU utilization stats.
const FCPUTime CPUTime = FPlatformTime : : GetCPUTime ( ) ;
SET_FLOAT_STAT ( STAT_CPUTimePct , CPUTime . CPUTimePct ) ;
SET_FLOAT_STAT ( STAT_CPUTimePctRelative , CPUTime . CPUTimePctRelative ) ;
2015-09-08 22:01:08 -04:00
// Set the UObject count stat
# if UE_GC_TRACK_OBJ_AVAILABLE
2015-09-10 11:58:41 -04:00
SET_DWORD_STAT ( STAT_Hash_NumObjects , GUObjectArray . GetObjectArrayNumMinusAvailable ( ) ) ;
2015-09-08 22:01:08 -04:00
# endif
2016-04-05 11:25:00 -04:00
}
2014-03-14 14:13:41 -04:00
}
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
void FEngineLoop : : ClearPendingCleanupObjects ( )
{
delete PendingCleanupObjects ;
2015-09-29 15:30:25 -04:00
PendingCleanupObjects = nullptr ;
2014-03-14 14:13:41 -04:00
}
# endif // WITH_ENGINE
2015-12-10 21:55:37 -05:00
static TAutoConsoleVariable < int32 > CVarLogTimestamp (
TEXT ( " log.Timestamp " ) ,
1 ,
TEXT ( " Defines if time is included in each line in the log file and in what form. Layout: [time][frame mod 1000] \n " )
TEXT ( " 0 = Do not display log timestamps \n " )
TEXT ( " 1 = Log time stamps in UTC and Frametime (default) e.g. [2015.11.25-21.28.50:803][376] \n " )
TEXT ( " 2 = Log timestamps in seconds elapsed since GStartTime e.g. [0130.29][420] " ) ,
ECVF_Default ) ;
static TAutoConsoleVariable < int32 > CVarLogCategory (
TEXT ( " log.Category " ) ,
1 ,
TEXT ( " Defines if the categoy is included in each line in the log file and in what form. \n " )
TEXT ( " 0 = Do not log category \n " )
TEXT ( " 2 = Log the category (default) " ) ,
ECVF_Default ) ;
// Gets called any time cvars change (on the main thread)
static void CVarLogSinkFunction ( )
{
{
// for debugging
ELogTimes : : Type OldGPrintLogTimes = GPrintLogTimes ;
int32 LogTimestampValue = CVarLogTimestamp . GetValueOnGameThread ( ) ;
// Note GPrintLogTimes can be used on multiple threads but it should be no issue to change it on the fly
switch ( LogTimestampValue )
{
default :
case 0 : GPrintLogTimes = ELogTimes : : None ; break ;
case 1 : GPrintLogTimes = ELogTimes : : UTC ; break ;
case 2 : GPrintLogTimes = ELogTimes : : SinceGStartTime ; break ;
}
}
{
int32 LogCategoryValue = CVarLogCategory . GetValueOnGameThread ( ) ;
// Note GPrintLogCategory can be used on multiple threads but it should be no issue to change it on the fly
GPrintLogCategory = LogCategoryValue ! = 0 ;
}
}
FAutoConsoleVariableSink CVarLogSink ( FConsoleCommandDelegate : : CreateStatic ( & CVarLogSinkFunction ) ) ;
2015-09-29 15:30:25 -04:00
2015-04-21 13:43:58 -04:00
static void CheckForPrintTimesOverride ( )
{
// Determine whether to override the default setting for including timestamps in the log.
FString LogTimes ;
if ( GConfig - > GetString ( TEXT ( " LogFiles " ) , TEXT ( " LogTimes " ) , LogTimes , GEngineIni ) )
{
if ( LogTimes = = TEXT ( " SinceStart " ) )
{
2015-12-10 21:55:37 -05:00
CVarLogTimestamp - > Set ( 2 , ECVF_SetBySystemSettingsIni ) ;
2015-04-21 13:43:58 -04:00
}
// Assume this is a bool for backward compatibility
else if ( FCString : : ToBool ( * LogTimes ) )
{
2015-12-10 21:55:37 -05:00
CVarLogTimestamp - > Set ( 1 , ECVF_SetBySystemSettingsIni ) ;
2015-04-21 13:43:58 -04:00
}
}
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " LOGTIMES " ) ) )
{
2015-12-10 21:55:37 -05:00
CVarLogTimestamp - > Set ( 1 , ECVF_SetByCommandline ) ;
2015-04-21 13:43:58 -04:00
}
else if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " NOLOGTIMES " ) ) )
{
2015-12-10 21:55:37 -05:00
CVarLogTimestamp - > Set ( 0 , ECVF_SetByCommandline ) ;
2015-04-21 13:43:58 -04:00
}
else if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " LOGTIMESINCESTART " ) ) )
{
2015-12-10 21:55:37 -05:00
CVarLogTimestamp - > Set ( 2 , ECVF_SetByCommandline ) ;
2015-04-21 13:43:58 -04:00
}
}
2014-03-14 14:13:41 -04:00
2015-09-29 15:30:25 -04:00
2014-03-14 14:13:41 -04:00
/* FEngineLoop static interface
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2014-05-14 20:01:43 -04:00
bool FEngineLoop : : AppInit ( )
2014-03-14 14:13:41 -04:00
{
// Output devices.
GError = FPlatformOutputDevices : : GetError ( ) ;
GWarn = FPlatformOutputDevices : : GetWarn ( ) ;
BeginInitTextLocalization ( ) ;
// Avoiding potential exploits by not exposing command line overrides in the shipping games.
# if !UE_BUILD_SHIPPING && WITH_EDITORONLY_DATA
// 8192 is the maximum length of the command line on Windows XP.
TCHAR CmdLineEnv [ 8192 ] ;
// Retrieve additional command line arguments from environment variable.
FPlatformMisc : : GetEnvironmentVariable ( TEXT ( " UE-CmdLineArgs " ) , CmdLineEnv , ARRAY_COUNT ( CmdLineEnv ) ) ;
2015-09-29 15:30:25 -04:00
// Manually nullptr terminate just in case. The nullptr string is returned above in the error case so
2014-03-14 14:13:41 -04:00
// we don't have to worry about that.
CmdLineEnv [ ARRAY_COUNT ( CmdLineEnv ) - 1 ] = 0 ;
FString Env = FString ( CmdLineEnv ) . Trim ( ) ;
if ( Env . Len ( ) )
{
// Append the command line environment after inserting a space as we can't set it in the
// environment. Note that any code accessing GCmdLine before appInit obviously won't
// respect the command line environment additions.
FCommandLine : : Append ( TEXT ( " -EnvAfterHere " ) ) ;
FCommandLine : : Append ( CmdLineEnv ) ;
}
# endif
// Error history.
FCString : : Strcpy ( GErrorHist , TEXT ( " Fatal error! " LINE_TERMINATOR LINE_TERMINATOR ) ) ;
// Platform specific pre-init.
FPlatformMisc : : PlatformPreInit ( ) ;
// Keep track of start time.
GSystemStartTime = FDateTime : : Now ( ) . ToString ( ) ;
// Switch into executable's directory.
FPlatformProcess : : SetCurrentWorkingDirectoryToBaseDir ( ) ;
// Now finish initializing the file manager after the command line is set up
IFileManager : : Get ( ) . ProcessCommandLineOptions ( ) ;
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
FPageAllocator : : LatchProtectedMode ( ) ;
Copying //UE4/Orion-Staging to //UE4/Main (originated from //Orion/Dev-General @ 2831630)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2831624 on 2016/01/17 by Marcus.Wassmer
Merge disable of FCachedReadPlatformData on PS4. Reduces memory spikes. 2830986
#rb none
#test none
#codereview Michael.Noland,James.Golding
Change 2831402 on 2016/01/17 by Marcus.Wassmer
HLOD priority and streamout changes.
Give texture pool an extra 200MB which we can afford thanks to James/Michael
#rb Chris.Gagnon
#test run agora, notice nice textures.
#lockdown Andrew.Grant
Change 2831398 on 2016/01/17 by Marcus.Wassmer
Fix 3 logic bugs with Relocate
#rb chris.gagnon
#test run game, look for corruption.
#lockdown Andrew.Grant
Change 2831372 on 2016/01/16 by Marcus.Wassmer
Update param.sfo's and lockdown version in prep for good PS4 playtest build.
#rb none
#test build from last night...
#lockdown Andrew.Grant
Change 2831274 on 2016/01/16 by Graeme.Thornton
Disable platform file cache wrapper on PS4
#codereview James.Golding
#rb none
#tests ran cooked ps4 build, timed loading (no real change), measured memory used for file handles (small)
Change 2831237 on 2016/01/16 by Sammy.James
Fix PS4 compile error
#codereview Andrew.Grant
#rb none
#tests none
Change 2831219 on 2016/01/16 by Matt.Kuhlenschmidt
Fix possible invalid access to shared movie player resource across threads causing startup crash.
#codereview marcus.wassmer
#rb none, #tests initial load
Change 2831218 on 2016/01/16 by Marcus.Wassmer
Fix bad warning case.
#codereview Martin.Mittring
#rb none
#test none
Change 2831201 on 2016/01/16 by Andrew.Grant
Added extra info about referencer to missing asset reference message
#rb none
#tests cooked, ran editor
Change 2831183 on 2016/01/16 by David.Nikdel
#OSS #PS4 #Purchasing #StoreV2
- Force failure if we have no receipts after a "successful" checkout.
- Report consumed entitlements as well as unconsumed but leave ValidationInfo empty so we can tell the difference at the application level
- Convert productIds to skuIds at checkout time
- Added PS4 Implementation of IOnlineStoreV2
- Bugfix: set bSuccessfullyStartedUp=false when InitNPGameSettings() fails
- Adjusted FOnlineStoreOffer to use FText::AsCurrencyBase
#RB: Paul.Moore
#TESTS: login, purchase redemption, store MTX purchasing on PS4 & PC
Change 2831129 on 2016/01/16 by David.Nikdel
#MCP
- Added a ctor to make converting from FOnlineError to FMcpQueryResult easier (for stuff that was already using FMcpQueryResult).
#RB: none
#TESTS: frontend
Change 2830986 on 2016/01/15 by Michael.Noland
PS4: Disabling FCachedReadPlatformFile on PS4 to significantly reduce high watermark memory consumption during blocking loads
#rb marcus.wassmer
#tests Ran Paragon PS4 down a bad path that currently does a blocking map and hero load
#lockdown andrew.grant
Change 2830943 on 2016/01/15 by Max.Chen
Sequencer: Fix bug introduced with preroll. It was also causing a crash in particle track instance.
#tests Master sequence trailer plays without crashing
#rb none
Change 2830912 on 2016/01/15 by Michael.Noland
Rendering: Exposed GRHIDeviceId (only filled in on D3D11 and D3D12 RHI's under the same circumstances as GRHIAdapterName, etc..., 0 otherwise)
#rb mieszko.zielinski
#tests Tested printing the value out
#codereview martin.mittring
Change 2830910 on 2016/01/15 by Michael.Noland
Rendering: Improved GPU driver detection logic to handle more cases
#codereview martin.mittring
#rb mieszko.zielinski
#tests Tested on my machine which was previous reporting Unknown for the values as some entries contained the key in the Settings subfolder
Change 2830776 on 2016/01/15 by Martin.Mittring
from Dev-Rendering
added ensure to track down multiple issues like
OR-11771 CRASH: User Crashed when pressing the Play button
OR-12430 CRASH: OT2 user crashed with FRHIResource::AddRef()
#rb:Gil.Gribb
#code_review:Gil.Gribb,Mark.Satterthwaite,Marcus.Wassmer
2016-01-20 11:32:08 -05:00
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " purgatorymallocproxy " ) ) )
{
FMemory : : EnablePurgatoryTests ( ) ;
}
2014-03-14 14:13:41 -04:00
# if !UE_BUILD_SHIPPING
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " BUILDMACHINE " ) ) )
{
GIsBuildMachine = true ;
}
2014-08-08 13:30:27 -04:00
// If "-WaitForDebugger" was specified, halt startup and wait for a debugger to attach before continuing
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " WaitForDebugger " ) ) )
{
2014-08-08 13:36:58 -04:00
while ( ! FPlatformMisc : : IsDebuggerPresent ( ) )
2014-08-08 13:30:27 -04:00
{
FPlatformProcess : : Sleep ( 0.1f ) ;
}
}
2014-03-14 14:13:41 -04:00
# endif // !UE_BUILD_SHIPPING
# if PLATFORM_WINDOWS
2014-11-07 09:46:18 -05:00
// make sure that the log directory exists
IFileManager : : Get ( ) . MakeDirectory ( * FPaths : : GameLogDir ( ) ) ;
2014-03-14 14:13:41 -04:00
// update the mini dump filename now that we have enough info to point it to the log folder even in installed builds
2015-08-13 15:44:02 -04:00
FCString : : Strcpy ( MiniDumpFilenameW , * IFileManager : : Get ( ) . ConvertToAbsolutePathForExternalAppForWrite ( * FString : : Printf ( TEXT ( " %sunreal-v%i-%s.dmp " ) , * FPaths : : GameLogDir ( ) , FEngineVersion : : Current ( ) . GetChangelist ( ) , * FDateTime : : Now ( ) . ToString ( ) ) ) ) ;
2014-03-14 14:13:41 -04:00
# endif
// Init logging to disk
2014-08-08 21:42:14 -04:00
FPlatformOutputDevices : : SetupOutputDevices ( ) ;
2014-03-14 14:13:41 -04:00
// init config system
FConfigCacheIni : : InitializeConfigSystem ( ) ;
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
// Now that configs have been initialized, setup stack walking options
FPlatformStackWalk : : Init ( ) ;
2015-04-21 13:43:58 -04:00
CheckForPrintTimesOverride ( ) ;
2014-05-14 20:01:43 -04:00
// Check whether the project or any of its plugins are missing or are out of date
# if UE_EDITOR
2014-07-30 13:16:05 -04:00
if ( ! GIsBuildMachine & & FPaths : : IsProjectFilePathSet ( ) & & IPluginManager : : Get ( ) . AreRequiredPluginsAvailable ( ) )
2014-05-14 20:01:43 -04:00
{
2015-03-11 15:53:29 -04:00
const FProjectDescriptor * CurrentProject = IProjectManager : : Get ( ) . GetCurrentProject ( ) ;
if ( CurrentProject ! = nullptr & & CurrentProject - > Modules . Num ( ) > 0 )
2014-05-14 20:01:43 -04:00
{
2015-03-11 15:53:29 -04:00
bool bNeedCompile = false ;
2015-04-20 10:12:55 -04:00
GConfig - > GetBool ( TEXT ( " /Script/UnrealEd.EditorLoadingSavingSettings " ) , TEXT ( " bForceCompilationAtStartup " ) , bNeedCompile , GEditorPerProjectIni ) ;
2014-09-10 12:43:07 -04:00
2015-03-11 15:53:29 -04:00
if ( ! bNeedCompile )
2014-05-14 20:01:43 -04:00
{
2015-03-11 15:53:29 -04:00
// Check if any of the project or plugin modules are out of date, and the user wants to compile them.
TArray < FString > IncompatibleFiles ;
IProjectManager : : Get ( ) . CheckModuleCompatibility ( IncompatibleFiles ) ;
IPluginManager : : Get ( ) . CheckModuleCompatibility ( IncompatibleFiles ) ;
2014-09-10 12:43:07 -04:00
2015-03-11 15:53:29 -04:00
if ( IncompatibleFiles . Num ( ) > 0 )
2014-09-10 12:43:07 -04:00
{
2015-03-11 15:53:29 -04:00
// Log the modules which need to be rebuilt
FString ModulesList = TEXT ( " The following modules are missing or built with a different engine version: \n \n " ) ;
for ( int Idx = 0 ; Idx < IncompatibleFiles . Num ( ) ; Idx + + )
{
UE_LOG ( LogInit , Warning , TEXT ( " Incompatible or missing module: %s " ) , * IncompatibleFiles [ Idx ] ) ;
ModulesList + = IncompatibleFiles [ Idx ] + TEXT ( " \n " ) ;
}
ModulesList + = TEXT ( " \n Would you like to rebuild them now? " ) ;
// If we're running with -stdout, assume that we're a non interactive process and about to fail
if ( FApp : : IsUnattended ( ) | | FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " stdout " ) ) )
{
return false ;
}
// Ask whether to compile before continuing
if ( FPlatformMisc : : MessageBoxExt ( EAppMsgType : : YesNo , * ModulesList , * FString : : Printf ( TEXT ( " Missing %s Modules " ) , FApp : : GetGameName ( ) ) ) = = EAppReturnType : : No )
{
return false ;
}
bNeedCompile = true ;
}
}
if ( bNeedCompile )
{
// Try to compile it
FFeedbackContext * Context = ( FFeedbackContext * ) FDesktopPlatformModule : : Get ( ) - > GetNativeFeedbackContext ( ) ;
Context - > BeginSlowTask ( FText : : FromString ( TEXT ( " Starting build... " ) ) , true , true ) ;
bool bCompileResult = FDesktopPlatformModule : : Get ( ) - > CompileGameProject ( FPaths : : RootDir ( ) , FPaths : : GetProjectFilePath ( ) , Context ) ;
Context - > EndSlowTask ( ) ;
// Get a list of modules which are still incompatible
TArray < FString > StillIncompatibleFiles ;
IProjectManager : : Get ( ) . CheckModuleCompatibility ( StillIncompatibleFiles ) ;
IPluginManager : : Get ( ) . CheckModuleCompatibility ( StillIncompatibleFiles ) ;
if ( ! bCompileResult | | StillIncompatibleFiles . Num ( ) > 0 )
{
for ( int Idx = 0 ; Idx < StillIncompatibleFiles . Num ( ) ; Idx + + )
{
UE_LOG ( LogInit , Warning , TEXT ( " Still incompatible or missing module: %s " ) , * StillIncompatibleFiles [ Idx ] ) ;
}
2015-08-11 09:28:16 -04:00
if ( ! FApp : : IsUnattended ( ) )
{
FPlatformMisc : : MessageBoxExt ( EAppMsgType : : Ok , * FString : : Printf ( TEXT ( " %s could not be compiled. Try rebuilding from source manually. " ) , FApp : : GetGameName ( ) ) , TEXT ( " Error " ) ) ;
}
2015-03-11 15:53:29 -04:00
return false ;
2014-09-10 12:43:07 -04:00
}
}
2014-05-14 20:01:43 -04:00
}
}
# endif
2014-03-14 14:13:41 -04:00
// Load "pre-init" plugin modules
2014-07-30 13:16:05 -04:00
if ( ! IProjectManager : : Get ( ) . LoadModulesForProject ( ELoadingPhase : : PostConfigInit ) | | ! IPluginManager : : Get ( ) . LoadModulesForEnabledPlugins ( ELoadingPhase : : PostConfigInit ) )
2014-03-14 14:13:41 -04:00
{
2014-07-30 13:16:05 -04:00
return false ;
2014-03-14 14:13:41 -04:00
}
2014-08-05 17:36:56 -04:00
PreInitHMDDevice ( ) ;
2014-03-14 14:13:41 -04:00
// Put the command line and config info into the suppression system
FLogSuppressionInterface : : Get ( ) . ProcessConfigAndCommandLine ( ) ;
// after the above has run we now have the REQUIRED set of engine .INIs (all of the other .INIs)
// that are gotten from .h files' config() are not requires and are dynamically loaded when the .u files are loaded
# if !UE_BUILD_SHIPPING
// Prompt the user for remote debugging?
bool bPromptForRemoteDebug = false ;
GConfig - > GetBool ( TEXT ( " Engine.ErrorHandling " ) , TEXT ( " bPromptForRemoteDebugging " ) , bPromptForRemoteDebug , GEngineIni ) ;
bool bPromptForRemoteDebugOnEnsure = false ;
GConfig - > GetBool ( TEXT ( " Engine.ErrorHandling " ) , TEXT ( " bPromptForRemoteDebugOnEnsure " ) , bPromptForRemoteDebugOnEnsure , GEngineIni ) ;
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " PROMPTREMOTEDEBUG " ) ) )
{
bPromptForRemoteDebug = true ;
}
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " PROMPTREMOTEDEBUGENSURE " ) ) )
{
bPromptForRemoteDebug = true ;
bPromptForRemoteDebugOnEnsure = true ;
}
FPlatformMisc : : SetShouldPromptForRemoteDebugging ( bPromptForRemoteDebug ) ;
FPlatformMisc : : SetShouldPromptForRemoteDebugOnEnsure ( bPromptForRemoteDebugOnEnsure ) ;
// Feedback context.
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " WARNINGSASERRORS " ) ) )
{
GWarn - > TreatWarningsAsErrors = true ;
}
if ( FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " SILENT " ) ) )
{
GIsSilent = true ;
}
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
# endif // !UE_BUILD_SHIPPING
2014-03-14 14:13:41 -04:00
// Show log if wanted.
if ( GLogConsole & & FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " LOG " ) ) )
{
GLogConsole - > Show ( true ) ;
}
//// Command line.
2015-08-13 15:44:02 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Version: %s " ) , * FEngineVersion : : Current ( ) . ToString ( ) ) ;
UE_LOG ( LogInit , Log , TEXT ( " API Version: %u " ) , FEngineVersion : : CompatibleWith ( ) . GetChangelist ( ) ) ;
2016-04-05 11:25:00 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Net Version: %u " ) , GEngineNetVersion ) ;
Copying //UE4/Dev-Core to //UE4/Main
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2799478 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added Dev Stream custom versions.
- Each stream now has its own custom version
- Developers working in a stream should only modify their respective version
Change 2789867 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
UnrealHeaderTool plugins no longer need to be a separate plugin and don't require UnrealHeaderTool source code changes to work.
- Merged ScriptGeneratorPlugin with ScriptPlugin
- Introduced the concept of UHT plugin support for plugins so that UHT's source files don't need to be modified to make it work with external plugins
- Added RuntimeNoProgram module type (module that can be used at runtime but not by program targets).
- Fixed logic with project file path setting in the engine. It will no longer try to crate a full path from an already rooted path.
Change 2796114 on 2015/12/09 by Steve.Robb@Dev-Core
TEnumRange - enabled ranged-based for iteration over enum values.
Change 2789843 on 2015/12/04 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
More thorough way of verifying GC cluster assumptions.
Change 2794221 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Don't merge GC clusters by default
Change 2797824 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Added the option to load all symbols for stack walking in non-monolithic builds.
Change 2790539 on 2015/12/04 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Stats/Profiler - Better handling for live connection, using the same path as file profiles, added FStatsLoadedState to separate runtime stats state from the loaded one
Change 2794183 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Always reset events when returning them to pool.
Change 2794406 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Fixing -unversioned flag being completely ignored when cooking
Change 2794563 on 2015/12/08 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream2
Making sure string referenced assets don't get cooked if referenced by editor-only properties.
Change 2795124 on 2015/12/08 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Fixed bad data in min/max/avg inclusive times, added min/max/avg num calls, fixed event graph tooltip not displaying correct values
Change 2796208 on 2015/12/09 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
Profiler - Remove support for multiple instances in the profiler (game thread is always visible, a few crash fixes, cleaned code a bit)
Change 2797658 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Allocation verification helpers. Helps with tracking down memory stomps, freeing the same pointers multiple times.
Change 2797699 on 2015/12/10 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fix incorrect asset loading in Cooked game data (by bozaro)
PR #1844
Change 2798173 on 2015/12/10 by Steve.Robb@Dev-Core
Migration of Fortnite to use engine's TEnumRange.
Change 2798217 on 2015/12/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
PR #1331
[Core] Added a stomp allocator that allows finding memory overruns, underruns, and read/write after free. (Contributed by Pablo Zurita)
Change 2799605 on 2015/12/11 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Fixing a crash when cancelling async loading caused by detaching linker from objects that had RF_NeedLoad flag set.
Change 2799849 on 2015/12/11 by Steve.Robb@Dev-Core
Migration of Ocean to use engine's TEnumRange.
Change 2803144 on 2015/12/15 by Robert.Manuszewski@Robert.Manuszewski_NCL_Stream1
Changed export tagging archive to also serialize class default objects using the normal Serialize path so that it can collect all custom versions used by exports.
Change 2803206 on 2015/12/15 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec
#jira UE-24177
Audit ôshippingö defines in engine
Change 2804868 on 2015/12/16 by Steve.Robb@Dev-Core
Removal of stats from MallocBinned2, to be readded later.
#lockdown Nick.Penwarden
[CL 2805158 by Robert Manuszewski in Main branch]
2015-12-16 11:52:36 -05:00
FDevVersionRegistration : : DumpVersionsToLog ( ) ;
2014-03-14 14:13:41 -04:00
# if PLATFORM_64BITS
UE_LOG ( LogInit , Log , TEXT ( " Compiled (64-bit): %s %s " ) , ANSI_TO_TCHAR ( __DATE__ ) , ANSI_TO_TCHAR ( __TIME__ ) ) ;
# else
UE_LOG ( LogInit , Log , TEXT ( " Compiled (32-bit): %s %s " ) , ANSI_TO_TCHAR ( __DATE__ ) , ANSI_TO_TCHAR ( __TIME__ ) ) ;
# endif
2014-08-18 09:48:44 -04:00
// Print compiler version info
# if defined(__clang__)
UE_LOG ( LogInit , Log , TEXT ( " Compiled with Clang: %s " ) , ANSI_TO_TCHAR ( __clang_version__ ) ) ;
# elif defined( _MSC_VER )
# ifndef __INTELLISENSE__ // Intellisense compiler doesn't support _MSC_FULL_VER
{
const FString VisualCPPVersion ( FString : : Printf ( TEXT ( " %d " ) , _MSC_FULL_VER ) ) ;
const FString VisualCPPRevisionNumber ( FString : : Printf ( TEXT ( " %02d " ) , _MSC_BUILD ) ) ;
UE_LOG ( LogInit , Log , TEXT ( " Compiled with Visual C++: %s.%s.%s.%s " ) ,
* VisualCPPVersion . Mid ( 0 , 2 ) , // Major version
* VisualCPPVersion . Mid ( 2 , 2 ) , // Minor version
* VisualCPPVersion . Mid ( 4 ) , // Build version
* VisualCPPRevisionNumber // Revision number
) ;
}
# endif
# else
UE_LOG ( LogInit , Log , TEXT ( " Compiled with unrecognized C++ compiler " ) ) ;
# endif
2014-03-14 14:13:41 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Build Configuration: %s " ) , EBuildConfigurations : : ToString ( FApp : : GetBuildConfiguration ( ) ) ) ;
UE_LOG ( LogInit , Log , TEXT ( " Branch Name: %s " ) , * FApp : : GetBranchName ( ) ) ;
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
UE_LOG ( LogInit , Log , TEXT ( " Command line: %s " ) , FCommandLine : : GetForLogging ( ) ) ;
2014-03-14 14:13:41 -04:00
UE_LOG ( LogInit , Log , TEXT ( " Base directory: %s " ) , FPlatformProcess : : BaseDir ( ) ) ;
//UE_LOG(LogInit, Log, TEXT("Character set: %s"), sizeof(TCHAR)==1 ? TEXT("ANSI") : TEXT("Unicode") );
2015-12-04 09:32:58 -05:00
UE_LOG ( LogInit , Log , TEXT ( " Installed Engine Build: %d " ) , FApp : : IsEngineInstalled ( ) ? 1 : 0 ) ;
2014-03-14 14:13:41 -04:00
// if a logging build, clear out old log files
2016-04-05 11:25:00 -04:00
# if !NO_LOGGING
2014-03-14 14:13:41 -04:00
FMaintenance : : DeleteOldLogs ( ) ;
# endif
# if !UE_BUILD_SHIPPING
FApp : : InitializeSession ( ) ;
# endif
# if WITH_ENGINE
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
if ( ! IsRunningCommandlet ( ) )
2015-06-22 14:42:11 -04:00
{
Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2826201 on 2016/01/13 by Zabir.Hoque
Add more verbose logging to try to understand #OR-11297
#lockdown Andrew.Grant
#CodeReview Marcus.Wassmer
#RB none
#TESTS compiled Win64 debug editor, ran agora_p
Change 2826170 on 2016/01/13 by Marcus.Wassmer
Flush unloaded resource properly in LoadMap
#codereview Gil.Gribb
#rb none
#test cycling game. memory is freed properly now.
#lockdown Andrew.Grant
Change 2826135 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General
Change 2826131 on 2016/01/12 by Michael.Noland
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General
Change 2826128 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main
Change 2826116 on 2016/01/12 by Michael.Noland
Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
- Added logging of the current average frame time when the datacenter ping is finalized
- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
#jira OR-12453
#rb paul.moore
#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
#lockdown andrew.grant
#codereview josh.markiewicz
Change 2825772 on 2016/01/12 by Dmitry.Rekman
Linux signal handling improvements.
- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
- Remove unnecessary memory allocations from graceful termination handler.
#rb none
#tests Run the Linux server and crashed it a few times.
#codereview David.Vossel, Michael.Trepka
Change 2825768 on 2016/01/12 by Josh.Markiewicz
#UE4 - added print out of MS/FPS during Qos ping evaluation
#rb michael.noland
#tests loaded up through login screen to see output
Change 2825703 on 2016/01/12 by Brian.Karis
Switched on new motion blur. Set temporal AA sharpness to 1.
#rb none
#TESTS editor
Change 2825689 on 2016/01/12 by Lina.Halper
Fix for get animation notify crash
https://jira.ol.epicgames.net/browse/OR-12248
https://jira.ol.epicgames.net/browse/OR-12348
- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
- Also fixed blend space player to reinitialize cache data
- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.
#rb : Laurent.Delayen
#tests: 10 Sparrows bot match for long time
#code review: Martin.Wilson
#lockdown: Andrew.Grant
Change 2825680 on 2016/01/12 by Martin.Mittring
fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
#rb:Olaf.Piesche, David.Hill
#test: PC, many cases
Change 2825579 on 2016/01/12 by Chris.Bunner
Force shadow shape bone indices on the required update list.
#rb Lina.Halper, Rolando.Caloca
#tests Editor
#codereview Daniel.Wright
#jira OR-12339
Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
// Earliest place to init the online subsystems
// Code needs GConfigFile to be valid
// Must be after FThreadStats::StartThread();
// Must be before Render/RHI subsystem D3DCreate()
// For platform services that need D3D hooks like Steam
// --
// Why load HTTP?
// Because most, if not all online subsystems will load HTTP themselves. This can cause problems though, as HTTP will be loaded *after* OSS,
// and if OSS holds on to resources allocated by it, this will cause crash (modules are being unloaded in LIFO order with no dependency tracking).
// Loading HTTP before OSS works around this problem by making ModuleManager unload HTTP after OSS, at the cost of extra module for the few OSS (like Null) that don't use it.
if ( FModuleManager : : Get ( ) . ModuleExists ( TEXT ( " XMPP " ) ) )
{
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " XMPP " ) ) ;
}
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " HTTP " ) ) ;
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " OnlineSubsystem " ) ) ;
FModuleManager : : Get ( ) . LoadModule ( TEXT ( " OnlineSubsystemUtils " ) ) ;
// Also load the console/platform specific OSS which might not necessarily be the default OSS instance
IOnlineSubsystem : : GetByPlatform ( ) ;
2015-06-22 14:42:11 -04:00
}
2014-03-14 14:13:41 -04:00
# endif
// Checks.
check ( sizeof ( uint8 ) = = 1 ) ;
check ( sizeof ( int8 ) = = 1 ) ;
check ( sizeof ( uint16 ) = = 2 ) ;
check ( sizeof ( uint32 ) = = 4 ) ;
check ( sizeof ( uint64 ) = = 8 ) ;
check ( sizeof ( ANSICHAR ) = = 1 ) ;
# if PLATFORM_TCHAR_IS_4_BYTES
check ( sizeof ( TCHAR ) = = 4 ) ;
# else
check ( sizeof ( TCHAR ) = = 2 ) ;
# endif
check ( sizeof ( int16 ) = = 2 ) ;
check ( sizeof ( int32 ) = = 4 ) ;
check ( sizeof ( int64 ) = = 8 ) ;
check ( sizeof ( bool ) = = 1 ) ;
check ( sizeof ( float ) = = 4 ) ;
check ( sizeof ( double ) = = 8 ) ;
2015-08-13 15:44:02 -04:00
check ( GEngineNetVersion = = 0 | | GEngineNetVersion > = GEngineMinNetVersion | | FEngineVersion : : Current ( ) . IsLicenseeVersion ( ) ) ;
2014-03-14 14:13:41 -04:00
// Init list of common colors.
GColorList . CreateColorMap ( ) ;
2014-08-19 09:49:21 -04:00
bool bForceSmokeTests = false ;
GConfig - > GetBool ( TEXT ( " AutomationTesting " ) , TEXT ( " bForceSmokeTests " ) , bForceSmokeTests , GEngineIni ) ;
bForceSmokeTests | = FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " bForceSmokeTests " ) ) ;
FAutomationTestFramework : : GetInstance ( ) . SetForceSmokeTests ( bForceSmokeTests ) ;
2014-03-14 14:13:41 -04:00
// Init other systems.
FCoreDelegates : : OnInit . Broadcast ( ) ;
2014-05-14 20:01:43 -04:00
return true ;
2014-03-14 14:13:41 -04:00
}
void FEngineLoop : : AppPreExit ( )
{
UE_LOG ( LogExit , Log , TEXT ( " Preparing to exit. " ) ) ;
FCoreDelegates : : OnPreExit . Broadcast ( ) ;
# if WITH_ENGINE
if ( FString ( FCommandLine : : Get ( ) ) . Contains ( TEXT ( " CreatePak " ) ) & & GetDerivedDataCache ( ) )
{
// if we are creating a Pak, we need to make sure everything is done and written before we exit
UE_LOG ( LogInit , Display , TEXT ( " Closing DDC Pak File. " ) ) ;
GetDerivedDataCacheRef ( ) . WaitForQuiescence ( true ) ;
}
# endif
# if WITH_EDITOR
FRemoteConfig : : Flush ( ) ;
# endif
FCoreDelegates : : OnExit . Broadcast ( ) ;
// Clean up the thread pool
2015-03-24 07:29:32 -04:00
if ( GThreadPool ! = nullptr )
2014-03-14 14:13:41 -04:00
{
GThreadPool - > Destroy ( ) ;
}
2014-04-25 16:10:53 -04:00
# if WITH_ENGINE
if ( GShaderCompilingManager )
{
GShaderCompilingManager - > Shutdown ( ) ;
2014-12-16 20:00:07 -05:00
delete GShaderCompilingManager ;
GShaderCompilingManager = nullptr ;
2014-04-25 16:10:53 -04:00
}
# endif
2014-03-14 14:13:41 -04:00
}
void FEngineLoop : : AppExit ( )
{
UE_LOG ( LogExit , Log , TEXT ( " Exiting. " ) ) ;
2014-08-19 22:04:56 -04:00
FPlatformMisc : : PlatformTearDown ( ) ;
2014-03-14 14:13:41 -04:00
if ( GConfig )
{
GConfig - > Exit ( ) ;
delete GConfig ;
2015-09-29 15:30:25 -04:00
GConfig = nullptr ;
2014-03-14 14:13:41 -04:00
}
if ( GLog )
{
GLog - > TearDown ( ) ;
}
2014-05-02 11:04:22 -04:00
FInternationalization : : TearDown ( ) ;
2014-03-14 14:13:41 -04:00
}
2015-09-29 15:30:25 -04:00
2014-08-05 17:36:56 -04:00
void FEngineLoop : : PreInitHMDDevice ( )
{
2014-08-28 13:49:44 -04:00
# if WITH_ENGINE && !UE_SERVER
2016-04-06 08:52:37 -04:00
if ( ! FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " nohmd " ) ) & & ! FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " emulatestereo " ) ) )
2014-08-05 17:36:56 -04:00
{
2016-04-06 08:52:37 -04:00
// Get a list of modules that implement this feature
FName Type = IHeadMountedDisplayModule : : GetModularFeatureName ( ) ;
IModularFeatures & ModularFeatures = IModularFeatures : : Get ( ) ;
TArray < IHeadMountedDisplayModule * > HMDModules = ModularFeatures . GetModularFeatureImplementations < IHeadMountedDisplayModule > ( Type ) ;
// Iterate over modules, calling PreInit
for ( auto HMDModuleIt = HMDModules . CreateIterator ( ) ; HMDModuleIt ; + + HMDModuleIt )
2014-08-05 17:36:56 -04:00
{
2016-04-06 08:52:37 -04:00
IHeadMountedDisplayModule * HMDModule = * HMDModuleIt ;
if ( ! HMDModule - > PreInit ( ) )
2014-08-05 17:36:56 -04:00
{
2016-04-06 08:52:37 -04:00
// Unregister modules which fail PreInit
ModularFeatures . UnregisterModularFeature ( Type , HMDModule ) ;
2014-08-05 17:36:56 -04:00
}
}
}
2014-08-28 13:49:44 -04:00
# endif // #if WITH_ENGINE && !UE_SERVER
2014-08-05 17:36:56 -04:00
}
2015-09-29 15:30:25 -04:00
2016-04-05 11:25:00 -04:00
# undef LOCTEXT_NAMESPACE