ATOM-16346 Change Atom setreg path (#3690)

* Changed path Amazon to O3DE. Fixed issues that setreg is not loaded in game launchers.

Signed-off-by: jiaweig <jiaweig@amazon.com>

* Add brackets.

Signed-off-by: jiaweig <jiaweig@amazon.com>
This commit is contained in:
jiaweig
2021-08-30 14:57:46 -07:00
committed by GitHub
parent cdcdcb0777
commit a7309cf2eb
12 changed files with 40 additions and 9 deletions
@@ -55,6 +55,12 @@ namespace AzGameFramework
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_TargetBuildDependencyRegistry(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer);
#if AZ_TRAIT_OS_IS_HOST_OS_PLATFORM && (defined (AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD))
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_EngineRegistry(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer);
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_GemRegistries(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer);
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_ProjectRegistry(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer);
#endif
// Used the lowercase the platform name since the bootstrap.game.<config>.<platform>.setreg is being loaded
// from the asset cache root where all the files are in lowercased from regardless of the filesystem case-sensitivity
static constexpr char filename[] = "bootstrap.game." AZ_BUILD_CONFIGURATION_TYPE "." AZ_TRAIT_OS_PLATFORM_CODENAME_LOWER ".setreg";
@@ -68,7 +68,7 @@ namespace AZ
HeapMemoryHintParameters m_usageHintParameters;
HeapAllocationStrategy m_heapAllocationStrategy = HeapAllocationStrategy::MemoryHint;
void LoadPlatformLimitsDescriptor(const char* rhiName);
virtual void LoadPlatformLimitsDescriptor(const char* rhiName);
};
class PlatformLimits final
@@ -77,7 +77,7 @@ namespace AZ
void PlatformLimitsDescriptor::LoadPlatformLimitsDescriptor(const char* rhiName)
{
auto settingsRegistry = AZ::SettingsRegistry::Get();
AZStd::string platformLimitsRegPath = AZStd::string::format("/Amazon/Atom/RHI/PlatformLimits/%s", rhiName);
AZStd::string platformLimitsRegPath = AZStd::string::format("/O3DE/Atom/RHI/PlatformLimits/%s", rhiName);
if (!(settingsRegistry &&
settingsRegistry->GetObject(this, azrtti_typeid(this), platformLimitsRegPath.c_str())))
{
+1 -1
View File
@@ -147,7 +147,7 @@ namespace AZ
// Some GPU drivers have known issues and it is recommended to update or use other versions.
auto settingsRegistry = AZ::SettingsRegistry::Get();
PhysicalDeviceDriverValidator physicalDriverValidator;
if (!(settingsRegistry && settingsRegistry->GetObject(physicalDriverValidator, "/Amazon/Atom/RHI/PhysicalDeviceDriverInfo")))
if (!(settingsRegistry && settingsRegistry->GetObject(physicalDriverValidator, "/O3DE/Atom/RHI/PhysicalDeviceDriverInfo")))
{
AZ_Printf("RHISystem", "Failed to get settings registry for GPU driver Info.");
}
@@ -65,6 +65,8 @@ namespace AZ
AZStd::unordered_map<AZStd::string, AZStd::array<uint32_t, NumHeapFlags>> m_descriptorHeapLimits;
FrameGraphExecuterData m_frameGraphExecuterData;
void LoadPlatformLimitsDescriptor(const char* rhiName) override;
};
}
}
@@ -7,6 +7,7 @@
*/
#include <Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Settings/SettingsRegistryImpl.h>
namespace AZ
{
@@ -39,5 +40,27 @@ namespace AZ
;
}
}
void PlatformLimitsDescriptor::LoadPlatformLimitsDescriptor(const char* rhiName)
{
auto settingsRegistry = AZ::SettingsRegistry::Get();
AZStd::string platformLimitsRegPath = AZStd::string::format("/O3DE/Atom/RHI/PlatformLimits/%s", rhiName);
if (!(settingsRegistry && settingsRegistry->GetObject(this, azrtti_typeid(this), platformLimitsRegPath.c_str())))
{
AZ_Warning(
"Device", false, "Platform limits for %s %s is not loaded correctly. Will use default values.",
AZ_TRAIT_OS_PLATFORM_NAME, rhiName);
// Map default value must be initialized after attempting to serialize (and result in failure).
// Otherwise, serialization won't overwrite the default values.
m_descriptorHeapLimits = AZStd::unordered_map<AZStd::string, AZStd::array<uint32_t, NumHeapFlags>>({
{ AZStd::string("DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV"), { 1000000, 1000000 } },
{ AZStd::string("DESCRIPTOR_HEAP_TYPE_SAMPLER"), { 2048, 2048 } },
{ AZStd::string("DESCRIPTOR_HEAP_TYPE_RTV"), { 2048, 0 } },
{ AZStd::string("DESCRIPTOR_HEAP_TYPE_DSV"), { 2048, 0 } }
});
}
}
}
}
@@ -8,7 +8,7 @@
//
{
"Amazon":
"O3DE":
{
"Atom":
{
@@ -8,7 +8,7 @@
//
{
"Amazon":
"O3DE":
{
"Atom":
{
@@ -8,7 +8,7 @@
//
{
"Amazon":
"O3DE":
{
"Atom":
{
@@ -8,7 +8,7 @@
//
{
"Amazon":
"O3DE":
{
"Atom":
{
@@ -8,7 +8,7 @@
//
{
"Amazon":
"O3DE":
{
"Atom":
{
@@ -8,7 +8,7 @@
//
{
"Amazon":
"O3DE":
{
"Atom":
{