Put the ShaderMetrics.json in the @user@ folder, plus an unrelated #include path fix. (#4402)

Signed-off-by: bosnichd <bosnichd@amazon.com>
monroegm-disable-blank-issue-2
bosnichd 4 years ago committed by GitHub
parent 8d67f184c8
commit 3635e5ed35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "Platform.h"
#include <AzTest/Platform.h>
#include <iostream>
class ModuleHandle

@ -23,11 +23,11 @@ namespace AZ
{
namespace RPI
{
AZStd::string GetMetricsFilePath()
AZ::IO::FixedMaxPath GetMetricsFilePath()
{
char shaderMetricPath[AZ_MAX_PATH_LEN];
AZ::Utils::GetExecutableDirectory(shaderMetricPath, AZ_MAX_PATH_LEN);
return AZStd::string(shaderMetricPath) + AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING + "ShaderMetrics.json";
AZ::IO::FixedMaxPath resolvedPath;
AZ::IO::LocalFileIO::GetInstance()->ResolvePath(resolvedPath, "@user@/ShaderMetrics.json");
return resolvedPath;
}
ShaderMetricsSystemInterface* ShaderMetricsSystemInterface::Get()
@ -64,7 +64,7 @@ namespace AZ
void ShaderMetricsSystem::ReadLog()
{
const AZStd::string metricsFilePath = GetMetricsFilePath();
const AZ::IO::FixedMaxPath metricsFilePath = GetMetricsFilePath();
if (AZ::IO::LocalFileIO::GetInstance()->Exists(metricsFilePath.c_str()))
{
@ -80,7 +80,7 @@ namespace AZ
void ShaderMetricsSystem::WriteLog()
{
const AZStd::string metricsFilePath = GetMetricsFilePath();
const AZ::IO::FixedMaxPath metricsFilePath = GetMetricsFilePath();
auto saveResult = AZ::JsonSerializationUtils::SaveObjectToFile<ShaderVariantMetrics>(&m_metrics, metricsFilePath.c_str());

Loading…
Cancel
Save