You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2870336 on 2016/02/17 by Marc.Audy Continued splitting up Orion Build * Restructure from platform based MakeBuild steps in to a PS4, Server, and Windows Client MakeBuild * Cook server data only once for both Windows and Linux (windows reuses Linux server data) * Split compilation of Win64 Client and Server such that MakeBuild_Server only builds Server and MakeBuild_WindowsClient only builds Client #jira UEB-580 #rb Ben.Marsh #tests Preflight and generated Windows Client and Server work to play game Change 2870026 on 2016/02/17 by Wes.Hunt Don't allow array shrinking when removing the corruption wrapper trailer. #rb none Updating CIS Counter Change 2869725 on 2016/02/17 by Dmitry.Rekman More analytics and QoS stats added for 0.19. #rb none #tests Ran Windows client and Linux server on compatible content. Change 2869705 on 2016/02/16 by Ryan.Gerleve Fix replicated properties and call RepNotifies of startup actors when scrubbing in replays. This is the engine support for fixing OR-6817, towers not respawning when rewinding replays. #rb john.pollard #tests golden path, replays, ps4 nomcp Change 2869644 on 2016/02/16 by Jason.Bestimt #ORION_DEV - Merge MAIN (0.18) at CL# 2869635 #Tests:none #RB:none Change 2869586 on 2016/02/16 by Marcus.Wassmer Fix texturestreaming RHI flushes. #rb none #test goldenpath #codereview Gil.Gribb Change 2869279 on 2016/02/16 by Lukasz.Furman fixed minion hit reaction directions #orion OR-13953 #rb Mieszko.Zielinski #tests PIE: hit minions with various abilities from different angles, checked velocity of death particles when killed by abilities and towers #codereview Dan.Youhon Change 2869277 on 2016/02/16 by Wes.Hunt During cook, when a package is not ready to save, actually early out of the saving code. Saves somewhere in the 130s to 200s range for cooks. #rb daniel.lamb #tests local windows cooks, preflight PS4 cooks Change 2869132 on 2016/02/16 by Mieszko.Zielinski Added a function to AISenseConfig allowing native-code MaxAge configuration #UE4 #rb Lukasz.Furman #test none required Change 2868981 on 2016/02/16 by Wes.Hunt remove -LogCookStats cmdline check, always log cook stats. -SendCookAnalytics flag is still used. This was requested by NickP. #rb none #tests local windows cooks Change 2868975 on 2016/02/16 by Wes.Hunt Don't submit DDC usage stats for zero-sized events. #rb none #tests local windows cook Change 2868956 on 2016/02/16 by Jason.Bestimt #ORION_DEV - Merge MAIN (0.18) at CL# 2868926 #RB:none #Tests:none Change 2868889 on 2016/02/16 by Max.Chen Sequencer: Only allow transport control binding when editing level editor sequencers. #rb none #tests none Change 2868663 on 2016/02/16 by David.Ratti downgrade warning to display #rb none #tests compile Change 2868624 on 2016/02/16 by Marcus.Wassmer Re-Enable Defrag validation for devgeneral #rb none #test none Change 2868493 on 2016/02/16 by Benn.Gallagher Added a few more stats to morph target updates to try and narrow down hitches #rb Bruce.Nesbit #tests pie, -game Win64 Change 2868445 on 2016/02/16 by Dmitry.Rekman Linux: report crashes due to stack overflow (OR-14519). - Reserve memory for alternative stack for signal handlers. Adds about 128KB memory per thread. - Force process spawning to use vfork() when no pipes are needed. - Ignore all signals except explicitly handled. - Prevent signals from being raised while another one is handled. - Added "debug threadrecurse" and "debug threadstackoverflow" to test that. [CL 2873763 by Andrew Grant in Main branch]
225 lines
7.5 KiB
C++
225 lines
7.5 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
#include "ModuleManager.h"
|
|
|
|
class FDerivedDataCacheUsageStats;
|
|
|
|
/**
|
|
* Opaque class for rollup handling
|
|
**/
|
|
class IDerivedDataRollup
|
|
{
|
|
public:
|
|
virtual ~IDerivedDataRollup()
|
|
{
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Interface for the derived data cache
|
|
* This API is fully threadsafe (with the possible exception of the system interface: NotfiyBootComplete, etc).
|
|
**/
|
|
class FDerivedDataCacheInterface
|
|
{
|
|
public:
|
|
virtual ~FDerivedDataCacheInterface()
|
|
{
|
|
}
|
|
|
|
//--------------------
|
|
// High Level Interface
|
|
//--------------------
|
|
|
|
/**
|
|
* Synchronously checks the cache and if the item is present, it returns the cached results, otherwise tells the deriver to build the data and then updates the cache
|
|
* @param DataDeriver plugin to produce cache key and in the event of a miss, return the data.
|
|
* @return true if the data was retrieved from the cache or the deriver built the data sucessfully. false can only occur if the plugin returns false.
|
|
**/
|
|
virtual bool GetSynchronous(class FDerivedDataPluginInterface* DataDeriver, TArray<uint8>& OutData) = 0;
|
|
|
|
/**
|
|
* Starts the async process of checking the cache and if the item is present, retrieving the cached results, otherwise telling the deriver to build the data and then updating the cache
|
|
* If the plugin does not support threading, all of the above will be completed before the call returns.
|
|
* @param DataDeriver plugin to produce cache key and in the event of a miss, return the data.
|
|
* @return a handle that can be used for PollAsynchronousCompletion, WaitAsynchronousCompletion and GetAsynchronousResults
|
|
**/
|
|
virtual uint32 GetAsynchronous(class FDerivedDataPluginInterface* DataDeriver) = 0;
|
|
/**
|
|
* Polls a previous GetAsynchronous get for completion.
|
|
* @param Handle Handle returned from GetAsynchronous.
|
|
* @return true if the build / retrieve is complete and the results can be obtained.
|
|
**/
|
|
virtual bool PollAsynchronousCompletion(uint32 Handle) = 0;
|
|
/**
|
|
* Blocks the current thread until an previous GetAsynchronous request is ready
|
|
* @param Handle Handle returned from GetAsynchronous.
|
|
**/
|
|
virtual void WaitAsynchronousCompletion(uint32 Handle) = 0;
|
|
/**
|
|
* Retrieves the results from an async lookup / build. MUST only be called after the results are known to be ready by one of the aforementioned calls.
|
|
* @param Handle Handle returned from GetAsynchronous.
|
|
* @param OutData Array to receive the output results.
|
|
* @return true if the data was retrieved from the cache or the deriver built the data successfully. false can only occur if the plugin returns false.
|
|
**/
|
|
virtual bool GetAsynchronousResults(uint32 Handle, TArray<uint8>& OutData) = 0;
|
|
|
|
//--------------------------
|
|
// Low Level Static Helpers
|
|
//--------------------------
|
|
|
|
/**
|
|
* Static function to make sure a cache key contains only legal characters by using an escape
|
|
* @param CacheKey Cache key to sanitize
|
|
* @return Sanitized cache key
|
|
**/
|
|
static FString SanitizeCacheKey(const TCHAR* CacheKey)
|
|
{
|
|
FString Output;
|
|
FString Input(CacheKey);
|
|
int32 StartValid = 0;
|
|
int32 NumValid = 0;
|
|
|
|
for (int32 i = 0; i < Input.Len(); i++)
|
|
{
|
|
if (FChar::IsAlnum(Input[i]) || FChar::IsUnderscore(Input[i]))
|
|
{
|
|
NumValid++;
|
|
}
|
|
else
|
|
{
|
|
// Copy the valid range so far
|
|
Output += Input.Mid(StartValid, NumValid);
|
|
|
|
// Reset valid ranges
|
|
StartValid = i + 1;
|
|
NumValid = 0;
|
|
|
|
// Replace the invalid character with a special string
|
|
Output += FString::Printf(TEXT("$%x"), uint32(Input[i]));
|
|
}
|
|
}
|
|
|
|
// Just return the input if the entire string was valid
|
|
if (StartValid == 0 && NumValid == Input.Len())
|
|
{
|
|
return Input;
|
|
}
|
|
else if (NumValid > 0)
|
|
{
|
|
// Copy the remaining valid part
|
|
Output += Input.Mid(StartValid, NumValid);
|
|
}
|
|
|
|
return Output;
|
|
}
|
|
|
|
/**
|
|
* Static function to build a cache key out of the plugin name, versions and plugin specific info
|
|
* @param PluginName Name of the derived data type
|
|
* @param VersionString Version string of the derived data
|
|
* @param PluginSpecificCacheKeySuffix GUIDS and / or Hashes, etc to uniquely identify the specific cache entry
|
|
* @return Assembled cache key
|
|
**/
|
|
static FString BuildCacheKey(const TCHAR* PluginName, const TCHAR* VersionString, const TCHAR* PluginSpecificCacheKeySuffix)
|
|
{
|
|
return SanitizeCacheKey(*FString::Printf(TEXT("%s_%s_%s"), PluginName, VersionString, PluginSpecificCacheKeySuffix));
|
|
}
|
|
|
|
//--------------------
|
|
// Low Level Interface
|
|
//--------------------
|
|
|
|
/**
|
|
* Starts a rollup. Use this for GetAsynchronous calls, then call close on it
|
|
* @return a pointer to a rollup
|
|
**/
|
|
virtual IDerivedDataRollup* StartRollup() = 0;
|
|
|
|
/**
|
|
* Ends a rollup. Use this for GetAsynchronous calls, then call close on it
|
|
* @param Rollup reference to a pointer to the rollup to close...also sets the pointer to NULL
|
|
**/
|
|
virtual void EndRollup(IDerivedDataRollup*& Rollup) = 0;
|
|
|
|
/**
|
|
* Synchronously checks the cache and if the item is present, it returns the cached results, otherwise it returns false
|
|
* @param CacheKey Key to identify the data
|
|
* @return true if the data was retrieved from the cache
|
|
**/
|
|
virtual bool GetSynchronous(const TCHAR* CacheKey, TArray<uint8>& OutData) = 0;
|
|
|
|
/**
|
|
* Starts the async process of checking the cache and if the item is present, retrieving the cached results
|
|
* @param CacheKey Key to identify the data
|
|
* @param Rollup Rollup pointer, if this is part of a rollup
|
|
* @return a handle that can be used for PollAsynchronousCompletion, WaitAsynchronousCompletion and GetAsynchronousResults
|
|
**/
|
|
virtual uint32 GetAsynchronous(const TCHAR* CacheKey, IDerivedDataRollup* Rollup = NULL) = 0;
|
|
|
|
/**
|
|
* Puts data into the cache. This is fire-and-forget and typically asynchronous.
|
|
* @param CacheKey Key to identify the data
|
|
* @param Data Data to put in the cache under this key
|
|
**/
|
|
virtual void Put(const TCHAR* CacheKey, TArray<uint8>& Data, bool bPutEvenIfExists = false) = 0;
|
|
|
|
/**
|
|
* Hint that the data associated with the key is transient and may be optionally purged from the cache.
|
|
* @param CacheKey Key that is associated with transient data.
|
|
*/
|
|
virtual void MarkTransient(const TCHAR* CacheKey) = 0;
|
|
|
|
/**
|
|
* Returns true if the data associated with the key is likely to exist in the cache.
|
|
* Even if this function returns true, a get for this key may still fail!
|
|
* @param CacheKey Key to see if data probably exists.
|
|
*/
|
|
virtual bool CachedDataProbablyExists(const TCHAR* CacheKey) = 0;
|
|
|
|
//--------------------
|
|
// System Interface
|
|
//--------------------
|
|
|
|
/**
|
|
* Notify the system that the boot process is complete and so we can write the boot cache and get rid of it
|
|
*/
|
|
virtual void NotifyBootComplete() = 0;
|
|
|
|
/**
|
|
* Adds or subtracts a number from the thread safe counter which tracks outstand async requests. This is used to ensure everything is complete prior to shutdown.
|
|
*/
|
|
virtual void AddToAsyncCompletionCounter(int32 Addend) = 0;
|
|
|
|
/**
|
|
* Wait for all outstanding async DDC operations to complete.
|
|
*/
|
|
virtual void WaitForQuiescence(bool bShutdown = false) = 0;
|
|
|
|
/**
|
|
* Retrieve the directories used by the DDC
|
|
*/
|
|
virtual void GetDirectories(TArray<FString>& OutResults) = 0;
|
|
|
|
//--------------------
|
|
// UsageStats Interface
|
|
//--------------------
|
|
|
|
/**
|
|
* Retrieve usage stats by the DDC
|
|
*/
|
|
virtual void GatherUsageStats(TMap<FString, FDerivedDataCacheUsageStats>& UsageStats) = 0;
|
|
};
|
|
|
|
/**
|
|
* Module for the DDC
|
|
*/
|
|
class IDerivedDataCacheModule : public IModuleInterface
|
|
{
|
|
public:
|
|
/** Return the DDC interface **/
|
|
virtual FDerivedDataCacheInterface& GetDDC() = 0;
|
|
};
|
|
|