Put the ShaderMetrics.json in the @user@ folder, plus an unrelated #include path fix. (#4402)
Signed-off-by: bosnichd <bosnichd@amazon.com>
This commit is contained in:
+1
-1
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user