Make shader library determinism optional per platform.

#rb Josh.Adams, Ben.Woodhouse
#rnx


#ROBOMERGE-OWNER: Arciel.Rekman
#ROBOMERGE-AUTHOR: arciel.rekman
#ROBOMERGE-SOURCE: CL 11450810 via CL 11452365 via CL 11452390 via CL 11452432
#ROBOMERGE-BOT: (v654-11333218)

[CL 11456136 by Arciel Rekman in Main branch]
This commit is contained in:
Arciel Rekman
2020-02-15 10:16:44 -05:00
parent 4287aa1fa5
commit f6b2c6df54
5 changed files with 57 additions and 25 deletions
@@ -181,9 +181,15 @@ struct RENDERCORE_API FShaderCodeLibrary
// Clean the cook directories
static void CleanDirectories(TArray<FName> const& ShaderFormats);
// Specify the shader formats to cook and which ones needs stable keys. Provide an array of tuples
// with names and whether the format needs stable keys.
static void CookShaderFormats(TArray<TTuple<FName,bool>> const& ShaderFormats);
struct FShaderFormatDescriptor
{
FName ShaderFormat;
bool bNeedsStableKeys;
bool bNeedsDeterministicOrder;
};
// Specify the shader formats to cook and which ones needs stable keys. Provide an array of FShaderFormatDescriptors
static void CookShaderFormats(TArray<FShaderFormatDescriptor> const& ShaderFormats);
// At cook time, add shader code to collection
static bool AddShaderCode(EShaderPlatform ShaderPlatform, const FShaderMapResourceCode* Code);
@@ -209,7 +215,7 @@ struct RENDERCORE_API FShaderCodeLibrary
static void DumpShaderCodeStats();
// Create a smaller 'patch' library that only contains data from 'NewMetaDataDir' not contained in any of 'OldMetaDataDirs'
static bool CreatePatchLibrary(TArray<FString> const& OldMetaDataDirs, FString const& NewMetaDataDir, FString const& OutDir, bool bNativeFormat);
static bool CreatePatchLibrary(TArray<FString> const& OldMetaDataDirs, FString const& NewMetaDataDir, FString const& OutDir, bool bNativeFormat, bool bNeedsDeterministicOrder);
#endif
// Safely assign the hash to a shader object