In Atom_Feature_Common.static, get cvar values from cvar system instead of reading directly (#5350)

Signed-off-by: Tommy Walton <waltont@amazon.com>
monroegm-disable-blank-issue-2
Tommy Walton 4 years ago committed by GitHub
parent f1d9e7ae28
commit e3c3db4ba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,7 +97,12 @@ namespace AZ
Utils::PngFile image = Utils::PngFile::Create(readbackResult.m_imageDescriptor.m_size, format, *buffer);
Utils::PngFile::SaveSettings saveSettings;
saveSettings.m_compressionLevel = r_pngCompressionLevel;
if (auto console = AZ::Interface<AZ::IConsole>::Get(); console != nullptr)
{
console->GetCvarValue("r_pngCompressionLevel", saveSettings.m_compressionLevel);
}
// We should probably strip alpha to save space, especially for automated test screenshots. Alpha is left in to maintain
// prior behavior, changing this is out of scope for the current task. Note, it would have bit of a cascade effect where
// AtomSampleViewer's ScriptReporter assumes an RGBA image.

@ -98,7 +98,12 @@ namespace AZ
}
m_needsInit = false;
const AZ::u64 sizeInMb = r_skinnedMeshInstanceMemoryPoolSize;
AZ::u64 sizeInMb{};
if (auto console = AZ::Interface<AZ::IConsole>::Get(); console != nullptr)
{
console->GetCvarValue("r_skinnedMeshInstanceMemoryPoolSize", sizeInMb);
}
m_sizeInBytes = sizeInMb * (1024u * 1024u);
CalculateAlignment();

Loading…
Cancel
Save