Removed file size limit on .shadervariantlist files.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
santorac
2021-12-10 17:13:23 -08:00
parent cfb426b86c
commit 5da5ff9067
2 changed files with 5 additions and 5 deletions
@@ -241,7 +241,7 @@ namespace AZ
{
// Need to get the name of the shader file from the template so that we can preprocess the shader data and setup
// source file dependencies.
if (!RPI::JsonUtils::LoadObjectFromFile(variantListFullPath, shaderVariantList))
if (!RPI::JsonUtils::LoadObjectFromFile(variantListFullPath, shaderVariantList, AZStd::numeric_limits<size_t>::max()))
{
AZ_Error(ShaderVariantAssetBuilderName, false, "Failed to parse Shader Variant List Descriptor JSON from [%s]", variantListFullPath.c_str());
return LoadResult{LoadResult::Code::Error};
@@ -635,7 +635,7 @@ namespace AZ
AzFramework::StringFunc::Path::ConstructFull(request.m_watchFolder.data(), request.m_sourceFile.data(), variantListFullPath, true);
RPI::ShaderVariantListSourceData shaderVariantListDescriptor;
if (!RPI::JsonUtils::LoadObjectFromFile(variantListFullPath, shaderVariantListDescriptor))
if (!RPI::JsonUtils::LoadObjectFromFile(variantListFullPath, shaderVariantListDescriptor, AZStd::numeric_limits<size_t>::max()))
{
AZ_Assert(false, "Failed to parse Shader Variant List Descriptor JSON [%s]", variantListFullPath.c_str());
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed;
@@ -29,7 +29,7 @@ namespace AZ
//! Loads serialized object data from a json file at the specified path
//! Errors will be reported using AZ trace
template<typename ObjectType>
bool LoadObjectFromFile(const AZStd::string& path, ObjectType& objectData);
bool LoadObjectFromFile(const AZStd::string& path, ObjectType& objectData, size_t maxFileSize = DefaultMaxFileSize);
//! Saves serialized object data to a json file at the specified path
//! Errors will be reported using AZ trace
@@ -39,11 +39,11 @@ namespace AZ
// Definitions...
template<typename ObjectType>
bool LoadObjectFromFile(const AZStd::string& path, ObjectType& objectData)
bool LoadObjectFromFile(const AZStd::string& path, ObjectType& objectData, size_t maxFileSize)
{
objectData = ObjectType();
auto loadOutcome = AZ::JsonSerializationUtils::ReadJsonFile(path, DefaultMaxFileSize);
auto loadOutcome = AZ::JsonSerializationUtils::ReadJsonFile(path, maxFileSize);
if (!loadOutcome.IsSuccess())
{
AZ_Error("AZ::RPI::JsonUtils", false, "%s", loadOutcome.GetError().c_str());