From 1909d43dcc424c84452a7f8e70f350a0eec996e0 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 23 Nov 2021 17:57:45 -0800 Subject: [PATCH 001/413] initial version ported from an old implementation Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Tests/Memory/AllocatorBenchmarks.cpp | 483 ++++++++++++++++++ .../Memory/AllocatorBenchmarks_Linux.cpp | 31 ++ .../Platform/Linux/platform_linux_files.cmake | 1 + .../Tests/Memory/AllocatorBenchmarks_Mac.cpp | 30 ++ .../Platform/Mac/platform_mac_files.cmake | 1 + .../Memory/AllocatorBenchmarks_Windows.cpp | 74 +++ .../Windows/platform_windows_files.cmake | 1 + .../AzCore/Tests/azcoretests_files.cmake | 1 + 8 files changed, 622 insertions(+) create mode 100644 Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp create mode 100644 Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp create mode 100644 Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp create mode 100644 Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp new file mode 100644 index 0000000000..2bac12fe83 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -0,0 +1,483 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#if defined(HAVE_BENCHMARK) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes(); + size_t GetMemorySize(void* memory); + } + + static AZ::Debug::DrillerManager* s_drillerManager = nullptr; + + template + class TestAllocator : public TAllocator + { + public: + TestAllocator() + : TAllocator() + { + } + + static void SetUp() + { + AZ::AllocatorInstance::Create(); + + s_drillerManager = AZ::Debug::DrillerManager::Create(); + s_drillerManager->Register(aznew AZ::Debug::MemoryDriller); + } + + static void TearDown() + { + AZ::Debug::DrillerManager::Destroy(s_drillerManager); + s_drillerManager = nullptr; + + AZ::AllocatorInstance::Destroy(); + } + + typename TAllocator::pointer_type Allocate( + typename TAllocator::size_type byteSize, + typename TAllocator::size_type alignment, + int = 0, + const char* = nullptr, + const char* = nullptr, + int = 0, + unsigned int = 0) override + { + return AZ::AllocatorInstance::Get().Allocate(byteSize, alignment); + } + + void DeAllocate( + typename TAllocator::pointer_type ptr, + typename TAllocator::size_type byteSize = 0, + typename TAllocator::size_type = 0) override + { + AZ::AllocatorInstance::Get().DeAllocate(ptr, byteSize); + } + + typename TAllocator::pointer_type ReAllocate( + typename TAllocator::pointer_type ptr, + typename TAllocator::size_type newSize, + typename TAllocator::size_type newAlignment) override + { + return AZ::AllocatorInstance::Get().ReAllocate(ptr, newSize, newAlignment); + } + + typename TAllocator::size_type Resize(typename TAllocator::pointer_type ptr, typename TAllocator::size_type newSize) override + { + return AZ::AllocatorInstance::Get().Resize(ptr, newSize); + } + + void GarbageCollect() override + { + AZ::AllocatorInstance::Get().GarbageCollect(); + } + + typename TAllocator::size_type NumAllocatedBytes() const override + { + return AZ::AllocatorInstance::Get().NumAllocatedBytes() + + AZ::AllocatorInstance::Get().GetUnAllocatedMemory(); + } + }; +} + +namespace AZ +{ + AZ_TYPE_INFO_TEMPLATE(Benchmark::TestAllocator, "{ACE2D6E5-4EB8-4DD2-AE95-6BDFD0476801}", AZ_TYPE_INFO_CLASS); +} + +namespace Benchmark +{ + class TestRawMallocAllocator {}; + + template <> + class TestAllocator + : public TestRawMallocAllocator + { + public: + struct Descriptor {}; + + TestAllocator() + {} + + static void SetUp() + { + s_numAllocatedBytes = 0; + } + + static void TearDown() + {} + + void* Allocate( + size_t byteSize, + size_t alignment, + int = 0, + const char* = nullptr, + const char* = nullptr, + int = 0, + unsigned int = 0) + { + s_numAllocatedBytes += byteSize; + if (alignment) + { + return AZ_OS_MALLOC(byteSize, alignment); + } + else + { + return AZ_OS_MALLOC(byteSize, 1); + } + } + + static void DeAllocate(void* ptr, size_t = 0) + { + s_numAllocatedBytes -= Platform::GetMemorySize(ptr); + AZ_OS_FREE(ptr); + } + + static void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) + { + s_numAllocatedBytes -= Platform::GetMemorySize(ptr); + AZ_OS_FREE(ptr); + + s_numAllocatedBytes += newSize; + if (newAlignment) + { + return AZ_OS_MALLOC(newSize, newAlignment); + } + else + { + return AZ_OS_MALLOC(newSize, 1); + } + } + + static size_t Resize(void* ptr, size_t newSize) + { + AZ_UNUSED(ptr); + AZ_UNUSED(newSize); + + return 0; + } + + static void GarbageCollect() + {} + + static size_t NumAllocatedBytes() + { + return s_numAllocatedBytes; + } + + private: + static size_t s_numAllocatedBytes; + }; + + size_t TestAllocator::s_numAllocatedBytes = 0; + + // Here we require to implement this to be able to configure a name for the allocator, otherswise the AllocatorManager crashes when trying to configure the overrides + class TestMallocSchemaAllocator : public AZ::SimpleSchemaAllocator + { + public: + AZ_TYPE_INFO(TestMallocSchemaAllocator, "{3E68224F-E676-402C-8276-CE4B49C05E89}"); + + TestMallocSchemaAllocator() + : AZ::SimpleSchemaAllocator("TestMallocSchemaAllocator", "") + {} + }; + + class TestHeapSchemaAllocator : public AZ::SimpleSchemaAllocator + { + public: + AZ_TYPE_INFO(TestHeapSchemaAllocator, "{456E6C30-AA84-488F-BE47-5C1E6AF636B7}"); + + TestHeapSchemaAllocator() + : AZ::SimpleSchemaAllocator("TestHeapSchemaAllocator", "") + {} + }; + + class TestHphaSchemaAllocator : public AZ::SimpleSchemaAllocator + { + public: + AZ_TYPE_INFO(TestHphaSchemaAllocator, "{6563AB4B-A68E-4499-8C98-D61D640D1F7F}"); + + TestHphaSchemaAllocator() + : AZ::SimpleSchemaAllocator("TestHphaSchemaAllocator", "") + {} + }; + + class TestSystemAllocator : public AZ::SystemAllocator + { + public: + AZ_TYPE_INFO(TestSystemAllocator, "{360D4DAA-D65D-4D5C-A6FA-1A4C5261C35C}"); + + TestSystemAllocator() + : AZ::SystemAllocator() + {} + }; +} + +namespace AZ +{ + AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{1065B446-4873-4B3E-9CB1-069E148D4DF6}"); + AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{92CFDF86-02EE-4247-9809-884EE9F7BA18}"); + AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{67DA01DF-9232-493A-B11C-6952FEDEB2A9}"); + AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{47384CB4-6729-43A9-B0CE-402E3A7AEFB2}"); + AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{096423BC-DC36-48D2-8E89-8F1D600F488A}"); +} + +namespace Benchmark +{ + // Allocated bytes reported by the allocator / actually requested bytes + static const char* s_counterAllocatorMemoryRatio = "Allocator_MemoryRatio"; + + // Allocated bytes reported by the process / actually requested bytes + static const char* s_counterProcessMemoryRatio = "Process_MemoryRatio"; + + enum AllocationSize + { + SMALL, + BIG, + MIXED, + COUNT + }; + + static const size_t s_kiloByte = 1024; + static const size_t s_megaByte = s_kiloByte * s_kiloByte; + using AllocationSizeArray = AZStd::array; + static const AZStd::array s_allocationSizes = { + /* SMALL */ AllocationSizeArray{ 2, 16, 20, 59, 100, 128, 160, 250, 300, 512 }, + /* BIG */ AllocationSizeArray{ 513, s_kiloByte, 2 * s_kiloByte, 4 * s_kiloByte, 10 * s_kiloByte, 64 * s_kiloByte, 128 * s_kiloByte, 200 * s_kiloByte, s_megaByte, 2 * s_megaByte }, + /* MIXED */ AllocationSizeArray{ 2, s_kiloByte, 59, 4 * s_kiloByte, 128, 200 * s_kiloByte, 250, s_megaByte, 512, 2 * s_megaByte } + }; + + template + class AllocatorBenchmarkFixture + : public ::benchmark::Fixture + { + protected: + using TestAllocatorType = TestAllocator; + + virtual void internalSetUp(const ::benchmark::State&) + { + TestAllocatorType::SetUp(); + } + + virtual void internalTearDown(const ::benchmark::State&) + { + TestAllocatorType::TearDown(); + } + + public: + void SetUp(const ::benchmark::State& state) override + { + internalSetUp(state); + } + void SetUp(::benchmark::State& state) override + { + internalSetUp(state); + } + + void TearDown(const ::benchmark::State& state) override + { + internalTearDown(state); + } + void TearDown(::benchmark::State& state) override + { + internalTearDown(state); + } + }; + + template + class AllocationBenchmarkFixture + : public AllocatorBenchmarkFixture + { + using TestAllocatorType = AllocatorBenchmarkFixture::TestAllocatorType; + + void internalSetUp(const ::benchmark::State& state) override + { + AllocatorBenchmarkFixture::SetUp(state); + + m_allocations.resize(state.range_x(), nullptr); + } + + void internalTearDown(const ::benchmark::State& state) override + { + m_allocations.clear(); + m_allocations.shrink_to_fit(); + + AllocatorBenchmarkFixture::TearDown(state); + } + + public: + void Benchmark(benchmark::State& state) + { + TestAllocatorType allocatorType; + + for (auto _ : state) + { + const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); + + const size_t numberOfAllocations = m_allocations.size(); + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + state.PauseTiming(); + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + + state.ResumeTiming(); + m_allocations[allocationIndex] = allocatorType.Allocate(allocationSize, 0); + } + + state.PauseTiming(); + state.counters[s_counterAllocatorMemoryRatio] = + benchmark::Counter(static_cast(allocatorType.NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( + static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), + benchmark::Counter::kDefaults); + + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + allocatorType.DeAllocate(m_allocations[allocationIndex], allocationSize); + m_allocations[allocationIndex] = nullptr; + } + allocatorType.GarbageCollect(); + + state.SetItemsProcessed(numberOfAllocations); + state.ResumeTiming(); + } + } + + private: + AZStd::vector m_allocations; + }; + + template + class DeAllocationBenchmarkFixture + : public AllocatorBenchmarkFixture + { + using TestAllocatorType = AllocatorBenchmarkFixture::TestAllocatorType; + + void internalSetUp(const ::benchmark::State& state) override + { + AllocatorBenchmarkFixture::SetUp(state); + + m_allocations.resize(state.range_x(), nullptr); + } + + void internalTearDown(const ::benchmark::State& state) override + { + m_allocations.clear(); + m_allocations.shrink_to_fit(); + + AllocatorBenchmarkFixture::TearDown(state); + } + public: + void Benchmark(benchmark::State& state) + { + TestAllocatorType allocatorType; + + for (auto _ : state) + { + state.PauseTiming(); + const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); + + const size_t numberOfAllocations = m_allocations.size(); + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + m_allocations[allocationIndex] = allocatorType.Allocate(allocationSize, 0); + } + + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + state.ResumeTiming(); + allocatorType.DeAllocate(m_allocations[allocationIndex], allocationSize); + state.PauseTiming(); + m_allocations[allocationIndex] = nullptr; + } + + state.counters[s_counterAllocatorMemoryRatio] = + benchmark::Counter(static_cast(allocatorType.NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( + static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), + benchmark::Counter::kDefaults); + + state.SetItemsProcessed(numberOfAllocations); + + allocatorType.GarbageCollect(); + + state.ResumeTiming(); + } + } + + private: + AZStd::vector m_allocations; + }; + + static void RunRanges(benchmark::internal::Benchmark* b) + { + for (int i = 0; i < 6; ++i) + { + b->Arg((1 << i) * 1000); + } + } + +#define BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME, ...) \ + BENCHMARK_TEMPLATE_DEFINE_F(FIXTURE, TESTNAME, __VA_ARGS__)(benchmark::State& state) { Benchmark(state); } \ + BENCHMARK_REGISTER_F(FIXTURE, TESTNAME) + +#define BM_REGISTER_SIZE_FIXTURES(FIXTURE, TESTNAME, ALLOCATORTYPE) \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_SMALL, ALLOCATORTYPE, SMALL)->Apply(RunRanges); \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_BIG, ALLOCATORTYPE, BIG)->Apply(RunRanges); \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED, ALLOCATORTYPE, MIXED)->Apply(RunRanges); + +#define BM_REGISTER_ALLOCATOR(TESTNAME, ALLOCATORTYPE) \ + namespace TESTNAME \ + { \ + BM_REGISTER_SIZE_FIXTURES(AllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE) \ + BM_REGISTER_SIZE_FIXTURES(DeAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE) \ + } + + BM_REGISTER_ALLOCATOR(RawMallocAllocator, TestRawMallocAllocator); + BM_REGISTER_ALLOCATOR(MallocSchemaAllocator, TestMallocSchemaAllocator); + BM_REGISTER_ALLOCATOR(HeapSchemaAllocator, TestHeapSchemaAllocator); + BM_REGISTER_ALLOCATOR(HphaSchemaAllocator, TestHphaSchemaAllocator); + BM_REGISTER_ALLOCATOR(SystemAllocator, TestSystemAllocator); + + //BM_REGISTER_SCHEMA(BestFitExternalMapSchema); // Requires to implement AZ::IAllocatorAllocate + //BM_REGISTER_SCHEMA(PoolSchema); // Requires special alignment requests while allocating + +#undef BM_REGISTER_ALLOCATOR +#undef BM_REGISTER_SIZE_FIXTURES +#undef BM_REGISTER_TEMPLATE + +} // Benchmark + +#endif // HAVE_BENCHMARK diff --git a/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp b/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp new file mode 100644 index 0000000000..49ecefda49 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); + return rusage.ru_maxrss * 1024L; + } + + size_t GetMemorySize(void* memory) + { + return memory ? _aligned_msize(memory, 1, 0) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake b/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake index 844b621e05..953dbb7791 100644 --- a/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake @@ -9,4 +9,5 @@ set(FILES Tests/UtilsTests_Linux.cpp ../Common/UnixLike/Tests/UtilsTests_UnixLike.cpp + Tests/Memory/AllocatorBenchmarks_Linux.cpp ) diff --git a/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp new file mode 100644 index 0000000000..374d9f81f7 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); + return rusage.ru_maxrss; + } + + size_t GetMemorySize(void* memory) + { + return memory ? _aligned_msize(memory, 1, 0) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake b/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake index 93d2daf2b8..14e39d47f4 100644 --- a/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake @@ -9,4 +9,5 @@ set(FILES ../Common/Apple/Tests/UtilsTests_Apple.cpp ../Common/UnixLike/Tests/UtilsTests_UnixLike.cpp + Tests/Memory/AllocatorBenchmarks_Mac.cpp ) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp new file mode 100644 index 0000000000..9f4efd7a2c --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + EmptyWorkingSet(GetCurrentProcess()); + + //PROCESS_MEMORY_COUNTERS_EX pmc; + //GetProcessMemoryInfo(GetCurrentProcess(), (PPROCESS_MEMORY_COUNTERS)&pmc, sizeof(pmc)); + //return pmc.PrivateUsage; + //return pmc.WorkingSetSize; + + //size_t memoryUsage = 0; + //HANDLE defaultProcessHeap = GetProcessHeap(); + //PROCESS_HEAP_ENTRY heapEntry; + //if (HeapLock(defaultProcessHeap) == FALSE) + //{ + // AZ_Error("Benchmark", false, "Could not lock process' heap, error: %d", GetLastError()); + // return memoryUsage; + //} + + //heapEntry.lpData = NULL; + //while (HeapWalk(defaultProcessHeap, &heapEntry) != FALSE) + //{ + // memoryUsage += heapEntry.cbData; + //} + + //DWORD lastError = GetLastError(); + //if (lastError != ERROR_NO_MORE_ITEMS) + //{ + // AZ_Error("Benchmark", false, "HeapWalk failed with LastError %d", lastError); + //} + + //if (HeapUnlock(defaultProcessHeap) == FALSE) + //{ + // AZ_Error("Benchmark", false, "Failed to unlock heap with LastError %d", GetLastError()); + //} + + //return memoryUsage; + + size_t memoryUsage = 0; + + MEMORY_BASIC_INFORMATION mbi = { 0 }; + unsigned char* pEndRegion = NULL; + while (sizeof(mbi) == VirtualQuery(pEndRegion, &mbi, sizeof(mbi))) { + pEndRegion += mbi.RegionSize; + if ((mbi.AllocationProtect & PAGE_READWRITE) && (mbi.State & MEM_COMMIT)) { + memoryUsage += mbi.RegionSize; + } + } + return memoryUsage; + } + + size_t GetMemorySize(void* memory) + { + return memory ? _aligned_msize(memory, 1, 0) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake b/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake index 0a96dad34e..97b12b28e6 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake @@ -9,6 +9,7 @@ set(FILES ../Common/WinAPI/Tests/UtilsTests_WinAPI.cpp Tests/IO/Streamer/StorageDriveTests_Windows.cpp + Tests/Memory/AllocatorBenchmarks_Windows.cpp Tests/Memory/OverrunDetectionAllocator_Windows.cpp Tests/Serialization_Windows.cpp ) diff --git a/Code/Framework/AzCore/Tests/azcoretests_files.cmake b/Code/Framework/AzCore/Tests/azcoretests_files.cmake index d39595c45e..6762e07d0a 100644 --- a/Code/Framework/AzCore/Tests/azcoretests_files.cmake +++ b/Code/Framework/AzCore/Tests/azcoretests_files.cmake @@ -170,6 +170,7 @@ set(FILES Math/Vector3Tests.cpp Math/Vector4PerformanceTests.cpp Math/Vector4Tests.cpp + Memory/AllocatorBenchmarks.cpp Memory/AllocatorManager.cpp Memory/HphaSchema.cpp Memory/HphaSchemaErrorDetection.cpp From 35c1751694ce245b2a033c195a83a094140ec1a0 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 23 Nov 2021 18:31:00 -0800 Subject: [PATCH 002/413] simplification of code Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Tests/Memory/AllocatorBenchmarks.cpp | 189 +++++++++--------- 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 2bac12fe83..af87584fc6 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -34,15 +34,15 @@ namespace Benchmark static AZ::Debug::DrillerManager* s_drillerManager = nullptr; + /// + /// Test allocator wrapper that redirects the calls to the passed TAllocator by using AZ::AllocatorInstance. + /// It also creates/destroys the TAllocator type and connects the driller (to reflect what happens at runtime) + /// + /// Allocator type to wrap template - class TestAllocator : public TAllocator + class TestAllocatorWrapper { public: - TestAllocator() - : TAllocator() - { - } - static void SetUp() { AZ::AllocatorInstance::Create(); @@ -59,89 +59,81 @@ namespace Benchmark AZ::AllocatorInstance::Destroy(); } - typename TAllocator::pointer_type Allocate( - typename TAllocator::size_type byteSize, - typename TAllocator::size_type alignment, - int = 0, - const char* = nullptr, - const char* = nullptr, - int = 0, - unsigned int = 0) override + static void* Allocate(size_t byteSize, size_t alignment) { return AZ::AllocatorInstance::Get().Allocate(byteSize, alignment); } - void DeAllocate( - typename TAllocator::pointer_type ptr, - typename TAllocator::size_type byteSize = 0, - typename TAllocator::size_type = 0) override + static void DeAllocate(void* ptr, size_t byteSize = 0) { AZ::AllocatorInstance::Get().DeAllocate(ptr, byteSize); } - typename TAllocator::pointer_type ReAllocate( - typename TAllocator::pointer_type ptr, - typename TAllocator::size_type newSize, - typename TAllocator::size_type newAlignment) override + static void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) { return AZ::AllocatorInstance::Get().ReAllocate(ptr, newSize, newAlignment); } - typename TAllocator::size_type Resize(typename TAllocator::pointer_type ptr, typename TAllocator::size_type newSize) override + static size_t Resize(void* ptr, size_t newSize) { return AZ::AllocatorInstance::Get().Resize(ptr, newSize); } - void GarbageCollect() override + static void GarbageCollect() { AZ::AllocatorInstance::Get().GarbageCollect(); } - typename TAllocator::size_type NumAllocatedBytes() const override + static size_t NumAllocatedBytes() { return AZ::AllocatorInstance::Get().NumAllocatedBytes() + AZ::AllocatorInstance::Get().GetUnAllocatedMemory(); } }; -} -namespace AZ -{ - AZ_TYPE_INFO_TEMPLATE(Benchmark::TestAllocator, "{ACE2D6E5-4EB8-4DD2-AE95-6BDFD0476801}", AZ_TYPE_INFO_CLASS); -} - -namespace Benchmark -{ - class TestRawMallocAllocator {}; - - template <> - class TestAllocator - : public TestRawMallocAllocator + /// + /// Basic allocator used as a baseline. This allocator is the most basic allocation possible with the OS (AZ_OS_MALLOC). + /// MallocSchema cannot be used here because it has extra logic that we don't want to use as a baseline. + /// + class TestRawMallocAllocator + : public AZ::AllocatorBase + , public AZ::IAllocatorAllocate { public: + AZ_TYPE_INFO(TestMallocSchemaAllocator, "{08EB400A-D723-46C6-808E-D0844C8DE206}"); + struct Descriptor {}; - TestAllocator() - {} - - static void SetUp() + TestRawMallocAllocator() + : AllocatorBase(this, "TestRawMallocAllocator", "") { - s_numAllocatedBytes = 0; + m_numAllocatedBytes = 0; } - static void TearDown() - {} - - void* Allocate( - size_t byteSize, - size_t alignment, - int = 0, - const char* = nullptr, - const char* = nullptr, - int = 0, - unsigned int = 0) + bool Create(const Descriptor&) { - s_numAllocatedBytes += byteSize; + m_numAllocatedBytes = 0; + return true; + } + + // IAllocator + void Destroy() override + { + m_numAllocatedBytes = 0; + } + AZ::AllocatorDebugConfig GetDebugConfig() override + { + return AZ::AllocatorDebugConfig(); + } + AZ::IAllocatorAllocate* GetSchema() override + { + return nullptr; + } + + // IAllocatorAllocate + void* Allocate(size_t byteSize, size_t alignment, int = 0, const char* = 0, const char* = 0, int = 0, unsigned int = 0) override + { + m_numAllocatedBytes += byteSize; if (alignment) { return AZ_OS_MALLOC(byteSize, alignment); @@ -152,18 +144,18 @@ namespace Benchmark } } - static void DeAllocate(void* ptr, size_t = 0) + void DeAllocate(void* ptr, size_t = 0, size_type = 0) override { - s_numAllocatedBytes -= Platform::GetMemorySize(ptr); + m_numAllocatedBytes -= Platform::GetMemorySize(ptr); AZ_OS_FREE(ptr); } - static void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) + void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) override { - s_numAllocatedBytes -= Platform::GetMemorySize(ptr); + m_numAllocatedBytes -= Platform::GetMemorySize(ptr); AZ_OS_FREE(ptr); - s_numAllocatedBytes += newSize; + m_numAllocatedBytes += newSize; if (newAlignment) { return AZ_OS_MALLOC(newSize, newAlignment); @@ -174,7 +166,7 @@ namespace Benchmark } } - static size_t Resize(void* ptr, size_t newSize) + size_t Resize(void* ptr, size_t newSize) override { AZ_UNUSED(ptr); AZ_UNUSED(newSize); @@ -182,20 +174,45 @@ namespace Benchmark return 0; } - static void GarbageCollect() - {} - - static size_t NumAllocatedBytes() + size_t AllocationSize(void* ptr) override { - return s_numAllocatedBytes; + return Platform::GetMemorySize(ptr); + } + + void GarbageCollect() override {} + + size_t NumAllocatedBytes() const override + { + return m_numAllocatedBytes; + } + + size_t Capacity() const override + { + return AZ_CORE_MAX_ALLOCATOR_SIZE; // unused + } + + size_t GetMaxAllocationSize() const override + { + return AZ_CORE_MAX_ALLOCATOR_SIZE; // unused + } + + size_t GetMaxContiguousAllocationSize() const override + { + return AZ_CORE_MAX_ALLOCATOR_SIZE; // unused + } + size_t GetUnAllocatedMemory(bool = false) const override + { + return 0; // unused + } + IAllocatorAllocate* GetSubAllocator() override + { + return nullptr; // unused } private: - static size_t s_numAllocatedBytes; + size_t m_numAllocatedBytes; }; - size_t TestAllocator::s_numAllocatedBytes = 0; - // Here we require to implement this to be able to configure a name for the allocator, otherswise the AllocatorManager crashes when trying to configure the overrides class TestMallocSchemaAllocator : public AZ::SimpleSchemaAllocator { @@ -236,19 +253,7 @@ namespace Benchmark : AZ::SystemAllocator() {} }; -} -namespace AZ -{ - AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{1065B446-4873-4B3E-9CB1-069E148D4DF6}"); - AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{92CFDF86-02EE-4247-9809-884EE9F7BA18}"); - AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{67DA01DF-9232-493A-B11C-6952FEDEB2A9}"); - AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{47384CB4-6729-43A9-B0CE-402E3A7AEFB2}"); - AZ_TYPE_INFO_SPECIALIZE(Benchmark::TestAllocator, "{096423BC-DC36-48D2-8E89-8F1D600F488A}"); -} - -namespace Benchmark -{ // Allocated bytes reported by the allocator / actually requested bytes static const char* s_counterAllocatorMemoryRatio = "Allocator_MemoryRatio"; @@ -277,7 +282,7 @@ namespace Benchmark : public ::benchmark::Fixture { protected: - using TestAllocatorType = TestAllocator; + using TestAllocatorType = TestAllocatorWrapper; virtual void internalSetUp(const ::benchmark::State&) { @@ -333,8 +338,6 @@ namespace Benchmark public: void Benchmark(benchmark::State& state) { - TestAllocatorType allocatorType; - for (auto _ : state) { const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); @@ -347,12 +350,12 @@ namespace Benchmark const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; state.ResumeTiming(); - m_allocations[allocationIndex] = allocatorType.Allocate(allocationSize, 0); + m_allocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); } state.PauseTiming(); state.counters[s_counterAllocatorMemoryRatio] = - benchmark::Counter(static_cast(allocatorType.NumAllocatedBytes()), benchmark::Counter::kDefaults); + benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); @@ -361,10 +364,10 @@ namespace Benchmark { const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; - allocatorType.DeAllocate(m_allocations[allocationIndex], allocationSize); + TestAllocatorType::DeAllocate(m_allocations[allocationIndex], allocationSize); m_allocations[allocationIndex] = nullptr; } - allocatorType.GarbageCollect(); + TestAllocatorType::GarbageCollect(); state.SetItemsProcessed(numberOfAllocations); state.ResumeTiming(); @@ -398,8 +401,6 @@ namespace Benchmark public: void Benchmark(benchmark::State& state) { - TestAllocatorType allocatorType; - for (auto _ : state) { state.PauseTiming(); @@ -410,7 +411,7 @@ namespace Benchmark { const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; - m_allocations[allocationIndex] = allocatorType.Allocate(allocationSize, 0); + m_allocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); } for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) @@ -418,20 +419,20 @@ namespace Benchmark const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; state.ResumeTiming(); - allocatorType.DeAllocate(m_allocations[allocationIndex], allocationSize); + TestAllocatorType::DeAllocate(m_allocations[allocationIndex], allocationSize); state.PauseTiming(); m_allocations[allocationIndex] = nullptr; } state.counters[s_counterAllocatorMemoryRatio] = - benchmark::Counter(static_cast(allocatorType.NumAllocatedBytes()), benchmark::Counter::kDefaults); + benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); state.SetItemsProcessed(numberOfAllocations); - allocatorType.GarbageCollect(); + TestAllocatorType::GarbageCollect(); state.ResumeTiming(); } From 3273b7621d10dc98d54864ef41b59284161f5c0d Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 23 Nov 2021 18:37:24 -0800 Subject: [PATCH 003/413] Fixes a recursive loop Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index af87584fc6..f27c92dfb2 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -322,7 +322,7 @@ namespace Benchmark void internalSetUp(const ::benchmark::State& state) override { - AllocatorBenchmarkFixture::SetUp(state); + AllocatorBenchmarkFixture::internalSetUp(state); m_allocations.resize(state.range_x(), nullptr); } @@ -332,7 +332,7 @@ namespace Benchmark m_allocations.clear(); m_allocations.shrink_to_fit(); - AllocatorBenchmarkFixture::TearDown(state); + AllocatorBenchmarkFixture::internalTearDown(state); } public: @@ -386,7 +386,7 @@ namespace Benchmark void internalSetUp(const ::benchmark::State& state) override { - AllocatorBenchmarkFixture::SetUp(state); + AllocatorBenchmarkFixture::internalSetUp(state); m_allocations.resize(state.range_x(), nullptr); } @@ -396,7 +396,7 @@ namespace Benchmark m_allocations.clear(); m_allocations.shrink_to_fit(); - AllocatorBenchmarkFixture::TearDown(state); + AllocatorBenchmarkFixture::internalTearDown(state); } public: void Benchmark(benchmark::State& state) From 160235e86f940a63dd7a06ccb12af39622a0eff8 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 29 Nov 2021 09:03:14 -0800 Subject: [PATCH 004/413] Removing commented code of different options for getting memory usage of a process Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Memory/AllocatorBenchmarks_Windows.cpp | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp index 9f4efd7a2c..c8532687e8 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp @@ -20,41 +20,7 @@ namespace Benchmark { EmptyWorkingSet(GetCurrentProcess()); - //PROCESS_MEMORY_COUNTERS_EX pmc; - //GetProcessMemoryInfo(GetCurrentProcess(), (PPROCESS_MEMORY_COUNTERS)&pmc, sizeof(pmc)); - //return pmc.PrivateUsage; - //return pmc.WorkingSetSize; - - //size_t memoryUsage = 0; - //HANDLE defaultProcessHeap = GetProcessHeap(); - //PROCESS_HEAP_ENTRY heapEntry; - //if (HeapLock(defaultProcessHeap) == FALSE) - //{ - // AZ_Error("Benchmark", false, "Could not lock process' heap, error: %d", GetLastError()); - // return memoryUsage; - //} - - //heapEntry.lpData = NULL; - //while (HeapWalk(defaultProcessHeap, &heapEntry) != FALSE) - //{ - // memoryUsage += heapEntry.cbData; - //} - - //DWORD lastError = GetLastError(); - //if (lastError != ERROR_NO_MORE_ITEMS) - //{ - // AZ_Error("Benchmark", false, "HeapWalk failed with LastError %d", lastError); - //} - - //if (HeapUnlock(defaultProcessHeap) == FALSE) - //{ - // AZ_Error("Benchmark", false, "Failed to unlock heap with LastError %d", GetLastError()); - //} - - //return memoryUsage; - size_t memoryUsage = 0; - MEMORY_BASIC_INFORMATION mbi = { 0 }; unsigned char* pEndRegion = NULL; while (sizeof(mbi) == VirtualQuery(pEndRegion, &mbi, sizeof(mbi))) { From febaebc386225a091dc785e72d6bd99a2b3de196 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 30 Nov 2021 13:51:08 -0800 Subject: [PATCH 005/413] PR comment (NULL->nullptr) Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp index c8532687e8..e9571a7e5b 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp @@ -22,7 +22,7 @@ namespace Benchmark size_t memoryUsage = 0; MEMORY_BASIC_INFORMATION mbi = { 0 }; - unsigned char* pEndRegion = NULL; + unsigned char* pEndRegion = nullptr; while (sizeof(mbi) == VirtualQuery(pEndRegion, &mbi, sizeof(mbi))) { pEndRegion += mbi.RegionSize; if ((mbi.AllocationProtect & PAGE_READWRITE) && (mbi.State & MEM_COMMIT)) { From 215cb9b52ffd0ee1f40325421f93d977754ed2ff Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 30 Nov 2021 16:06:26 -0800 Subject: [PATCH 006/413] Adds mulit-threaded tests Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Tests/Memory/AllocatorBenchmarks.cpp | 82 +++++++++++-------- 1 file changed, 50 insertions(+), 32 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index f27c92dfb2..7cd7e7ce0a 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -284,14 +284,34 @@ namespace Benchmark protected: using TestAllocatorType = TestAllocatorWrapper; - virtual void internalSetUp(const ::benchmark::State&) + virtual void internalSetUp(const ::benchmark::State& state) { - TestAllocatorType::SetUp(); + if (state.thread_index == 0) // Only setup in the first thread + { + TestAllocatorType::SetUp(); + + m_allocations.resize(state.threads); + for (auto& perThreadAllocations : m_allocations) + { + perThreadAllocations.resize(state.range_x(), nullptr); + } + } } - virtual void internalTearDown(const ::benchmark::State&) + virtual void internalTearDown(const ::benchmark::State& state) { - TestAllocatorType::TearDown(); + if (state.thread_index == 0) // Only setup in the first thread + { + m_allocations.clear(); + m_allocations.shrink_to_fit(); + + TestAllocatorType::TearDown(); + } + } + + AZStd::vector& GetPerThreadAllocations(size_t threadIndex) + { + return m_allocations[threadIndex]; } public: @@ -312,26 +332,25 @@ namespace Benchmark { internalTearDown(state); } + + private: + AZStd::vector> m_allocations; }; template class AllocationBenchmarkFixture : public AllocatorBenchmarkFixture { - using TestAllocatorType = AllocatorBenchmarkFixture::TestAllocatorType; + using base = AllocatorBenchmarkFixture; + using TestAllocatorType = base::TestAllocatorType; void internalSetUp(const ::benchmark::State& state) override { AllocatorBenchmarkFixture::internalSetUp(state); - - m_allocations.resize(state.range_x(), nullptr); } void internalTearDown(const ::benchmark::State& state) override { - m_allocations.clear(); - m_allocations.shrink_to_fit(); - AllocatorBenchmarkFixture::internalTearDown(state); } @@ -340,17 +359,19 @@ namespace Benchmark { for (auto _ : state) { + state.PauseTiming(); const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); - const size_t numberOfAllocations = m_allocations.size(); + AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); + const size_t numberOfAllocations = perThreadAllocations.size(); for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) { - state.PauseTiming(); const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; state.ResumeTiming(); - m_allocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); + perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); + state.PauseTiming(); } state.PauseTiming(); @@ -364,8 +385,8 @@ namespace Benchmark { const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; - TestAllocatorType::DeAllocate(m_allocations[allocationIndex], allocationSize); - m_allocations[allocationIndex] = nullptr; + TestAllocatorType::DeAllocate(perThreadAllocations[allocationIndex], allocationSize); + perThreadAllocations[allocationIndex] = nullptr; } TestAllocatorType::GarbageCollect(); @@ -373,29 +394,22 @@ namespace Benchmark state.ResumeTiming(); } } - - private: - AZStd::vector m_allocations; }; template class DeAllocationBenchmarkFixture : public AllocatorBenchmarkFixture { - using TestAllocatorType = AllocatorBenchmarkFixture::TestAllocatorType; + using base = AllocatorBenchmarkFixture; + using TestAllocatorType = base::TestAllocatorType; void internalSetUp(const ::benchmark::State& state) override { AllocatorBenchmarkFixture::internalSetUp(state); - - m_allocations.resize(state.range_x(), nullptr); } void internalTearDown(const ::benchmark::State& state) override { - m_allocations.clear(); - m_allocations.shrink_to_fit(); - AllocatorBenchmarkFixture::internalTearDown(state); } public: @@ -404,14 +418,15 @@ namespace Benchmark for (auto _ : state) { state.PauseTiming(); + AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); - const size_t numberOfAllocations = m_allocations.size(); + const size_t numberOfAllocations = perThreadAllocations.size(); for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) { const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; - m_allocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); + perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); } for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) @@ -419,9 +434,9 @@ namespace Benchmark const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; state.ResumeTiming(); - TestAllocatorType::DeAllocate(m_allocations[allocationIndex], allocationSize); + TestAllocatorType::DeAllocate(perThreadAllocations[allocationIndex], allocationSize); state.PauseTiming(); - m_allocations[allocationIndex] = nullptr; + perThreadAllocations[allocationIndex] = nullptr; } state.counters[s_counterAllocatorMemoryRatio] = @@ -437,9 +452,6 @@ namespace Benchmark state.ResumeTiming(); } } - - private: - AZStd::vector m_allocations; }; static void RunRanges(benchmark::internal::Benchmark* b) @@ -450,14 +462,20 @@ namespace Benchmark } } + // Test under and over-subscription of threads vs the amount of CPUs available + static const unsigned int MaxThreadRange = 2 * AZStd::thread::hardware_concurrency(); + #define BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME, ...) \ BENCHMARK_TEMPLATE_DEFINE_F(FIXTURE, TESTNAME, __VA_ARGS__)(benchmark::State& state) { Benchmark(state); } \ BENCHMARK_REGISTER_F(FIXTURE, TESTNAME) + // We test small/big/mixed allocations in single-threaded environments. For multi-threaded environments, we test mixed since + // the multi threaded fixture will run multiple passes (1, 2, 4, ... until 2*hardware_concurrency) #define BM_REGISTER_SIZE_FIXTURES(FIXTURE, TESTNAME, ALLOCATORTYPE) \ BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_SMALL, ALLOCATORTYPE, SMALL)->Apply(RunRanges); \ BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_BIG, ALLOCATORTYPE, BIG)->Apply(RunRanges); \ - BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED, ALLOCATORTYPE, MIXED)->Apply(RunRanges); + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED, ALLOCATORTYPE, MIXED)->Apply(RunRanges); \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED_THREADED, ALLOCATORTYPE, MIXED)->ThreadRange(1, MaxThreadRange)->Apply(RunRanges); #define BM_REGISTER_ALLOCATOR(TESTNAME, ALLOCATORTYPE) \ namespace TESTNAME \ From f062b563c89e88b1facf32c6660bdca6cfac9057 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 30 Nov 2021 17:30:55 -0800 Subject: [PATCH 007/413] Improving runtime and making the whole duration manageable Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Tests/Memory/AllocatorBenchmarks.cpp | 44 +++++++--- .../AzCore/Tests/Memory/HphaSchema.cpp | 88 ------------------- 2 files changed, 31 insertions(+), 101 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 7cd7e7ce0a..c1fdd4ca32 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -364,21 +364,27 @@ namespace Benchmark AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); const size_t numberOfAllocations = perThreadAllocations.size(); + size_t totalAllocationSize = 0; for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) { const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + totalAllocationSize += allocationSize; state.ResumeTiming(); perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); state.PauseTiming(); } - state.PauseTiming(); - state.counters[s_counterAllocatorMemoryRatio] = - benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + // In allocation cases, s_counterAllocatorMemoryRatio is measuring how much over-allocation our allocators + // are doing to keep track of the memory and because of fragmentation/under-use of blocks. A ratio over 1 means + // that we are using more memory than requested. Ideally we would approximate to a ratio of 1. + state.counters[s_counterAllocatorMemoryRatio] = benchmark::Counter( + static_cast(TestAllocatorType::NumAllocatedBytes()) / static_cast(totalAllocationSize), + benchmark::Counter::kDefaults); + // s_counterProcessMemoryRatio is measuring the same ratio but using the OS to measure the used process memory state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( - static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), + static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline) / static_cast(totalAllocationSize), benchmark::Counter::kDefaults); for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) @@ -391,7 +397,6 @@ namespace Benchmark TestAllocatorType::GarbageCollect(); state.SetItemsProcessed(numberOfAllocations); - state.ResumeTiming(); } } }; @@ -422,10 +427,12 @@ namespace Benchmark const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); const size_t numberOfAllocations = perThreadAllocations.size(); + size_t totalAllocationSize = 0; for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) { const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + totalAllocationSize += allocationSize; perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); } @@ -439,29 +446,40 @@ namespace Benchmark perThreadAllocations[allocationIndex] = nullptr; } - state.counters[s_counterAllocatorMemoryRatio] = - benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + // In deallocation cases, s_counterAllocatorMemoryRatio is measuring how much "left-over" memory our allocators + // have after deallocations happen. This is memory that is not returned to the operative system. A ratio of 1 means + // that no memory was returned to the OS. A ratio over 1 means that we are holding more memory than requested. A ratio + // lower than 1 means that we have returned some memory. + state.counters[s_counterAllocatorMemoryRatio] = benchmark::Counter( + static_cast(TestAllocatorType::NumAllocatedBytes()) / static_cast(totalAllocationSize), + benchmark::Counter::kDefaults); + // s_counterProcessMemoryRatio is measuring the same ratio but using the OS to measure the used process memory state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( - static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), + static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline) / static_cast(totalAllocationSize), benchmark::Counter::kDefaults); state.SetItemsProcessed(numberOfAllocations); TestAllocatorType::GarbageCollect(); - - state.ResumeTiming(); } } }; + // For non-threaded ranges, run 100, 400, 1600 amounts static void RunRanges(benchmark::internal::Benchmark* b) { - for (int i = 0; i < 6; ++i) + for (int i = 0; i < 6; i += 2) { - b->Arg((1 << i) * 1000); + b->Arg((1 << i) * 100); } } + // For threaded ranges, run just 200, multi-threaded will already multiply by thread + static void ThreadedRunRanges(benchmark::internal::Benchmark* b) + { + b->Arg(100); + } + // Test under and over-subscription of threads vs the amount of CPUs available static const unsigned int MaxThreadRange = 2 * AZStd::thread::hardware_concurrency(); @@ -475,7 +493,7 @@ namespace Benchmark BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_SMALL, ALLOCATORTYPE, SMALL)->Apply(RunRanges); \ BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_BIG, ALLOCATORTYPE, BIG)->Apply(RunRanges); \ BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED, ALLOCATORTYPE, MIXED)->Apply(RunRanges); \ - BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED_THREADED, ALLOCATORTYPE, MIXED)->ThreadRange(1, MaxThreadRange)->Apply(RunRanges); + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED_THREADED, ALLOCATORTYPE, MIXED)->ThreadRange(2, MaxThreadRange)->Apply(ThreadedRunRanges); #define BM_REGISTER_ALLOCATOR(TESTNAME, ALLOCATORTYPE) \ namespace TESTNAME \ diff --git a/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp b/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp index 85dd79931d..08b84416e6 100644 --- a/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp +++ b/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp @@ -10,10 +10,6 @@ #include #include -#if defined(HAVE_BENCHMARK) -#include -#endif // HAVE_BENCHMARK - class HphaSchema_TestAllocator : public AZ::SimpleSchemaAllocator { @@ -112,87 +108,3 @@ namespace UnitTest HphaSchemaTestFixture, ::testing::ValuesIn(s_mixedInstancesParameters)); } - - -#if defined(HAVE_BENCHMARK) -namespace Benchmark -{ - class HphaSchemaBenchmarkFixture - : public ::benchmark::Fixture - { - void internalSetUp() - { - AZ::AllocatorInstance::Create(); - } - - void internalTearDown() - { - AZ::AllocatorInstance::Destroy(); - } - - public: - void SetUp(const benchmark::State&) override - { - internalSetUp(); - } - void SetUp(benchmark::State&) override - { - internalSetUp(); - } - void TearDown(const benchmark::State&) override - { - internalTearDown(); - } - void TearDown(benchmark::State&) override - { - internalTearDown(); - } - - static void BM_Allocations(benchmark::State& state, const AllocationSizeArray& allocationArray) - { - AZStd::vector allocations; - while (state.KeepRunning()) - { - state.PauseTiming(); - const size_t allocationIndex = allocations.size(); - const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; - - state.ResumeTiming(); - void* allocation = AZ::AllocatorInstance::Get().Allocate(allocationSize, 0); - - state.PauseTiming(); - allocations.emplace_back(allocation); - - state.ResumeTiming(); - } - - const size_t numberOfAllocations = allocations.size(); - state.SetItemsProcessed(numberOfAllocations); - - for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) - { - AZ::AllocatorInstance::Get().DeAllocate(allocations[allocationIndex], allocationArray[allocationIndex % allocationArray.size()]); - } - AZ::AllocatorInstance::Get().GarbageCollect(); - } - }; - - // Small allocations, these are allocations that are going to end up in buckets in the HphaSchema - BENCHMARK_F(HphaSchemaBenchmarkFixture, SmallAllocations)(benchmark::State& state) - { - BM_Allocations(state, s_smallAllocationSizes); - } - - BENCHMARK_F(HphaSchemaBenchmarkFixture, BigAllocations)(benchmark::State& state) - { - BM_Allocations(state, s_bigAllocationSizes); - } - - BENCHMARK_F(HphaSchemaBenchmarkFixture, MixedAllocations)(benchmark::State& state) - { - BM_Allocations(state, s_mixedAllocationSizes); - } - - -} // Benchmark -#endif // HAVE_BENCHMARK From 0f5cb54a38d32abacc29f1bc23d58d6032384bb6 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 30 Nov 2021 18:11:08 -0800 Subject: [PATCH 008/413] Fixes Linux build Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/Tests/Memory/AllocatorBenchmarks.cpp | 10 +++------- .../Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp | 4 ++-- .../Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp | 5 +++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index c1fdd4ca32..dfaefd4c0f 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -248,10 +248,6 @@ namespace Benchmark { public: AZ_TYPE_INFO(TestSystemAllocator, "{360D4DAA-D65D-4D5C-A6FA-1A4C5261C35C}"); - - TestSystemAllocator() - : AZ::SystemAllocator() - {} }; // Allocated bytes reported by the allocator / actually requested bytes @@ -293,7 +289,7 @@ namespace Benchmark m_allocations.resize(state.threads); for (auto& perThreadAllocations : m_allocations) { - perThreadAllocations.resize(state.range_x(), nullptr); + perThreadAllocations.resize(state.range(0), nullptr); } } } @@ -342,7 +338,7 @@ namespace Benchmark : public AllocatorBenchmarkFixture { using base = AllocatorBenchmarkFixture; - using TestAllocatorType = base::TestAllocatorType; + using TestAllocatorType = typename base::TestAllocatorType; void internalSetUp(const ::benchmark::State& state) override { @@ -406,7 +402,7 @@ namespace Benchmark : public AllocatorBenchmarkFixture { using base = AllocatorBenchmarkFixture; - using TestAllocatorType = base::TestAllocatorType; + using TestAllocatorType = typename base::TestAllocatorType; void internalSetUp(const ::benchmark::State& state) override { diff --git a/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp b/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp index 49ecefda49..636d5519d8 100644 --- a/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace Benchmark { @@ -25,7 +25,7 @@ namespace Benchmark size_t GetMemorySize(void* memory) { - return memory ? _aligned_msize(memory, 1, 0) : 0; + return memory ? malloc_usable_size(memory) : 0; } } } diff --git a/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp index 374d9f81f7..303b7efbb4 100644 --- a/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp @@ -9,7 +9,8 @@ #include #include -#include +#include +#include namespace Benchmark { @@ -24,7 +25,7 @@ namespace Benchmark size_t GetMemorySize(void* memory) { - return memory ? _aligned_msize(memory, 1, 0) : 0; + return memory ? malloc_usable_size(memory) : 0; } } } From fbd2d60fc1cfc91a49331b304abb797524ae0270 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 30 Nov 2021 18:15:22 -0800 Subject: [PATCH 009/413] Fixes for mac Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp index 303b7efbb4..932252985a 100644 --- a/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include namespace Benchmark @@ -25,7 +25,7 @@ namespace Benchmark size_t GetMemorySize(void* memory) { - return memory ? malloc_usable_size(memory) : 0; + return memory ? malloc_size(memory) : 0; } } } From 72f338a6897ff952ae0bfc564fc19fae072fbb1c Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 2 Dec 2021 11:55:36 -0800 Subject: [PATCH 010/413] Fixes for HeapSchema to get a default block if none is passed Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp | 12 +----------- Code/Framework/AzCore/AzCore/Memory/HeapSchema.h | 14 ++++---------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp index aceafa1b28..1f0fc59a97 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp @@ -115,6 +115,7 @@ namespace AZ m_ownMemoryBlock[i] = false; } + AZ_Assert(m_desc.m_numMemoryBlocks > 0, "At least one memory block is required"); for (int i = 0; i < m_desc.m_numMemoryBlocks; ++i) { if (m_desc.m_memoryBlocks[i] == nullptr) // Allocate memory block if requested! @@ -131,17 +132,6 @@ namespace AZ m_capacity += m_desc.m_memoryBlocksByteSize[i]; } - - if (m_desc.m_numMemoryBlocks == 0) - { - // Create default memory space if we can to serve for default allocations - m_memSpaces[0] = AZDLMalloc::create_mspace(0, m_desc.m_isMultithreadAlloc); - if (m_memSpaces[0]) - { - AZDLMalloc::mspace_az_set_expandable(m_memSpaces[0], true); - m_capacity = Platform::GetHeapCapacity(); - } - } } HeapSchema::~HeapSchema() diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h index f72ae31057..3a7716a127 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h @@ -32,17 +32,11 @@ namespace AZ */ struct Descriptor { - Descriptor() - : m_numMemoryBlocks(0) - , m_isMultithreadAlloc(true) - {} - - static const int m_memoryBlockAlignment = 64 * 1024; static const int m_maxNumBlocks = 5; - int m_numMemoryBlocks; ///< Number of memory blocks to use. - void* m_memoryBlocks[m_maxNumBlocks]; ///< Pointers to provided memory blocks or NULL if you want the system to allocate them for you with the System Allocator. - size_t m_memoryBlocksByteSize[m_maxNumBlocks]; ///< Sizes of different memory blocks, if m_memoryBlock is 0 the block will be allocated for you with the System Allocator. - bool m_isMultithreadAlloc; ///< Set to true to enable multi threading safe allocation. + int m_numMemoryBlocks = 1; ///< Number of memory blocks to use. + void* m_memoryBlocks[m_maxNumBlocks] = {}; ///< Pointers to provided memory blocks or NULL if you want the system to allocate them for you with the System Allocator. + size_t m_memoryBlocksByteSize[m_maxNumBlocks] = {4 * 1024}; ///< Sizes of different memory blocks, if m_memoryBlock is 0 the block will be allocated for you with the System Allocator. + bool m_isMultithreadAlloc = true; ///< Set to true to enable multi threading safe allocation. }; HeapSchema(const Descriptor& desc); From cf9aab991104d0b59697b4826d25024add70f752 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 6 Dec 2021 18:34:52 -0800 Subject: [PATCH 011/413] Adds recording functionality (disabled) and a benchmark that can run recordings Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Memory/AllocatorBase.cpp | 81 +++++ .../Tests/Memory/AllocatorBenchmarks.cpp | 344 ++++++++++++------ 2 files changed, 309 insertions(+), 116 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index e450f12bcf..40ddff0fc3 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -12,6 +12,49 @@ using namespace AZ; +#define RECORDING_ENABLED 0 + +#if RECORDING_ENABLED + +struct AllocatorOperation +{ + enum OperationType : unsigned int + { + ALLOCATE, + DEALLOCATE, + REALLOCATE, + RESIZE + }; + OperationType m_operationType : 2; + size_t m_size : 46; + size_t m_alignment : 16; + void* m_ptr; + void* m_newptr; // required for resize +}; +static constexpr size_t s_allocationOperationCount = 5 * 1024; +static AZStd::array s_operations = {}; +static uint64_t s_operationCounter = 0; +static AZStd::mutex s_operationsMutex; + +AllocatorOperation& GetNextAllocatorOperation() +{ + AZStd::scoped_lock lock(s_operationsMutex); + if (s_operationCounter == s_allocationOperationCount) + { + FILE* file = nullptr; + fopen_s(&file, "memoryrecordings.bin", "ab"); + if (file) + { + fwrite(&s_operations, sizeof(AllocatorOperation), s_allocationOperationCount, file); + fclose(file); + } + s_operationCounter = 0; + } + return s_operations[s_operationCounter++]; +} + +#endif + AllocatorBase::AllocatorBase(IAllocatorAllocate* allocationSource, const char* name, const char* desc) : IAllocator(allocationSource), m_name(name), @@ -136,6 +179,16 @@ void AllocatorBase::ProfileAllocation(void* ptr, size_t byteSize, size_t alignme EBUS_EVENT(AZ::Debug::MemoryDrillerBus, RegisterAllocation, this, ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord); #endif } + +#if RECORDING_ENABLED + { + AllocatorOperation& op = GetNextAllocatorOperation(); + op.m_operationType = AllocatorOperation::ALLOCATE; + op.m_size = byteSize; + op.m_alignment = alignment; + op.m_ptr = ptr; + } +#endif } void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t alignment, Debug::AllocationInfo* info) @@ -148,6 +201,15 @@ void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t align EBUS_EVENT(AZ::Debug::MemoryDrillerBus, UnregisterAllocation, this, ptr, byteSize, alignment, info); #endif } +#if RECORDING_ENABLED + { + AllocatorOperation& op = GetNextAllocatorOperation(); + op.m_operationType = AllocatorOperation::DEALLOCATE; + op.m_size = byteSize; + op.m_alignment = alignment; + op.m_ptr = ptr; + } +#endif } void AllocatorBase::ProfileReallocationBegin(void* ptr, size_t newSize) @@ -174,6 +236,16 @@ void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSi EBUS_EVENT(AZ::Debug::MemoryDrillerBus, ReallocateAllocation, this, ptr, newPtr, newSize, newAlignment); #endif } +#if RECORDING_ENABLED + { + AllocatorOperation& op = GetNextAllocatorOperation(); + op.m_operationType = AllocatorOperation::REALLOCATE; + op.m_size = newSize; + op.m_alignment = newAlignment; + op.m_ptr = ptr; + op.m_newptr = newPtr; + } +#endif } void AllocatorBase::ProfileReallocation(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) @@ -187,6 +259,15 @@ void AllocatorBase::ProfileResize(void* ptr, size_t newSize) { EBUS_EVENT(AZ::Debug::MemoryDrillerBus, ResizeAllocation, this, ptr, newSize); } +#if RECORDING_ENABLED + { + AllocatorOperation& op = GetNextAllocatorOperation(); + op.m_operationType = AllocatorOperation::RESIZE; + op.m_size = newSize; + op.m_alignment = 0; + op.m_ptr = ptr; + } +#endif } bool AllocatorBase::OnOutOfMemory(size_t byteSize, size_t alignment, int flags, const char* name, const char* fileName, int lineNum) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index dfaefd4c0f..76c3316009 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -32,7 +32,7 @@ namespace Benchmark size_t GetMemorySize(void* memory); } - static AZ::Debug::DrillerManager* s_drillerManager = nullptr; + //static AZ::Debug::DrillerManager* s_drillerManager = nullptr; /// /// Test allocator wrapper that redirects the calls to the passed TAllocator by using AZ::AllocatorInstance. @@ -47,14 +47,14 @@ namespace Benchmark { AZ::AllocatorInstance::Create(); - s_drillerManager = AZ::Debug::DrillerManager::Create(); - s_drillerManager->Register(aznew AZ::Debug::MemoryDriller); + /*s_drillerManager = AZ::Debug::DrillerManager::Create(); + s_drillerManager->Register(aznew AZ::Debug::MemoryDriller);*/ } static void TearDown() { - AZ::Debug::DrillerManager::Destroy(s_drillerManager); - s_drillerManager = nullptr; + /*AZ::Debug::DrillerManager::Destroy(s_drillerManager); + s_drillerManager = nullptr;*/ AZ::AllocatorInstance::Destroy(); } @@ -89,51 +89,41 @@ namespace Benchmark return AZ::AllocatorInstance::Get().NumAllocatedBytes() + AZ::AllocatorInstance::Get().GetUnAllocatedMemory(); } + + static size_t GetSize(void* ptr) + { + return AZ::AllocatorInstance::Get().AllocationSize(ptr); + } }; /// /// Basic allocator used as a baseline. This allocator is the most basic allocation possible with the OS (AZ_OS_MALLOC). /// MallocSchema cannot be used here because it has extra logic that we don't want to use as a baseline. /// - class TestRawMallocAllocator - : public AZ::AllocatorBase - , public AZ::IAllocatorAllocate + class TestRawMallocAllocator {}; + + template<> + class TestAllocatorWrapper { public: - AZ_TYPE_INFO(TestMallocSchemaAllocator, "{08EB400A-D723-46C6-808E-D0844C8DE206}"); - - struct Descriptor {}; - - TestRawMallocAllocator() - : AllocatorBase(this, "TestRawMallocAllocator", "") + TestAllocatorWrapper() { - m_numAllocatedBytes = 0; + s_numAllocatedBytes = 0; } - bool Create(const Descriptor&) + static void SetUp() { - m_numAllocatedBytes = 0; - return true; + s_numAllocatedBytes = 0; } - // IAllocator - void Destroy() override + static void TearDown() { - m_numAllocatedBytes = 0; - } - AZ::AllocatorDebugConfig GetDebugConfig() override - { - return AZ::AllocatorDebugConfig(); - } - AZ::IAllocatorAllocate* GetSchema() override - { - return nullptr; } // IAllocatorAllocate - void* Allocate(size_t byteSize, size_t alignment, int = 0, const char* = 0, const char* = 0, int = 0, unsigned int = 0) override + static void* Allocate(size_t byteSize, size_t alignment) { - m_numAllocatedBytes += byteSize; + s_numAllocatedBytes += byteSize; if (alignment) { return AZ_OS_MALLOC(byteSize, alignment); @@ -144,18 +134,18 @@ namespace Benchmark } } - void DeAllocate(void* ptr, size_t = 0, size_type = 0) override + static void DeAllocate(void* ptr, size_t = 0) { - m_numAllocatedBytes -= Platform::GetMemorySize(ptr); + s_numAllocatedBytes -= Platform::GetMemorySize(ptr); AZ_OS_FREE(ptr); } - void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) override + static void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) { - m_numAllocatedBytes -= Platform::GetMemorySize(ptr); + s_numAllocatedBytes -= Platform::GetMemorySize(ptr); AZ_OS_FREE(ptr); - m_numAllocatedBytes += newSize; + s_numAllocatedBytes += newSize; if (newAlignment) { return AZ_OS_MALLOC(newSize, newAlignment); @@ -166,7 +156,7 @@ namespace Benchmark } } - size_t Resize(void* ptr, size_t newSize) override + static size_t Resize(void* ptr, size_t newSize) { AZ_UNUSED(ptr); AZ_UNUSED(newSize); @@ -174,45 +164,24 @@ namespace Benchmark return 0; } - size_t AllocationSize(void* ptr) override + static void GarbageCollect() {} + + static size_t NumAllocatedBytes() + { + return s_numAllocatedBytes; + } + + static size_t GetSize(void* ptr) { return Platform::GetMemorySize(ptr); } - void GarbageCollect() override {} - - size_t NumAllocatedBytes() const override - { - return m_numAllocatedBytes; - } - - size_t Capacity() const override - { - return AZ_CORE_MAX_ALLOCATOR_SIZE; // unused - } - - size_t GetMaxAllocationSize() const override - { - return AZ_CORE_MAX_ALLOCATOR_SIZE; // unused - } - - size_t GetMaxContiguousAllocationSize() const override - { - return AZ_CORE_MAX_ALLOCATOR_SIZE; // unused - } - size_t GetUnAllocatedMemory(bool = false) const override - { - return 0; // unused - } - IAllocatorAllocate* GetSubAllocator() override - { - return nullptr; // unused - } - private: - size_t m_numAllocatedBytes; + static size_t s_numAllocatedBytes; }; + size_t TestAllocatorWrapper::s_numAllocatedBytes = 0; + // Here we require to implement this to be able to configure a name for the allocator, otherswise the AllocatorManager crashes when trying to configure the overrides class TestMallocSchemaAllocator : public AZ::SimpleSchemaAllocator { @@ -250,11 +219,14 @@ namespace Benchmark AZ_TYPE_INFO(TestSystemAllocator, "{360D4DAA-D65D-4D5C-A6FA-1A4C5261C35C}"); }; - // Allocated bytes reported by the allocator / actually requested bytes - static const char* s_counterAllocatorMemoryRatio = "Allocator_MemoryRatio"; + // Allocated bytes reported by the allocator + static const char* s_counterAllocatorMemory = "Allocator_Memory"; - // Allocated bytes reported by the process / actually requested bytes - static const char* s_counterProcessMemoryRatio = "Process_MemoryRatio"; + // Allocated bytes reported by the process + static const char* s_counterProcessMemory = "Process_Memory"; + + // Allocated bytes as counted by the benchmark + static const char* s_counterBenchmarkMemory = "Benchmark_Memory"; enum AllocationSize { @@ -340,16 +312,6 @@ namespace Benchmark using base = AllocatorBenchmarkFixture; using TestAllocatorType = typename base::TestAllocatorType; - void internalSetUp(const ::benchmark::State& state) override - { - AllocatorBenchmarkFixture::internalSetUp(state); - } - - void internalTearDown(const ::benchmark::State& state) override - { - AllocatorBenchmarkFixture::internalTearDown(state); - } - public: void Benchmark(benchmark::State& state) { @@ -372,16 +334,9 @@ namespace Benchmark state.PauseTiming(); } - // In allocation cases, s_counterAllocatorMemoryRatio is measuring how much over-allocation our allocators - // are doing to keep track of the memory and because of fragmentation/under-use of blocks. A ratio over 1 means - // that we are using more memory than requested. Ideally we would approximate to a ratio of 1. - state.counters[s_counterAllocatorMemoryRatio] = benchmark::Counter( - static_cast(TestAllocatorType::NumAllocatedBytes()) / static_cast(totalAllocationSize), - benchmark::Counter::kDefaults); - // s_counterProcessMemoryRatio is measuring the same ratio but using the OS to measure the used process memory - state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( - static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline) / static_cast(totalAllocationSize), - benchmark::Counter::kDefaults); + state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); + state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) { @@ -404,15 +359,6 @@ namespace Benchmark using base = AllocatorBenchmarkFixture; using TestAllocatorType = typename base::TestAllocatorType; - void internalSetUp(const ::benchmark::State& state) override - { - AllocatorBenchmarkFixture::internalSetUp(state); - } - - void internalTearDown(const ::benchmark::State& state) override - { - AllocatorBenchmarkFixture::internalTearDown(state); - } public: void Benchmark(benchmark::State& state) { @@ -442,17 +388,9 @@ namespace Benchmark perThreadAllocations[allocationIndex] = nullptr; } - // In deallocation cases, s_counterAllocatorMemoryRatio is measuring how much "left-over" memory our allocators - // have after deallocations happen. This is memory that is not returned to the operative system. A ratio of 1 means - // that no memory was returned to the OS. A ratio over 1 means that we are holding more memory than requested. A ratio - // lower than 1 means that we have returned some memory. - state.counters[s_counterAllocatorMemoryRatio] = benchmark::Counter( - static_cast(TestAllocatorType::NumAllocatedBytes()) / static_cast(totalAllocationSize), - benchmark::Counter::kDefaults); - // s_counterProcessMemoryRatio is measuring the same ratio but using the OS to measure the used process memory - state.counters[s_counterProcessMemoryRatio] = benchmark::Counter( - static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline) / static_cast(totalAllocationSize), - benchmark::Counter::kDefaults); + state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); + state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); state.SetItemsProcessed(numberOfAllocations); @@ -460,6 +398,175 @@ namespace Benchmark } } }; + + template + class RecordedAllocationBenchmarkFixture : public AllocatorBenchmarkFixture + { + using base = AllocatorBenchmarkFixture; + using TestAllocatorType = typename base::TestAllocatorType; + + struct AllocatorOperation + { + enum OperationType : unsigned int + { + ALLOCATE, + DEALLOCATE, + REALLOCATE, + RESIZE + }; + OperationType m_operationType : 2; + size_t m_size : 46; + size_t m_alignment : 16; + void* m_ptr; + void* m_newptr; // required for resize + }; + + public: + void Benchmark(benchmark::State& state) + { + for (auto _ : state) + { + state.PauseTiming(); + + AZStd::unordered_map pointerRemapping; + AZStd::unordered_map allocationSize; + constexpr size_t allocationOperationCount = 5 * 1024; + AZStd::array m_operations = {}; + + FILE* file = nullptr; + fopen_s(&file, "memoryrecordings.bin", "rb"); + if (!file) + { + return; + } + size_t elementsRead = fread(&m_operations, sizeof(AllocatorOperation), allocationOperationCount, file); + size_t totalElementsRead = elementsRead; + const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); + size_t totalAllocationSize = 0; + + while (elementsRead > 0) + { + for (size_t operationIndex = 0; operationIndex < elementsRead; ++operationIndex) + { + const AllocatorOperation& operation = m_operations[operationIndex]; + switch (operation.m_operationType) + { + case AllocatorOperation::ALLOCATE: + { + if (operation.m_ptr) + { + const auto it = pointerRemapping.emplace(operation.m_ptr, nullptr); + if (it.second) // otherwise already allocated + { + state.ResumeTiming(); + void* ptr = TestAllocatorType::Allocate(operation.m_size, operation.m_alignment); + state.PauseTiming(); + totalAllocationSize += operation.m_size; + it.first->second = ptr; + allocationSize[ptr] = operation.m_size; + } + else + { + //AZ_Warning("RecordedAllocationBenchmarkFixture", false, "Allocation on %p was already made", operation.m_ptr); + } + } + break; + } + case AllocatorOperation::DEALLOCATE: + { + if (operation.m_ptr) // some deallocate(nullptr) are recorded + { + const auto ptrIt = pointerRemapping.find(operation.m_ptr); + if (ptrIt != pointerRemapping.end()) + { + totalAllocationSize -= allocationSize[ptrIt->second]; + state.ResumeTiming(); + TestAllocatorType::DeAllocate(ptrIt->second, /*operation.m_size*/ 0); // size is not correct after a resize, a 0 size deals with it + state.PauseTiming(); + pointerRemapping.erase(ptrIt); + } + } + else + { + // Just to account of the call of deallocate(nullptr); + // totalAllocationSize -= 0; // No real deallocation happened + state.ResumeTiming(); + TestAllocatorType::DeAllocate(operation.m_ptr, /*operation.m_size*/ 0); + state.PauseTiming(); + } + break; + } + case AllocatorOperation::REALLOCATE: + { + void* ptr = nullptr; + if (operation.m_ptr) + { + AZ_Assert(operation.m_newptr, "Need to consider other cases?"); + const auto ptrIt = pointerRemapping.find(operation.m_ptr); + AZ_Assert(ptrIt != pointerRemapping.end(), "Missing allocation for reallocation"); // In case the recording didnt catch something + ptr = ptrIt->second; + pointerRemapping.erase(ptrIt); + } + AZ_Assert(operation.m_newptr != nullptr, "Reallocation failed in the game"); + const auto it = pointerRemapping.emplace(operation.m_newptr, nullptr); + if (it.second) + { + totalAllocationSize -= allocationSize[ptr]; + state.ResumeTiming(); + void* newPtr = TestAllocatorType::ReAllocate(ptr, operation.m_size, operation.m_alignment); + state.PauseTiming(); + totalAllocationSize += operation.m_size; + it.first->second = newPtr; + allocationSize[newPtr] = operation.m_size; + } + else + { + totalAllocationSize -= allocationSize[ptr]; + state.ResumeTiming(); + TestAllocatorType::DeAllocate(ptr); + state.PauseTiming(); + } + break; + } + case AllocatorOperation::RESIZE: + { + const auto ptrIt = pointerRemapping.find(operation.m_ptr); + AZ_Assert(ptrIt != pointerRemapping.end(), "Missing allocation for resize"); // In case the recording didnt catch something + totalAllocationSize -= allocationSize[ptrIt->second]; + state.ResumeTiming(); + TestAllocatorType::Resize(ptrIt->second, operation.m_size); + state.PauseTiming(); + totalAllocationSize += operation.m_size; + if (operation.m_size == 0) + { + pointerRemapping.erase(ptrIt); + } + break; + } + } + } + + elementsRead = fread(&m_operations, sizeof(AllocatorOperation), allocationOperationCount, file); + totalElementsRead += elementsRead; + } + fclose(file); + + state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); + state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); + + state.SetItemsProcessed(totalElementsRead); + + // Deallocate the remainder (since we stopped the recording middle-game)(there are leaks as well) + for (const auto& pointerMapping : pointerRemapping) + { + TestAllocatorType::DeAllocate(pointerMapping.second); + } + pointerRemapping.clear(); + TestAllocatorType::GarbageCollect(); + } + } + }; // For non-threaded ranges, run 100, 400, 1600 amounts static void RunRanges(benchmark::internal::Benchmark* b) @@ -469,6 +576,10 @@ namespace Benchmark b->Arg((1 << i) * 100); } } + static void RecordedRunRanges(benchmark::internal::Benchmark* b) + { + b->Arg(1); + } // For threaded ranges, run just 200, multi-threaded will already multiply by thread static void ThreadedRunRanges(benchmark::internal::Benchmark* b) @@ -494,16 +605,17 @@ namespace Benchmark #define BM_REGISTER_ALLOCATOR(TESTNAME, ALLOCATORTYPE) \ namespace TESTNAME \ { \ - BM_REGISTER_SIZE_FIXTURES(AllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE) \ - BM_REGISTER_SIZE_FIXTURES(DeAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE) \ + BM_REGISTER_SIZE_FIXTURES(AllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE); \ + BM_REGISTER_SIZE_FIXTURES(DeAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE); \ + BM_REGISTER_TEMPLATE(RecordedAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE)->Apply(RecordedRunRanges); \ } BM_REGISTER_ALLOCATOR(RawMallocAllocator, TestRawMallocAllocator); BM_REGISTER_ALLOCATOR(MallocSchemaAllocator, TestMallocSchemaAllocator); - BM_REGISTER_ALLOCATOR(HeapSchemaAllocator, TestHeapSchemaAllocator); BM_REGISTER_ALLOCATOR(HphaSchemaAllocator, TestHphaSchemaAllocator); BM_REGISTER_ALLOCATOR(SystemAllocator, TestSystemAllocator); + //BM_REGISTER_ALLOCATOR(HeapSchemaAllocator, TestHeapSchemaAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator //BM_REGISTER_SCHEMA(BestFitExternalMapSchema); // Requires to implement AZ::IAllocatorAllocate //BM_REGISTER_SCHEMA(PoolSchema); // Requires special alignment requests while allocating From 4b07665496f060459020f3f6c250807f26d0a80f Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 6 Dec 2021 18:35:39 -0800 Subject: [PATCH 012/413] Removes Heap allocator from being possible to use as a SystemAllocator since it doesnt allow dynamic allocating (only works with pre-allocated blocks) Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Memory/SystemAllocator.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp index 8c84338fd0..9ce681ef2d 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp @@ -19,7 +19,6 @@ #define AZCORE_SYSTEM_ALLOCATOR_HPHA 1 #define AZCORE_SYSTEM_ALLOCATOR_MALLOC 2 -#define AZCORE_SYSTEM_ALLOCATOR_HEAP 3 #if !defined(AZCORE_SYSTEM_ALLOCATOR) // define the default @@ -30,8 +29,6 @@ #include #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC #include -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - #include #else #error "Invalid allocator selected for SystemAllocator" #endif @@ -46,8 +43,6 @@ static bool g_isSystemSchemaUsed = false; static AZStd::aligned_storage::value>::type g_systemSchema; #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC static AZStd::aligned_storage::value>::type g_systemSchema; -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - static AZStd::aligned_storage::value>::type g_systemSchema; #endif ////////////////////////////////////////////////////////////////////////// @@ -121,11 +116,6 @@ SystemAllocator::Create(const Descriptor& desc) heapDesc.m_systemChunkSize = desc.m_heap.m_systemChunkSize; #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC MallocSchema::Descriptor heapDesc; -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - HeapSchema::Descriptor heapDesc; - memcpy(heapDesc.m_memoryBlocks, desc.m_heap.m_memoryBlocks, sizeof(heapDesc.m_memoryBlocks)); - memcpy(heapDesc.m_memoryBlocksByteSize, desc.m_heap.m_memoryBlocksByteSize, sizeof(heapDesc.m_memoryBlocksByteSize)); - heapDesc.m_numMemoryBlocks = desc.m_heap.m_numMemoryBlocks; #endif if (&AllocatorInstance::Get() == this) // if we are the system allocator { @@ -135,8 +125,6 @@ SystemAllocator::Create(const Descriptor& desc) m_allocator = new(&g_systemSchema)HphaSchema(heapDesc); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC m_allocator = new(&g_systemSchema)MallocSchema(heapDesc); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - m_allocator = new(&g_systemSchema)HeapSchema(heapDesc); #endif g_isSystemSchemaUsed = true; isReady = true; @@ -150,8 +138,6 @@ SystemAllocator::Create(const Descriptor& desc) m_allocator = azcreate(HphaSchema, (heapDesc), SystemAllocator); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC m_allocator = azcreate(MallocSchema, (heapDesc), SystemAllocator); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - m_allocator = azcreate(HeapSchema, (heapDesc), SystemAllocator); #endif if (m_allocator == nullptr) { @@ -188,8 +174,6 @@ SystemAllocator::Destroy() static_cast(m_allocator)->~HphaSchema(); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC static_cast(m_allocator)->~MallocSchema(); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - static_cast(m_allocator)->~HeapSchema(); #endif g_isSystemSchemaUsed = false; } From f96a466212c1acc526e2a1e41e6849fe854e3a1d Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 7 Dec 2021 17:58:49 -0800 Subject: [PATCH 013/413] WIP trying to use SystemAllocator instead of raw reads Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Memory/AllocatorBase.cpp | 193 ++++++++++++------ Code/Framework/AzCore/CMakeLists.txt | 5 + .../Memory/AllocatorBenchmarkRecordings.bin | 3 + .../Tests/Memory/AllocatorBenchmarks.cpp | 145 ++++--------- 4 files changed, 181 insertions(+), 165 deletions(-) create mode 100644 Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index 7bba1b1d20..32ccd43f9a 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -11,47 +11,142 @@ using namespace AZ; -#define RECORDING_ENABLED 0 +#define RECORDING_ENABLED 1 #if RECORDING_ENABLED -struct AllocatorOperation -{ - enum OperationType : unsigned int - { - ALLOCATE, - DEALLOCATE, - REALLOCATE, - RESIZE - }; - OperationType m_operationType : 2; - size_t m_size : 46; - size_t m_alignment : 16; - void* m_ptr; - void* m_newptr; // required for resize -}; -static constexpr size_t s_allocationOperationCount = 5 * 1024; -static AZStd::array s_operations = {}; -static uint64_t s_operationCounter = 0; -static AZStd::mutex s_operationsMutex; +#include +#include +#include +#include -AllocatorOperation& GetNextAllocatorOperation() +namespace { - AZStd::scoped_lock lock(s_operationsMutex); - if (s_operationCounter == s_allocationOperationCount) + class DebugAllocator { - FILE* file = nullptr; - fopen_s(&file, "memoryrecordings.bin", "ab"); - if (file) + public: + typedef void* pointer_type; + typedef AZStd::size_t size_type; + typedef AZStd::ptrdiff_t difference_type; + typedef AZStd::false_type allow_memory_leaks; ///< Regular allocators should not leak. + + AZ_FORCE_INLINE pointer_type allocate(size_t byteSize, size_t alignment, int = 0) { - fwrite(&s_operations, sizeof(AllocatorOperation), s_allocationOperationCount, file); - fclose(file); + return AZ_OS_MALLOC(byteSize, alignment); } - s_operationCounter = 0; - } - return s_operations[s_operationCounter++]; -} + AZ_FORCE_INLINE size_type resize(pointer_type, size_type) + { + return 0; + } + AZ_FORCE_INLINE void deallocate(pointer_type ptr, size_type, size_type) + { + AZ_OS_FREE(ptr); + } + }; + struct AllocatorOperation + { + enum OperationType : unsigned int + { + ALLOCATE, + DEALLOCATE + }; + OperationType m_type: 1; + unsigned int m_size : 28; // Can represent up to 256Mb requests + unsigned int m_alignment : 7; // Can represent up to 128 alignment + unsigned int m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids + }; + static AZStd::mutex s_operationsMutex = {}; + + static constexpr size_t s_maxNumberOfAllocationsToRecord = 16384; + static size_t s_numberOfAllocationsRecorded = 0; + static constexpr size_t s_allocationOperationCount = 5 * 1024; + static AZStd::array s_operations = {}; + static uint64_t s_operationCounter = 0; + + static unsigned int s_nextRecordId = 1; + using AllocatorOperationByAddress = AZStd::map, DebugAllocator>; + static AllocatorOperationByAddress s_allocatorOperationByAddress; + using AvailableRecordIds = AZStd::vector; + AvailableRecordIds s_availableRecordIds; + + void RecordAllocatorOperation(AllocatorOperation::OperationType type, void* ptr, size_t size = 0, size_t alignment = 0) + { + AZStd::scoped_lock lock(s_operationsMutex); + if (s_operationCounter == s_allocationOperationCount) + { + AZ::IO::SystemFile file; + file.Open("memoryrecordings.bin", AZ::IO::SystemFile::OpenMode::SF_OPEN_APPEND); + if (file.IsOpen()) + { + file.Write(&s_operations, sizeof(AllocatorOperation) * s_allocationOperationCount); + file.Close(); + } + s_operationCounter = 0; + } + AllocatorOperation& operation = s_operations[s_operationCounter++]; + operation.m_type = type; + if (type == AllocatorOperation::OperationType::ALLOCATE) + { + if (s_numberOfAllocationsRecorded > s_maxNumberOfAllocationsToRecord) + { + // reached limit of allocations, dont record anymore + --s_operationCounter; + return; + } + ++s_numberOfAllocationsRecorded; + operation.m_size = size; + operation.m_alignment = alignment; + unsigned int recordId = 0; + if (!s_availableRecordIds.empty()) + { + recordId = s_availableRecordIds.back(); + s_availableRecordIds.pop_back(); + } + else + { + recordId = s_nextRecordId; + ++s_nextRecordId; + } + operation.m_recordId = recordId; + auto it = s_allocatorOperationByAddress.emplace(ptr, operation); + if (!it.second) + { + // double alloc or resize, leave the current record and return the id + operation = it.first->second; + s_availableRecordIds.emplace_back(recordId); + } + } + else + { + if (ptr == nullptr) + { + // common scenario, just record the operation + operation.m_size = 0; + operation.m_alignment = 0; + operation.m_recordId = 0; // recordId = 0 will flag this case + } + else + { + auto it = s_allocatorOperationByAddress.find(ptr); + if (it != s_allocatorOperationByAddress.end()) + { + operation.m_size = it->second.m_size; + operation.m_alignment = it->second.m_alignment; + operation.m_recordId = it->second.m_recordId; + s_availableRecordIds.push_back(it->second.m_recordId); + s_allocatorOperationByAddress.erase(it); + } + else + { + // just dont record this operation + --s_operationCounter; + } + } + } + + } +} #endif AllocatorBase::AllocatorBase(IAllocatorAllocate* allocationSource, const char* name, const char* desc) : @@ -188,13 +283,7 @@ void AllocatorBase::ProfileAllocation(void* ptr, size_t byteSize, size_t alignme } #if RECORDING_ENABLED - { - AllocatorOperation& op = GetNextAllocatorOperation(); - op.m_operationType = AllocatorOperation::ALLOCATE; - op.m_size = byteSize; - op.m_alignment = alignment; - op.m_ptr = ptr; - } + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, byteSize, alignment); #endif } @@ -209,13 +298,7 @@ void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t align } } #if RECORDING_ENABLED - { - AllocatorOperation& op = GetNextAllocatorOperation(); - op.m_operationType = AllocatorOperation::DEALLOCATE; - op.m_size = byteSize; - op.m_alignment = alignment; - op.m_ptr = ptr; - } + RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr, byteSize, alignment); #endif } @@ -232,14 +315,8 @@ void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSi ProfileAllocation(newPtr, newSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); } #if RECORDING_ENABLED - { - AllocatorOperation& op = GetNextAllocatorOperation(); - op.m_operationType = AllocatorOperation::REALLOCATE; - op.m_size = newSize; - op.m_alignment = newAlignment; - op.m_ptr = ptr; - op.m_newptr = newPtr; - } + RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr); + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, newPtr, newSize, newAlignment); #endif } @@ -259,13 +336,7 @@ void AllocatorBase::ProfileResize(void* ptr, size_t newSize) } } #if RECORDING_ENABLED - { - AllocatorOperation& op = GetNextAllocatorOperation(); - op.m_operationType = AllocatorOperation::RESIZE; - op.m_size = newSize; - op.m_alignment = 0; - op.m_ptr = ptr; - } + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, newSize); #endif } diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index 96ed838ccc..838142f0df 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -146,6 +146,11 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) PROPERTY COMPILE_DEFINITIONS VALUES AZCORETEST_DLL_NAME=\"$\" ) + ly_add_target_files( + TARGETS AzCore.Tests + FILES ${CMAKE_CURRENT_SOURCE_DIR}/Tests/Memory/AllocatorBenchmarkRecordings.bin + OUTPUT_SUBDIRECTORY Tests/AzCore/Memory + ) endif() diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin new file mode 100644 index 0000000000..2b587a2304 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0f148441ce120b303896618cec364b5afb6f8b911b4785ec6358cfe8467cf7a +size 368640 diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 76c3316009..f5a728018c 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -9,9 +9,8 @@ #if defined(HAVE_BENCHMARK) #include +#include #include -#include -#include #include #include #include @@ -21,6 +20,7 @@ #include #include #include +#include #include @@ -32,11 +32,9 @@ namespace Benchmark size_t GetMemorySize(void* memory); } - //static AZ::Debug::DrillerManager* s_drillerManager = nullptr; - /// /// Test allocator wrapper that redirects the calls to the passed TAllocator by using AZ::AllocatorInstance. - /// It also creates/destroys the TAllocator type and connects the driller (to reflect what happens at runtime) + /// It also creates/destroys the TAllocator type (to reflect what happens at runtime) /// /// Allocator type to wrap template @@ -46,16 +44,10 @@ namespace Benchmark static void SetUp() { AZ::AllocatorInstance::Create(); - - /*s_drillerManager = AZ::Debug::DrillerManager::Create(); - s_drillerManager->Register(aznew AZ::Debug::MemoryDriller);*/ } static void TearDown() { - /*AZ::Debug::DrillerManager::Destroy(s_drillerManager); - s_drillerManager = nullptr;*/ - AZ::AllocatorInstance::Destroy(); } @@ -410,15 +402,12 @@ namespace Benchmark enum OperationType : unsigned int { ALLOCATE, - DEALLOCATE, - REALLOCATE, - RESIZE + DEALLOCATE }; - OperationType m_operationType : 2; - size_t m_size : 46; - size_t m_alignment : 16; - void* m_ptr; - void* m_newptr; // required for resize + OperationType m_type : 1; + unsigned int m_size : 28; // Can represent up to 256Mb requests + unsigned int m_alignment : 7; // Can represent up to 128 alignment + unsigned int m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids }; public: @@ -428,18 +417,18 @@ namespace Benchmark { state.PauseTiming(); - AZStd::unordered_map pointerRemapping; - AZStd::unordered_map allocationSize; + AZStd::unordered_map pointerRemapping; constexpr size_t allocationOperationCount = 5 * 1024; AZStd::array m_operations = {}; - FILE* file = nullptr; - fopen_s(&file, "memoryrecordings.bin", "rb"); - if (!file) + AZ::IO::SystemFile file; + AZ::IO::FixedMaxPathString filePath = AZ::Utils::GetExecutableDirectory(); + filePath += "/Tests/AzCore/Memory/AllocatorBenchmarkRecordings.bin"; + if (!file.Open(filePath.c_str(), AZ::IO::SystemFile::OpenMode::SF_OPEN_READ_ONLY)) { return; } - size_t elementsRead = fread(&m_operations, sizeof(AllocatorOperation), allocationOperationCount, file); + size_t elementsRead = file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations); size_t totalElementsRead = elementsRead; const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); size_t totalAllocationSize = 0; @@ -449,107 +438,54 @@ namespace Benchmark for (size_t operationIndex = 0; operationIndex < elementsRead; ++operationIndex) { const AllocatorOperation& operation = m_operations[operationIndex]; - switch (operation.m_operationType) + if (operation.m_type == AllocatorOperation::ALLOCATE) { - case AllocatorOperation::ALLOCATE: - { - if (operation.m_ptr) + const auto it = pointerRemapping.emplace(operation.m_recordId, nullptr); + if (it.second) // otherwise already allocated { - const auto it = pointerRemapping.emplace(operation.m_ptr, nullptr); - if (it.second) // otherwise already allocated - { - state.ResumeTiming(); - void* ptr = TestAllocatorType::Allocate(operation.m_size, operation.m_alignment); - state.PauseTiming(); - totalAllocationSize += operation.m_size; - it.first->second = ptr; - allocationSize[ptr] = operation.m_size; - } - else - { - //AZ_Warning("RecordedAllocationBenchmarkFixture", false, "Allocation on %p was already made", operation.m_ptr); - } + state.ResumeTiming(); + void* ptr = TestAllocatorType::Allocate(operation.m_size, operation.m_alignment); + state.PauseTiming(); + totalAllocationSize += operation.m_size; + it.first->second = ptr; } - break; - } - case AllocatorOperation::DEALLOCATE: - { - if (operation.m_ptr) // some deallocate(nullptr) are recorded + else { - const auto ptrIt = pointerRemapping.find(operation.m_ptr); + // Doing a resize, dont account for this memory change, this operation is rare and we dont have + // the size of the previous allocation + state.ResumeTiming(); + TestAllocatorType::Resize(it.first->second, operation.m_size); + state.PauseTiming(); + } + } + else // AllocatorOperation::DEALLOCATE: + { + if (operation.m_recordId) + { + const auto ptrIt = pointerRemapping.find(operation.m_recordId); if (ptrIt != pointerRemapping.end()) { - totalAllocationSize -= allocationSize[ptrIt->second]; + totalAllocationSize -= operation.m_size; state.ResumeTiming(); TestAllocatorType::DeAllocate(ptrIt->second, /*operation.m_size*/ 0); // size is not correct after a resize, a 0 size deals with it state.PauseTiming(); pointerRemapping.erase(ptrIt); } } - else + else // deallocate(nullptr) are recorded { // Just to account of the call of deallocate(nullptr); - // totalAllocationSize -= 0; // No real deallocation happened state.ResumeTiming(); - TestAllocatorType::DeAllocate(operation.m_ptr, /*operation.m_size*/ 0); + TestAllocatorType::DeAllocate(nullptr, /*operation.m_size*/ 0); state.PauseTiming(); } - break; - } - case AllocatorOperation::REALLOCATE: - { - void* ptr = nullptr; - if (operation.m_ptr) - { - AZ_Assert(operation.m_newptr, "Need to consider other cases?"); - const auto ptrIt = pointerRemapping.find(operation.m_ptr); - AZ_Assert(ptrIt != pointerRemapping.end(), "Missing allocation for reallocation"); // In case the recording didnt catch something - ptr = ptrIt->second; - pointerRemapping.erase(ptrIt); - } - AZ_Assert(operation.m_newptr != nullptr, "Reallocation failed in the game"); - const auto it = pointerRemapping.emplace(operation.m_newptr, nullptr); - if (it.second) - { - totalAllocationSize -= allocationSize[ptr]; - state.ResumeTiming(); - void* newPtr = TestAllocatorType::ReAllocate(ptr, operation.m_size, operation.m_alignment); - state.PauseTiming(); - totalAllocationSize += operation.m_size; - it.first->second = newPtr; - allocationSize[newPtr] = operation.m_size; - } - else - { - totalAllocationSize -= allocationSize[ptr]; - state.ResumeTiming(); - TestAllocatorType::DeAllocate(ptr); - state.PauseTiming(); - } - break; - } - case AllocatorOperation::RESIZE: - { - const auto ptrIt = pointerRemapping.find(operation.m_ptr); - AZ_Assert(ptrIt != pointerRemapping.end(), "Missing allocation for resize"); // In case the recording didnt catch something - totalAllocationSize -= allocationSize[ptrIt->second]; - state.ResumeTiming(); - TestAllocatorType::Resize(ptrIt->second, operation.m_size); - state.PauseTiming(); - totalAllocationSize += operation.m_size; - if (operation.m_size == 0) - { - pointerRemapping.erase(ptrIt); - } - break; - } } } - elementsRead = fread(&m_operations, sizeof(AllocatorOperation), allocationOperationCount, file); + elementsRead = file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations); totalElementsRead += elementsRead; } - fclose(file); + file.Close(); state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); @@ -579,6 +515,7 @@ namespace Benchmark static void RecordedRunRanges(benchmark::internal::Benchmark* b) { b->Arg(1); + b->Iterations(100); } // For threaded ranges, run just 200, multi-threaded will already multiply by thread From 0d66278ef7c466e6457fc8f5cb99ac020022becd Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 8 Dec 2021 13:44:15 -0800 Subject: [PATCH 014/413] Makes the recorded benchmark more stable Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Memory/AllocatorBase.cpp | 23 ++- .../Memory/AllocatorBenchmarkRecordings.bin | 4 +- .../Tests/Memory/AllocatorBenchmarks.cpp | 186 +++++++++++------- 3 files changed, 135 insertions(+), 78 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index 32ccd43f9a..48994c4eef 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -11,7 +11,7 @@ using namespace AZ; -#define RECORDING_ENABLED 1 +#define RECORDING_ENABLED 0 #if RECORDING_ENABLED @@ -44,18 +44,22 @@ namespace } }; - struct AllocatorOperation + #pragma pack(push, 1) + struct alignas(1) AllocatorOperation { - enum OperationType : unsigned int + enum OperationType : size_t { ALLOCATE, DEALLOCATE }; OperationType m_type: 1; - unsigned int m_size : 28; // Can represent up to 256Mb requests - unsigned int m_alignment : 7; // Can represent up to 128 alignment - unsigned int m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids + size_t m_size : 28; // Can represent up to 256Mb requests + size_t m_alignment : 7; // Can represent up to 128 alignment + size_t m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids }; + #pragma pack(pop) + static_assert(sizeof(AllocatorOperation) == 8); + static AZStd::mutex s_operationsMutex = {}; static constexpr size_t s_maxNumberOfAllocationsToRecord = 16384; @@ -76,7 +80,12 @@ namespace if (s_operationCounter == s_allocationOperationCount) { AZ::IO::SystemFile file; - file.Open("memoryrecordings.bin", AZ::IO::SystemFile::OpenMode::SF_OPEN_APPEND); + int mode = AZ::IO::SystemFile::OpenMode::SF_OPEN_APPEND | AZ::IO::SystemFile::OpenMode::SF_OPEN_WRITE_ONLY; + if (!file.Exists("memoryrecordings.bin")) + { + mode |= AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE; + } + file.Open("memoryrecordings.bin", mode); if (file.IsOpen()) { file.Write(&s_operations, sizeof(AllocatorOperation) * s_allocationOperationCount); diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin index 2b587a2304..ec5de82e83 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0f148441ce120b303896618cec364b5afb6f8b911b4785ec6358cfe8467cf7a -size 368640 +oid sha256:281ba03e79ecba90b313a0b17bdba87c57d76b504b6e38d579b5eabd995902cc +size 245760 diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index f5a728018c..aa1c7f21ab 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -390,115 +390,159 @@ namespace Benchmark } } }; - - template - class RecordedAllocationBenchmarkFixture : public AllocatorBenchmarkFixture - { - using base = AllocatorBenchmarkFixture; - using TestAllocatorType = typename base::TestAllocatorType; - struct AllocatorOperation + template + class RecordedAllocationBenchmarkFixture : public ::benchmark::Fixture + { + using TestAllocatorType = TestAllocatorWrapper; + + virtual void internalSetUp() { - enum OperationType : unsigned int + TestAllocatorType::SetUp(); + } + + void internalTearDown() + { + TestAllocatorType::TearDown(); + } + + #pragma pack(push, 1) + struct alignas(1) AllocatorOperation + { + enum OperationType : size_t { ALLOCATE, DEALLOCATE }; OperationType m_type : 1; - unsigned int m_size : 28; // Can represent up to 256Mb requests - unsigned int m_alignment : 7; // Can represent up to 128 alignment - unsigned int m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids + size_t m_size : 28; // Can represent up to 256Mb requests + size_t m_alignment : 7; // Can represent up to 128 alignment + size_t m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids }; + #pragma pack(pop) + static_assert(sizeof(AllocatorOperation) == 8); public: + void SetUp(const ::benchmark::State&) override + { + internalSetUp(); + } + void SetUp(::benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const ::benchmark::State&) override + { + internalTearDown(); + } + void TearDown(::benchmark::State&) override + { + internalTearDown(); + } + void Benchmark(benchmark::State& state) { for (auto _ : state) { state.PauseTiming(); - AZStd::unordered_map pointerRemapping; + AZStd::unordered_map pointerRemapping; constexpr size_t allocationOperationCount = 5 * 1024; AZStd::array m_operations = {}; + [[maybe_unused]] const size_t operationSize = sizeof(AllocatorOperation); - AZ::IO::SystemFile file; - AZ::IO::FixedMaxPathString filePath = AZ::Utils::GetExecutableDirectory(); - filePath += "/Tests/AzCore/Memory/AllocatorBenchmarkRecordings.bin"; - if (!file.Open(filePath.c_str(), AZ::IO::SystemFile::OpenMode::SF_OPEN_READ_ONLY)) - { - return; - } - size_t elementsRead = file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations); - size_t totalElementsRead = elementsRead; const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); size_t totalAllocationSize = 0; + size_t itemsProcessed = 0; - while (elementsRead > 0) + for (size_t i = 0; i < 100; ++i) // replay the recording, this way we can keep a smaller recording { - for (size_t operationIndex = 0; operationIndex < elementsRead; ++operationIndex) + AZ::IO::SystemFile file; + AZ::IO::FixedMaxPathString filePath = AZ::Utils::GetExecutableDirectory(); + filePath += "/Tests/AzCore/Memory/AllocatorBenchmarkRecordings.bin"; + if (!file.Open(filePath.c_str(), AZ::IO::SystemFile::OpenMode::SF_OPEN_READ_ONLY)) { - const AllocatorOperation& operation = m_operations[operationIndex]; - if (operation.m_type == AllocatorOperation::ALLOCATE) + return; + } + size_t elementsRead = + file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations) / sizeof(AllocatorOperation); + itemsProcessed += elementsRead; + + while (elementsRead > 0) + { + for (size_t operationIndex = 0; operationIndex < elementsRead; ++operationIndex) { - const auto it = pointerRemapping.emplace(operation.m_recordId, nullptr); - if (it.second) // otherwise already allocated + const AllocatorOperation& operation = m_operations[operationIndex]; + if (operation.m_type == AllocatorOperation::ALLOCATE) { - state.ResumeTiming(); - void* ptr = TestAllocatorType::Allocate(operation.m_size, operation.m_alignment); - state.PauseTiming(); - totalAllocationSize += operation.m_size; - it.first->second = ptr; - } - else - { - // Doing a resize, dont account for this memory change, this operation is rare and we dont have - // the size of the previous allocation - state.ResumeTiming(); - TestAllocatorType::Resize(it.first->second, operation.m_size); - state.PauseTiming(); - } - } - else // AllocatorOperation::DEALLOCATE: - { - if (operation.m_recordId) - { - const auto ptrIt = pointerRemapping.find(operation.m_recordId); - if (ptrIt != pointerRemapping.end()) + const auto it = pointerRemapping.emplace(operation.m_recordId, nullptr); + if (it.second) // otherwise already allocated { - totalAllocationSize -= operation.m_size; state.ResumeTiming(); - TestAllocatorType::DeAllocate(ptrIt->second, /*operation.m_size*/ 0); // size is not correct after a resize, a 0 size deals with it + void* ptr = TestAllocatorType::Allocate(operation.m_size, operation.m_alignment); + state.PauseTiming(); + totalAllocationSize += operation.m_size; + it.first->second = ptr; + } + else + { + // Doing a resize, dont account for this memory change, this operation is rare and we dont have + // the size of the previous allocation + state.ResumeTiming(); + TestAllocatorType::Resize(it.first->second, operation.m_size); state.PauseTiming(); - pointerRemapping.erase(ptrIt); } } - else // deallocate(nullptr) are recorded + else // AllocatorOperation::DEALLOCATE: { - // Just to account of the call of deallocate(nullptr); - state.ResumeTiming(); - TestAllocatorType::DeAllocate(nullptr, /*operation.m_size*/ 0); - state.PauseTiming(); + if (operation.m_recordId) + { + const auto ptrIt = pointerRemapping.find(operation.m_recordId); + if (ptrIt != pointerRemapping.end()) + { + totalAllocationSize -= operation.m_size; + state.ResumeTiming(); + TestAllocatorType::DeAllocate( + ptrIt->second, + /*operation.m_size*/ 0); // size is not correct after a resize, a 0 size deals with it + state.PauseTiming(); + pointerRemapping.erase(ptrIt); + } + } + else // deallocate(nullptr) are recorded + { + // Just to account of the call of deallocate(nullptr); + state.ResumeTiming(); + TestAllocatorType::DeAllocate(nullptr, /*operation.m_size*/ 0); + state.PauseTiming(); + } } } - } - elementsRead = file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations); - totalElementsRead += elementsRead; + elementsRead = + file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations) / sizeof(AllocatorOperation); + itemsProcessed += elementsRead; + } + file.Close(); + + // Deallocate the remainder (since we stopped the recording middle-game)(there are leaks as well) + for (const auto& pointerMapping : pointerRemapping) + { + state.ResumeTiming(); + TestAllocatorType::DeAllocate(pointerMapping.second); + state.PauseTiming(); + } + itemsProcessed += pointerRemapping.size(); + pointerRemapping.clear(); } - file.Close(); state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); - state.SetItemsProcessed(totalElementsRead); + state.SetItemsProcessed(itemsProcessed); - // Deallocate the remainder (since we stopped the recording middle-game)(there are leaks as well) - for (const auto& pointerMapping : pointerRemapping) - { - TestAllocatorType::DeAllocate(pointerMapping.second); - } - pointerRemapping.clear(); TestAllocatorType::GarbageCollect(); } } @@ -514,8 +558,7 @@ namespace Benchmark } static void RecordedRunRanges(benchmark::internal::Benchmark* b) { - b->Arg(1); - b->Iterations(100); + b->Iterations(1); } // For threaded ranges, run just 200, multi-threaded will already multiply by thread @@ -547,6 +590,11 @@ namespace Benchmark BM_REGISTER_TEMPLATE(RecordedAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE)->Apply(RecordedRunRanges); \ } + /// Warm up benchmark used to prepare the OS for allocations. Most OS keep allocations for a process somehow + /// reserved. So the first allocations run always get a bigger impact in a process. This warm up allocator runs + /// all the benchmarks and is just used for the the next allocators to report more consistent results. + BM_REGISTER_ALLOCATOR(WarmUpAllocator, TestRawMallocAllocator); + BM_REGISTER_ALLOCATOR(RawMallocAllocator, TestRawMallocAllocator); BM_REGISTER_ALLOCATOR(MallocSchemaAllocator, TestMallocSchemaAllocator); BM_REGISTER_ALLOCATOR(HphaSchemaAllocator, TestHphaSchemaAllocator); From b96be71c619000a580e964ff51d84c14aa4c2c0f Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 8 Dec 2021 19:55:55 -0800 Subject: [PATCH 015/413] More stability changes, improvement on type usage within the benchmark, cleanup of unstable stats Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Tests/Memory/AllocatorBenchmarks.cpp | 93 +++++++------------ 1 file changed, 35 insertions(+), 58 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index aa1c7f21ab..5cf5176308 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -92,10 +92,10 @@ namespace Benchmark /// Basic allocator used as a baseline. This allocator is the most basic allocation possible with the OS (AZ_OS_MALLOC). /// MallocSchema cannot be used here because it has extra logic that we don't want to use as a baseline. /// - class TestRawMallocAllocator {}; + class RawMallocAllocator {}; template<> - class TestAllocatorWrapper + class TestAllocatorWrapper { public: TestAllocatorWrapper() @@ -113,17 +113,11 @@ namespace Benchmark } // IAllocatorAllocate - static void* Allocate(size_t byteSize, size_t alignment) + static void* Allocate(size_t byteSize, size_t) { s_numAllocatedBytes += byteSize; - if (alignment) - { - return AZ_OS_MALLOC(byteSize, alignment); - } - else - { - return AZ_OS_MALLOC(byteSize, 1); - } + // Don't pass an alignment since we wont be able to get the memory size without also passing the alignment + return AZ_OS_MALLOC(byteSize, 1); } static void DeAllocate(void* ptr, size_t = 0) @@ -132,20 +126,13 @@ namespace Benchmark AZ_OS_FREE(ptr); } - static void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) + static void* ReAllocate(void* ptr, size_t newSize, size_t) { s_numAllocatedBytes -= Platform::GetMemorySize(ptr); AZ_OS_FREE(ptr); s_numAllocatedBytes += newSize; - if (newAlignment) - { - return AZ_OS_MALLOC(newSize, newAlignment); - } - else - { - return AZ_OS_MALLOC(newSize, 1); - } + return AZ_OS_MALLOC(newSize, 1); } static size_t Resize(void* ptr, size_t newSize) @@ -172,51 +159,47 @@ namespace Benchmark static size_t s_numAllocatedBytes; }; - size_t TestAllocatorWrapper::s_numAllocatedBytes = 0; + size_t TestAllocatorWrapper::s_numAllocatedBytes = 0; - // Here we require to implement this to be able to configure a name for the allocator, otherswise the AllocatorManager crashes when trying to configure the overrides - class TestMallocSchemaAllocator : public AZ::SimpleSchemaAllocator + // Some allocator are not fully declared, those we simply setup from the schema + class MallocSchemaAllocator : public AZ::SimpleSchemaAllocator { public: - AZ_TYPE_INFO(TestMallocSchemaAllocator, "{3E68224F-E676-402C-8276-CE4B49C05E89}"); + AZ_TYPE_INFO(MallocSchemaAllocator, "{3E68224F-E676-402C-8276-CE4B49C05E89}"); - TestMallocSchemaAllocator() - : AZ::SimpleSchemaAllocator("TestMallocSchemaAllocator", "") + MallocSchemaAllocator() + : AZ::SimpleSchemaAllocator("MallocSchemaAllocator", "") {} }; - class TestHeapSchemaAllocator : public AZ::SimpleSchemaAllocator + // We use both this HphaSchemaAllocator and the SystemAllocator configured with Hpha because the SystemAllocator + // has extra things + class HphaSchemaAllocator : public AZ::SimpleSchemaAllocator { public: - AZ_TYPE_INFO(TestHeapSchemaAllocator, "{456E6C30-AA84-488F-BE47-5C1E6AF636B7}"); + AZ_TYPE_INFO(HphaSchemaAllocator, "{6563AB4B-A68E-4499-8C98-D61D640D1F7F}"); - TestHeapSchemaAllocator() - : AZ::SimpleSchemaAllocator("TestHeapSchemaAllocator", "") - {} - }; - - class TestHphaSchemaAllocator : public AZ::SimpleSchemaAllocator - { - public: - AZ_TYPE_INFO(TestHphaSchemaAllocator, "{6563AB4B-A68E-4499-8C98-D61D640D1F7F}"); - - TestHphaSchemaAllocator() + HphaSchemaAllocator() : AZ::SimpleSchemaAllocator("TestHphaSchemaAllocator", "") {} }; + // For the SystemAllocator we inherit so we have a different stack. The SystemAllocator is used globally so we dont want + // to get that data affecting the benchmark class TestSystemAllocator : public AZ::SystemAllocator { public: AZ_TYPE_INFO(TestSystemAllocator, "{360D4DAA-D65D-4D5C-A6FA-1A4C5261C35C}"); + + TestSystemAllocator() + : AZ::SystemAllocator() + { + } }; // Allocated bytes reported by the allocator static const char* s_counterAllocatorMemory = "Allocator_Memory"; - // Allocated bytes reported by the process - static const char* s_counterProcessMemory = "Process_Memory"; - // Allocated bytes as counted by the benchmark static const char* s_counterBenchmarkMemory = "Benchmark_Memory"; @@ -310,8 +293,7 @@ namespace Benchmark for (auto _ : state) { state.PauseTiming(); - const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); - + AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); const size_t numberOfAllocations = perThreadAllocations.size(); size_t totalAllocationSize = 0; @@ -327,7 +309,6 @@ namespace Benchmark } state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); - state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) @@ -358,7 +339,6 @@ namespace Benchmark { state.PauseTiming(); AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); - const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); const size_t numberOfAllocations = perThreadAllocations.size(); size_t totalAllocationSize = 0; @@ -381,7 +361,6 @@ namespace Benchmark } state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); - state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); state.SetItemsProcessed(numberOfAllocations); @@ -452,11 +431,10 @@ namespace Benchmark AZStd::array m_operations = {}; [[maybe_unused]] const size_t operationSize = sizeof(AllocatorOperation); - const size_t processMemoryBaseline = Platform::GetProcessMemoryUsageBytes(); size_t totalAllocationSize = 0; size_t itemsProcessed = 0; - for (size_t i = 0; i < 100; ++i) // replay the recording, this way we can keep a smaller recording + for (size_t i = 0; i < 100; ++i) // play the recording multiple times to get a good stable sample, this way we can keep a smaller recording { AZ::IO::SystemFile file; AZ::IO::FixedMaxPathString filePath = AZ::Utils::GetExecutableDirectory(); @@ -538,7 +516,6 @@ namespace Benchmark } state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); - state.counters[s_counterProcessMemory] = benchmark::Counter(static_cast(Platform::GetProcessMemoryUsageBytes() - processMemoryBaseline), benchmark::Counter::kDefaults); state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); state.SetItemsProcessed(itemsProcessed); @@ -583,7 +560,7 @@ namespace Benchmark BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED_THREADED, ALLOCATORTYPE, MIXED)->ThreadRange(2, MaxThreadRange)->Apply(ThreadedRunRanges); #define BM_REGISTER_ALLOCATOR(TESTNAME, ALLOCATORTYPE) \ - namespace TESTNAME \ + namespace BM_##TESTNAME \ { \ BM_REGISTER_SIZE_FIXTURES(AllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE); \ BM_REGISTER_SIZE_FIXTURES(DeAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE); \ @@ -593,15 +570,15 @@ namespace Benchmark /// Warm up benchmark used to prepare the OS for allocations. Most OS keep allocations for a process somehow /// reserved. So the first allocations run always get a bigger impact in a process. This warm up allocator runs /// all the benchmarks and is just used for the the next allocators to report more consistent results. - BM_REGISTER_ALLOCATOR(WarmUpAllocator, TestRawMallocAllocator); + BM_REGISTER_ALLOCATOR(WarmUpAllocator, RawMallocAllocator); - BM_REGISTER_ALLOCATOR(RawMallocAllocator, TestRawMallocAllocator); - BM_REGISTER_ALLOCATOR(MallocSchemaAllocator, TestMallocSchemaAllocator); - BM_REGISTER_ALLOCATOR(HphaSchemaAllocator, TestHphaSchemaAllocator); + BM_REGISTER_ALLOCATOR(RawMallocAllocator, RawMallocAllocator); + BM_REGISTER_ALLOCATOR(MallocSchemaAllocator, MallocSchemaAllocator); + BM_REGISTER_ALLOCATOR(HphaSchemaAllocator, HphaSchemaAllocator); BM_REGISTER_ALLOCATOR(SystemAllocator, TestSystemAllocator); - + + //BM_REGISTER_ALLOCATOR(BestFitExternalMapAllocator, BestFitExternalMapAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator //BM_REGISTER_ALLOCATOR(HeapSchemaAllocator, TestHeapSchemaAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator - //BM_REGISTER_SCHEMA(BestFitExternalMapSchema); // Requires to implement AZ::IAllocatorAllocate //BM_REGISTER_SCHEMA(PoolSchema); // Requires special alignment requests while allocating #undef BM_REGISTER_ALLOCATOR From 947adc0248d9be1bac2565d1a67d081b0d1677c7 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 9 Dec 2021 17:13:09 -0800 Subject: [PATCH 016/413] Removal of OverrideShim, AP seems to be crashing Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/Component/ComponentApplication.cpp | 38 +-- .../AzCore/Component/ComponentApplication.h | 8 +- .../AzCore/AzCore/Compression/Compression.h | 4 +- .../AzCore/AzCore/Compression/compression.cpp | 6 +- .../AzCore/Compression/zstd_compression.cpp | 6 +- .../AzCore/Compression/zstd_compression.h | 5 +- .../AzCore/AzCore/IO/CompressorZStd.h | 2 +- .../AzCore/AzCore/IO/IStreamerTypes.cpp | 2 +- .../AzCore/AzCore/IO/IStreamerTypes.h | 4 +- .../AzCore/AzCore/Memory/AllocatorBase.cpp | 31 +- .../AzCore/AzCore/Memory/AllocatorBase.h | 9 +- .../AzCore/AzCore/Memory/AllocatorManager.cpp | 264 +----------------- .../AzCore/AzCore/Memory/AllocatorManager.h | 21 +- .../AzCore/Memory/AllocatorOverrideShim.cpp | 227 --------------- .../AzCore/Memory/AllocatorOverrideShim.h | 102 ------- .../Memory/BestFitExternalMapAllocator.cpp | 13 +- .../Memory/BestFitExternalMapAllocator.h | 7 +- .../Memory/BestFitExternalMapSchema.cpp | 20 +- .../AzCore/Memory/BestFitExternalMapSchema.h | 25 +- .../AzCore/AzCore/Memory/HeapSchema.cpp | 1 - .../AzCore/AzCore/Memory/HeapSchema.h | 5 +- .../AzCore/AzCore/Memory/HphaSchema.cpp | 2 +- .../AzCore/AzCore/Memory/HphaSchema.h | 5 +- .../AzCore/AzCore/Memory/IAllocator.cpp | 15 +- .../AzCore/AzCore/Memory/IAllocator.h | 65 +---- .../AzCore/AzCore/Memory/MallocSchema.cpp | 31 +- .../AzCore/AzCore/Memory/MallocSchema.h | 20 +- Code/Framework/AzCore/AzCore/Memory/Memory.h | 32 +-- .../AzCore/AzCore/Memory/OSAllocator.cpp | 1 - .../AzCore/AzCore/Memory/OSAllocator.h | 8 +- .../Memory/OverrunDetectionAllocator.cpp | 11 - .../AzCore/Memory/OverrunDetectionAllocator.h | 5 +- .../AzCore/AzCore/Memory/PoolAllocator.h | 2 +- .../AzCore/AzCore/Memory/PoolSchema.cpp | 25 +- .../AzCore/AzCore/Memory/PoolSchema.h | 8 +- .../AzCore/Memory/SimpleSchemaAllocator.h | 25 +- .../AzCore/AzCore/Memory/SystemAllocator.cpp | 40 ++- .../AzCore/AzCore/Memory/SystemAllocator.h | 24 +- .../AzCore/AzCore/Script/ScriptContext.cpp | 6 +- .../AzCore/AzCore/Script/ScriptContext.h | 2 +- .../AzCore/Serialization/AZStdContainers.inl | 4 +- .../AzCore/Serialization/SerializeContext.cpp | 2 +- .../AzCore/Serialization/SerializeContext.h | 18 +- .../Serialization/std/VariantReflection.inl | 4 +- .../AzCore/AzCore/azcore_files.cmake | 2 - Code/Framework/AzCore/Tests/AZStd/Hashed.cpp | 4 +- Code/Framework/AzCore/Tests/AZStd/Ordered.cpp | 4 +- Code/Framework/AzCore/Tests/Memory.cpp | 199 +++++++------ .../Tests/Memory/AllocatorBenchmarks.cpp | 2 +- .../AzCore/Tests/Memory/AllocatorManager.cpp | 85 +----- .../AzFramework/Archive/Archive.cpp | 2 +- .../AzFramework/Archive/IArchive.h | 2 +- .../AzFramework/Archive/ZipDirCache.cpp | 6 +- .../AzFramework/Archive/ZipDirCache.h | 4 +- .../AzFramework/Archive/ZipDirList.cpp | 2 +- .../AzFramework/Archive/ZipDirList.h | 4 +- .../AzFramework/Archive/ZipDirStructures.cpp | 8 +- Code/LauncherUnified/Launcher.h | 2 +- Code/Legacy/CryCommon/CryLegacyAllocator.h | 28 +- .../RHI/Code/Include/Atom/RHI/DrawPacket.h | 4 +- .../Code/Include/Atom/RHI/DrawPacketBuilder.h | 6 +- .../RHI/Code/Source/RHI/DrawPacketBuilder.cpp | 2 +- 62 files changed, 299 insertions(+), 1222 deletions(-) delete mode 100644 Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp delete mode 100644 Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.h diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index 693b2f1648..a760061215 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -152,8 +152,6 @@ namespace AZ m_reservedDebug = 0; m_recordingMode = Debug::AllocationRecords::RECORD_STACK_IF_NO_FILE_LINE; m_stackRecordLevels = 5; - m_useOverrunDetection = false; - m_useMalloc = false; } bool AppDescriptorConverter(SerializeContext& serialize, SerializeContext::DataElementNode& node) @@ -323,9 +321,6 @@ namespace AZ ->Field("blockSize", &Descriptor::m_memoryBlocksByteSize) ->Field("reservedOS", &Descriptor::m_reservedOS) ->Field("reservedDebug", &Descriptor::m_reservedDebug) - ->Field("useOverrunDetection", &Descriptor::m_useOverrunDetection) - ->Field("useMalloc", &Descriptor::m_useMalloc) - ->Field("allocatorRemappings", &Descriptor::m_allocatorRemappings) ->Field("modules", &Descriptor::m_modules) ; @@ -361,8 +356,6 @@ namespace AZ ->Attribute(Edit::Attributes::Step, &Descriptor::m_pageSize) ->DataElement(Edit::UIHandlers::SpinBox, &Descriptor::m_reservedOS, "OS reserved memory", "System memory reserved for OS (used only when 'Allocate all memory at startup' is true)") ->DataElement(Edit::UIHandlers::SpinBox, &Descriptor::m_reservedDebug, "Memory reserved for debugger", "System memory reserved for Debug allocator, like memory tracking (used only when 'Allocate all memory at startup' is true)") - ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_useOverrunDetection, "Use Overrun Detection", "Use the overrun detection memory manager (only available on some platforms, ignored in Release builds)") - ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_useMalloc, "Use Malloc", "Use malloc for memory allocations (for memory debugging only, ignored in Release builds)") ; } } @@ -879,7 +872,7 @@ namespace AZ AZ::AllocatorInstance::Create(desc); AZ::Debug::Trace::Instance().Init(); - AZ::Debug::AllocationRecords* records = AllocatorInstance::GetAllocator().GetRecords(); + AZ::Debug::AllocationRecords* records = AllocatorInstance::Get().GetRecords(); if (records) { records->SetMode(m_descriptor.m_recordingMode); @@ -891,35 +884,6 @@ namespace AZ m_isSystemAllocatorOwner = true; } - -#ifndef RELEASE - if (m_descriptor.m_useOverrunDetection) - { - OverrunDetectionSchema::Descriptor overrunDesc(false); - s_overrunDetectionSchema = Environment::CreateVariable(AzTypeInfo::Name(), overrunDesc); - OverrunDetectionSchema* schemaPtr = &s_overrunDetectionSchema.Get(); - - AZ::AllocatorManager::Instance().SetOverrideAllocatorSource(schemaPtr); - } - - if (m_descriptor.m_useMalloc) - { - AZ_Printf("Malloc", "WARNING: Malloc override is enabled. Registered allocators will use malloc instead of their normal allocation schemas."); - s_mallocSchema = Environment::CreateVariable(AzTypeInfo::Name()); - MallocSchema* schemaPtr = &s_mallocSchema.Get(); - - AZ::AllocatorManager::Instance().SetOverrideAllocatorSource(schemaPtr); - } -#endif - - AllocatorManager& allocatorManager = AZ::AllocatorManager::Instance(); - - for (const auto& remapping : m_descriptor.m_allocatorRemappings) - { - allocatorManager.AddAllocatorRemapping(remapping.m_from.c_str(), remapping.m_to.c_str()); - } - - allocatorManager.FinalizeConfiguration(); } void ComponentApplication::MergeSettingsToRegistry(SettingsRegistryInterface& registry) diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h index d53b8e1a4e..a28c58ac6b 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h @@ -142,10 +142,6 @@ namespace AZ AZ::u64 m_reservedDebug; //!< Reserved memory for Debugging (allocation,etc.). Used only when m_grabAllMemory is set to true. (default: 0) Debug::AllocationRecords::Mode m_recordingMode; //!< When to record stack traces (default: AZ::Debug::AllocationRecords::RECORD_STACK_IF_NO_FILE_LINE) AZ::u64 m_stackRecordLevels; //!< If stack recording is enabled, how many stack levels to record. (default: 5) - bool m_useOverrunDetection; //!< True to use the overrun detection memory management scheme. Only available on some platforms; greatly increases memory consumption. - bool m_useMalloc; //!< True to use malloc instead of the internal memory manager. Intended for debugging purposes only. - - AllocatorRemappings m_allocatorRemappings; //!< List of remappings of allocators to perform, so that they can alias each other. ModuleDescriptorList m_modules; //!< Dynamic modules used by the application. //!< These will be loaded on startup. @@ -159,7 +155,7 @@ namespace AZ //! If set, this allocator is used to allocate the temporary bootstrap memory, as well as the main \ref SystemAllocator heap. //! If it's left nullptr (default), the \ref OSAllocator will be used. - IAllocatorAllocate* m_allocator = nullptr; + IAllocator* m_allocator = nullptr; //! Callback to create AZ::Modules for the static libraries linked by this application. //! Leave null if the application uses no static AZ::Modules. @@ -372,7 +368,7 @@ namespace AZ bool m_isOSAllocatorOwner{ false }; bool m_ownsConsole{}; void* m_fixedMemoryBlock{ nullptr }; //!< Pointer to the memory block allocator, so we can free it OnDestroy. - IAllocatorAllocate* m_osAllocator{ nullptr }; + IAllocator* m_osAllocator{ nullptr }; EntitySetType m_entities; AZ::SettingsRegistryInterface::NotifyEventHandler m_projectPathChangedHandler; diff --git a/Code/Framework/AzCore/AzCore/Compression/Compression.h b/Code/Framework/AzCore/AzCore/Compression/Compression.h index 855dcf9a6a..105fb9dbe6 100644 --- a/Code/Framework/AzCore/AzCore/Compression/Compression.h +++ b/Code/Framework/AzCore/AzCore/Compression/Compression.h @@ -15,7 +15,7 @@ struct z_stream_s; namespace AZ { class IAllocator; - class IAllocatorAllocate; + class IAllocatorSchema; /** * The most well known and used compression algorithm. It gives the best compression ratios even on level 1, @@ -90,7 +90,7 @@ namespace AZ z_stream_s* m_strDeflate; z_stream_s* m_strInflate; - IAllocatorAllocate* m_workMemoryAllocator; + IAllocatorSchema* m_workMemoryAllocator; }; } diff --git a/Code/Framework/AzCore/AzCore/Compression/compression.cpp b/Code/Framework/AzCore/AzCore/Compression/compression.cpp index 8b6f270b00..b5b775ef5e 100644 --- a/Code/Framework/AzCore/AzCore/Compression/compression.cpp +++ b/Code/Framework/AzCore/AzCore/Compression/compression.cpp @@ -26,7 +26,7 @@ ZLib::ZLib(IAllocator* workMemAllocator) : m_strDeflate(nullptr) , m_strInflate(nullptr) { - m_workMemoryAllocator = workMemAllocator ? workMemAllocator->GetAllocationSource() : nullptr; + m_workMemoryAllocator = workMemAllocator->GetSchema(); if (!m_workMemoryAllocator) { m_workMemoryAllocator = &AllocatorInstance::Get(); @@ -55,7 +55,7 @@ ZLib::~ZLib() //========================================================================= void* ZLib::AllocateMem(void* userData, unsigned int items, unsigned int size) { - IAllocatorAllocate* allocator = reinterpret_cast(userData); + IAllocator* allocator = reinterpret_cast(userData); return allocator->Allocate(items * size, 4, 0, "ZLib", __FILE__, __LINE__); } @@ -65,7 +65,7 @@ void* ZLib::AllocateMem(void* userData, unsigned int items, unsigned int size) //========================================================================= void ZLib::FreeMem(void* userData, void* address) { - IAllocatorAllocate* allocator = reinterpret_cast(userData); + IAllocator* allocator = reinterpret_cast(userData); allocator->DeAllocate(address); } diff --git a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp index ecab62d123..95576a275b 100644 --- a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp +++ b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp @@ -16,7 +16,7 @@ using namespace AZ; -ZStd::ZStd(IAllocatorAllocate* workMemAllocator) +ZStd::ZStd(IAllocator* workMemAllocator) { m_workMemoryAllocator = workMemAllocator; if (!m_workMemoryAllocator) @@ -41,13 +41,13 @@ ZStd::~ZStd() void* ZStd::AllocateMem(void* userData, size_t size) { - IAllocatorAllocate* allocator = reinterpret_cast(userData); + IAllocator* allocator = reinterpret_cast(userData); return allocator->Allocate(size, 4, 0, "ZStandard", __FILE__, __LINE__); } void ZStd::FreeMem(void* userData, void* address) { - IAllocatorAllocate* allocator = reinterpret_cast(userData); + IAllocator* allocator = reinterpret_cast(userData); allocator->DeAllocate(address); } diff --git a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.h b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.h index 3fe6677fff..70d8c37831 100644 --- a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.h +++ b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.h @@ -17,12 +17,11 @@ namespace AZ { class IAllocator; - class IAllocatorAllocate; class ZStd { public: - ZStd(IAllocatorAllocate* workMemAllocator = 0); + ZStd(IAllocator* workMemAllocator = 0); ~ZStd(); enum FlushType @@ -77,7 +76,7 @@ namespace AZ ZSTD_CStream* m_streamCompression; ZSTD_DStream* m_streamDecompression; - IAllocatorAllocate* m_workMemoryAllocator; + IAllocator* m_workMemoryAllocator; ZSTD_inBuffer m_inBuffer; ZSTD_outBuffer m_outBuffer; size_t m_nextBlockSize; diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorZStd.h b/Code/Framework/AzCore/AzCore/IO/CompressorZStd.h index ed6b94fffa..9503f22665 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorZStd.h +++ b/Code/Framework/AzCore/AzCore/IO/CompressorZStd.h @@ -48,7 +48,7 @@ namespace AZ public: AZ_CLASS_ALLOCATOR(CompressorZStdData, AZ::SystemAllocator, 0); - CompressorZStdData(IAllocatorAllocate* zstdMemAllocator = 0) + CompressorZStdData(IAllocator* zstdMemAllocator = 0) { m_zstd = zstdMemAllocator; } diff --git a/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.cpp b/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.cpp index 4c8272cfc8..4126d7457d 100644 --- a/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.cpp +++ b/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.cpp @@ -21,7 +21,7 @@ namespace AZ::IO::IStreamerTypes : m_allocator(AZ::AllocatorInstance::Get()) {} - DefaultRequestMemoryAllocator::DefaultRequestMemoryAllocator(AZ::IAllocatorAllocate& allocator) + DefaultRequestMemoryAllocator::DefaultRequestMemoryAllocator(AZ::IAllocator& allocator) : m_allocator(allocator) {} diff --git a/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.h b/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.h index 901fc5e594..2c4dc28518 100644 --- a/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.h +++ b/Code/Framework/AzCore/AzCore/IO/IStreamerTypes.h @@ -137,7 +137,7 @@ namespace AZ::IO::IStreamerTypes public: //! DefaultRequestMemoryAllocator wraps around the AZ::SystemAllocator by default. DefaultRequestMemoryAllocator(); - explicit DefaultRequestMemoryAllocator(AZ::IAllocatorAllocate& allocator); + explicit DefaultRequestMemoryAllocator(AZ::IAllocator& allocator); ~DefaultRequestMemoryAllocator() override; void LockAllocator() override; @@ -151,7 +151,7 @@ namespace AZ::IO::IStreamerTypes private: AZStd::atomic_int m_lockCounter{ 0 }; AZStd::atomic_int m_allocationCounter{ 0 }; - AZ::IAllocatorAllocate& m_allocator; + AZ::IAllocator& m_allocator; }; // The following alignment functions are put here until they're available in AzCore's math library. diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index 48994c4eef..4da9ab384f 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -158,10 +158,10 @@ namespace } #endif -AllocatorBase::AllocatorBase(IAllocatorAllocate* allocationSource, const char* name, const char* desc) : - IAllocator(allocationSource), - m_name(name), - m_desc(desc) +AllocatorBase::AllocatorBase(IAllocatorSchema* allocationSchema, const char* name, const char* desc) + : IAllocator(allocationSchema) + , m_name(name) + , m_desc(desc) { } @@ -180,11 +180,6 @@ const char* AllocatorBase::GetDescription() const return m_desc; } -IAllocatorAllocate* AllocatorBase::GetSchema() -{ - return nullptr; -} - Debug::AllocationRecords* AllocatorBase::GetRecords() { return m_records; @@ -201,11 +196,6 @@ bool AllocatorBase::IsReady() const return m_isReady; } -bool AllocatorBase::CanBeOverridden() const -{ - return m_canBeOverridden; -} - void AllocatorBase::PostCreate() { if (m_registrationEnabled) @@ -266,11 +256,6 @@ bool AllocatorBase::IsProfilingActive() const return m_isProfilingActive; } -void AllocatorBase::DisableOverriding() -{ - m_canBeOverridden = false; -} - void AllocatorBase::DisableRegistration() { m_registrationEnabled = false; @@ -278,12 +263,12 @@ void AllocatorBase::DisableRegistration() void AllocatorBase::ProfileAllocation(void* ptr, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, int suppressStackRecord) { -#if defined(AZ_HAS_VARIADIC_TEMPLATES) && defined(AZ_DEBUG_BUILD) - ++suppressStackRecord; // one more for the fact the ebus is a function -#endif // AZ_HAS_VARIADIC_TEMPLATES - if (m_isProfilingActive) { +#if defined(AZ_HAS_VARIADIC_TEMPLATES) && defined(AZ_DEBUG_BUILD) + ++suppressStackRecord; // one more for the fact the ebus is a function +#endif // AZ_HAS_VARIADIC_TEMPLATES + auto records = GetRecords(); if (records) { diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h index 8f8a17e470..f2521087b3 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h @@ -22,7 +22,7 @@ namespace AZ class AllocatorBase : public IAllocator { protected: - AllocatorBase(IAllocatorAllocate* allocationSource, const char* name, const char* desc); + AllocatorBase(IAllocatorSchema* allocationSchema, const char* name, const char* desc); ~AllocatorBase(); public: @@ -32,11 +32,9 @@ namespace AZ //--------------------------------------------------------------------- const char* GetName() const override; const char* GetDescription() const override; - IAllocatorAllocate* GetSchema() override; Debug::AllocationRecords* GetRecords() final; void SetRecords(Debug::AllocationRecords* records) final; bool IsReady() const final; - bool CanBeOverridden() const final; void PostCreate() override; void PreDestroy() final; void SetLazilyCreated(bool lazy) final; @@ -68,10 +66,6 @@ namespace AZ return byteSize; } - /// Call to disallow this allocator from being overridden. - /// Only kernel-level allocators where it would be especially problematic for them to be overridden should do this. - void DisableOverriding(); - /// Call to disallow this allocator from being registered with the AllocatorManager. /// Only kernel-level allocators where it would be especially problematic for them to be registered with the AllocatorManager should do this. void DisableRegistration(); @@ -107,7 +101,6 @@ namespace AZ bool m_isLazilyCreated = false; bool m_isProfilingActive = false; bool m_isReady = false; - bool m_canBeOverridden = true; bool m_registrationEnabled = true; }; diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp index 70ac813972..758fa222fe 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp @@ -12,17 +12,12 @@ #include #include -#include #include #include #include #include -#if !defined(RELEASE) && !defined(AZCORE_MEMORY_ENABLE_OVERRIDES) -# define AZCORE_MEMORY_ENABLE_OVERRIDES -#endif - namespace AZ::Internal { struct AMStringHasher @@ -54,18 +49,6 @@ namespace AZ::Internal namespace AZ { -struct AllocatorManager::InternalData -{ - explicit InternalData(const AZStdIAllocator& alloc) - : m_allocatorMap(alloc) - , m_remappings(alloc) - , m_remappingsReverse(alloc) - {} - Internal::AllocatorNameMap m_allocatorMap; - Internal::AllocatorRemappings m_remappings; - Internal::AllocatorRemappings m_remappingsReverse; -}; - static EnvironmentVariable s_allocManager = nullptr; static AllocatorManager* s_allocManagerDebug = nullptr; // For easier viewing in crash dumps @@ -81,16 +64,6 @@ static Internal::PreEnvironmentAttachData& GetPreEnvironmentAttachData() void AllocatorManager::PreRegisterAllocator(IAllocator* allocator) { auto& data = GetPreEnvironmentAttachData(); - -#ifdef AZCORE_MEMORY_ENABLE_OVERRIDES - // All allocators must switch to an OverrideEnabledAllocationSource proxy if they are to support allocator overriding. - if (allocator->CanBeOverridden()) - { - auto shim = Internal::AllocatorOverrideShim::Create(allocator, &data.m_mallocSchema); - allocator->SetAllocationSource(shim); - } -#endif - { AZStd::lock_guard lock(data.m_mutex); AZ_Assert(data.m_unregisteredAllocatorCount < Internal::PreEnvironmentAttachData::MAX_UNREGISTERED_ALLOCATORS, "Too many allocators trying to register before environment attached!"); @@ -175,12 +148,9 @@ AllocatorManager::AllocatorManager() } ) { - m_overrideSource = nullptr; m_numAllocators = 0; m_isAllocatorLeaking = false; - m_configurationFinalized = false; m_defaultTrackingRecordMode = Debug::AllocationRecords::RECORD_NO_RECORDS; - m_data = new (m_mallocSchema->Allocate(sizeof(InternalData), AZStd::alignment_of::value, 0)) InternalData(AZStdIAllocator(m_mallocSchema.get())); } //========================================================================= @@ -210,10 +180,6 @@ AllocatorManager::RegisterAllocator(class IAllocator* alloc) alloc->SetProfilingActive(m_profilingRefcount.load() > 0); m_allocators[m_numAllocators++] = alloc; - -#ifdef AZCORE_MEMORY_ENABLE_OVERRIDES - ConfigureAllocatorOverrides(alloc); -#endif } //========================================================================= @@ -232,81 +198,12 @@ AllocatorManager::InternalDestroy() // Do not actually destroy the lazy allocator as it may have work to do during non-deterministic shutdown } - if (m_data) - { - m_data->~InternalData(); - m_mallocSchema->DeAllocate(m_data); - m_data = nullptr; - } - if (!m_isAllocatorLeaking) { AZ_Assert(m_numAllocators == 0, "There are still %d registered allocators!", m_numAllocators); } } -//========================================================================= -// ConfigureAllocatorOverrides -// [10/14/2018] -//========================================================================= -void -AllocatorManager::ConfigureAllocatorOverrides(IAllocator* alloc) -{ - auto record = m_data->m_allocatorMap.emplace(AZStd::piecewise_construct, AZStd::forward_as_tuple(alloc->GetName(), AZStdIAllocator(m_mallocSchema.get())), AZStd::forward_as_tuple(alloc)); - - // We only need to keep going if the allocator supports overrides. - if (!alloc->CanBeOverridden()) - { - return; - } - - if (!alloc->IsAllocationSourceChanged()) - { - // All allocators must switch to an OverrideEnabledAllocationSource proxy if they are to support allocator overriding. - auto overrideEnabled = Internal::AllocatorOverrideShim::Create(alloc, m_mallocSchema.get()); - alloc->SetAllocationSource(overrideEnabled); - } - - auto itr = m_data->m_remappings.find(record.first->first); - - if (itr != m_data->m_remappings.end()) - { - auto remapTo = m_data->m_allocatorMap.find(itr->second); - - if (remapTo != m_data->m_allocatorMap.end()) - { - static_cast(alloc->GetAllocationSource())->SetOverride(remapTo->second->GetOriginalAllocationSource()); - } - } - - itr = m_data->m_remappingsReverse.find(record.first->first); - - if (itr != m_data->m_remappingsReverse.end()) - { - auto remapFrom = m_data->m_allocatorMap.find(itr->second); - - if (remapFrom != m_data->m_allocatorMap.end()) - { - AZ_Assert(!m_configurationFinalized, "Allocators may only remap to allocators that have been created before configuration finalization"); - static_cast(remapFrom->second->GetAllocationSource())->SetOverride(alloc->GetOriginalAllocationSource()); - } - } - - if (m_overrideSource) - { - static_cast(alloc->GetAllocationSource())->SetOverride(m_overrideSource); - } - - if (m_configurationFinalized) - { - // We can get rid of the intermediary if configuration won't be changing any further. - // (The creation of it at the top of this function was superflous, but it made it easier to set things up going through a single code path.) - auto shim = static_cast(alloc->GetAllocationSource()); - alloc->SetAllocationSource(shim->GetOverride()); - Internal::AllocatorOverrideShim::Destroy(shim); - } -} - //========================================================================= // UnRegisterAllocator // [9/17/2009] @@ -365,7 +262,7 @@ AllocatorManager::GarbageCollect() for (int i = 0; i < m_numAllocators; ++i) { - m_allocators[i]->GetAllocationSource()->GarbageCollect(); + m_allocators[i]->GetSchema()->GarbageCollect(); } } @@ -414,94 +311,6 @@ AllocatorManager::SetTrackingMode(Debug::AllocationRecords::Mode mode) } } -//========================================================================= -// SetOverrideSchema -// [8/17/2018] -//========================================================================= -void -AllocatorManager::SetOverrideAllocatorSource(IAllocatorAllocate* source, bool overrideExistingAllocators) -{ - (void)source; - (void)overrideExistingAllocators; - -#ifdef AZCORE_MEMORY_ENABLE_OVERRIDES - AZ_Assert(!m_configurationFinalized, "You cannot set an allocator source after FinalizeConfiguration() has been called."); - m_overrideSource = source; - - if (overrideExistingAllocators) - { - AZStd::lock_guard lock(m_allocatorListMutex); - for (int i = 0; i < m_numAllocators; ++i) - { - if (m_allocators[i]->CanBeOverridden()) - { - auto shim = static_cast(m_allocators[i]->GetAllocationSource()); - shim->SetOverride(source); - } - } - } -#endif -} - -//========================================================================= -// AddAllocatorRemapping -// [8/27/2018] -//========================================================================= -void -AllocatorManager::AddAllocatorRemapping(const char* fromName, const char* toName) -{ - (void)fromName; - (void)toName; - -#ifdef AZCORE_MEMORY_ENABLE_OVERRIDES - AZ_Assert(!m_configurationFinalized, "You cannot set an allocator remapping after FinalizeConfiguration() has been called."); - m_data->m_remappings.emplace(AZStd::piecewise_construct, AZStd::forward_as_tuple(fromName, m_mallocSchema.get()), AZStd::forward_as_tuple(toName, m_mallocSchema.get())); - m_data->m_remappingsReverse.emplace(AZStd::piecewise_construct, AZStd::forward_as_tuple(toName, m_mallocSchema.get()), AZStd::forward_as_tuple(fromName, m_mallocSchema.get())); -#endif -} - -void -AllocatorManager::FinalizeConfiguration() -{ - if (m_configurationFinalized) - { - return; - } - -#ifdef AZCORE_MEMORY_ENABLE_OVERRIDES - { - AZStd::lock_guard lock(m_allocatorListMutex); - - for (int i = 0; i < m_numAllocators; ++i) - { - if (!m_allocators[i]->CanBeOverridden()) - { - continue; - } - - auto shim = static_cast(m_allocators[i]->GetAllocationSource()); - - if (!shim->IsOverridden()) - { - m_allocators[i]->ResetAllocationSource(); - Internal::AllocatorOverrideShim::Destroy(shim); - } - else if (!shim->HasOrphanedAllocations()) - { - m_allocators[i]->SetAllocationSource(shim->GetOverride()); - Internal::AllocatorOverrideShim::Destroy(shim); - } - else - { - shim->SetFinalizedConfiguration(); - } - } - } -#endif - - m_configurationFinalized = true; -} - void AllocatorManager::EnterProfilingMode() { @@ -545,27 +354,18 @@ AllocatorManager::DumpAllocators() size_t totalConsumedBytes = 0; memset(m_dumpInfo, 0, sizeof(m_dumpInfo)); - void* sourceList[m_maxNumAllocators]; AZ_Printf(TAG, "%d allocators active\n", m_numAllocators); AZ_Printf(TAG, "Index,Name,Used kb,Reserved kb,Consumed kb\n"); for (int i = 0; i < m_numAllocators; i++) { - auto allocator = m_allocators[i]; - auto source = allocator->GetAllocationSource(); + IAllocator* allocator = GetAllocator(i); const char* name = allocator->GetName(); - size_t usedBytes = source->NumAllocatedBytes(); - size_t reservedBytes = source->Capacity(); + size_t usedBytes = allocator->NumAllocatedBytes(); + size_t reservedBytes = allocator->Capacity(); size_t consumedBytes = reservedBytes; - // Very hacky and inefficient check to see if this allocator obtains its memory from another allocator - sourceList[i] = source; - if (AZStd::find(sourceList, sourceList + i, allocator->GetSchema()) != sourceList + i) - { - consumedBytes = 0; - } - totalUsedBytes += usedBytes; totalReservedBytes += reservedBytes; totalConsumedBytes += consumedBytes; @@ -585,61 +385,21 @@ void AllocatorManager::GetAllocatorStats(size_t& allocatedBytes, size_t& capacit AZStd::lock_guard lock(m_allocatorListMutex); const int allocatorCount = GetNumAllocators(); - AZStd::unordered_map existingAllocators; - AZStd::unordered_map sourcesToAllocators; // Build a mapping of original allocator sources to their allocators for (int i = 0; i < allocatorCount; ++i) { IAllocator* allocator = GetAllocator(i); - sourcesToAllocators.emplace(allocator->GetOriginalAllocationSource(), allocator); - } - - for (int i = 0; i < allocatorCount; ++i) - { - IAllocator* allocator = GetAllocator(i); - IAllocatorAllocate* source = allocator->GetAllocationSource(); - IAllocatorAllocate* originalSource = allocator->GetOriginalAllocationSource(); - IAllocatorAllocate* schema = allocator->GetSchema(); - IAllocator* alias = (source != originalSource) ? sourcesToAllocators[source] : nullptr; - - if (schema && !alias) - { - // Check to see if this allocator's source maps to another allocator - // Need to check both the schema and the allocator itself, as either one might be used as the alias depending on how it's implemented - AZStd::array checkAllocators = { { schema, allocator->GetAllocationSource() } }; - - for (IAllocatorAllocate* check : checkAllocators) - { - auto existing = existingAllocators.emplace(check, allocator); - - if (!existing.second) - { - alias = existing.first->second; - // Do not break out of the loop as we need to add to the map for all entries - } - } - } - - static const IAllocator* OS_ALLOCATOR = &AllocatorInstance::GetAllocator(); - size_t sourceAllocatedBytes = source->NumAllocatedBytes(); - size_t sourceCapacityBytes = source->Capacity(); - - if (allocator == OS_ALLOCATOR) - { - // Need to special case the OS allocator because its capacity is a made-up number. Better to just use the allocated amount, it will hopefully be small anyway. - sourceCapacityBytes = sourceAllocatedBytes; - } - + allocatedBytes += allocator->NumAllocatedBytes(); + capacityBytes += allocator->Capacity(); + if (outStats) { - outStats->emplace(outStats->end(), allocator->GetName(), alias ? alias->GetName() : allocator->GetDescription(), sourceAllocatedBytes, sourceCapacityBytes, alias != nullptr); - } - - if (!alias) - { - allocatedBytes += sourceAllocatedBytes; - capacityBytes += sourceCapacityBytes; + outStats->emplace(outStats->end(), + allocator->GetName(), + allocator->GetDescription(), + allocator->NumAllocatedBytes(), + allocator->Capacity()); } } } diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h index 14dec68ad1..0e8be07013 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h @@ -84,17 +84,6 @@ namespace AZ /// Especially for great code and engines... void SetAllocatorLeaking(bool allowLeaking) { m_isAllocatorLeaking = allowLeaking; } - /// Set an override allocator - /// All allocators registered with the AllocatorManager will automatically redirect to this allocator - /// if set. - void SetOverrideAllocatorSource(IAllocatorAllocate* source, bool overrideExistingAllocators = true); - - /// Retrieve the override schema - IAllocatorAllocate* GetOverrideAllocatorSource() const { return m_overrideSource; } - - void AddAllocatorRemapping(const char* fromName, const char* toName); - void FinalizeConfiguration(); - /// Enter or exit profiling mode; calls to Enter must be matched with calls to Exit void EnterProfilingMode(); void ExitProfilingMode(); @@ -113,19 +102,17 @@ namespace AZ struct AllocatorStats { - AllocatorStats(const char* name, const char* aliasOrDescription, size_t allocatedBytes, size_t capacityBytes, bool isAlias) + AllocatorStats(const char* name, const char* aliasOrDescription, size_t allocatedBytes, size_t capacityBytes) : m_name(name) , m_aliasOrDescription(aliasOrDescription) , m_allocatedBytes(allocatedBytes) , m_capacityBytes(capacityBytes) - , m_isAlias(isAlias) {} AZStd::string m_name; AZStd::string m_aliasOrDescription; size_t m_allocatedBytes; size_t m_capacityBytes; - bool m_isAlias; }; void GetAllocatorStats(size_t& usedBytes, size_t& reservedBytes, AZStd::vector* outStats = nullptr); @@ -157,7 +144,6 @@ namespace AZ private: void InternalDestroy(); - void ConfigureAllocatorOverrides(IAllocator* alloc); void DebugBreak(void* address, const Debug::AllocationInfo& info); AZ::MallocSchema* CreateMallocSchema(); @@ -172,14 +158,9 @@ namespace AZ MemoryBreak m_memoryBreak[MaxNumMemoryBreaks]; char m_activeBreaks; AZStd::mutex m_allocatorListMutex; - IAllocatorAllocate* m_overrideSource; DumpInfo m_dumpInfo[m_maxNumAllocators]; - struct InternalData; - - InternalData* m_data; - bool m_configurationFinalized; AZStd::atomic m_profilingRefcount; AZ::Debug::AllocationRecords::Mode m_defaultTrackingRecordMode; diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp deleted file mode 100644 index e4928e83c5..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -namespace AZ::Internal -{ - AllocatorOverrideShim* AllocatorOverrideShim::Create(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) - { - void* memory = shimAllocationSource->Allocate(sizeof(AllocatorOverrideShim), AZStd::alignment_of::value, 0); - auto result = new (memory) AllocatorOverrideShim(owningAllocator, shimAllocationSource); - return result; - } - - void AllocatorOverrideShim::Destroy(AllocatorOverrideShim* source) - { - auto shimAllocationSource = source->m_shimAllocationSource; - source->~AllocatorOverrideShim(); - shimAllocationSource->DeAllocate(source); - } - - AllocatorOverrideShim::AllocatorOverrideShim(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) - : m_owningAllocator(owningAllocator) - , m_source(owningAllocator->GetOriginalAllocationSource()) - , m_overridingSource(owningAllocator->GetOriginalAllocationSource()) - , m_shimAllocationSource(shimAllocationSource) - , m_records(typename AllocationSet::hasher(), typename AllocationSet::key_eq(), StdAllocationSrc(shimAllocationSource)) - { - } - - void AllocatorOverrideShim::SetOverride(IAllocatorAllocate* source) - { - m_overridingSource = source; - } - - IAllocatorAllocate* AllocatorOverrideShim::GetOverride() const - { - return m_overridingSource; - } - - bool AllocatorOverrideShim::IsOverridden() const - { - return m_source != m_overridingSource; - } - - bool AllocatorOverrideShim::HasOrphanedAllocations() const - { - return !m_records.empty(); - } - - void AllocatorOverrideShim::SetFinalizedConfiguration() - { - m_finalizedConfiguration = true; - } - - typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) - { - pointer_type ptr = m_overridingSource->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord); - - if (!IsOverridden()) - { - lock_type lock(m_mutex); - m_records.insert(ptr); // Record in case we need to orphan this allocation later - } - - return ptr; - } - - void AllocatorOverrideShim::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) - { - IAllocatorAllocate* source = m_overridingSource; - bool destroy = false; - - { - lock_type lock(m_mutex); - - // Check to see if this came from a prior allocation source - if (m_records.erase(ptr) && IsOverridden()) - { - source = m_source; - - if (m_records.empty() && m_finalizedConfiguration) - { - // All orphaned records are gone; we are no longer needed - m_owningAllocator->SetAllocationSource(m_overridingSource); - destroy = true; // Must destroy outside the lock - } - } - } - - source->DeAllocate(ptr, byteSize, alignment); - - if (destroy) - { - Destroy(this); - } - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Resize(pointer_type ptr, size_type newSize) - { - IAllocatorAllocate* source = m_overridingSource; - - if (IsOverridden()) - { - // Determine who owns the allocation - lock_type lock(m_mutex); - - if (m_records.count(ptr)) - { - source = m_source; - } - } - - size_t result = source->Resize(ptr, newSize); - - return result; - } - - typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) - { - pointer_type newPtr = nullptr; - bool useOverride = true; - bool destroy = false; - - if (IsOverridden()) - { - lock_type lock(m_mutex); - - if (m_records.erase(ptr)) - { - // An old allocation needs to be transferred to the new, overriding allocator. - useOverride = false; // We'll do the reallocation here - size_t oldSize = m_source->AllocationSize(ptr); - - if (newSize) - { - newPtr = m_overridingSource->Allocate(newSize, newAlignment, 0); - memcpy(newPtr, ptr, AZStd::min(newSize, oldSize)); - } - - m_source->DeAllocate(ptr, oldSize); - - if (m_records.empty() && m_finalizedConfiguration) - { - // All orphaned records are gone; we are no longer needed - m_owningAllocator->SetAllocationSource(m_overridingSource); - destroy = true; // Must destroy outside the lock - } - } - } - - if (useOverride) - { - // Default behavior, we weren't deleting an old allocation - newPtr = m_overridingSource->ReAllocate(ptr, newSize, newAlignment); - - if (!IsOverridden()) - { - // Still need to do bookkeeping if we haven't been overridden yet - lock_type lock(m_mutex); - m_records.erase(ptr); - m_records.insert(newPtr); - } - } - - if (destroy) - { - Destroy(this); - } - - return newPtr; - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::AllocationSize(pointer_type ptr) - { - IAllocatorAllocate* source = m_overridingSource; - - if (IsOverridden()) - { - // Determine who owns the allocation - lock_type lock(m_mutex); - - if (m_records.count(ptr)) - { - source = m_source; - } - } - - return source->AllocationSize(ptr); - } - - void AllocatorOverrideShim::GarbageCollect() - { - m_source->GarbageCollect(); - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::NumAllocatedBytes() const - { - return m_source->NumAllocatedBytes(); - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Capacity() const - { - return m_source->Capacity(); - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::GetMaxAllocationSize() const - { - return m_source->GetMaxAllocationSize(); - } - - auto AllocatorOverrideShim::GetMaxContiguousAllocationSize() const -> size_type - { - return m_source->GetMaxContiguousAllocationSize(); - } - - IAllocatorAllocate* AllocatorOverrideShim::GetSubAllocator() - { - return m_source->GetSubAllocator(); - } - -} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.h deleted file mode 100644 index 3b45b9953e..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include - -namespace AZ -{ - class AllocatorManager; - - namespace Internal - { - /** - * A shim schema that solves the problem of overriding lazily-created allocators especially, that perform allocations before the override happens. - * - * Any allocator that *might* be overridden at some point must have this shim installed as its allocation source. This is done automatically by - * the AllocationManager; you generally do not have to interact with this shim directly at all. - * - * The shim will keep track of any allocations that occur, and if the allocator gets overridden it will ensure that prior allocations are - * deallocated with the old schema rather than the new one. - * - * There is some performance cost to this intrusion, however, in most cases it's only temporary: - * * Once the application calls FinalizeConfiguration(), any non-overridden allocators will have their shims destroyed. - * * Any overridden allocators that do not have prior allocations will have their shims destroyed. - * * Any overridden allocator will automatically destroy its shim once the last of the prior allocations has been deallocated. - * - * Note that an allocator that gets overridden but has prior allocations that it never intends to deallocate (such as file-level statics that never - * get changed) will keep its shim indefinitely. This is an unfortunate cost but only affects those allocators if they are being overridden. - */ - class AllocatorOverrideShim - : public IAllocatorAllocate - { - friend AllocatorManager; - - public: - //--------------------------------------------------------------------- - // IAllocator implementation - //--------------------------------------------------------------------- - pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = nullptr, const char* fileName = nullptr, int lineNum = 0, unsigned int suppressStackRecord = 0) override; - void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; - size_type Resize(pointer_type ptr, size_type newSize) override; - pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; - size_type AllocationSize(pointer_type ptr) override; - void GarbageCollect() override; - size_type NumAllocatedBytes() const override; - size_type Capacity() const override; - size_type GetMaxAllocationSize() const override; - size_type GetMaxContiguousAllocationSize() const override; - IAllocatorAllocate* GetSubAllocator() override; - - private: - /// Creates a shim using a custom memory source - static AllocatorOverrideShim* Create(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource); - static void Destroy(AllocatorOverrideShim* source); - - AllocatorOverrideShim(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource); - - /// Overrides the shim's memory source with a different memory source. - void SetOverride(IAllocatorAllocate* source); - - /// Returns the override source. - IAllocatorAllocate* GetOverride() const; - - /// Returns true if the shim has an override source set on it. - bool IsOverridden() const; - - /// Returns true if there are orphaned allocations from before the shim had its override set. - bool HasOrphanedAllocations() const; - - /// Called by the AllocatorManager to signify that the configuration has been finalized by the application. - void SetFinalizedConfiguration(); - - private: - class StdAllocationSrc : public AZStdIAllocator - { - public: - StdAllocationSrc(IAllocatorAllocate* schema = nullptr) : AZStdIAllocator(schema) - { - } - }; - - typedef AZStd::mutex mutex_type; - typedef AZStd::lock_guard lock_type; - typedef AZStd::unordered_set, AZStd::equal_to, StdAllocationSrc> AllocationSet; - - IAllocator* m_owningAllocator; - IAllocatorAllocate* m_source; - IAllocatorAllocate* m_overridingSource; - IAllocatorAllocate* m_shimAllocationSource; - AllocationSet m_records; - mutex_type m_mutex; - bool m_finalizedConfiguration = false; - }; - } -} diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp index 30b0b78fe5..da960ce3f3 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp @@ -20,8 +20,7 @@ using namespace AZ; // [1/28/2011] //========================================================================= BestFitExternalMapAllocator::BestFitExternalMapAllocator() - : AllocatorBase(this, "BestFitExternalMapAllocator", "Best fit allocator with external tracking storage!") - , m_schema(nullptr) + : AllocatorBase(nullptr, "BestFitExternalMapAllocator", "Best fit allocator with external tracking storage!") {} //========================================================================= @@ -186,13 +185,3 @@ auto BestFitExternalMapAllocator::GetMaxContiguousAllocationSize() const -> size { return m_schema->GetMaxContiguousAllocationSize(); } - -//========================================================================= -// GetSubAllocator -// [1/28/2011] -//========================================================================= -IAllocatorAllocate* -BestFitExternalMapAllocator::GetSubAllocator() -{ - return m_schema->GetSubAllocator(); -} diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h index 17425625b7..2cad404cd0 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h @@ -20,7 +20,6 @@ namespace AZ */ class BestFitExternalMapAllocator : public AllocatorBase - , public IAllocatorAllocate { public: AZ_TYPE_INFO(BestFitExternalMapAllocator, "{36266C8B-9A2C-4E3E-9812-3DB260868A2B}") @@ -38,7 +37,7 @@ namespace AZ static const int m_memoryBlockAlignment = 16; void* m_memoryBlock; ///< Pointer to memory to allocate from. Can be uncached. unsigned int m_memoryBlockByteSize; ///< Sizes if the memory block. - IAllocatorAllocate* m_mapAllocator; ///< Allocator for the free chunks map. If null the SystemAllocator will be used. + IAllocator* m_mapAllocator; ///< Allocator for the free chunks map. If null the SystemAllocator will be used. bool m_allocationRecords; ///< True if we want to track memory allocations, otherwise false. unsigned char m_stackRecordLevels; ///< If stack recording is enabled, how many stack levels to record. @@ -53,7 +52,7 @@ namespace AZ AllocatorDebugConfig GetDebugConfig() override; ////////////////////////////////////////////////////////////////////////// - // IAllocatorAllocate + // IAllocatorSchema pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; size_type Resize(pointer_type ptr, size_type newSize) override; @@ -64,7 +63,6 @@ namespace AZ size_type Capacity() const override; size_type GetMaxAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override; - IAllocatorAllocate* GetSubAllocator() override; ////////////////////////////////////////////////////////////////////////// protected: @@ -72,7 +70,6 @@ namespace AZ BestFitExternalMapAllocator& operator=(const BestFitExternalMapAllocator&); Descriptor m_desc; - BestFitExternalMapSchema* m_schema; }; } diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp index 715ecd221e..75356e85f3 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp @@ -30,6 +30,7 @@ BestFitExternalMapSchema::BestFitExternalMapSchema(const Descriptor& desc) //if( m_desc.m_memoryBlock == NULL) there is no point to automate this cause we need to flag this memory special, otherwise there is no point to use this allocator at all // m_desc.m_memoryBlock = azmalloc(SystemAllocator,m_desc.m_memoryBlockByteSize,16); m_freeChunksMap.insert(AZStd::make_pair(m_desc.m_memoryBlockByteSize, reinterpret_cast(m_desc.m_memoryBlock))); + } //========================================================================= @@ -37,7 +38,7 @@ BestFitExternalMapSchema::BestFitExternalMapSchema(const Descriptor& desc) // [1/28/2011] //========================================================================= BestFitExternalMapSchema::pointer_type -BestFitExternalMapSchema::Allocate(size_type byteSize, size_type alignment, int flags) +BestFitExternalMapSchema::Allocate(size_type byteSize, size_type alignment, int flags, const char*, const char*, int, unsigned int) { (void)flags; char* address = nullptr; @@ -91,8 +92,7 @@ BestFitExternalMapSchema::Allocate(size_type byteSize, size_type alignment, int // DeAllocate // [1/28/2011] //========================================================================= -void -BestFitExternalMapSchema::DeAllocate(pointer_type ptr) +void BestFitExternalMapSchema::DeAllocate(pointer_type ptr, size_type, size_type) { if (ptr == nullptr) { @@ -122,6 +122,20 @@ BestFitExternalMapSchema::AllocationSize(pointer_type ptr) return 0; } +BestFitExternalMapSchema::size_type +BestFitExternalMapSchema::Resize(pointer_type, size_type) +{ + AZ_Assert(false, AZ_FUNCTION_SIGNATURE " unsupported"); + return 0; +} + +BestFitExternalMapSchema::pointer_type +BestFitExternalMapSchema::ReAllocate(pointer_type, size_type, size_type) +{ + AZ_Assert(false, AZ_FUNCTION_SIGNATURE " unsupported"); + return nullptr; +} + //========================================================================= // GetMaxAllocationSize // [1/28/2011] diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h index eaab614593..63e9027dd2 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h @@ -21,7 +21,7 @@ namespace AZ * External map allows us to use this allocator with uncached memory, * because the tracking node is stored outside the main chunk. */ - class BestFitExternalMapSchema + class BestFitExternalMapSchema : public IAllocatorSchema { public: typedef void* pointer_type; @@ -45,26 +45,27 @@ namespace AZ static const int m_memoryBlockAlignment = 16; void* m_memoryBlock; ///< Pointer to memory to allocate from. Can be uncached. unsigned int m_memoryBlockByteSize; ///< Sizes if the memory block. - IAllocatorAllocate* m_mapAllocator; ///< Allocator for the free chunks map. If null the SystemAllocator will be used. + IAllocator* m_mapAllocator; ///< Allocator for the free chunks map. If null the SystemAllocator will be used. }; BestFitExternalMapSchema(const Descriptor& desc); - pointer_type Allocate(size_type byteSize, size_type alignment, int flags); - void DeAllocate(pointer_type ptr); - size_type AllocationSize(pointer_type ptr); + pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; + void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; + size_type Resize(pointer_type ptr, size_type newSize) override; + pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; + size_type AllocationSize(pointer_type ptr) override; - AZ_FORCE_INLINE size_type NumAllocatedBytes() const { return m_used; } - AZ_FORCE_INLINE size_type Capacity() const { return m_desc.m_memoryBlockByteSize; } - size_type GetMaxAllocationSize() const; - size_type GetMaxContiguousAllocationSize() const; - AZ_FORCE_INLINE IAllocatorAllocate* GetSubAllocator() const { return m_desc.m_mapAllocator; } + AZ_FORCE_INLINE size_type NumAllocatedBytes() const override { return m_used; } + AZ_FORCE_INLINE size_type Capacity() const override { return m_desc.m_memoryBlockByteSize; } + size_type GetMaxAllocationSize() const override; + size_type GetMaxContiguousAllocationSize() const override; /** - * Since we don't consolidate chucnks at free time (too expensive) we will do it as we need or when we can't + * Since we don't consolidate chunks at free time (too expensive) we will do it as we need or when we can't * allocate memory. This function is at least O(nlogn) where 'n' are the free chunks. */ - void GarbageCollect(); + void GarbageCollect() override; private: AZ_FORCE_INLINE size_type ChunckSize(pointer_type ptr); diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp index 1f0fc59a97..98ca1f87ed 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp @@ -107,7 +107,6 @@ namespace AZ m_used = 0; m_desc = desc; - m_subAllocator = nullptr; for (int i = 0; i < Descriptor::m_maxNumBlocks; ++i) { diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h index 3a7716a127..ea4a4ebdc6 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h @@ -17,7 +17,7 @@ namespace AZ * Internally uses use dlmalloc or version of it (nedmalloc, ptmalloc3). */ class HeapSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: typedef void* pointer_type; @@ -52,7 +52,6 @@ namespace AZ size_type Capacity() const override { return m_capacity; } size_type GetMaxAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override; - IAllocatorAllocate* GetSubAllocator() override { return m_subAllocator; } void GarbageCollect() override {} private: @@ -62,7 +61,7 @@ namespace AZ Descriptor m_desc; size_type m_capacity; ///< Capacity in bytes. size_type m_used; ///< Number of bytes in use. - IAllocatorAllocate* m_subAllocator; + IAllocatorSchema* m_subAllocator; bool m_ownMemoryBlock[Descriptor::m_maxNumBlocks]; }; } diff --git a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp index 6e40ccd8cd..6891eb4248 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp @@ -1081,7 +1081,7 @@ namespace AZ { const size_t m_treePageAlignment; const size_t m_poolPageSize; bool m_isPoolAllocations; - IAllocatorAllocate* m_subAllocator; + IAllocatorSchema* m_subAllocator; #if !defined (USE_MUTEX_PER_BUCKET) mutable AZStd::mutex m_mutex; diff --git a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h index 5ee0205196..27dbd321d2 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.h @@ -19,7 +19,7 @@ namespace AZ * Heap allocator schema, based on Dimitar Lazarov "High Performance Heap Allocator". */ class HphaSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: /** @@ -47,7 +47,7 @@ namespace AZ unsigned int m_isPoolAllocations : 1; ///< True to allow allocations from pools, otherwise false. size_t m_fixedMemoryBlockByteSize; ///< Memory block size, if 0 we use the OS memory allocation functions. void* m_fixedMemoryBlock; ///< Can be NULL if so the we will allocate memory from the subAllocator if m_memoryBlocksByteSize is != 0. - IAllocatorAllocate* m_subAllocator; ///< Allocator that m_memoryBlocks memory was allocated from or should be allocated (if NULL). + IAllocatorSchema* m_subAllocator; ///< Allocator that m_memoryBlocks memory was allocated from or should be allocated (if NULL). size_t m_systemChunkSize; ///< Size of chunk to request from the OS when more memory is needed (defaults to m_pageSize) size_t m_capacity; ///< Max size this allocator can grow to }; @@ -68,7 +68,6 @@ namespace AZ size_type GetMaxAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override; size_type GetUnAllocatedMemory(bool isPrint = false) const override; - IAllocatorAllocate* GetSubAllocator() override { return m_desc.m_subAllocator; } /// Return unused memory to the OS (if we don't use fixed block). Don't call this unless you really need free memory, it is slow. void GarbageCollect() override; diff --git a/Code/Framework/AzCore/AzCore/Memory/IAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/IAllocator.cpp index 08c567bf84..2d561b45ef 100644 --- a/Code/Framework/AzCore/AzCore/Memory/IAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/IAllocator.cpp @@ -9,23 +9,12 @@ namespace AZ { - IAllocator::IAllocator(IAllocatorAllocate* allocationSource) - : m_allocationSource(allocationSource) - , m_originalAllocationSource(allocationSource) + IAllocator::IAllocator(IAllocatorSchema* schema) + : m_schema(schema) { } IAllocator::~IAllocator() { } - - void IAllocator::SetAllocationSource(IAllocatorAllocate* allocationSource) - { - m_allocationSource = allocationSource; - } - - void IAllocator::ResetAllocationSource() - { - m_allocationSource = m_originalAllocationSource; - } } diff --git a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h index 532335e50b..319175f9ee 100644 --- a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h @@ -28,17 +28,16 @@ namespace AZ class AllocatorManager; /** - * Allocator alloc/free basic interface. It is separate because it can be used - * for user provided allocators overrides + * Allocator schema interface */ - class IAllocatorAllocate + class IAllocatorSchema { public: typedef void* pointer_type; typedef size_t size_type; typedef ptrdiff_t difference_type; - virtual ~IAllocatorAllocate() {} + virtual ~IAllocatorSchema() {} virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) = 0; virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) = 0; @@ -70,8 +69,6 @@ namespace AZ * that will be reported. */ virtual size_type GetUnAllocatedMemory(bool isPrint = false) const { (void)isPrint; return 0; } - /// Returns a pointer to a sub-allocator or NULL. - virtual IAllocatorAllocate* GetSubAllocator() = 0; }; /** @@ -100,56 +97,19 @@ namespace AZ /** * Interface class for all allocators. */ - class IAllocator + class IAllocator : public IAllocatorSchema { public: - IAllocator(IAllocatorAllocate* allocationSource); + IAllocator(IAllocatorSchema* schema = nullptr); virtual ~IAllocator(); - // @{ Every system allocator is required to provide name this is how + // Every system allocator is required to provide name this is how // it will be registered with the allocator manager. virtual const char* GetName() const = 0; virtual const char* GetDescription() const = 0; - // @} - //--------------------------------------------------------------------- - // Code releating to the allocation source is made concrete within this - // interface as a performance optimization. - //--------------------------------------------------------------------- - - /// Returns the current allocation source, which may be used to perform memory allocations. - AZ_FORCE_INLINE IAllocatorAllocate* GetAllocationSource() const - { - return m_allocationSource; - } - - /// Returns the original allocation source. Generally only used for debugging purposes. - AZ_FORCE_INLINE IAllocatorAllocate* GetOriginalAllocationSource() const - { - return m_originalAllocationSource; - } - - /// Returns true if the allocation source has changed from its original value. - AZ_FORCE_INLINE bool IsAllocationSourceChanged() const - { - return m_allocationSource != m_originalAllocationSource; - } - - /// Sets the allocation source, effectively overriding the allocator. - /// Be very careful doing this, as existing allocations will be deallocated through the new source, - /// typically leading to unwanted effects (such as crashes). - void SetAllocationSource(IAllocatorAllocate* allocationSource); - - /// Restores the allocation source to its original value. - /// Be very careful doing this, as allocations that came from the new source will now be deallocated - /// through the original source, typically leading to unwanted effects (such as crashes). - void ResetAllocationSource(); - - //--------------------------------------------------------------------- - - /// Returns the schema, if the allocator uses one. Returns nullptr if the allocator does not use a schema. - /// This is mainly used when debugging to determine if allocators alias each other under the hood. - virtual IAllocatorAllocate* GetSchema() = 0; + /// Returns the schema + AZ_FORCE_INLINE IAllocatorSchema* GetSchema() const { return m_schema; }; /// Returns the debug configuration for this allocator. virtual AllocatorDebugConfig GetDebugConfig() = 0; @@ -163,11 +123,6 @@ namespace AZ /// Returns true if this allocator is ready to use. virtual bool IsReady() const = 0; - /// Returns true if this allocator can be overridden with a different source. - /// Almost all allocators should return true. There are very few minor exceptions, such as the OS Allocator, that are required for direct - /// interfacing with the kernel and must never be overridden under any circumstances. - virtual bool CanBeOverridden() const = 0; - /// Returns true if the allocator was lazily created. Exposed primarily for testing systems that need to verify the state of allocators. virtual bool IsLazilyCreated() const = 0; @@ -195,9 +150,7 @@ namespace AZ virtual void Destroy() = 0; protected: - // The allocation source is made a direct member of the interface as a performance optimization. - IAllocatorAllocate * m_allocationSource; - IAllocatorAllocate* m_originalAllocationSource; + IAllocatorSchema* m_schema; template friend class AllocatorStorage::StoragePolicyBase; diff --git a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp index 9aa31cd8b6..37fa277fab 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp @@ -22,31 +22,15 @@ namespace AZ::Internal namespace AZ { + static constexpr size_t DEFAULT_ALIGNMENT = sizeof(void*) * 2; // Default malloc alignment + //--------------------------------------------------------------------- // MallocSchema methods //--------------------------------------------------------------------- - MallocSchema::MallocSchema(const Descriptor& desc) + MallocSchema::MallocSchema(const Descriptor&) : m_bytesAllocated(0) { - if (desc.m_useAZMalloc) - { - static const int DEFAULT_ALIGNMENT = sizeof(void*) * 2; // Default malloc alignment - - m_mallocFn = [](size_t byteSize) - { - return AZ_OS_MALLOC(byteSize, DEFAULT_ALIGNMENT); - }; - m_freeFn = [](void* ptr) - { - AZ_OS_FREE(ptr); - }; - } - else - { - m_mallocFn = &malloc; - m_freeFn = &free; - } } MallocSchema::~MallocSchema() @@ -84,7 +68,7 @@ namespace AZ ((alignment > sizeof(double)) ? alignment : 0); // Malloc will align to a minimum boundary for native objects, so we only pad if aligning to a large value - void* data = (*m_mallocFn)(required); + void* data = AZ_OS_MALLOC(required, DEFAULT_ALIGNMENT); void* result = PointerAlignUp(reinterpret_cast(reinterpret_cast(data) + sizeof(Internal::Header)), alignment); Internal::Header* header = PointerAlignDown( (Internal::Header*)(reinterpret_cast(result) - sizeof(Internal::Header)), AZStd::alignment_of::value); @@ -112,7 +96,7 @@ namespace AZ void* freePtr = reinterpret_cast(reinterpret_cast(ptr) - static_cast(header->offset)); m_bytesAllocated -= header->size; - (*m_freeFn)(freePtr); + AZ_OS_FREE(freePtr); } MallocSchema::pointer_type MallocSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) @@ -166,11 +150,6 @@ namespace AZ return AZ_CORE_MAX_ALLOCATOR_SIZE; } - IAllocatorAllocate* MallocSchema::GetSubAllocator() - { - return nullptr; - } - void MallocSchema::GarbageCollect() { } diff --git a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h index 7a8c4a0366..02559fdb57 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.h @@ -16,7 +16,7 @@ namespace AZ * Uses malloc internally. Mainly intended for debugging using host operating system features. */ class MallocSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: AZ_TYPE_INFO("MallocSchema", "{2A21D120-A42A-484C-997C-5735DCCA5FE9}"); @@ -25,21 +25,13 @@ namespace AZ typedef size_t size_type; typedef ptrdiff_t difference_type; - struct Descriptor - { - Descriptor(bool useAZMalloc = true) - : m_useAZMalloc(useAZMalloc) - { - } - - bool m_useAZMalloc; - }; + struct Descriptor {}; MallocSchema(const Descriptor& desc = Descriptor()); virtual ~MallocSchema(); //--------------------------------------------------------------------- - // IAllocatorAllocate + // IAllocatorSchema //--------------------------------------------------------------------- pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; @@ -51,15 +43,9 @@ namespace AZ size_type Capacity() const override; size_type GetMaxAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override; - IAllocatorAllocate* GetSubAllocator() override; void GarbageCollect() override; private: - typedef void* (*MallocFn)(size_t); - typedef void (*FreeFn)(void*); - AZStd::atomic m_bytesAllocated; - MallocFn m_mallocFn; - FreeFn m_freeFn; }; } diff --git a/Code/Framework/AzCore/AzCore/Memory/Memory.h b/Code/Framework/AzCore/AzCore/Memory/Memory.h index 2e08ec1b15..2ecba6ebff 100644 --- a/Code/Framework/AzCore/AzCore/Memory/Memory.h +++ b/Code/Framework/AzCore/AzCore/Memory/Memory.h @@ -141,9 +141,9 @@ void* operator new[](std::size_t, const AZ::Internal::AllocatorDummy*); */ #define azfree(...) AZ_MACRO_SPECIALIZE(azfree_, AZ_VA_NUM_ARGS(__VA_ARGS__), (__VA_ARGS__)) -/// Returns allocation size, based on it's pointer \ref AZ::IAllocatorAllocate::AllocationSize. +/// Returns allocation size, based on it's pointer \ref AZ::IAllocatorSchema::AllocationSize. #define azallocsize(_Ptr, _Allocator) AZ::AllocatorInstance< _Allocator >::Get().AllocationSize(_Ptr) -/// Returns the new expanded size or 0 if NOT supported by the allocator \ref AZ::IAllocatorAllocate::Resize. +/// Returns the new expanded size or 0 if NOT supported by the allocator \ref AZ::IAllocatorSchema::Resize. #define azallocresize(_Ptr, _NewSize, _Allocator) AZ::AllocatorInstance< _Allocator >::Get().Resize(_Ptr, _NewSize) namespace AZ { @@ -734,12 +734,15 @@ namespace AZ public: typedef typename Allocator::Descriptor Descriptor; - AZ_FORCE_INLINE static IAllocatorAllocate& Get() + // Maintained for backwards compatibility, prefer to use Get() instead. + // Get was previously used to get the the schema, however, that bypases what the allocators are doing. + // If the schema is needed, call Get().GetSchema() + AZ_FORCE_INLINE static IAllocator& GetAllocator() { - return *GetAllocator().GetAllocationSource(); + return StoragePolicy::GetAllocator(); } - AZ_FORCE_INLINE static IAllocator& GetAllocator() + AZ_FORCE_INLINE static IAllocator& Get() { return StoragePolicy::GetAllocator(); } @@ -781,7 +784,7 @@ namespace AZ // structure of another allocator template class ChildAllocatorSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: // No descriptor is necessary, as the parent allocator is expected to already @@ -792,7 +795,7 @@ namespace AZ ChildAllocatorSchema(const Descriptor&) {} //--------------------------------------------------------------------- - // IAllocatorAllocate + // IAllocatorSchema //--------------------------------------------------------------------- pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override { @@ -848,11 +851,6 @@ namespace AZ { return AZ::AllocatorInstance::Get().GetUnAllocatedMemory(isPrint); } - - IAllocatorAllocate* GetSubAllocator() override - { - return AZ::AllocatorInstance::Get().GetSubAllocator(); - } }; /** @@ -873,7 +871,7 @@ namespace AZ { if (AllocatorInstance::IsReady()) { - m_name = AllocatorInstance::GetAllocator().GetName(); + m_name = AllocatorInstance::Get().GetName(); } else { @@ -932,7 +930,7 @@ namespace AZ typedef AZStd::ptrdiff_t difference_type; typedef AZStd::false_type allow_memory_leaks; ///< Regular allocators should not leak. - AZ_FORCE_INLINE AZStdIAllocator(IAllocatorAllocate* allocator, const char* name = "AZ::AZStdIAllocator") + AZ_FORCE_INLINE AZStdIAllocator(IAllocator* allocator, const char* name = "AZ::AZStdIAllocator") : m_allocator(allocator) , m_name(name) { @@ -965,7 +963,7 @@ namespace AZ AZ_FORCE_INLINE bool operator==(const AZStdIAllocator& rhs) const { return m_allocator == rhs.m_allocator; } AZ_FORCE_INLINE bool operator!=(const AZStdIAllocator& rhs) const { return m_allocator != rhs.m_allocator; } private: - IAllocatorAllocate* m_allocator; + IAllocator* m_allocator; const char* m_name; }; @@ -982,8 +980,8 @@ namespace AZ using size_type = AZStd::size_t; using difference_type = AZStd::ptrdiff_t; using allow_memory_leaks = AZStd::false_type; ///< Regular allocators should not leak. - using functor_type = IAllocatorAllocate&(*)(); ///< Function Pointer must return IAllocatorAllocate&. - ///< function pointers do not support covariant return types + using functor_type = IAllocator&(*)(); ///< Function Pointer must return IAllocator&. + ///< function pointers do not support covariant return types constexpr AZStdFunctorAllocator(functor_type allocatorFunctor, const char* name = "AZ::AZStdFunctorAllocator") : m_allocatorFunctor(allocatorFunctor) diff --git a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.cpp index 317df214d6..293cd92354 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.cpp @@ -19,7 +19,6 @@ namespace AZ , m_custom(nullptr) , m_numAllocatedBytes(0) { - DisableOverriding(); } //========================================================================= diff --git a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h index 3a8080483b..0bdf7d9fed 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h @@ -24,7 +24,6 @@ namespace AZ */ class OSAllocator : public AllocatorBase - , public IAllocatorAllocate { public: AZ_TYPE_INFO(OSAllocator, "{9F835EE3-F23C-454E-B4E3-011E2F3C8118}") @@ -39,7 +38,7 @@ namespace AZ { Descriptor() : m_custom(0) {} - IAllocatorAllocate* m_custom; ///< You can provide our own allocation scheme. If NULL a HeapScheme will be used with the provided Descriptor. + IAllocatorSchema* m_custom; ///< You can provide our own allocation scheme. If NULL a HeapScheme will be used with the provided Descriptor. }; bool Create(const Descriptor& desc); @@ -51,7 +50,7 @@ namespace AZ AllocatorDebugConfig GetDebugConfig() override; ////////////////////////////////////////////////////////////////////////// - // IAllocatorAllocate + // IAllocatorSchema pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; size_type Resize(pointer_type ptr, size_type newSize) override { return m_custom ? m_custom->Resize(ptr, newSize) : 0; } @@ -62,13 +61,12 @@ namespace AZ size_type Capacity() const override { return m_custom ? m_custom->Capacity() : AZ_CORE_MAX_ALLOCATOR_SIZE; } // custom size or unlimited size_type GetMaxAllocationSize() const override { return m_custom ? m_custom->GetMaxAllocationSize() : AZ_CORE_MAX_ALLOCATOR_SIZE; } // custom size or unlimited size_type GetMaxContiguousAllocationSize() const override { return m_custom ? m_custom->GetMaxContiguousAllocationSize() : AZ_CORE_MAX_ALLOCATOR_SIZE; } // custom size or unlimited - IAllocatorAllocate* GetSubAllocator() override { return m_custom ? m_custom : NULL; } protected: OSAllocator(const OSAllocator&); OSAllocator& operator=(const OSAllocator&); - IAllocatorAllocate* m_custom; + IAllocatorSchema* m_custom; size_type m_numAllocatedBytes; }; diff --git a/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.cpp index ed5e0febc2..096fbbac95 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.cpp @@ -233,7 +233,6 @@ namespace AZ size_type Capacity() const; size_type GetMaxAllocationSize() const; size_type GetMaxContiguousAllocationSize() const; - IAllocatorAllocate* GetSubAllocator(); void GarbageCollect(); private: @@ -680,11 +679,6 @@ auto AZ::OverrunDetectionSchemaImpl::GetMaxContiguousAllocationSize() const -> s return 0; } -AZ::IAllocatorAllocate* AZ::OverrunDetectionSchemaImpl::GetSubAllocator() -{ - return nullptr; -} - void AZ::OverrunDetectionSchemaImpl::GarbageCollect() { } @@ -810,11 +804,6 @@ auto AZ::OverrunDetectionSchema::GetMaxContiguousAllocationSize() const -> size_ return m_impl->GetMaxContiguousAllocationSize(); } -AZ::IAllocatorAllocate* AZ::OverrunDetectionSchema::GetSubAllocator() -{ - return m_impl->GetSubAllocator(); -} - void AZ::OverrunDetectionSchema::GarbageCollect() { m_impl->GarbageCollect(); diff --git a/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h b/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h index 9895a5f84f..073b54160b 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/OverrunDetectionAllocator.h @@ -27,7 +27,7 @@ namespace AZ * the requested memory, plus the trap page). On most platforms this is 8kb (4kb * 2 pages). */ class OverrunDetectionSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: AZ_TYPE_INFO("OverrunDetectionSchema", "{0DF781AC-1615-40AE-81F7-6CA5841E2914}"); @@ -75,7 +75,7 @@ namespace AZ virtual ~OverrunDetectionSchema(); //--------------------------------------------------------------------- - // IAllocatorAllocate + // IAllocatorSchema //--------------------------------------------------------------------- pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; @@ -87,7 +87,6 @@ namespace AZ size_type Capacity() const override; size_type GetMaxAllocationSize() const override; size_type GetMaxContiguousAllocationSize() const override; - IAllocatorAllocate* GetSubAllocator() override; void GarbageCollect() override; private: diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h b/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h index a03f7b5b92..f55c6251bf 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h @@ -102,7 +102,7 @@ namespace AZ } ////////////////////////////////////////////////////////////////////////// - // IAllocatorAllocate + // IAllocatorSchema pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override { (void)ptr; diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp index 9167864450..60f4f34f1d 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp @@ -163,7 +163,7 @@ namespace AZ } using AllocatorType = PoolAllocation; - IAllocatorAllocate* m_pageAllocator; + IAllocatorSchema* m_pageAllocator; AllocatorType m_allocator; void* m_staticDataBlock; unsigned int m_numStaticPages; @@ -295,7 +295,7 @@ namespace AZ FreePagesType m_freePages; AZStd::vector m_threads; ///< Array with all separate thread data. Used to traverse end free elements. - IAllocatorAllocate* m_pageAllocator; + IAllocatorSchema* m_pageAllocator; void* m_staticDataBlock; size_t m_numStaticPages; size_t m_pageSize; @@ -732,17 +732,6 @@ PoolSchema::Capacity() const return m_impl->m_numStaticPages * m_impl->m_pageSize; } -//========================================================================= -// GetPageAllocator -// [11/17/2010] -//========================================================================= -IAllocatorAllocate* -PoolSchema::GetSubAllocator() -{ - return m_impl->m_pageAllocator; -} - - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // PollAllocator Implementation @@ -1090,16 +1079,6 @@ ThreadPoolSchema::Capacity() const return m_impl->m_numStaticPages * m_impl->m_pageSize; } -//========================================================================= -// GetPageAllocator -// [11/17/2010] -//========================================================================= -IAllocatorAllocate* -ThreadPoolSchema::GetSubAllocator() -{ - return m_impl->m_pageAllocator; -} - //========================================================================= // ThreadPoolSchemaImpl diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h index cfc5e3ea07..d9faf976b3 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h @@ -22,7 +22,7 @@ namespace AZ * use ThreadPool Schema or do the sync yourself. */ class PoolSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: /** @@ -52,7 +52,7 @@ namespace AZ * this is the minimum number of pages we will have allocated at all times, otherwise the total number of pages supported. */ unsigned int m_numStaticPages; - IAllocatorAllocate* m_pageAllocator; ///< If you provide this interface we will use it for page allocations, otherwise SystemAllocator will be used. + IAllocatorSchema* m_pageAllocator; ///< If you provide this interface we will use it for page allocations, otherwise SystemAllocator will be used. }; PoolSchema(const Descriptor& desc = Descriptor()); @@ -73,7 +73,6 @@ namespace AZ size_type GetMaxContiguousAllocationSize() const override; size_type NumAllocatedBytes() const override; size_type Capacity() const override; - IAllocatorAllocate* GetSubAllocator() override; protected: PoolSchema(const PoolSchema&); @@ -90,7 +89,7 @@ namespace AZ * for each thread. So there will be some memory overhead, especially if you use fixed pool sizes. */ class ThreadPoolSchema - : public IAllocatorAllocate + : public IAllocatorSchema { public: // Functions for getting an instance of a ThreadPoolData when using thread local storage @@ -119,7 +118,6 @@ namespace AZ size_type GetMaxContiguousAllocationSize() const override; size_type NumAllocatedBytes() const override; size_type Capacity() const override; - IAllocatorAllocate* GetSubAllocator() override; protected: ThreadPoolSchema(const ThreadPoolSchema&); diff --git a/Code/Framework/AzCore/AzCore/Memory/SimpleSchemaAllocator.h b/Code/Framework/AzCore/AzCore/Memory/SimpleSchemaAllocator.h index 5fbc890203..76be66786e 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SimpleSchemaAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/SimpleSchemaAllocator.h @@ -22,17 +22,15 @@ namespace AZ template class SimpleSchemaAllocator : public AllocatorBase - , public IAllocatorAllocate { public: using Descriptor = DescriptorType; - using pointer_type = typename IAllocatorAllocate::pointer_type; - using size_type = typename IAllocatorAllocate::size_type; - using difference_type = typename IAllocatorAllocate::difference_type; + using pointer_type = typename Schema::pointer_type; + using size_type = typename Schema::size_type; + using difference_type = typename Schema::difference_type; SimpleSchemaAllocator(const char* name, const char* desc) - : AllocatorBase(this, name, desc) - , m_schema(nullptr) + : AllocatorBase(nullptr, name, desc) { } @@ -65,13 +63,8 @@ namespace AZ return AllocatorDebugConfig(); } - IAllocatorAllocate* GetSchema() override - { - return m_schema; - } - //--------------------------------------------------------------------- - // IAllocatorAllocate + // IAllocatorSchema //--------------------------------------------------------------------- pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = nullptr, const char* fileName = nullptr, int lineNum = 0, unsigned int suppressStackRecord = 0) override { @@ -188,14 +181,6 @@ namespace AZ { return m_schema->GetUnAllocatedMemory(isPrint); } - - IAllocatorAllocate* GetSubAllocator() override - { - return m_schema->GetSubAllocator(); - } - - protected: - IAllocatorAllocate* m_schema; private: typename AZStd::aligned_storage::value>::type m_schemaStorage; diff --git a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp index e56f4f045d..c403df0ed6 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp @@ -51,9 +51,8 @@ static bool g_isSystemSchemaUsed = false; // [9/2/2009] //========================================================================= SystemAllocator::SystemAllocator() - : AllocatorBase(this, "SystemAllocator", "Fundamental generic memory allocator") + : AllocatorBase(nullptr, "SystemAllocator", "Fundamental generic memory allocator") , m_isCustom(false) - , m_allocator(nullptr) , m_ownsOSAllocator(false) { } @@ -93,7 +92,7 @@ SystemAllocator::Create(const Descriptor& desc) if (desc.m_custom) { m_isCustom = true; - m_allocator = desc.m_custom; + m_schema = desc.m_custom; isReady = true; } else @@ -121,9 +120,9 @@ SystemAllocator::Create(const Descriptor& desc) AZ_Assert(!g_isSystemSchemaUsed, "AZ::SystemAllocator MUST be created first! It's the source of all allocations!"); #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - m_allocator = new(&g_systemSchema)HphaSchema(heapDesc); + m_schema = new (&g_systemSchema) HphaSchema(heapDesc); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - m_allocator = new(&g_systemSchema)MallocSchema(heapDesc); + m_schema = new (&g_systemSchema) MallocSchema(heapDesc); #endif g_isSystemSchemaUsed = true; isReady = true; @@ -134,11 +133,11 @@ SystemAllocator::Create(const Descriptor& desc) AZ_Assert(AllocatorInstance::IsReady(), "System allocator must be created before any other allocator! They allocate from it."); #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - m_allocator = azcreate(HphaSchema, (heapDesc), SystemAllocator); + m_schema = azcreate(HphaSchema, (heapDesc), SystemAllocator); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - m_allocator = azcreate(MallocSchema, (heapDesc), SystemAllocator); + m_schema = azcreate(MallocSchema, (heapDesc), SystemAllocator); #endif - if (m_allocator == nullptr) + if (m_schema == nullptr) { isReady = false; } @@ -167,18 +166,18 @@ SystemAllocator::Destroy() if (!m_isCustom) { - if ((void*)m_allocator == (void*)&g_systemSchema) + if ((void*)m_schema == (void*)&g_systemSchema) { #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - static_cast(m_allocator)->~HphaSchema(); + static_cast(m_schema)->~HphaSchema(); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - static_cast(m_allocator)->~MallocSchema(); + static_cast(m_schema)->~MallocSchema(); #endif g_isSystemSchemaUsed = false; } else { - azdestroy(m_allocator); + azdestroy(m_schema); } } @@ -198,11 +197,6 @@ AllocatorDebugConfig SystemAllocator::GetDebugConfig() .ExcludeFromDebugging(!m_desc.m_allocationRecords); } -IAllocatorAllocate* SystemAllocator::GetSchema() -{ - return m_allocator; -} - //========================================================================= // Allocate // [9/2/2009] @@ -218,14 +212,14 @@ SystemAllocator::Allocate(size_type byteSize, size_type alignment, int flags, co AZ_Assert((alignment & (alignment - 1)) == 0, "Alignment must be power of 2!"); byteSize = MemorySizeAdjustedUp(byteSize); - SystemAllocator::pointer_type address = m_allocator->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); + SystemAllocator::pointer_type address = m_schema->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); if (address == nullptr) { // Free all memory we can and try again! AllocatorManager::Instance().GarbageCollect(); - address = m_allocator->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); + address = m_schema->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); } if (address == nullptr) @@ -251,7 +245,7 @@ SystemAllocator::DeAllocate(pointer_type ptr, size_type byteSize, size_type alig byteSize = MemorySizeAdjustedUp(byteSize); AZ_PROFILE_MEMORY_FREE(MemoryReserved, ptr); AZ_MEMORY_PROFILE(ProfileDeallocation(ptr, byteSize, alignment, nullptr)); - m_allocator->DeAllocate(ptr, byteSize, alignment); + m_schema->DeAllocate(ptr, byteSize, alignment); } //========================================================================= @@ -265,7 +259,7 @@ SystemAllocator::ReAllocate(pointer_type ptr, size_type newSize, size_type newAl AZ_MEMORY_PROFILE(ProfileReallocationBegin(ptr, newSize)); AZ_PROFILE_MEMORY_FREE(MemoryReserved, ptr); - pointer_type newAddress = m_allocator->ReAllocate(ptr, newSize, newAlignment); + pointer_type newAddress = m_schema->ReAllocate(ptr, newSize, newAlignment); AZ_PROFILE_MEMORY_ALLOC(MemoryReserved, newAddress, newSize, "SystemAllocator realloc"); AZ_MEMORY_PROFILE(ProfileReallocationEnd(ptr, newAddress, newSize, newAlignment)); @@ -280,7 +274,7 @@ SystemAllocator::size_type SystemAllocator::Resize(pointer_type ptr, size_type newSize) { newSize = MemorySizeAdjustedUp(newSize); - size_type resizedSize = m_allocator->Resize(ptr, newSize); + size_type resizedSize = m_schema->Resize(ptr, newSize); AZ_MEMORY_PROFILE(ProfileResize(ptr, resizedSize)); @@ -294,7 +288,7 @@ SystemAllocator::Resize(pointer_type ptr, size_type newSize) SystemAllocator::size_type SystemAllocator::AllocationSize(pointer_type ptr) { - size_type allocSize = MemorySizeAdjustedDown(m_allocator->AllocationSize(ptr)); + size_type allocSize = MemorySizeAdjustedDown(m_schema->AllocationSize(ptr)); return allocSize; } diff --git a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h index c02ada5843..0ea4251b8a 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h @@ -26,7 +26,6 @@ namespace AZ */ class SystemAllocator : public AllocatorBase - , public IAllocatorAllocate { public: AZ_TYPE_INFO(SystemAllocator, "{424C94D8-85CF-4E89-8CD6-AB5EC173E875}") @@ -39,7 +38,7 @@ namespace AZ * we will allocate system memory using system calls. You can * provide arenas (spaces) with pre-allocated memory, and use the * flag to specify which arena you want to allocate from. - * You are also allowed to supply IAllocatorAllocate, but if you do + * You are also allowed to supply IAllocatorSchema, but if you do * so you will need to take care of all allocations, we will not use * the default HeapSchema. * \ref HeapSchema::Descriptor @@ -51,7 +50,7 @@ namespace AZ , m_allocationRecords(true) , m_stackRecordLevels(5) {} - IAllocatorAllocate* m_custom; ///< You can provide our own allocation scheme. If NULL a HeapScheme will be used with the provided Descriptor. + IAllocatorSchema* m_custom; ///< You can provide our own allocation scheme. If NULL a HeapScheme will be used with the provided Descriptor. struct Heap { @@ -73,7 +72,7 @@ namespace AZ int m_numFixedMemoryBlocks; ///< Number of memory blocks to use. void* m_fixedMemoryBlocks[m_maxNumFixedBlocks]; ///< Pointers to provided memory blocks or NULL if you want the system to allocate them for you with the System Allocator. size_t m_fixedMemoryBlocksByteSize[m_maxNumFixedBlocks]; ///< Sizes of different memory blocks (MUST be multiple of m_pageSize), if m_memoryBlock is 0 the block will be allocated for you with the System Allocator. - IAllocatorAllocate* m_subAllocator; ///< Allocator that m_memoryBlocks memory was allocated from or should be allocated (if NULL). + IAllocatorSchema* m_subAllocator; ///< Allocator that m_memoryBlocks memory was allocated from or should be allocated (if NULL). size_t m_systemChunkSize; ///< Size of chunk to request from the OS when more memory is needed (defaults to m_pageSize) } m_heap; bool m_allocationRecords; ///< True if we want to track memory allocations, otherwise false. @@ -87,25 +86,23 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// // IAllocator AllocatorDebugConfig GetDebugConfig() override; - IAllocatorAllocate* GetSchema() override; ////////////////////////////////////////////////////////////////////////// - // IAllocatorAllocate + // IAllocatorSchema pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; size_type Resize(pointer_type ptr, size_type newSize) override; size_type AllocationSize(pointer_type ptr) override; - void GarbageCollect() override { m_allocator->GarbageCollect(); } + void GarbageCollect() override { GetSchema()->GarbageCollect(); } - size_type NumAllocatedBytes() const override { return m_allocator->NumAllocatedBytes(); } - size_type Capacity() const override { return m_allocator->Capacity(); } + size_type NumAllocatedBytes() const override { return GetSchema()->NumAllocatedBytes(); } + size_type Capacity() const override { return GetSchema()->Capacity(); } /// Keep in mind this operation will execute GarbageCollect to make sure it returns, max allocation. This function WILL be slow. - size_type GetMaxAllocationSize() const override { return m_allocator->GetMaxAllocationSize(); } - size_type GetMaxContiguousAllocationSize() const override { return m_allocator->GetMaxContiguousAllocationSize(); } - size_type GetUnAllocatedMemory(bool isPrint = false) const override { return m_allocator->GetUnAllocatedMemory(isPrint); } - IAllocatorAllocate* GetSubAllocator() override { return m_isCustom ? m_allocator : m_allocator->GetSubAllocator(); } + size_type GetMaxAllocationSize() const override { return GetSchema()->GetMaxAllocationSize(); } + size_type GetMaxContiguousAllocationSize() const override { return GetSchema()->GetMaxContiguousAllocationSize(); } + size_type GetUnAllocatedMemory(bool isPrint = false) const override { return GetSchema()->GetUnAllocatedMemory(isPrint); } ////////////////////////////////////////////////////////////////////////// @@ -115,7 +112,6 @@ namespace AZ Descriptor m_desc; bool m_isCustom; - IAllocatorAllocate* m_allocator; bool m_ownsOSAllocator; }; } diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp index 841387f14d..b6f42e79ec 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp @@ -1456,7 +1456,7 @@ using namespace AZ; static void* LuaMemoryHook(void* userData, void* ptr, size_t osize, size_t nsize) { (void)osize; - IAllocatorAllocate* allocator = reinterpret_cast(userData); + IAllocator* allocator = reinterpret_cast(userData); if (nsize == 0) { if (ptr) @@ -4274,7 +4274,7 @@ LUA_API const Node* lua_getDummyNode() AZ_CLASS_ALLOCATOR(ScriptContextImpl, AZ::SystemAllocator, 0); ////////////////////////////////////////////////////////////////////////// - ScriptContextImpl(ScriptContext* owner, IAllocatorAllocate* allocator, lua_State* nativeContext) + ScriptContextImpl(ScriptContext* owner, IAllocator* allocator, lua_State* nativeContext) : m_owner(owner) , m_context(nullptr) , m_debug(nullptr) @@ -5827,7 +5827,7 @@ LUA_API const Node* lua_getDummyNode() }; } // namespace AZ - ScriptContext::ScriptContext(ScriptContextId id, IAllocatorAllocate* allocator, lua_State* nativeContext) + ScriptContext::ScriptContext(ScriptContextId id, IAllocator* allocator, lua_State* nativeContext) { m_id = id; m_impl = aznew ScriptContextImpl(this, allocator, nativeContext); diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.h b/Code/Framework/AzCore/AzCore/Script/ScriptContext.h index bb63a9368d..8784bf7ca7 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.h +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.h @@ -822,7 +822,7 @@ namespace AZ CustomFromLua m_fromLua; }; - ScriptContext(ScriptContextId id = ScriptContextIds::DefaultScriptContextId, IAllocatorAllocate* allocator = nullptr, lua_State* nativeContext = nullptr); + ScriptContext(ScriptContextId id = ScriptContextIds::DefaultScriptContextId, IAllocator* allocator = nullptr, lua_State* nativeContext = nullptr); ~ScriptContext(); /// Bind LUA context (VM) a specific behaviorContext diff --git a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl index a633af22da..c1ecd3634a 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl @@ -74,7 +74,7 @@ namespace AZ * But as the AZStdAssociativeContainer instance will not be accessed outside of the module it was * created within then this will return this .dll/.exe module allocator */ - classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return GetCurrentSerializeContextModule().GetAllocator(); })); + classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocator& { return GetCurrentSerializeContextModule().GetAllocator(); })); // Flag the field with the EnumType attribute if we're an enumeration type aliased by RemoveEnum const bool isSpecializedEnum = AZStd::is_enum::value && !AzTypeInfo::Uuid().IsNull(); @@ -650,7 +650,7 @@ namespace AZ * But as the AZStdAssociativeContainer instance will not be accessed outside of the module it was * created within then this will return this .dll/.exe module allocator */ - m_classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return GetCurrentSerializeContextModule().GetAllocator(); })); + m_classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocator& { return GetCurrentSerializeContextModule().GetAllocator(); })); m_classElement.m_attributes.emplace_back(AZ_CRC("KeyType", 0x15bc5303), CreateModuleAttribute(AZStd::move(uuid))); } diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp index ff0ad571f7..227ba3dc75 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp @@ -3245,7 +3245,7 @@ namespace AZ return genericClassInfoFoundIt != m_moduleLocalGenericClassInfos.end() ? genericClassInfoFoundIt->second : nullptr; } - AZ::IAllocatorAllocate& SerializeContext::PerModuleGenericClassInfo::GetAllocator() + AZ::IAllocator& SerializeContext::PerModuleGenericClassInfo::GetAllocator() { return m_moduleOSAllocator; } diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h index bf96bcdb9a..f8daa8c328 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h @@ -574,10 +574,10 @@ namespace AZ GenericClassInfo* m_genericClassInfo = nullptr; ///< Valid when the generic class is set. So you don't search for the actual type in the class register. Edit::ElementData* m_editData{}; ///< Pointer to edit data (generated by EditContext). AZStd::vector m_attributes{ - AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return AZ::AllocatorInstance::Get(); }) + AZStdFunctorAllocator([]() -> IAllocator& { return AZ::AllocatorInstance::Get(); }) }; ///< Attributes attached to ClassElement. Lambda is required here as AZStdFunctorAllocator expects a function pointer - ///< that returns an IAllocatorAllocate& and the AZ::AllocatorInstance::Get returns an AZ::SystemAllocator& - /// which while it inherits from IAllocatorAllocate, does not work as function pointers do not support covariant return types + ///< that returns an IAllocator& and the AZ::AllocatorInstance::Get returns an AZ::SystemAllocator& + /// which while it inherits from IAllocator, does not work as function pointers do not support covariant return types AttributeOwnership m_attributeOwnership = AttributeOwnership::Parent; int m_flags{}; ///< }; @@ -639,12 +639,12 @@ namespace AZ DataPatchUpgradeHandler m_dataPatchUpgrader; ///< Attributes for this class type. Lambda is required here as AZStdFunctorAllocator expects a function pointer - ///< that returns an IAllocatorAllocate& and the AZ::AllocatorInstance::Get returns an AZ::SystemAllocator& - /// which while it inherits from IAllocatorAllocate, does not work as function pointers do not support covariant return types + ///< that returns an IAllocator& and the AZ::AllocatorInstance::Get returns an AZ::SystemAllocator& + /// which while it inherits from IAllocator, does not work as function pointers do not support covariant return types AZStd::vector m_attributes{AZStdFunctorAllocator(&GetSystemAllocator) }; private: - static IAllocatorAllocate& GetSystemAllocator() + static IAllocator& GetSystemAllocator() { return AZ::AllocatorInstance::Get(); } @@ -2483,7 +2483,7 @@ namespace AZ PerModuleGenericClassInfo(); ~PerModuleGenericClassInfo(); - AZ::IAllocatorAllocate& GetAllocator(); + AZ::IAllocator& GetAllocator(); void AddGenericClassInfo(AZ::GenericClassInfo* genericClassInfo); void RemoveGenericClassInfo(const AZ::TypeId& canonicalTypeId); @@ -2546,12 +2546,12 @@ namespace AZ template AttributePtr CreateModuleAttribute(T&& attrValue) { - IAllocatorAllocate& moduleAllocator = GetCurrentSerializeContextModule().GetAllocator(); + IAllocator& moduleAllocator = GetCurrentSerializeContextModule().GetAllocator(); void* rawMemory = moduleAllocator.Allocate(sizeof(ContainerType), alignof(ContainerType)); new (rawMemory) ContainerType{ AZStd::forward(attrValue) }; auto attributeDeleter = [](Attribute* attribute) { - IAllocatorAllocate& moduleAllocator = GetCurrentSerializeContextModule().GetAllocator(); + IAllocator& moduleAllocator = GetCurrentSerializeContextModule().GetAllocator(); attribute->~Attribute(); moduleAllocator.DeAllocate(attribute); }; diff --git a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl index 06d4f76c80..2712baa859 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl @@ -32,7 +32,7 @@ namespace AZ * But as the AZStdAssociativeContainer instance will not be accessed outside of the module it was * created within then this will return this .dll/.exe module allocator */ - classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return GetCurrentSerializeContextModule().GetAllocator(); })); + classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocator& { return GetCurrentSerializeContextModule().GetAllocator(); })); } template @@ -429,7 +429,7 @@ namespace AZ // the serialize context dll module allocator has to be used to manage the lifetime of the ClassData attributes within a module // If a module which reflects a variant is unloaded, then the dll module allocator will properly unreflect the variant type from the serialize context // for this particular module - AZStdFunctorAllocator dllAllocator([]() -> IAllocatorAllocate& { return GetCurrentSerializeContextModule().GetAllocator(); }); + AZStdFunctorAllocator dllAllocator([]() -> IAllocator& { return GetCurrentSerializeContextModule().GetAllocator(); }); m_classData.m_attributes.set_allocator(AZStd::move(dllAllocator)); // Create the ObjectStreamWriteOverrideCB in the current module diff --git a/Code/Framework/AzCore/AzCore/azcore_files.cmake b/Code/Framework/AzCore/AzCore/azcore_files.cmake index e8001f7215..b8ea9d3f39 100644 --- a/Code/Framework/AzCore/AzCore/azcore_files.cmake +++ b/Code/Framework/AzCore/AzCore/azcore_files.cmake @@ -362,8 +362,6 @@ set(FILES Memory/AllocatorBase.h Memory/AllocatorManager.cpp Memory/AllocatorManager.h - Memory/AllocatorOverrideShim.cpp - Memory/AllocatorOverrideShim.h Memory/AllocatorWrapper.h Memory/AllocatorScope.h Memory/BestFitExternalMapAllocator.cpp diff --git a/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp b/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp index c982868c4f..dd2597334d 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp @@ -1400,7 +1400,7 @@ namespace UnitTest { using ContainerType = ContainerTemplate, AZStd::equal_to, AZ::AZStdIAllocator>; - static ContainerType Create(std::initializer_list intList, AZ::IAllocatorAllocate* allocatorInstance) + static ContainerType Create(std::initializer_list intList, AZ::IAllocator* allocatorInstance) { ContainerType allocatorSet(intList, AZStd::hash{}, AZStd::equal_to{}, AZ::AZStdIAllocator{ allocatorInstance }); return allocatorSet; @@ -1798,7 +1798,7 @@ namespace UnitTest { using ContainerType = ContainerTemplate, AZStd::equal_to, AZ::AZStdIAllocator>; - static ContainerType Create(std::initializer_list intList, AZ::IAllocatorAllocate* allocatorInstance) + static ContainerType Create(std::initializer_list intList, AZ::IAllocator* allocatorInstance) { ContainerType allocatorMap(intList, AZStd::hash{}, AZStd::equal_to{}, AZ::AZStdIAllocator{ allocatorInstance }); return allocatorMap; diff --git a/Code/Framework/AzCore/Tests/AZStd/Ordered.cpp b/Code/Framework/AzCore/Tests/AZStd/Ordered.cpp index 26838eeb63..3f3bc86ed6 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Ordered.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Ordered.cpp @@ -1082,7 +1082,7 @@ namespace UnitTest { using ContainerType = ContainerTemplate, AZ::AZStdIAllocator>; - static ContainerType Create(std::initializer_list intList, AZ::IAllocatorAllocate* allocatorInstance) + static ContainerType Create(std::initializer_list intList, AZ::IAllocator* allocatorInstance) { ContainerType allocatorSet(intList, AZStd::less{}, AZ::AZStdIAllocator{ allocatorInstance }); return allocatorSet; @@ -1503,7 +1503,7 @@ namespace UnitTest { using ContainerType = ContainerTemplate, AZ::AZStdIAllocator>; - static ContainerType Create(std::initializer_list intList, AZ::IAllocatorAllocate* allocatorInstance) + static ContainerType Create(std::initializer_list intList, AZ::IAllocator* allocatorInstance) { ContainerType allocatorMap(intList, AZStd::less{}, AZ::AZStdIAllocator{ allocatorInstance }); return allocatorMap; diff --git a/Code/Framework/AzCore/Tests/Memory.cpp b/Code/Framework/AzCore/Tests/Memory.cpp index 5287167c8b..0e0103d162 100644 --- a/Code/Framework/AzCore/Tests/Memory.cpp +++ b/Code/Framework/AzCore/Tests/Memory.cpp @@ -87,7 +87,7 @@ namespace UnitTest #endif void* addresses[numAllocations] = {nullptr}; - IAllocatorAllocate& sysAlloc = AllocatorInstance::Get(); + IAllocator& sysAllocator = AllocatorInstance::Get(); ////////////////////////////////////////////////////////////////////////// // Allocate @@ -96,19 +96,19 @@ namespace UnitTest { AZStd::size_t size = AZStd::GetMax(rand() % 256, 1); // supply all debug info, so we don't need to record the stack. - addresses[i] = sysAlloc.Allocate(size, 8, 0, "Test Alloc", __FILE__, __LINE__); + addresses[i] = sysAllocator.Allocate(size, 8, 0, "Test Alloc", __FILE__, __LINE__); memset(addresses[i], 1, size); totalAllocSize += size; } ////////////////////////////////////////////////////////////////////////// - EXPECT_GE(sysAlloc.NumAllocatedBytes(), totalAllocSize); + EXPECT_GE(sysAllocator.NumAllocatedBytes(), totalAllocSize); ////////////////////////////////////////////////////////////////////////// // Deallocate for (int i = numAllocations-1; i >=0; --i) { - sysAlloc.DeAllocate(addresses[i]); + sysAllocator.DeAllocate(addresses[i]); } ////////////////////////////////////////////////////////////////////////// } @@ -122,21 +122,21 @@ namespace UnitTest { AllocatorInstance::Create(); - IAllocatorAllocate& sysAlloc = AllocatorInstance::Get(); + IAllocator& sysAllocator = AllocatorInstance::Get(); for (int i = 0; i < 100; ++i) { - address[i] = sysAlloc.Allocate(1000, 32, 0); + address[i] = sysAllocator.Allocate(1000, 32, 0); EXPECT_NE(nullptr, address[i]); EXPECT_EQ(0, ((size_t)address[i] & 31)); // check alignment - EXPECT_GE(sysAlloc.AllocationSize(address[i]), 1000); // check allocation size + EXPECT_GE(sysAllocator.AllocationSize(address[i]), 1000); // check allocation size } - EXPECT_GE(sysAlloc.NumAllocatedBytes(), 100000); // we requested 100 * 1000 so we should have at least this much allocated + EXPECT_GE(sysAllocator.NumAllocatedBytes(), 100000); // we requested 100 * 1000 so we should have at least this much allocated for (int i = 0; i < 100; ++i) { - sysAlloc.DeAllocate(address[i]); + sysAllocator.DeAllocate(address[i]); } //////////////////////////////////////////////////////////////////////// @@ -168,18 +168,17 @@ namespace UnitTest SystemAllocator::Descriptor descriptor; descriptor.m_stackRecordLevels = 20; AllocatorInstance::Create(descriptor); - IAllocator& sysAllocator = AllocatorInstance::GetAllocator(); - IAllocatorAllocate& sysAlloc = *sysAllocator.GetAllocationSource(); + IAllocator& sysAllocator = AllocatorInstance::Get(); for (int i = 0; i < 100; ++i) { - address[i] = sysAlloc.Allocate(1000, 32, 0); + address[i] = sysAllocator.Allocate(1000, 32, 0); EXPECT_NE(nullptr, address[i]); EXPECT_EQ(0, ((size_t)address[i] & 31)); // check alignment - EXPECT_GE(sysAlloc.AllocationSize(address[i]), 1000); // check allocation size + EXPECT_GE(sysAllocator.AllocationSize(address[i]), 1000); // check allocation size } - EXPECT_TRUE(sysAlloc.NumAllocatedBytes() >= 100000); // we requested 100 * 1000 so we should have at least this much allocated + EXPECT_TRUE(sysAllocator.NumAllocatedBytes() >= 100000); // we requested 100 * 1000 so we should have at least this much allocated // If tracking and recording is enabled, we can verify that the alloc info is valid #if defined(AZ_DEBUG_BUILD) @@ -192,7 +191,7 @@ namespace UnitTest const Debug::AllocationInfo& ai = iter->second; EXPECT_EQ(32, ai.m_alignment); EXPECT_EQ(1000, ai.m_byteSize); - EXPECT_EQ(nullptr, ai.m_fileName); // We did not pass fileName or lineNum to sysAlloc.Allocate() + EXPECT_EQ(nullptr, ai.m_fileName); // We did not pass fileName or lineNum to sysAllocator.Allocate() EXPECT_EQ(0, ai.m_lineNum); // -- " -- # if defined(AZ_PLATFORM_WINDOWS) // if our hardware support stack traces make sure we have them, since we did not provide fileName,lineNum @@ -229,47 +228,47 @@ namespace UnitTest // Free all memory for (int i = 0; i < 100; ++i) { - sysAlloc.DeAllocate(address[i]); + sysAllocator.DeAllocate(address[i]); } - sysAlloc.GarbageCollect(); - EXPECT_LT(sysAlloc.NumAllocatedBytes(), 1024); // We freed everything from a memspace, we should have only a very minor chunk of data + sysAllocator.GarbageCollect(); + EXPECT_LT(sysAllocator.NumAllocatedBytes(), 1024); // We freed everything from a memspace, we should have only a very minor chunk of data ////////////////////////////////////////////////////////////////////////// // realloc test address[0] = nullptr; static const unsigned int checkValue = 0x0badbabe; // create tree (non pool) allocation (we usually pool < 256 bytes) - address[0] = sysAlloc.Allocate(2048, 16); + address[0] = sysAllocator.Allocate(2048, 16); *(unsigned*)(address[0]) = checkValue; // set check value - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 2048, 16); - address[0] = sysAlloc.ReAllocate(address[0], 1024, 16); // test tree big -> tree small + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 2048, 16); + address[0] = sysAllocator.ReAllocate(address[0], 1024, 16); // test tree big -> tree small EXPECT_EQ(checkValue, *(unsigned*)address[0]); - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 1024, 16); - address[0] = sysAlloc.ReAllocate(address[0], 4096, 16); // test tree small -> tree big - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 4096, 16); + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 1024, 16); + address[0] = sysAllocator.ReAllocate(address[0], 4096, 16); // test tree small -> tree big + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 4096, 16); EXPECT_EQ(checkValue, *(unsigned*)address[0]); - address[0] = sysAlloc.ReAllocate(address[0], 128, 16); // test tree -> pool, - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 128, 16); + address[0] = sysAllocator.ReAllocate(address[0], 128, 16); // test tree -> pool, + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 128, 16); EXPECT_EQ(checkValue, *(unsigned*)address[0]); - address[0] = sysAlloc.ReAllocate(address[0], 64, 16); // pool big -> pool small - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 64, 16); + address[0] = sysAllocator.ReAllocate(address[0], 64, 16); // pool big -> pool small + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 64, 16); EXPECT_EQ(checkValue, *(unsigned*)address[0]); - address[0] = sysAlloc.ReAllocate(address[0], 64, 16); // pool sanity check - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 64, 16); + address[0] = sysAllocator.ReAllocate(address[0], 64, 16); // pool sanity check + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 64, 16); EXPECT_EQ(checkValue, *(unsigned*)address[0]); - address[0] = sysAlloc.ReAllocate(address[0], 192, 16); // pool small -> pool big - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 192, 16); + address[0] = sysAllocator.ReAllocate(address[0], 192, 16); // pool small -> pool big + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 192, 16); EXPECT_EQ(checkValue, *(unsigned*)address[0]); - address[0] = sysAlloc.ReAllocate(address[0], 2048, 16); // pool -> tree - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 2048, 16); + address[0] = sysAllocator.ReAllocate(address[0], 2048, 16); // pool -> tree + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 2048, 16); ; EXPECT_EQ(checkValue, *(unsigned*)address[0]); - address[0] = sysAlloc.ReAllocate(address[0], 2048, 16); // tree sanity check - AZ_TEST_ASSERT_CLOSE(sysAlloc.AllocationSize(address[0]), 2048, 16); + address[0] = sysAllocator.ReAllocate(address[0], 2048, 16); // tree sanity check + AZ_TEST_ASSERT_CLOSE(sysAllocator.AllocationSize(address[0]), 2048, 16); ; EXPECT_EQ(checkValue, *(unsigned*)address[0]); - sysAlloc.DeAllocate(address[0], 2048, 16); + sysAllocator.DeAllocate(address[0], 2048, 16); // TODO realloc with different alignment tests ////////////////////////////////////////////////////////////////////////// @@ -340,8 +339,7 @@ namespace UnitTest void run() { - IAllocatorAllocate& poolAlloc = AllocatorInstance::Get(); - IAllocator& poolAllocator = AllocatorInstance::GetAllocator(); + IAllocator& poolAllocator = AllocatorInstance::Get(); // 64 should be the max number of different pool sizes we can allocate. void* address[64]; ////////////////////////////////////////////////////////////////////////// @@ -352,12 +350,12 @@ namespace UnitTest int i = 0; for (int size = 8; size <= 256; ++i, size += 8) { - address[i] = poolAlloc.Allocate(size, 8); - EXPECT_GE(poolAlloc.AllocationSize(address[i]), (AZStd::size_t)size); + address[i] = poolAllocator.Allocate(size, 8); + EXPECT_GE(poolAllocator.AllocationSize(address[i]), (AZStd::size_t)size); memset(address[i], 1, size); } - EXPECT_GE(poolAlloc.NumAllocatedBytes(), 4126); + EXPECT_GE(poolAllocator.NumAllocatedBytes(), 4126); if (poolAllocator.GetRecords()) { @@ -369,11 +367,11 @@ namespace UnitTest for (i = 0; address[i] != nullptr; ++i) { - poolAlloc.DeAllocate(address[i]); + poolAllocator.DeAllocate(address[i]); } ////////////////////////////////////////////////////////////////////////// - EXPECT_EQ(0, poolAlloc.NumAllocatedBytes()); + EXPECT_EQ(0, poolAllocator.NumAllocatedBytes()); if (poolAllocator.GetRecords()) { @@ -393,13 +391,13 @@ namespace UnitTest memset(address, 0, AZ_ARRAY_SIZE(address)*sizeof(void*)); for (unsigned int j = 0; j < AZ_ARRAY_SIZE(address); ++j) { - address[j] = poolAlloc.Allocate(256, 8, 0, "Pool Alloc", "This File", 123); - EXPECT_GE(poolAlloc.AllocationSize(address[j]), 256); + address[j] = poolAllocator.Allocate(256, 8, 0, "Pool Alloc", "This File", 123); + EXPECT_GE(poolAllocator.AllocationSize(address[j]), 256); memset(address[j], 1, 256); } // AllocatorManager::Instance().ResetMemoryBreak(0); - EXPECT_GE(poolAlloc.NumAllocatedBytes(), AZ_ARRAY_SIZE(address)*256); + EXPECT_GE(poolAllocator.NumAllocatedBytes(), AZ_ARRAY_SIZE(address)*256); if (poolAllocator.GetRecords()) { @@ -411,11 +409,11 @@ namespace UnitTest for (unsigned int j = 0; j < AZ_ARRAY_SIZE(address); ++j) { - poolAlloc.DeAllocate(address[j]); + poolAllocator.DeAllocate(address[j]); } ////////////////////////////////////////////////////////////////////////// - EXPECT_EQ(0, poolAlloc.NumAllocatedBytes()); + EXPECT_EQ(0, poolAllocator.NumAllocatedBytes()); if (poolAllocator.GetRecords()) { @@ -541,14 +539,14 @@ namespace UnitTest #endif void* addresses[numAllocations] = {nullptr}; - IAllocatorAllocate& poolAlloc = AllocatorInstance::Get(); + IAllocator& poolAllocator = AllocatorInstance::Get(); ////////////////////////////////////////////////////////////////////////// // Allocate for (int i = 0; i < numAllocations; ++i) { AZStd::size_t size = AZStd::GetMax(1, ((i + 1) * 2) % 256); - addresses[i] = poolAlloc.Allocate(size, 8, 0, "Test Alloc", __FILE__, __LINE__); + addresses[i] = poolAllocator.Allocate(size, 8, 0, "Test Alloc", __FILE__, __LINE__); EXPECT_NE(addresses[i], nullptr); memset(addresses[i], 1, size); } @@ -558,7 +556,7 @@ namespace UnitTest // Deallocate for (int i = numAllocations-1; i >=0; --i) { - poolAlloc.DeAllocate(addresses[i]); + poolAllocator.DeAllocate(addresses[i]); } ////////////////////////////////////////////////////////////////////////// } @@ -568,12 +566,12 @@ namespace UnitTest */ void SharedAlloc() { - IAllocatorAllocate& poolAlloc = AllocatorInstance::Get(); + IAllocator& poolAllocator = AllocatorInstance::Get(); for (int i = 0; i < m_numSharedAlloc; ++i) { AZStd::size_t minSize = sizeof(AllocClass); AZStd::size_t size = AZStd::GetMax((AZStd::size_t)(rand() % 256), minSize); - AllocClass* ac = reinterpret_cast(poolAlloc.Allocate(size, AZStd::alignment_of::value, 0, "Shared Alloc", __FILE__, __LINE__)); + AllocClass* ac = reinterpret_cast(poolAllocator.Allocate(size, AZStd::alignment_of::value, 0, "Shared Alloc", __FILE__, __LINE__)); AZStd::lock_guard lock(m_mutex); m_sharedAlloc.push_back(*ac); } @@ -584,7 +582,7 @@ namespace UnitTest */ void SharedDeAlloc() { - IAllocatorAllocate& poolAlloc = AllocatorInstance::Get(); + IAllocator& poolAllocator = AllocatorInstance::Get(); AllocClass* ac; int isDone = 0; while (isDone!=2) @@ -594,7 +592,7 @@ namespace UnitTest { ac = &m_sharedAlloc.front(); m_sharedAlloc.pop_front(); - poolAlloc.DeAllocate(ac); + poolAllocator.DeAllocate(ac); } if (m_doneSharedAlloc) // once we know we don't add more elements, make one last check and exit. @@ -633,8 +631,7 @@ namespace UnitTest void run() { - IAllocatorAllocate& poolAlloc = AllocatorInstance::Get(); - IAllocator& poolAllocator = AllocatorInstance::GetAllocator(); + IAllocator& poolAllocator = AllocatorInstance::Get(); // 64 should be the max number of different pool sizes we can allocate. void* address[64]; ////////////////////////////////////////////////////////////////////////// @@ -645,12 +642,12 @@ namespace UnitTest int j = 0; for (int size = 8; size <= 256; ++j, size += 8) { - address[j] = poolAlloc.Allocate(size, 8); - EXPECT_GE(poolAlloc.AllocationSize(address[j]), (AZStd::size_t)size); + address[j] = poolAllocator.Allocate(size, 8); + EXPECT_GE(poolAllocator.AllocationSize(address[j]), (AZStd::size_t)size); memset(address[j], 1, size); } - EXPECT_GE(poolAlloc.NumAllocatedBytes(), 4126); + EXPECT_GE(poolAllocator.NumAllocatedBytes(), 4126); if (poolAllocator.GetRecords()) { @@ -662,11 +659,11 @@ namespace UnitTest for (int i = 0; address[i] != nullptr; ++i) { - poolAlloc.DeAllocate(address[i]); + poolAllocator.DeAllocate(address[i]); } ////////////////////////////////////////////////////////////////////////// - EXPECT_EQ(0, poolAlloc.NumAllocatedBytes()); + EXPECT_EQ(0, poolAllocator.NumAllocatedBytes()); if (poolAllocator.GetRecords()) { @@ -681,12 +678,12 @@ namespace UnitTest memset(address, 0, AZ_ARRAY_SIZE(address)*sizeof(void*)); for (unsigned int i = 0; i < AZ_ARRAY_SIZE(address); ++i) { - address[i] = poolAlloc.Allocate(256, 8); - EXPECT_GE(poolAlloc.AllocationSize(address[i]), 256); + address[i] = poolAllocator.Allocate(256, 8); + EXPECT_GE(poolAllocator.AllocationSize(address[i]), 256); memset(address[i], 1, 256); } - EXPECT_GE(poolAlloc.NumAllocatedBytes(), AZ_ARRAY_SIZE(address)*256); + EXPECT_GE(poolAllocator.NumAllocatedBytes(), AZ_ARRAY_SIZE(address)*256); if (poolAllocator.GetRecords()) { @@ -698,11 +695,11 @@ namespace UnitTest for (unsigned int i = 0; i < AZ_ARRAY_SIZE(address); ++i) { - poolAlloc.DeAllocate(address[i]); + poolAllocator.DeAllocate(address[i]); } ////////////////////////////////////////////////////////////////////////// - EXPECT_EQ(0, poolAlloc.NumAllocatedBytes()); + EXPECT_EQ(0, poolAllocator.NumAllocatedBytes()); if (poolAllocator.GetRecords()) { @@ -820,7 +817,7 @@ namespace UnitTest desc.m_memoryBlock = azmalloc(desc.m_memoryBlockByteSize, desc.m_memoryBlockAlignment); AllocatorInstance::Create(desc); - IAllocatorAllocate& bfAlloc = AllocatorInstance::Get(); + IAllocator& bfAlloc = AllocatorInstance::Get(); EXPECT_EQ( desc.m_memoryBlockByteSize, bfAlloc.Capacity() ); EXPECT_EQ( 0, bfAlloc.NumAllocatedBytes() ); @@ -882,8 +879,8 @@ namespace UnitTest void run() { - IAllocator& sysAllocator = AllocatorInstance::GetAllocator(); - IAllocator& poolAllocator = AllocatorInstance::GetAllocator(); + IAllocator& sysAllocator = AllocatorInstance::Get(); + IAllocator& poolAllocator = AllocatorInstance::Get(); void* ptr = azmalloc(16*1024, 32, SystemAllocator); EXPECT_EQ(0, ((size_t)ptr & 31)); // check alignment @@ -1010,27 +1007,27 @@ namespace UnitTest void run() { - IAllocator& sysAlloc = AllocatorInstance::GetAllocator(); - IAllocator& poolAlloc = AllocatorInstance::GetAllocator(); + IAllocator& sysAllocator = AllocatorInstance::Get(); + IAllocator& poolAllocator = AllocatorInstance::Get(); MyClass* ptr = aznew MyClass(202); /// this should allocate memory from the pool allocator EXPECT_EQ(0, ((size_t)ptr & 31)); // check alignment EXPECT_EQ(202, ptr->m_data); // check value - if (poolAlloc.GetRecords()) + if (poolAllocator.GetRecords()) { - AZStd::lock_guard lock(*poolAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = poolAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*poolAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = poolAllocator.GetRecords()->GetMap(); Debug::AllocationRecordsType::const_iterator iter = records.find(ptr); EXPECT_TRUE(iter!=records.end()); // our allocation is in the list EXPECT_STREQ(iter->second.m_name, "MyClass"); } delete ptr; - if (poolAlloc.GetRecords()) + if (poolAllocator.GetRecords()) { - AZStd::lock_guard lock(*poolAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = poolAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*poolAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = poolAllocator.GetRecords()->GetMap(); EXPECT_TRUE(records.find(ptr)==records.end()); // our allocation is NOT in the list } @@ -1038,19 +1035,19 @@ namespace UnitTest ptr = azcreate(MyClass, (101), SystemAllocator); EXPECT_EQ(0, ((size_t)ptr & 31)); // check alignment EXPECT_EQ(101, ptr->m_data); // check value - if (sysAlloc.GetRecords()) + if (sysAllocator.GetRecords()) { - AZStd::lock_guard lock(*sysAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = sysAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*sysAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = sysAllocator.GetRecords()->GetMap(); Debug::AllocationRecordsType::const_iterator iter = records.find(ptr); EXPECT_TRUE(iter!=records.end()); // our allocation is in the list EXPECT_STREQ(iter->second.m_name, "MyClass"); } azdestroy(ptr, SystemAllocator); - if (sysAlloc.GetRecords()) + if (sysAllocator.GetRecords()) { - AZStd::lock_guard lock(*sysAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = sysAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*sysAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = sysAllocator.GetRecords()->GetMap(); EXPECT_TRUE(records.find(ptr)==records.end()); // our allocation is NOT in the list } @@ -1059,19 +1056,19 @@ namespace UnitTest ptr = azcreate(MyClass, (505), SystemAllocator, "MyClassNamed"); EXPECT_EQ(0, ((size_t)ptr & 31)); // check alignment EXPECT_EQ(505, ptr->m_data); // check value - if (sysAlloc.GetRecords()) + if (sysAllocator.GetRecords()) { - AZStd::lock_guard lock(*sysAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = sysAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*sysAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = sysAllocator.GetRecords()->GetMap(); Debug::AllocationRecordsType::const_iterator iter = records.find(ptr); EXPECT_TRUE(iter!=records.end()); // our allocation is in the list EXPECT_STREQ(iter->second.m_name, "MyClassNamed"); } azdestroy(ptr); // imply SystemAllocator - if (sysAlloc.GetRecords()) + if (sysAllocator.GetRecords()) { - AZStd::lock_guard lock(*sysAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = sysAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*sysAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = sysAllocator.GetRecords()->GetMap(); EXPECT_TRUE(records.find(ptr)==records.end()); // our allocation is NOT in the list } @@ -1080,20 +1077,20 @@ namespace UnitTest EXPECT_EQ(0, ((size_t)ptr & 31)); // check alignment EXPECT_EQ(303, ptr->m_data); // check value - if (poolAlloc.GetRecords()) + if (poolAllocator.GetRecords()) { - AZStd::lock_guard lock(*poolAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = poolAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*poolAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = poolAllocator.GetRecords()->GetMap(); Debug::AllocationRecordsType::const_iterator iter = records.find(ptr); EXPECT_TRUE(iter != records.end()); // our allocation is in the list EXPECT_STREQ(iter->second.m_name, "MyClass"); } delete ptr; - if (poolAlloc.GetRecords()) + if (poolAllocator.GetRecords()) { - AZStd::lock_guard lock(*poolAlloc.GetRecords()); - const Debug::AllocationRecordsType& records = poolAlloc.GetRecords()->GetMap(); + AZStd::lock_guard lock(*poolAllocator.GetRecords()); + const Debug::AllocationRecordsType& records = poolAllocator.GetRecords()->GetMap(); EXPECT_TRUE(records.find(ptr) == records.end()); // our allocation is NOT in the list } } @@ -1140,8 +1137,8 @@ namespace UnitTest return (size_t)1 << (size_t)(MAX_ALIGNMENT_LOG2 * r); } - class DebugSysAlloc - : public AZ::IAllocatorAllocate + class DebugSysAllocSchema + : public AZ::IAllocatorSchema { pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override { @@ -1176,8 +1173,6 @@ namespace UnitTest size_type GetMaxAllocationSize() const override { return 1 * 1024 * 1024 * 1024; } /// Returns max allocation size of a single contiguous allocation size_type GetMaxContiguousAllocationSize() const override { return 1 * 1024 * 1024 * 1024; } - /// Returns a pointer to a sub-allocator or NULL. - IAllocatorAllocate* GetSubAllocator() override { return NULL; } }; public: void SetUp() override @@ -2565,7 +2560,7 @@ namespace UnitTest printf("\n\t\t\t=======================\n"); printf("\t\t\tSchemas Benchmark Test!\n"); printf("\t\t\t=======================\n"); - DebugSysAlloc da; + DebugSysAllocSchema da; { HphaSchema::Descriptor hphaDesc; hphaDesc.m_fixedMemoryBlockByteSize = AZ_TRAIT_OS_HPHA_MEMORYBLOCKBYTESIZE; diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 5cf5176308..7870749d24 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -112,7 +112,6 @@ namespace Benchmark { } - // IAllocatorAllocate static void* Allocate(size_t byteSize, size_t) { s_numAllocatedBytes += byteSize; @@ -580,6 +579,7 @@ namespace Benchmark //BM_REGISTER_ALLOCATOR(BestFitExternalMapAllocator, BestFitExternalMapAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator //BM_REGISTER_ALLOCATOR(HeapSchemaAllocator, TestHeapSchemaAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator //BM_REGISTER_SCHEMA(PoolSchema); // Requires special alignment requests while allocating + // BM_REGISTER_ALLOCATOR(OSAllocator, OSAllocator); // Requires special treatment to initialize since it will be already initialized, maybe creating a different instance? #undef BM_REGISTER_ALLOCATOR #undef BM_REGISTER_SIZE_FIXTURES diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorManager.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorManager.cpp index dc8ac033c1..bc758c1544 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorManager.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorManager.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -47,9 +46,6 @@ namespace UnitTest void RunTests() { - TestAllocatorShimWithDeallocateAfter(); - TestAllocatorShimRemovedAfterFinalization(); - TestAllocatorShimUsedForRealloc(); TearDownAllocatorManagerTest(); } @@ -64,7 +60,7 @@ namespace UnitTest EXPECT_EQ(m_manager->GetNumAllocators(), 0); AllocatorInstance::Create(); EXPECT_EQ(m_manager->GetNumAllocators(), 2); // SystemAllocator creates the OSAllocator if it doesn't exist - m_systemAllocator = &AllocatorInstance::GetAllocator(); + m_systemAllocator = &AllocatorInstance::Get(); } void TearDownAllocatorManagerTest() @@ -83,85 +79,6 @@ namespace UnitTest m_systemAllocator = nullptr; } - void TestAllocatorShimWithDeallocateAfter() - { - SetUpAllocatorManagerTest(); - - // Should begin with a shim installed. If this fails, check that AZCORE_MEMORY_ENABLE_OVERRIDES is enabled in AllocatorManager.cpp. - EXPECT_NE(m_systemAllocator->GetAllocationSource(), m_systemAllocator->GetOriginalAllocationSource()); - - const int testAllocBytes = TEST_ALLOC_BYTES; - - // Allocate from the shim, which should take from the allocator's original source - void* p = m_systemAllocator->GetAllocationSource()->Allocate(testAllocBytes, 0, 0); - EXPECT_NE(p, nullptr); - EXPECT_EQ(m_systemAllocator->GetOriginalAllocationSource()->NumAllocatedBytes(), testAllocBytes); - - // Add the override schema - m_manager->SetOverrideAllocatorSource(&m_mallocSchema); - - // Allocations should go through malloc schema instead of the allocator's regular schema - void* q = m_systemAllocator->GetAllocationSource()->Allocate(testAllocBytes, 0, 0); - EXPECT_NE(q, nullptr); - EXPECT_EQ(m_mallocSchema.NumAllocatedBytes(), testAllocBytes); - EXPECT_EQ(m_systemAllocator->GetOriginalAllocationSource()->NumAllocatedBytes(), testAllocBytes); - - // Finalize configuration, no more shims should be created after this point - m_manager->FinalizeConfiguration(); - - // Deallocating the original orphaned allocation from the SystemAllocator should remove the shim - EXPECT_NE(m_systemAllocator->GetAllocationSource(), &m_mallocSchema); - m_systemAllocator->GetAllocationSource()->DeAllocate(p); - EXPECT_EQ(m_systemAllocator->GetAllocationSource(), &m_mallocSchema); - - // Clean up - m_systemAllocator->GetAllocationSource()->DeAllocate(q); - } - - void TestAllocatorShimRemovedAfterFinalization() - { - SetUpAllocatorManagerTest(); - - // Should begin with a shim installed - EXPECT_NE(m_systemAllocator->GetAllocationSource(), m_systemAllocator->GetOriginalAllocationSource()); - - // Finalizing the configuration should remove the shim if it was unused - m_manager->FinalizeConfiguration(); - EXPECT_EQ(m_systemAllocator->GetAllocationSource(), m_systemAllocator->GetOriginalAllocationSource()); - } - - void TestAllocatorShimUsedForRealloc() - { - SetUpAllocatorManagerTest(); - - // Should begin with a shim installed - EXPECT_NE(m_systemAllocator->GetAllocationSource(), m_systemAllocator->GetOriginalAllocationSource()); - - const int testAllocBytes = TEST_ALLOC_BYTES; - - // Allocate from the shim, which should take from the allocator's original source - void* p = m_systemAllocator->GetAllocationSource()->Allocate(testAllocBytes, 0, 0); - EXPECT_NE(p, nullptr); - EXPECT_EQ(m_systemAllocator->GetOriginalAllocationSource()->NumAllocatedBytes(), testAllocBytes); - - // Add the override schema and finalize - m_manager->SetOverrideAllocatorSource(&m_mallocSchema); - m_manager->FinalizeConfiguration(); - - // Shim should still be present - EXPECT_NE(m_systemAllocator->GetAllocationSource(), &m_mallocSchema); - - // Reallocation should move allocation from the old source to the new source - EXPECT_EQ(m_mallocSchema.NumAllocatedBytes(), 0); - void* q = m_systemAllocator->GetAllocationSource()->ReAllocate(p, testAllocBytes * 2, 0); - EXPECT_NE(p, q); - EXPECT_EQ(m_mallocSchema.NumAllocatedBytes(), testAllocBytes * 2); - EXPECT_EQ(m_systemAllocator->GetOriginalAllocationSource()->NumAllocatedBytes(), 0); - - // Reallocation should also have removed the shim as it was no longer necessary - EXPECT_EQ(m_systemAllocator->GetAllocationSource(), &m_mallocSchema); - } - MallocSchema m_mallocSchema; AllocatorManager* m_manager = nullptr; IAllocator* m_systemAllocator = nullptr; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index 04802a8d0e..c2fba5c5a3 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -1975,7 +1975,7 @@ namespace AZ::IO AZ_Error("Archive", false, "OSAllocator is not ready. It cannot be used to allocate a MemoryBlock"); return {}; } - AZ::IAllocatorAllocate* allocator = &AZ::AllocatorInstance::Get(); + AZ::IAllocator* allocator = &AZ::AllocatorInstance::Get(); AZStd::intrusive_ptr memoryBlock{ new (allocator->Allocate(sizeof(AZ::IO::MemoryBlock), alignof(AZ::IO::MemoryBlock))) AZ::IO::MemoryBlock{AZ::IO::MemoryBlockDeleter{ &AZ::AllocatorInstance::Get() }} }; auto CreateFunc = [](size_t byteSize, size_t byteAlignment, const char* name) { diff --git a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h index d7eaee6e24..0bbc5aaaab 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h @@ -36,7 +36,7 @@ namespace AZ::IO struct MemoryBlockDeleter { void operator()(const AZStd::intrusive_refcount* ptr) const; - AZ::IAllocatorAllocate* m_allocator{}; + AZ::IAllocator* m_allocator{}; }; struct MemoryBlock : AZStd::intrusive_refcount diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp index 13d5b0f723..05c773f056 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.cpp @@ -42,7 +42,7 @@ namespace AZ::IO::ZipDir AZ_Error("Archive", false, "OSAllocator is not ready. It cannot be used to allocate a MemoryBlock"); return {}; } - AZ::IAllocatorAllocate* allocator = &AZ::AllocatorInstance::Get(); + AZ::IAllocator* allocator = &AZ::AllocatorInstance::Get(); AZStd::intrusive_ptr memoryBlock{ new (allocator->Allocate(sizeof(AZ::IO::MemoryBlock), alignof(AZ::IO::MemoryBlock))) AZ::IO::MemoryBlock{AZ::IO::MemoryBlockDeleter{ &AZ::AllocatorInstance::Get() }} }; auto CreateFunc = [](size_t byteSize, size_t byteAlignment, const char* name) { @@ -142,14 +142,14 @@ namespace AZ::IO::ZipDir { } - Cache::Cache(AZ::IAllocatorAllocate* allocator) + Cache::Cache(AZ::IAllocator* allocator) : m_fileHandle(AZ::IO::InvalidHandle) , m_nFlags(0) , m_lCDROffset(0) , m_encryptedHeaders(ZipFile::HEADERS_NOT_ENCRYPTED) , m_allocator{ allocator } { - AZ_Assert(allocator, "IAllocatorAllocate object is required in order to allocated memory for the ZipDir Cache operations"); + AZ_Assert(allocator, "IAllocator object is required in order to allocated memory for the ZipDir Cache operations"); } void Cache::Close() diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.h b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.h index ae1e3dfa9c..c8b19ebf33 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirCache.h @@ -40,7 +40,7 @@ namespace AZ::IO::ZipDir inline static constexpr int compressedBlockHeaderSizeInBytes = 4; //number of bytes we need in front of the compressed block to indicate which compressor was used Cache(); - explicit Cache(AZ::IAllocatorAllocate* allocator); + explicit Cache(AZ::IAllocator* allocator); ~Cache() { @@ -133,7 +133,7 @@ namespace AZ::IO::ZipDir friend class FileEntryTransactionAdd; FileEntryTree m_treeDir; AZ::IO::HandleType m_fileHandle; - AZ::IAllocatorAllocate* m_allocator; + AZ::IAllocator* m_allocator; AZ::IO::Path m_strFilePath; // String Pool for persistently storing paths as long as they reside in the cache diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.cpp index ab9c356d7f..9ad58443a0 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.cpp @@ -39,7 +39,7 @@ namespace AZ::IO::ZipDir { } - auto FileDataRecord::New(const FileRecord& rThat, AZ::IAllocatorAllocate* allocator) -> AZStd::intrusive_ptr + auto FileDataRecord::New(const FileRecord& rThat, AZ::IAllocator* allocator) -> AZStd::intrusive_ptr { auto fileDataRecordAlloc = reinterpret_cast(allocator->Allocate( sizeof(FileDataRecord) + rThat.pFileEntryBase->desc.lSizeCompressed, diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.h b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.h index 1183dbf384..2a4df44f2d 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirList.h @@ -28,7 +28,7 @@ namespace AZ::IO::ZipDir { void operator()(const AZStd::intrusive_refcount* ptr) const; - AZ::IAllocatorAllocate* m_allocator{}; + AZ::IAllocator* m_allocator{}; }; struct FileDataRecord : public FileRecord @@ -36,7 +36,7 @@ namespace AZ::IO::ZipDir { FileDataRecord(); - static auto New(const FileRecord& rThat, AZ::IAllocatorAllocate* allocator) ->AZStd::intrusive_ptr; + static auto New(const FileRecord& rThat, AZ::IAllocator* allocator) ->AZStd::intrusive_ptr; void* GetData() {return this + 1; } }; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp index cea517decd..1ac0906c94 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp @@ -25,13 +25,13 @@ namespace AZ::IO::ZipDir::ZipDirStructuresInternal { static void* ZlibAlloc(void* userData, uint32_t item, uint32_t size) { - auto allocator = reinterpret_cast(userData); + auto allocator = reinterpret_cast(userData); return allocator->Allocate(item * size, alignof(uint8_t), 0, "ZLibAlloc"); } static void ZlibFree(void* userData, void* ptr) { - auto allocator = reinterpret_cast(userData); + auto allocator = reinterpret_cast(userData); allocator->DeAllocate(ptr); } @@ -296,7 +296,7 @@ namespace AZ::IO::ZipDir::ZipDirStructuresInternal return {}; } - AZ::IAllocatorAllocate* allocator = &AZ::AllocatorInstance::Get(); + AZ::IAllocator* allocator = &AZ::AllocatorInstance::Get(); AZStd::intrusive_ptr memoryBlock{ new (allocator->Allocate(sizeof(AZ::IO::MemoryBlock), alignof(AZ::IO::MemoryBlock))) AZ::IO::MemoryBlock{AZ::IO::MemoryBlockDeleter{ &AZ::AllocatorInstance::Get() }} }; auto CreateFunc = [](size_t byteSize, size_t byteAlignment, const char* name) { @@ -451,7 +451,7 @@ namespace AZ::IO::ZipDir if (GetDiskFreeSpaceA(drive.c_str(),nullptr, &bytesPerSector, nullptr, nullptr)) { m_nSectorSize = bytesPerSector; - AZ::IAllocatorAllocate& allocator = AZ::AllocatorInstance::Get(); + AZ::IAllocator& allocator = AZ::AllocatorInstance::Get(); if (m_pReadTarget) { allocator.DeAllocate(m_pReadTarget); diff --git a/Code/LauncherUnified/Launcher.h b/Code/LauncherUnified/Launcher.h index 7c4c09c19f..eb1cf6479e 100644 --- a/Code/LauncherUnified/Launcher.h +++ b/Code/LauncherUnified/Launcher.h @@ -62,7 +62,7 @@ namespace O3DELauncher ResourceLimitUpdater m_updateResourceLimits = nullptr; //!< callback for updating system resources, if necessary OnPostApplicationStart m_onPostAppStart = nullptr; //!< callback notifying the platform specific entry point that AzGameFramework::GameApplication::Start has been called - AZ::IAllocatorAllocate* m_allocator = nullptr; //!< Used to allocate the temporary bootstrap memory, as well as the main \ref SystemAllocator heap. If null, OSAllocator will be used + AZ::IAllocator* m_allocator = nullptr; //!< Used to allocate the temporary bootstrap memory, as well as the main \ref SystemAllocator heap. If null, OSAllocator will be used const char* m_appResourcesPath = "."; //!< Path to the device specific assets, default is equivalent to blank path in ParseEngineConfig const char* m_appWriteStoragePath = nullptr; //!< Path to writeable storage if different than assets path, used to override userPath and logPath diff --git a/Code/Legacy/CryCommon/CryLegacyAllocator.h b/Code/Legacy/CryCommon/CryLegacyAllocator.h index b0e1e29657..e96c2a9347 100644 --- a/Code/Legacy/CryCommon/CryLegacyAllocator.h +++ b/Code/Legacy/CryCommon/CryLegacyAllocator.h @@ -23,19 +23,9 @@ inline void* CryModuleMallocImpl(size_t size, const char* file, const int line) #define CryModuleFree(ptr) CryModuleFreeImpl(ptr, __FILE__, __LINE__) #define CryModuleMemalignFree(ptr) CryModuleFreeImpl(ptr, __FILE__, __LINE__) -inline void CryModuleFreeImpl(void* ptr, const char* file, const int line) +inline void CryModuleFreeImpl(void* ptr, const char*, const int) { - - AZ::IAllocator& allocator = AZ::AllocatorInstance::GetAllocator(); - - if (allocator.IsAllocationSourceChanged()) - { - allocator.GetAllocationSource()->DeAllocate(ptr); - } - else - { - static_cast(allocator).DeAllocate(ptr, file, line); - } + AZ::AllocatorInstance::Get().DeAllocate(ptr, 0, 0); } #define CryModuleMemalign(size, alignment) CryModuleMemalignImpl(size, alignment, __FILE__, __LINE__) @@ -79,17 +69,5 @@ inline void* CryModuleReallocAlignImpl(void* prev, size_t size, size_t alignment } #endif - AZ::IAllocator& allocator = AZ::AllocatorInstance::GetAllocator(); - void *ptr; - - if (allocator.IsAllocationSourceChanged()) - { - ptr = allocator.GetAllocationSource()->ReAllocate(prev, size, 0); - } - else - { - ptr = static_cast(allocator).ReAllocate(prev, size, 0, file, line); - } - - return ptr; + return AZ::AllocatorInstance::Get().ReAllocate(prev, size, 0); } diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacket.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacket.h index d66a3ea1bb..7995002a39 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacket.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacket.h @@ -13,7 +13,7 @@ namespace AZ { - class IAllocatorAllocate; + class IAllocator; namespace RHI { @@ -66,7 +66,7 @@ namespace AZ DrawPacket() = default; // The allocator used to release the memory when Release() is called. - IAllocatorAllocate* m_allocator = nullptr; + IAllocator* m_allocator = nullptr; // The bit-mask of all active filter tags. DrawListMask m_drawListMask = 0; diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacketBuilder.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacketBuilder.h index 021125312b..30e013d486 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacketBuilder.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawPacketBuilder.h @@ -14,7 +14,7 @@ namespace AZ { - class IAllocatorAllocate; + class IAllocator; namespace RHI { @@ -50,7 +50,7 @@ namespace AZ // NOTE: This is configurable; just used to control the amount of memory held by the builder. static const size_t DrawItemCountMax = 16; - void Begin(IAllocatorAllocate* allocator); + void Begin(IAllocator* allocator); void SetDrawArguments(const DrawArguments& drawArguments); @@ -77,7 +77,7 @@ namespace AZ private: void ClearData(); - IAllocatorAllocate* m_allocator = nullptr; + IAllocator* m_allocator = nullptr; DrawArguments m_drawArguments; DrawListMask m_drawListMask = 0; DrawFilterMask m_drawFilterMask = DrawFilterMaskDefaultValue; diff --git a/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp b/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp index ebda9732df..ec9dd1a14f 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/DrawPacketBuilder.cpp @@ -18,7 +18,7 @@ namespace AZ { namespace RHI { - void DrawPacketBuilder::Begin(IAllocatorAllocate* allocator) + void DrawPacketBuilder::Begin(IAllocator* allocator) { m_allocator = allocator ? allocator : &AllocatorInstance::Get(); } From 5ff65be3145c43215c4a9e635316016919bdcbfa Mon Sep 17 00:00:00 2001 From: nemerle <96597+nemerle@users.noreply.github.com> Date: Sun, 12 Dec 2021 23:48:47 +0100 Subject: [PATCH 017/413] This reduces non-unity build time by ~2% and build size by ~0.5%. This PR is a 'clean' version of #6199 updated to latest development Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> --- Code/Editor/GameEngine.cpp | 1 + .../AtomCore/Instance/InstanceDatabase.h | 5 + .../AzCore/AzCore/Asset/AssetCommon.h | 2 +- .../AzCore/AzCore/Asset/AssetDataStream.cpp | 98 +++- .../AzCore/AzCore/Asset/AssetDataStream.h | 35 +- .../AzCore/AzCore/Asset/AssetManager.cpp | 1 + .../AzCore/AzCore/Asset/AssetManager.h | 1 - Code/Framework/AzCore/AzCore/IO/IStreamer.h | 6 +- .../AzCore/AzCore/IO/Streamer/BlockCache.cpp | 14 +- .../AzCore/AzCore/IO/Streamer/BlockCache.h | 8 +- .../AzCore/IO/Streamer/DedicatedCache.cpp | 20 +- .../AzCore/IO/Streamer/DedicatedCache.h | 23 +- .../AzCore/AzCore/IO/Streamer/FileRequest.cpp | 143 ++++-- .../AzCore/AzCore/IO/Streamer/FileRequest.h | 485 ++++++++++-------- .../IO/Streamer/FullFileDecompressor.cpp | 46 +- .../AzCore/IO/Streamer/FullFileDecompressor.h | 7 +- .../AzCore/IO/Streamer/ReadSplitter.cpp | 10 +- .../AzCore/AzCore/IO/Streamer/Scheduler.cpp | 50 +- .../AzCore/AzCore/IO/Streamer/Scheduler.h | 19 +- .../AzCore/IO/Streamer/StorageDrive.cpp | 42 +- .../AzCore/AzCore/IO/Streamer/StorageDrive.h | 8 +- .../AzCore/AzCore/IO/Streamer/Streamer.cpp | 7 +- .../AzCore/AzCore/IO/Streamer/Streamer.h | 8 +- .../AzCore/IO/Streamer/StreamerComponent.cpp | 3 +- .../AzCore/IO/Streamer/StreamerContext.cpp | 6 +- .../AzCore/IO/Streamer/StreamerContext.h | 15 +- .../IO/Streamer/StorageDrive_Windows.cpp | 52 +- .../AzCore/IO/Streamer/StorageDrive_Windows.h | 11 +- .../Tests/Asset/AssetDataStreamTests.cpp | 1 + .../IO/Streamer/StorageDriveTests_Windows.cpp | 26 +- .../AzCore/Tests/Streamer/BlockCacheTests.cpp | 16 +- .../Tests/Streamer/FullDecompressorTests.cpp | 2 +- .../AzCore/Tests/Streamer/IStreamerMock.h | 1 + .../Tests/Streamer/ReadSplitterTests.cpp | 10 +- .../AzCore/Tests/Streamer/SchedulerTests.cpp | 7 +- .../StreamStackEntryConformityTests.h | 1 + Code/Framework/AzCore/Tests/StreamerTests.cpp | 1 + .../Asset/AssetSystemComponent.cpp | 1 + .../AzFramework/IO/RemoteStorageDrive.cpp | 42 +- .../AzFramework/IO/RemoteStorageDrive.h | 11 +- .../Physics/Common/PhysicsSimulatedBody.cpp | 1 + .../Common/PhysicsSimulatedBodyAutomation.cpp | 1 + .../Common/PhysicsSimulatedBodyEvents.cpp | 1 + .../AzFramework/Physics/PhysicsScene.cpp | 1 + .../AzFramework/Physics/PhysicsSystem.cpp | 1 + .../AzFramework/Script/ScriptComponent.cpp | 1 + .../ToolsAssetCatalogComponent.h | 1 + .../Model/AssetCompleterModel.h | 5 +- .../AssetBuilder/AssetBuilderComponent.cpp | 1 + .../Shader/ShaderVariantAsyncLoader.h | 6 +- .../Shader/PrecompiledShaderAssetSourceData.h | 1 + .../RPI/Code/Source/RPI.Public/Culling.cpp | 24 +- .../Shader/Metrics/ShaderMetricsSystem.cpp | 4 +- .../Tests/Common/AssetManagerTestFixture.cpp | 2 + .../Atom/Utils/AssetCollectionAsyncLoader.h | 1 + .../Code/Source/AtomActorInstance.cpp | 2 + .../Code/Rendering/SharedBuffer.cpp | 2 + .../Code/Source/Engine/ATLEntities.cpp | 18 + .../Code/Source/Engine/ATLEntities.h | 14 +- .../Code/Source/Engine/FileCacheManager.cpp | 1 + .../Code/Tests/AudioSystemTest.cpp | 1 + .../Code/Tests/Mocks/FileCacheManagerMock.h | 5 + .../Code/EMotionFX/Source/ActorInstance.cpp | 2 + .../Code/Tests/TestAssetCode/SimpleActors.cpp | 2 + .../Asset/AssetSystemDebugComponent.cpp | 2 + .../Audio/AudioAreaEnvironmentComponent.cpp | 1 + .../ClothComponentMesh/ActorClothColliders.h | 1 + Gems/NvCloth/Code/Source/Utils/AssetHelper.h | 1 + .../Joints/JointsSubComponentModeAngleCone.h | 1 + .../Joints/JointsSubComponentModeSnap.h | 1 + .../Code/Source/ForceRegionComponent.cpp | 2 + .../Code/Source/Joint/PhysXJointUtils.cpp | 14 +- .../PhysX/Code/Source/Joint/PhysXJointUtils.h | 7 + Gems/PhysX/Code/Source/JointComponent.cpp | 11 +- Gems/PhysX/Code/Source/Material.cpp | 3 +- .../PhysXCharacters/API/CharacterUtils.cpp | 11 +- .../PhysXCharacters/API/RagdollNode.cpp | 11 +- .../Pipeline/HeightFieldAssetHandler.cpp | 3 +- .../Code/Source/Pipeline/StreamWrapper.h | 1 + Gems/PhysX/Code/Source/Scene/PhysXScene.cpp | 18 +- Gems/PhysX/Code/Source/System/PhysXSystem.cpp | 18 +- Gems/PhysX/Code/Tests/PhysXTestUtil.cpp | 1 + .../Code/Source/SystemComponent.cpp | 23 +- .../Editor/Assets/ScriptCanvasMemoryAsset.cpp | 9 +- .../Windows/Tools/UpgradeTool/FileSaver.cpp | 2 + .../Code/Source/ScriptEventsSystemComponent.h | 1 + .../WhiteBoxVertexTranslationModifier.h | 1 + 87 files changed, 882 insertions(+), 604 deletions(-) diff --git a/Code/Editor/GameEngine.cpp b/Code/Editor/GameEngine.cpp index db4c587f54..3753b5fa37 100644 --- a/Code/Editor/GameEngine.cpp +++ b/Code/Editor/GameEngine.cpp @@ -18,6 +18,7 @@ // AzCore #include #include +#include #include #include diff --git a/Code/Framework/AtomCore/AtomCore/Instance/InstanceDatabase.h b/Code/Framework/AtomCore/AtomCore/Instance/InstanceDatabase.h index 4b4ad572c2..de98ce97b9 100644 --- a/Code/Framework/AtomCore/AtomCore/Instance/InstanceDatabase.h +++ b/Code/Framework/AtomCore/AtomCore/Instance/InstanceDatabase.h @@ -17,6 +17,11 @@ #include #include +namespace AZStd +{ + class any; +} + namespace AZ { namespace Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h index e4d2c7612e..697ca81a49 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include namespace AZ { diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp index 4794b04626..7c9593fe3d 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp @@ -7,11 +7,61 @@ */ #include +#include +#include +#include +#include +#include + +#include +#include namespace AZ::Data { + namespace Internal + { + struct AssetDataStreamPrivate + { + //! Optional data buffer that's been directly passed in through Open(), instead of reading data from a file. + AZStd::vector m_preloadedData; + //! The current active streamer read request - tracked in case we need to cancel it prematurely + AZ::IO::FileRequestPtr m_curReadRequest{ nullptr }; + + //! Synchronization for the read request, so that it's possible to block until completion. + AZStd::mutex m_readRequestMutex; + AZStd::condition_variable m_readRequestActive; + + void SetReadRequest(AZ::IO::FileRequestPtr&& req) + { + AZStd::scoped_lock lock(m_readRequestMutex); + // The read request finished, so stop tracking it. + m_curReadRequest = AZStd::move(req); + } + void BlockUntilReadComplete() + { + AZStd::unique_lock lock(m_readRequestMutex); + m_readRequestActive.wait( + lock, + [this] + { + return m_curReadRequest == nullptr; + }); + lock.unlock(); + } + void CancelRequest() + { + AZStd::scoped_lock lock(m_readRequestMutex); + if (m_curReadRequest) + { + auto streamer = Interface::Get(); + m_curReadRequest = streamer->Cancel(m_curReadRequest); + } + } + }; + } // namespace Internal AssetDataStream::AssetDataStream(AZ::IO::IStreamerTypes::RequestMemoryAllocator* bufferAllocator) : m_bufferAllocator(bufferAllocator ? bufferAllocator : &m_defaultAllocator) + , m_privateData(new Internal::AssetDataStreamPrivate) { ClearInternalStateData(); } @@ -22,6 +72,7 @@ namespace AZ::Data { Close(); } + delete m_privateData; } @@ -53,9 +104,9 @@ namespace AZ::Data OpenInternal(data.size(), "(mem buffer)"); // Directly take ownership of the provided buffer - m_preloadedData = AZStd::move(data); - m_buffer = m_preloadedData.data(); - m_loadedSize = m_preloadedData.size(); + m_privateData->m_preloadedData = AZStd::move(data); + m_buffer = m_privateData->m_preloadedData.data(); + m_loadedSize = m_privateData->m_preloadedData.size(); } void AssetDataStream::Open(const AZStd::string& filePath, size_t fileOffset, size_t assetSize, @@ -65,7 +116,7 @@ namespace AZ::Data AZ_PROFILE_FUNCTION(AzCore); AZ_Assert(!m_isOpen, "Attempting to open the stream when it is already open."); - AZ_Assert(!m_curReadRequest, "Queueing an asset stream load while one is still in progress."); + AZ_Assert(!m_privateData->m_curReadRequest, "Queueing an asset stream load while one is still in progress."); AZ_Assert(!filePath.empty(), "AssetDataStream::Open called without a valid file name."); // Initialize the state variables and start tracking the overall load timings @@ -97,11 +148,8 @@ namespace AZ::Data "Buffer for %s was expected to be %zu bytes, but is %zu bytes.", m_filePath.c_str(), m_requestedAssetSize, m_loadedSize); - { - AZStd::scoped_lock lock(m_readRequestMutex); - // The read request finished, so stop tracking it. - m_curReadRequest = nullptr; - } + // The read request finished, so stop tracking it. + m_privateData->SetReadRequest(nullptr); // Call the load callback to start processing the loaded data. if (loadCallback) @@ -115,21 +163,22 @@ namespace AZ::Data } // Notify that the load is complete, in case anyone is using BlockUntilLoadComplete to block. - m_readRequestActive.notify_one(); + m_privateData->m_readRequestActive.notify_one(); }; // Queue the raw file load with the file streamer. auto streamer = AZ::Interface::Get(); - m_curReadRequest = streamer->Read( + m_privateData->m_curReadRequest = + streamer->Read( m_filePath, *m_bufferAllocator, m_requestedAssetSize, deadline, priority, m_fileOffset); m_curDeadline = deadline; m_curPriority = priority; - streamer->SetRequestCompleteCallback(m_curReadRequest, streamerCallback); + streamer->SetRequestCompleteCallback(m_privateData->m_curReadRequest, streamerCallback); - streamer->QueueRequest(m_curReadRequest); + streamer->QueueRequest(m_privateData->m_curReadRequest); } else { @@ -139,19 +188,19 @@ namespace AZ::Data loadCallback(AZ::IO::IStreamerTypes::RequestStatus::Completed); } - m_readRequestActive.notify_one(); + m_privateData->m_readRequestActive.notify_one(); } } void AssetDataStream::Reschedule(AZStd::chrono::milliseconds newDeadline, AZ::IO::IStreamerTypes::Priority newPriority) { - if (m_curReadRequest && (newDeadline < m_curDeadline || newPriority > m_curPriority)) + if (m_privateData->m_curReadRequest && (newDeadline < m_curDeadline || newPriority > m_curPriority)) { auto deadline = AZStd::GetMin(m_curDeadline, newDeadline); auto priority = AZStd::GetMax(m_curPriority, newPriority); auto streamer = Interface::Get(); - m_curReadRequest = streamer->RescheduleRequest(m_curReadRequest, deadline, priority); + m_privateData->m_curReadRequest = streamer->RescheduleRequest(m_privateData->m_curReadRequest, deadline, priority); m_curDeadline = deadline; m_curPriority = priority; } @@ -159,15 +208,13 @@ namespace AZ::Data void AssetDataStream::BlockUntilLoadComplete() { - AZStd::unique_lock lock(m_readRequestMutex); - m_readRequestActive.wait(lock, [this] { return m_curReadRequest == nullptr; }); - lock.unlock(); + m_privateData->BlockUntilReadComplete(); } void AssetDataStream::ClearInternalStateData() { // Clear all our internal state data. - m_preloadedData.resize(0); + m_privateData->m_preloadedData.resize(0); m_buffer = nullptr; m_loadedSize = 0; m_requestedAssetSize = 0; @@ -204,10 +251,10 @@ namespace AZ::Data void AssetDataStream::Close() { AZ_Assert(m_isOpen, "Attempting to close a stream that hasn't been opened."); - AZ_Assert(m_curReadRequest == nullptr, "Attempting to close a stream with a read request in flight."); + AZ_Assert(m_privateData->m_curReadRequest == nullptr, "Attempting to close a stream with a read request in flight."); // Destroy the asset buffer and unlock the allocator, so the allocator itself knows that it is no longer needed. - if (m_buffer != m_preloadedData.data()) + if (m_buffer != m_privateData->m_preloadedData.data()) { m_bufferAllocator->Release(m_buffer); } @@ -221,12 +268,7 @@ namespace AZ::Data void AssetDataStream::RequestCancel() { - AZStd::scoped_lock lock(m_readRequestMutex); - if (m_curReadRequest) - { - auto streamer = Interface::Get(); - m_curReadRequest = streamer->Cancel(m_curReadRequest); - } + m_privateData->CancelRequest(); } void AssetDataStream::Seek(AZ::IO::OffsetType bytes, AZ::IO::GenericStream::SeekMode mode) diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h index 79822c8db2..f095e31562 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h @@ -9,17 +9,26 @@ #include #include -#include -#include -#include -#include -#include +#include + + +namespace AZStd +{ + template + class vector; +} namespace AZ::Data { + namespace Internal + { + struct AssetDataStreamPrivate; + } + class AssetDataStream : public AZ::IO::GenericStream { public: + using VectorDataSource = AZStd::vector; // The default Generic Stream APIs in this class will only allow for a single sequential pass // through the data, no seeking. Reads will block when pages aren't available yet, and // pages will be marked for recycling once reading has progressed beyond them. @@ -29,10 +38,10 @@ namespace AZ::Data ~AssetDataStream() override; // Open the AssetDataStream and make a copy of the provided memory buffer. - void Open(const AZStd::vector& data); + void Open(const VectorDataSource& data); // Open the AssetDataStream and directly take ownership of a pre-populated memory buffer. - void Open(AZStd::vector&& data); + void Open(VectorDataSource&& data); // Open the AssetDataStream and load it via file streaming using OnCompleteCallback = AZStd::function; @@ -91,6 +100,8 @@ namespace AZ::Data void ClearInternalStateData(); + Internal::AssetDataStreamPrivate* m_privateData; + //! The allocator to use for allocating / deallocating asset buffers AZ::IO::IStreamerTypes::RequestMemoryAllocator* m_bufferAllocator{ nullptr }; @@ -106,9 +117,6 @@ namespace AZ::Data //! The amount of data that's expected to be loaded. size_t m_requestedAssetSize{ 0 }; - //! Optional data buffer that's been directly passed in through Open(), instead of reading data from a file. - AZStd::vector m_preloadedData; - //! The buffer that will hold the raw data after it's loaded from the file. void* m_buffer{ nullptr }; @@ -119,19 +127,12 @@ namespace AZ::Data //! The current offset representing how far we've read into the buffer. size_t m_curOffset{ 0 }; - //! The current active streamer read request - tracked in case we need to cancel it prematurely - AZ::IO::FileRequestPtr m_curReadRequest{ nullptr }; - //! The current request deadline. Used to avoid requesting a reschedule to the same (current) deadline. AZStd::chrono::milliseconds m_curDeadline{ AZ::IO::IStreamerTypes::s_noDeadline }; //! The current request priority. Used to avoid requesting a reschedule to the same (current) priority. AZ::IO::IStreamerTypes::Priority m_curPriority{ AZ::IO::IStreamerTypes::s_priorityMedium }; - //! Synchronization for the read request, so that it's possible to block until completion. - AZStd::mutex m_readRequestMutex; - AZStd::condition_variable m_readRequestActive; - //! Track whether or not the stream is currently open bool m_isOpen{ false }; diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp index afe3330bd3..b4b1a0d81c 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.h b/Code/Framework/AzCore/AzCore/Asset/AssetManager.h index 9666d434c1..663de2c058 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include // used as allocator for most components #include diff --git a/Code/Framework/AzCore/AzCore/IO/IStreamer.h b/Code/Framework/AzCore/AzCore/IO/IStreamer.h index 438384e687..d59ee5007e 100644 --- a/Code/Framework/AzCore/AzCore/IO/IStreamer.h +++ b/Code/Framework/AzCore/AzCore/IO/IStreamer.h @@ -15,14 +15,18 @@ #include #include #include +#include // These Streamer includes need to be moved to Streamer internals/implementation, // and pull out only what we need for visibility at IStreamer.h interface declaration. #include -#include namespace AZ::IO { + class ExternalFileRequest; + class FileRequestHandle; + + using FileRequestPtr = AZStd::intrusive_ptr; /** * Data Streamer Interface */ diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp index 6c873f3050..ca38414eaa 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp @@ -137,18 +137,18 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { ReadFile(request, args); return; } else { - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { FlushCache(args.m_path); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FlushEntireCache(); } @@ -166,7 +166,7 @@ namespace AZ::IO { Section& delayed = m_delayedSections.front(); AZ_Assert(delayed.m_parent, "Delayed section doesn't have a reference to the original request."); - auto data = AZStd::get_if(&delayed.m_parent->GetCommand()); + auto data = AZStd::get_if(&delayed.m_parent->GetCommand()); AZ_Assert(data, "A request in the delayed queue of the BlockCache didn't have a parent with read data."); // This call can add the same section to the back of the queue if there's not // enough space. Because of this the entry needs to be removed from the delayed @@ -233,7 +233,7 @@ namespace AZ::IO } } - void BlockCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + void BlockCache::ReadFile(FileRequest* request, Requests::ReadData& data) { if (!m_next) { @@ -250,7 +250,7 @@ namespace AZ::IO m_numMetaDataRetrievalInProgress--; if (fileSizeRequest.GetStatus() == IStreamerTypes::RequestStatus::Completed) { - auto& requestInfo = AZStd::get(fileSizeRequest.GetCommand()); + auto& requestInfo = AZStd::get(fileSizeRequest.GetCommand()); if (requestInfo.m_found) { ContinueReadFile(request, requestInfo.m_fileSize); @@ -272,7 +272,7 @@ namespace AZ::IO Section main; Section epilog; - auto& data = AZStd::get(request->GetCommand()); + auto& data = AZStd::get(request->GetCommand()); if (!SplitRequest(prolog, main, epilog, data.m_path, fileLength, data.m_offset, data.m_size, reinterpret_cast(data.m_output))) diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h index 90fb7ea193..68aa2da689 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h @@ -21,6 +21,12 @@ namespace AZ::IO { + class RequestPath; + namespace Requests + { + struct ReadData; + } + struct BlockCacheConfig final : public IStreamerStackConfig { @@ -109,7 +115,7 @@ namespace AZ::IO using TimePoint = AZStd::chrono::system_clock::time_point; - void ReadFile(FileRequest* request, FileRequest::ReadData& data); + void ReadFile(FileRequest* request, Requests::ReadData& data); void ContinueReadFile(FileRequest* request, u64 fileLength); CacheResult ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath); CacheResult ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock); diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp index b80a1ea724..f155d26eef 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp @@ -101,12 +101,12 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { args.m_range = FileRange::CreateRangeForEntireFile(); m_context->PushPreparedRequest(request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { args.m_range = FileRange::CreateRangeForEntireFile(); m_context->PushPreparedRequest(request); @@ -125,28 +125,28 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { ReadFile(request, args); return; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { CreateDedicatedCache(request, args); return; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { DestroyDedicatedCache(request, args); return; } else { - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { FlushCache(args.m_path); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FlushEntireCache(); } @@ -200,7 +200,7 @@ namespace AZ::IO } } - void DedicatedCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + void DedicatedCache::ReadFile(FileRequest* request, Requests::ReadData& data) { size_t index = FindCache(data.m_path, data.m_offset); if (index == s_fileNotFound) @@ -255,7 +255,7 @@ namespace AZ::IO StreamStackEntry::CollectStatistics(statistics); } - void DedicatedCache::CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data) + void DedicatedCache::CreateDedicatedCache(FileRequest* request, Requests::CreateDedicatedCacheData& data) { size_t index = FindCache(data.m_path, data.m_range); if (index == s_fileNotFound) @@ -276,7 +276,7 @@ namespace AZ::IO m_context->MarkRequestAsCompleted(request); } - void DedicatedCache::DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data) + void DedicatedCache::DestroyDedicatedCache(FileRequest* request, Requests::DestroyDedicatedCacheData& data) { size_t index = FindCache(data.m_path, data.m_range); if (index != s_fileNotFound) diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h index 0ef2d879d3..a69dcdbd7f 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h @@ -11,15 +11,21 @@ #include #include #include -#include #include +#include #include -#include #include +#include #include namespace AZ::IO { + namespace Requests + { + struct CreateDedicatedCacheData; + struct DestroyDedicatedCacheData; + } // namespace Requests + struct DedicatedCacheConfig final : public IStreamerStackConfig { @@ -56,16 +62,19 @@ namespace AZ::IO void UpdateStatus(Status& status) const override; - void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; + void UpdateCompletionEstimates( + AZStd::chrono::system_clock::time_point now, + AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, + StreamerContext::PreparedQueue::iterator pendingEnd) override; void CollectStatistics(AZStd::vector& statistics) const override; private: - void CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data); - void DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data); + void CreateDedicatedCache(FileRequest* request, Requests::CreateDedicatedCacheData& data); + void DestroyDedicatedCache(FileRequest* request, Requests::DestroyDedicatedCacheData& data); - void ReadFile(FileRequest* request, FileRequest::ReadData& data); + void ReadFile(FileRequest* request, AZ::IO::Requests::ReadData& data); size_t FindCache(const RequestPath& filename, FileRange range); size_t FindCache(const RequestPath& filename, u64 offset); diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp index fc05b77b36..2f96d224e6 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp @@ -12,22 +12,30 @@ #include #include -namespace AZ::IO +// +// Command structures. +// + +namespace AZ::IO::Requests { - // - // Command structures. - // + ReadData::ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead) + : m_path(path) + , m_output(output) + , m_outputSize(outputSize) + , m_offset(offset) + , m_size(size) + , m_sharedRead(sharedRead) + { + } - FileRequest::ExternalRequestData::ExternalRequestData(FileRequestPtr&& request) - : m_request(AZStd::move(request)) - {} - - FileRequest::RequestPathStoreData::RequestPathStoreData(RequestPath path) - : m_path(AZStd::move(path)) - {} - - FileRequest::ReadRequestData::ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + ReadRequestData::ReadRequestData( + RequestPath path, + void* output, + u64 outputSize, + u64 offset, + u64 size, + AZStd::chrono::system_clock::time_point deadline, + IStreamerTypes::Priority priority) : m_path(AZStd::move(path)) , m_allocator(nullptr) , m_deadline(deadline) @@ -37,10 +45,16 @@ namespace AZ::IO , m_size(size) , m_priority(priority) , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. - {} + { + } - FileRequest::ReadRequestData::ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, - u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + ReadRequestData::ReadRequestData( + RequestPath path, + IStreamerTypes::RequestMemoryAllocator* allocator, + u64 offset, + u64 size, + AZStd::chrono::system_clock::time_point deadline, + IStreamerTypes::Priority priority) : m_path(AZStd::move(path)) , m_allocator(allocator) , m_deadline(deadline) @@ -50,9 +64,10 @@ namespace AZ::IO , m_size(size) , m_priority(priority) , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. - {} + { + } - FileRequest::ReadRequestData::~ReadRequestData() + ReadRequestData::~ReadRequestData() { if (m_allocator != nullptr) { @@ -64,65 +79,81 @@ namespace AZ::IO } } - FileRequest::ReadData::ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead) - : m_output(output) - , m_outputSize(outputSize) - , m_path(path) - , m_offset(offset) - , m_size(size) - , m_sharedRead(sharedRead) - {} + CreateDedicatedCacheData::CreateDedicatedCacheData(RequestPath path, const FileRange& range) + : m_path(AZStd::move(path)) + , m_range(range) + { + } - FileRequest::CompressedReadData::CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize) + DestroyDedicatedCacheData::DestroyDedicatedCacheData(RequestPath path, const FileRange& range) + : m_path(AZStd::move(path)) + , m_range(range) + { + } + + ExternalRequestData::ExternalRequestData(FileRequestPtr&& request) + : m_request(AZStd::move(request)) + { + } + + RequestPathStoreData::RequestPathStoreData(RequestPath path) + : m_path(AZStd::move(path)) + { + } + + CompressedReadData::CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize) : m_compressionInfo(AZStd::move(compressionInfo)) , m_output(output) , m_readOffset(readOffset) , m_readSize(readSize) - {} + { + } - FileRequest::FileExistsCheckData::FileExistsCheckData(const RequestPath& path) + FileExistsCheckData::FileExistsCheckData(const RequestPath& path) : m_path(path) - {} + { + } - FileRequest::FileMetaDataRetrievalData::FileMetaDataRetrievalData(const RequestPath& path) + FileMetaDataRetrievalData::FileMetaDataRetrievalData(const RequestPath& path) : m_path(path) - {} + { + } - FileRequest::CancelData::CancelData(FileRequestPtr target) + CancelData::CancelData(FileRequestPtr target) : m_target(AZStd::move(target)) - {} + { + } - FileRequest::FlushData::FlushData(RequestPath path) + FlushData::FlushData(RequestPath path) : m_path(AZStd::move(path)) - {} + { + } - FileRequest::RescheduleData::RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, + RescheduleData::RescheduleData( + FileRequestPtr target, + AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority) : m_target(AZStd::move(target)) , m_newDeadline(newDeadline) , m_newPriority(newPriority) - {} + { + } - FileRequest::CreateDedicatedCacheData::CreateDedicatedCacheData(RequestPath path, const FileRange& range) - : m_path(AZStd::move(path)) - , m_range(range) - {} - - FileRequest::DestroyDedicatedCacheData::DestroyDedicatedCacheData(RequestPath path, const FileRange& range) - : m_path(AZStd::move(path)) - , m_range(range) - {} - - FileRequest::ReportData::ReportData(ReportType reportType) + Requests::ReportData::ReportData(ReportType reportType) : m_reportType(reportType) - {} + { + } - FileRequest::CustomData::CustomData(AZStd::any data, bool failWhenUnhandled) + CustomData::CustomData(AZStd::any data, bool failWhenUnhandled) : m_data(AZStd::move(data)) , m_failWhenUnhandled(failWhenUnhandled) - {} - + { + } +} // namespace AZ::IO::Requests +namespace AZ::IO +{ + using namespace Requests; // // FileRequest // @@ -263,7 +294,7 @@ namespace AZ::IO SetOptionalParent(parent); } - void FileRequest::CreateReport(ReportData::ReportType reportType) + void FileRequest::CreateReport(Requests::ReportType reportType) { AZ_Assert(AZStd::holds_alternative(m_command), "Attempting to set FileRequest to 'Report', but another task was already assigned."); @@ -361,7 +392,7 @@ namespace AZ::IO "Request does not contain a valid command. It may have been reset already or was never assigned a command."); return true; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { return args.m_failWhenUnhandled; } diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h index dd4dad2387..7f5874c95d 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h @@ -27,7 +27,252 @@ namespace AZ::IO class ExternalFileRequest; using FileRequestPtr = AZStd::intrusive_ptr; +} // namespace AZ::IO +namespace AZ::IO::Requests +{ + //! Request to read data. This is a translated request and holds an absolute path and has been + //! resolved to the archive file if needed. + struct ReadData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + + ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead); + + const RequestPath& m_path; //!< The path to the file that contains the requested data. + void* m_output; //!< Target output to write the read data to. + u64 m_outputSize; //!< Size of memory m_output points to. This needs to be at least as big as m_size, but can be bigger. + u64 m_offset; //!< The offset in bytes into the file. + u64 m_size; //!< The number of bytes to read from the file. + bool m_sharedRead; //!< True if other code will be reading from the file or the stack entry can exclusively lock. + }; + + //! Request to read data. This is an untranslated request and holds a relative path. The Scheduler + //! will translate this to the appropriate ReadData or CompressedReadData. + struct ReadRequestData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + + ReadRequestData( + RequestPath path, + void* output, + u64 outputSize, + u64 offset, + u64 size, + AZStd::chrono::system_clock::time_point deadline, + IStreamerTypes::Priority priority); + ReadRequestData( + RequestPath path, + IStreamerTypes::RequestMemoryAllocator* allocator, + u64 offset, + u64 size, + AZStd::chrono::system_clock::time_point deadline, + IStreamerTypes::Priority priority); + ~ReadRequestData(); + + RequestPath m_path; //!< Relative path to the target file. + IStreamerTypes::RequestMemoryAllocator* m_allocator; //!< Allocator used to manage the memory for this request. + AZStd::chrono::system_clock::time_point m_deadline; //!< Time by which this request should have been completed. + void* m_output; //!< The memory address assigned (during processing) to store the read data to. + u64 m_outputSize; //!< The memory size of the addressed used to store the read data. + u64 m_offset; //!< The offset in bytes into the file. + u64 m_size; //!< The number of bytes to read from the file. + IStreamerTypes::Priority m_priority; //!< Priority used for ordering requests. This is used when requests have the same deadline. + IStreamerTypes::MemoryType m_memoryType; //!< The type of memory provided by the allocator if used. + }; + + //! Creates a cache dedicated to a single file. This is best used for files where blocks are read from + //! periodically such as audio banks of video files. + struct CreateDedicatedCacheData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + CreateDedicatedCacheData(RequestPath path, const FileRange& range); + + RequestPath m_path; + FileRange m_range; + }; + + //! Destroys a cache dedicated to a single file that was previously created by CreateDedicatedCache + struct DestroyDedicatedCacheData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + DestroyDedicatedCacheData(RequestPath path, const FileRange& range); + + RequestPath m_path; + FileRange m_range; + }; + + enum class ReportType : int8_t + { + FileLocks + }; + + struct ReportData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityLow; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit ReportData(ReportType reportType); + + ReportType m_reportType; + }; + + //! Stores a reference to the external request so it stays alive while the request is being processed. + //! This is needed because Streamer supports fire-and-forget requests since completion can be handled by + //! registering a callback. + struct ExternalRequestData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + + explicit ExternalRequestData(FileRequestPtr&& request); + + FileRequestPtr m_request; //!< The request that was send to Streamer. + }; + + //! Stores an instance of a RequestPath. To reduce copying instances of a RequestPath functions that + //! need a path take them by reference to the original request. In some cases a path originates from + //! within in the stack and temporary storage is needed. This struct allows for that temporary storage + //! so it can be safely referenced later. + struct RequestPathStoreData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + + explicit RequestPathStoreData(RequestPath path); + + RequestPath m_path; + }; + + //! Request to read and decompress data. + struct CompressedReadData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + + CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize); + + CompressionInfo m_compressionInfo; + void* m_output; //!< Target output to write the read data to. + u64 m_readOffset; //!< The offset into the decompressed to start copying from. + u64 m_readSize; //!< Number of bytes to read from the decompressed file. + }; + + //! Holds the progress of an operation chain until this request is explicitly completed. + struct WaitData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + }; + + //! Checks to see if any node in the stack can find a file at the provided path. + struct FileExistsCheckData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit FileExistsCheckData(const RequestPath& path); + + const RequestPath& m_path; + bool m_found{ false }; + }; + + //! Searches for a file in the stack and retrieves the meta data. This may be slower than a file exists + //! check. + struct FileMetaDataRetrievalData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit FileMetaDataRetrievalData(const RequestPath& path); + + const RequestPath& m_path; + u64 m_fileSize{ 0 }; + bool m_found{ false }; + }; + + //! Cancels a request in the stream stack, if possible. + struct CancelData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHighest; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit CancelData(FileRequestPtr target); + + FileRequestPtr m_target; //!< The request that will be canceled. + }; + + //! Updates the priority and deadline of a request that has not been queued yet. + struct RescheduleData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority); + + FileRequestPtr m_target; //!< The request that will be rescheduled. + AZStd::chrono::system_clock::time_point m_newDeadline; //!< The new deadline for the request. + IStreamerTypes::Priority m_newPriority; //!< The new priority for the request. + }; + + //! Flushes all references to the provided file in the streaming stack. + struct FlushData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit FlushData(RequestPath path); + + RequestPath m_path; + }; + + //! Flushes all caches in the streaming stack. + struct FlushAllData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + }; + + //! Data for a custom command. This can be used by nodes added extensions that need data that can't be stored + //! in the already provided data. + struct CustomData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + + CustomData(AZStd::any data, bool failWhenUnhandled); + + AZStd::any m_data; //!< The data for the custom request. + bool m_failWhenUnhandled; //!< Whether or not the request is marked as failed or success when no node process it. + }; + using CommandVariant = AZStd::variant< + AZStd::monostate, + ExternalRequestData, + RequestPathStoreData, + ReadRequestData, + ReadData, + CompressedReadData, + WaitData, + FileExistsCheckData, + FileMetaDataRetrievalData, + CancelData, + RescheduleData, + FlushData, + FlushAllData, + CreateDedicatedCacheData, + DestroyDedicatedCacheData, + ReportData, + CustomData>; + +} // namespace AZ::IO::Requests + +namespace AZ::IO +{ class FileRequest final { public: @@ -36,218 +281,7 @@ namespace AZ::IO friend class StreamerContext; friend class ExternalFileRequest; - //! Stores a reference to the external request so it stays alive while the request is being processed. - //! This is needed because Streamer supports fire-and-forget requests since completion can be handled by - //! registering a callback. - struct ExternalRequestData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - explicit ExternalRequestData(FileRequestPtr&& request); - - FileRequestPtr m_request; //!< The request that was send to Streamer. - }; - - //! Stores an instance of a RequestPath. To reduce copying instances of a RequestPath functions that - //! need a path take them by reference to the original request. In some cases a path originates from - //! within in the stack and temporary storage is needed. This struct allows for that temporary storage - //! so it can be safely referenced later. - struct RequestPathStoreData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - explicit RequestPathStoreData(RequestPath path); - - RequestPath m_path; - }; - - //! Request to read data. This is an untranslated request and holds a relative path. The Scheduler - //! will translate this to the appropriate ReadData or CompressedReadData. - struct ReadRequestData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); - ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); - ~ReadRequestData(); - - RequestPath m_path; //!< Relative path to the target file. - IStreamerTypes::RequestMemoryAllocator* m_allocator; //!< Allocator used to manage the memory for this request. - AZStd::chrono::system_clock::time_point m_deadline; //!< Time by which this request should have been completed. - void* m_output; //!< The memory address assigned (during processing) to store the read data to. - u64 m_outputSize; //!< The memory size of the addressed used to store the read data. - u64 m_offset; //!< The offset in bytes into the file. - u64 m_size; //!< The number of bytes to read from the file. - IStreamerTypes::Priority m_priority; //!< Priority used for ordering requests. This is used when requests have the same deadline. - IStreamerTypes::MemoryType m_memoryType; //!< The type of memory provided by the allocator if used. - }; - - //! Request to read data. This is a translated request and holds an absolute path and has been - //! resolved to the archive file if needed. - struct ReadData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead); - - const RequestPath& m_path; //!< The path to the file that contains the requested data. - void* m_output; //!< Target output to write the read data to. - u64 m_outputSize; //!< Size of memory m_output points to. This needs to be at least as big as m_size, but can be bigger. - u64 m_offset; //!< The offset in bytes into the file. - u64 m_size; //!< The number of bytes to read from the file. - bool m_sharedRead; //!< True if other code will be reading from the file or the stack entry can exclusively lock. - }; - - //! Request to read and decompress data. - struct CompressedReadData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize); - - CompressionInfo m_compressionInfo; - void* m_output; //!< Target output to write the read data to. - u64 m_readOffset; //!< The offset into the decompressed to start copying from. - u64 m_readSize; //!< Number of bytes to read from the decompressed file. - }; - - //! Holds the progress of an operation chain until this request is explicitly completed. - struct WaitData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - }; - - //! Checks to see if any node in the stack can find a file at the provided path. - struct FileExistsCheckData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit FileExistsCheckData(const RequestPath& path); - - const RequestPath& m_path; - bool m_found{ false }; - }; - - //! Searches for a file in the stack and retrieves the meta data. This may be slower than a file exists - //! check. - struct FileMetaDataRetrievalData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit FileMetaDataRetrievalData(const RequestPath& path); - - const RequestPath& m_path; - u64 m_fileSize{ 0 }; - bool m_found{ false }; - }; - - //! Cancels a request in the stream stack, if possible. - struct CancelData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHighest; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit CancelData(FileRequestPtr target); - - FileRequestPtr m_target; //!< The request that will be canceled. - }; - - //! Updates the priority and deadline of a request that has not been queued yet. - struct RescheduleData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority); - - FileRequestPtr m_target; //!< The request that will be rescheduled. - AZStd::chrono::system_clock::time_point m_newDeadline; //!< The new deadline for the request. - IStreamerTypes::Priority m_newPriority; //!< The new priority for the request. - }; - - //! Flushes all references to the provided file in the streaming stack. - struct FlushData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit FlushData(RequestPath path); - - RequestPath m_path; - }; - - //! Flushes all caches in the streaming stack. - struct FlushAllData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - }; - - //! Creates a cache dedicated to a single file. This is best used for files where blocks are read from - //! periodically such as audio banks of video files. - struct CreateDedicatedCacheData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - CreateDedicatedCacheData(RequestPath path, const FileRange& range); - - RequestPath m_path; - FileRange m_range; - }; - - //! Destroys a cache dedicated to a single file that was previously created by CreateDedicatedCache - struct DestroyDedicatedCacheData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - DestroyDedicatedCacheData(RequestPath path, const FileRange& range); - - RequestPath m_path; - FileRange m_range; - }; - - struct ReportData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityLow; - inline constexpr static bool s_failWhenUnhandled = false; - - enum class ReportType - { - FileLocks - }; - - explicit ReportData(ReportType reportType); - - ReportType m_reportType; - }; - - //! Data for a custom command. This can be used by nodes added extensions that need data that can't be stored - //! in the already provided data. - struct CustomData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - - CustomData(AZStd::any data, bool failWhenUnhandled); - - AZStd::any m_data; //!< The data for the custom request. - bool m_failWhenUnhandled; //!< Whether or not the request is marked as failed or success when no node process it. - }; - - using CommandVariant = AZStd::variant; + using CommandVariant = Requests::CommandVariant; using OnCompletionCallback = AZStd::function; AZ_CLASS_ALLOCATOR(FileRequest, SystemAllocator, 0); @@ -278,7 +312,7 @@ namespace AZ::IO void CreateFlushAll(); void CreateDedicatedCacheCreation(RequestPath path, const FileRange& range = {}, FileRequest* parent = nullptr); void CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range = {}, FileRequest* parent = nullptr); - void CreateReport(ReportData::ReportType reportType); + void CreateReport(Requests::ReportType reportType); void CreateCustom(AZStd::any data, bool failWhenUnhandled = true, FileRequest* parent = nullptr); void SetCompletionCallback(OnCompletionCallback callback); @@ -325,8 +359,17 @@ namespace AZ::IO //! Command and parameters for the request. CommandVariant m_command; - //! Status of the request. - AZStd::atomic m_status{ IStreamerTypes::RequestStatus::Pending }; + //! Estimated time this request will complete. This is an estimation and depends on many + //! factors which can cause it to change drastically from moment to moment. + AZStd::chrono::system_clock::time_point m_estimatedCompletion; + + //! The file request that has a dependency on this one. This can be null if there are no + //! other request depending on this one to complete. + FileRequest* m_parent{ nullptr }; + + + //! Id assigned when the request is added to the pending queue. + size_t m_pendingId{ 0 }; //! Called once the request has completed. This will always be called from the Streamer thread //! and thread safety is the responsibility of called function. When assigning a lambda avoid @@ -336,16 +379,8 @@ namespace AZ::IO //! a longer running task is needed consider using a job to do the work. OnCompletionCallback m_onCompletion; - //! Estimated time this request will complete. This is an estimation and depends on many - //! factors which can cause it to change drastically from moment to moment. - AZStd::chrono::system_clock::time_point m_estimatedCompletion; - - //! The file request that has a dependency on this one. This can be null if there are no - //! other request depending on this one to complete. - FileRequest* m_parent{ nullptr }; - - //! Id assigned when the request is added to the pending queue. - size_t m_pendingId{ 0 }; + //! Status of the request. + AZStd::atomic m_status{ IStreamerTypes::RequestStatus::Pending }; //! The number of dependent file request that need to complete before this one is done. u16 m_dependencies{ 0 }; diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp index 723a5d62c8..ac9344dd28 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp @@ -91,12 +91,12 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { PrepareReadRequest(request, args); } - else if constexpr (AZStd::is_same_v || - AZStd::is_same_v) + else if constexpr (AZStd::is_same_v || + AZStd::is_same_v) { PrepareDedicatedCache(request, args.m_path); } @@ -114,11 +114,11 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { m_pendingReads.push_back(request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { m_pendingFileExistChecks.push_back(request); } @@ -203,7 +203,7 @@ namespace AZ::IO { FileRequest* compressedRequest = m_processingJobs[i].m_waitRequest->GetParent(); AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto data = AZStd::get_if(&compressedRequest->GetCommand()); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); AZ_Assert(data, "Compressed request in the decompression queue in FullFileDecompressor didn't contain compression read data."); size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; @@ -255,7 +255,7 @@ namespace AZ::IO // Calculate the amount of time it will take to decompress the data. FileRequest* compressedRequest = m_readRequests[i]->GetParent(); - auto data = AZStd::get_if(&compressedRequest->GetCommand()); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; auto decompressionDuration = AZStd::chrono::microseconds( @@ -290,7 +290,7 @@ namespace AZ::IO void FullFileDecompressor::EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const { - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); if (data) { AZStd::chrono::microseconds processingTime = decompressionDelay; @@ -343,7 +343,7 @@ namespace AZ::IO m_numRunningJobs == 0; } - void FullFileDecompressor::PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data) + void FullFileDecompressor::PrepareReadRequest(FileRequest* request, Requests::ReadRequestData &data) { CompressionInfo info; if (CompressionUtils::FindCompressionInfo(info, data.m_path.GetRelativePath())) @@ -359,7 +359,7 @@ namespace AZ::IO { FileRequest* pathStorageRequest = m_context->GetNewInternalRequest(); pathStorageRequest->CreateRequestPathStore(request, AZStd::move(info.m_archiveFilename)); - auto& pathStorage = AZStd::get(pathStorageRequest->GetCommand()); + auto& pathStorage = AZStd::get(pathStorageRequest->GetCommand()); nextRequest->CreateRead(pathStorageRequest, data.m_output, data.m_outputSize, pathStorage.m_path, info.m_offset + data.m_offset, data.m_size, info.m_isSharedPak); @@ -370,13 +370,13 @@ namespace AZ::IO auto callback = [this, nextRequest](const FileRequest& checkRequest) { AZ_PROFILE_FUNCTION(AzCore); - auto check = AZStd::get_if(&checkRequest.GetCommand()); + auto check = AZStd::get_if(&checkRequest.GetCommand()); AZ_Assert(check, "Callback in FullFileDecompressor::PrepareReadRequest expected FileExistsCheck but got another command."); if (check->m_found) { FileRequest* originalRequest = m_context->RejectRequest(nextRequest); - if (AZStd::holds_alternative(originalRequest->GetCommand())) + if (AZStd::holds_alternative(originalRequest->GetCommand())) { originalRequest = m_context->RejectRequest(originalRequest); } @@ -412,12 +412,12 @@ namespace AZ::IO AZStd::visit([request, &info, nextRequest](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { nextRequest->CreateDedicatedCacheCreation(AZStd::move(info.m_archiveFilename), FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { nextRequest->CreateDedicatedCacheDestruction(AZStd::move(info.m_archiveFilename), FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); @@ -429,7 +429,7 @@ namespace AZ::IO auto callback = [this, nextRequest](const FileRequest& checkRequest) { AZ_PROFILE_FUNCTION(AzCore); - auto check = AZStd::get_if(&checkRequest.GetCommand()); + auto check = AZStd::get_if(&checkRequest.GetCommand()); AZ_Assert(check, "Callback in FullFileDecompressor::PrepareDedicatedCache expected FileExistsCheck but got another command."); if (check->m_found) @@ -461,7 +461,7 @@ namespace AZ::IO void FullFileDecompressor::FileExistsCheck(FileRequest* checkRequest) { - auto& fileCheckRequest = AZStd::get(checkRequest->GetCommand()); + auto& fileCheckRequest = AZStd::get(checkRequest->GetCommand()); CompressionInfo info; if (CompressionUtils::FindCompressionInfo(info, fileCheckRequest.m_path.GetRelativePath())) { @@ -487,7 +487,7 @@ namespace AZ::IO { if (m_readBufferStatus[i] == ReadBufferStatus::Unused) { - auto data = AZStd::get_if(&compressedReadRequest->GetCommand()); + auto data = AZStd::get_if(&compressedReadRequest->GetCommand()); AZ_Assert(data, "Compressed request that's starting a read in FullFileDecompressor didn't contain compression read data."); AZ_Assert(data->m_compressionInfo.m_decompressor, "FileRequest for FullFileDecompressor is missing a decompression callback."); @@ -549,7 +549,7 @@ namespace AZ::IO } else { - auto data = AZStd::get_if(&compressedRequest->GetCommand()); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); AZ_Assert(data, "Compressed request in FullFileDecompressor that finished unsuccessfully didn't contain compression read data."); CompressionInfo& info = data->m_compressionInfo; size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); @@ -591,7 +591,7 @@ namespace AZ::IO } FileRequest* waitRequest = m_readRequests[readSlot]; - AZ_Assert(AZStd::holds_alternative(waitRequest->GetCommand()), + AZ_Assert(AZStd::holds_alternative(waitRequest->GetCommand()), "File request waiting for decompression wasn't marked as being a wait operation."); FileRequest* compressedRequest = waitRequest->GetParent(); AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); @@ -610,7 +610,7 @@ namespace AZ::IO m_readBuffers[readSlot] = nullptr; AZ::Job* decompressionJob; - auto data = AZStd::get_if(&compressedRequest->GetCommand()); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); AZ_Assert(data, "Compressed request in FullFileDecompressor that's starting decompression didn't contain compression read data."); AZ_Assert(data->m_compressionInfo.m_decompressor, "FullFileDecompressor is queuing a decompression job but couldn't find a decompressor."); @@ -664,7 +664,7 @@ namespace AZ::IO FileRequest* compressedRequest = jobInfo.m_waitRequest->GetParent(); AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto data = AZStd::get_if(&compressedRequest->GetCommand()); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); AZ_Assert(data, "Compressed request in FullFileDecompressor that completed decompression didn't contain compression read data."); CompressionInfo& info = data->m_compressionInfo; size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); @@ -694,7 +694,7 @@ namespace AZ::IO FileRequest* compressedRequest = info.m_waitRequest->GetParent(); AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto request = AZStd::get_if(&compressedRequest->GetCommand()); + auto request = AZStd::get_if(&compressedRequest->GetCommand()); AZ_Assert(request, "Compressed request in FullFileDecompressor that's running full decompression didn't contain compression read data."); CompressionInfo& compressionInfo = request->m_compressionInfo; AZ_Assert(compressionInfo.m_decompressor, "Full decompressor job started, but there's no decompressor callback assigned."); @@ -719,7 +719,7 @@ namespace AZ::IO FileRequest* compressedRequest = info.m_waitRequest->GetParent(); AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto request = AZStd::get_if(&compressedRequest->GetCommand()); + auto request = AZStd::get_if(&compressedRequest->GetCommand()); AZ_Assert(request, "Compressed request in FullFileDecompressor that's running partial decompression didn't contain compression read data."); CompressionInfo& compressionInfo = request->m_compressionInfo; AZ_Assert(compressionInfo.m_decompressor, "Partial decompressor job started, but there's no decompressor callback assigned."); diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h index d9bd68f1a1..cb4226fd7c 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h @@ -21,6 +21,11 @@ namespace AZ::IO { + namespace Requests + { + struct ReadRequestData; + } + struct FullFileDecompressorConfig final : public IStreamerStackConfig { @@ -87,7 +92,7 @@ namespace AZ::IO bool IsIdle() const; - void PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data); + void PrepareReadRequest(FileRequest* request, Requests::ReadRequestData& data); void PrepareDedicatedCache(FileRequest* request, const RequestPath& path); void FileExistsCheck(FileRequest* checkRequest); diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp index a952e31a93..282a1e15c9 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp @@ -118,7 +118,7 @@ namespace AZ::IO return; } - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); if (data == nullptr) { StreamStackEntry::QueueRequest(request); @@ -156,7 +156,7 @@ namespace AZ::IO void ReadSplitter::QueueAlignedRead(FileRequest* request) { - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); if (data->m_size <= m_maxReadSize) @@ -187,7 +187,7 @@ namespace AZ::IO bool ReadSplitter::QueueAlignedRead(PendingRead& pending) { - auto data = AZStd::get_if(&pending.m_request->GetCommand()); + auto data = AZStd::get_if(&pending.m_request->GetCommand()); AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); while (pending.m_readSize > 0) @@ -237,7 +237,7 @@ namespace AZ::IO void ReadSplitter::QueueBufferedRead(FileRequest* request) { - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); PendingRead pendingRead; @@ -262,7 +262,7 @@ namespace AZ::IO bool ReadSplitter::QueueBufferedRead(PendingRead& pending) { - auto data = AZStd::get_if(&pending.m_request->GetCommand()); + auto data = AZStd::get_if(&pending.m_request->GetCommand()); AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); while (pending.m_readSize > 0) diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp index fe1d5a5eda..65f72946b0 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp @@ -6,9 +6,11 @@ * */ +#include + +#include #include #include -#include #include #include @@ -35,6 +37,10 @@ namespace AZ::IO m_threadData.m_streamStack = AZStd::move(streamStack); } + Scheduler::~Scheduler() + { + } + void Scheduler::Start(const AZStd::thread_desc& threadDesc) { if (!m_isRunning) @@ -222,10 +228,10 @@ namespace AZ::IO { using Command = AZStd::decay_t; if constexpr ( - AZStd::is_same_v || - AZStd::is_same_v) + AZStd::is_same_v || + AZStd::is_same_v) { - auto parentReadRequest = next->GetCommandFromChain(); + auto parentReadRequest = next->GetCommandFromChain(); AZ_Assert(parentReadRequest != nullptr, "The issued read request can't be found for the (compressed) read command."); size_t size = parentReadRequest->m_size; @@ -234,7 +240,7 @@ namespace AZ::IO AZ_Assert(parentReadRequest->m_allocator, "The read request was issued without a memory allocator or valid output address."); u64 recommendedSize = size; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { recommendedSize = m_recommendations.CalculateRecommendedMemorySize(size, parentReadRequest->m_offset); } @@ -249,12 +255,12 @@ namespace AZ::IO parentReadRequest->m_output = allocation.m_address; parentReadRequest->m_outputSize = allocation.m_size; parentReadRequest->m_memoryType = allocation.m_type; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { args.m_output = parentReadRequest->m_output; args.m_outputSize = allocation.m_size; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { args.m_output = parentReadRequest->m_output; } @@ -267,7 +273,7 @@ namespace AZ::IO } #endif - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { m_threadData.m_lastFilePath = args.m_path; m_threadData.m_lastFileOffset = args.m_offset + args.m_size; @@ -275,7 +281,7 @@ namespace AZ::IO m_processingSize += args.m_size; #endif } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { const CompressionInfo& info = args.m_compressionInfo; m_threadData.m_lastFilePath = info.m_archiveFilename; @@ -288,15 +294,15 @@ namespace AZ::IO "Streamer queued %zu: %s", next->GetCommand().index(), parentReadRequest->m_path.GetRelativePath()); m_threadData.m_streamStack->QueueRequest(next); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { return Thread_ProcessCancelRequest(next, args); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { return Thread_ProcessRescheduleRequest(next, args); } - else if constexpr (AZStd::is_same_v || AZStd::is_same_v) + else if constexpr (AZStd::is_same_v || AZStd::is_same_v) { AZ_PROFILE_INTERVAL_START_COLORED(AzCore, next, ProfilerColor, "Streamer queued %zu", next->GetCommand().index()); @@ -345,7 +351,7 @@ namespace AZ::IO #endif { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { if (args.m_output == nullptr && args.m_allocator != nullptr) { @@ -393,7 +399,7 @@ namespace AZ::IO } } - void Scheduler::Thread_ProcessCancelRequest(FileRequest* request, FileRequest::CancelData& data) + void Scheduler::Thread_ProcessCancelRequest(FileRequest* request, Requests::CancelData& data) { AZ_PROFILE_INTERVAL_START_COLORED(AzCore, request, ProfilerColor, "Streamer queued cancel"); auto& pending = m_context.GetPreparedRequests(); @@ -415,7 +421,7 @@ namespace AZ::IO m_threadData.m_streamStack->QueueRequest(request); } - void Scheduler::Thread_ProcessRescheduleRequest(FileRequest* request, FileRequest::RescheduleData& data) + void Scheduler::Thread_ProcessRescheduleRequest(FileRequest* request, Requests::RescheduleData& data) { AZ_PROFILE_INTERVAL_START_COLORED(AzCore, request, ProfilerColor, "Streamer queued reschedule"); auto& pendingRequests = m_context.GetPreparedRequests(); @@ -424,7 +430,7 @@ namespace AZ::IO if (pending->WorksOn(data.m_target)) { // Read requests are the only requests that use deadlines and dynamic priorities. - auto readRequest = pending->GetCommandFromChain(); + auto readRequest = pending->GetCommandFromChain(); if (readRequest) { readRequest->m_deadline = data.m_newDeadline; @@ -463,8 +469,8 @@ namespace AZ::IO // Order is the same for both requests, so prioritize the request that are at risk of missing // it's deadline. - const FileRequest::ReadRequestData* firstRead = first->GetCommandFromChain(); - const FileRequest::ReadRequestData* secondRead = second->GetCommandFromChain(); + const Requests::ReadRequestData* firstRead = first->GetCommandFromChain(); + const Requests::ReadRequestData* secondRead = second->GetCommandFromChain(); if (firstRead == nullptr || secondRead == nullptr) { @@ -496,11 +502,11 @@ namespace AZ::IO auto sameFile = [this](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { return m_threadData.m_lastFilePath == args.m_path; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { return m_threadData.m_lastFilePath == args.m_compressionInfo.m_archiveFilename; } @@ -517,11 +523,11 @@ namespace AZ::IO auto offset = [](auto&& args) -> s64 { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { return aznumeric_caster(args.m_offset); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { return aznumeric_caster(args.m_compressionInfo.m_offset); } diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h index 053a57d332..502002fd27 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -24,11 +25,19 @@ namespace AZ::IO { class FileRequest; + namespace Requests + { + struct CancelData; + struct RescheduleData; + } // namespace Requests + class Scheduler final { public: explicit Scheduler(AZStd::shared_ptr streamStack, u64 memoryAlignment = AZCORE_GLOBAL_NEW_ALIGNMENT, u64 sizeAlignment = 1, u64 granularity = 1_mib); + ~Scheduler(); + void Start(const AZStd::thread_desc& threadDesc); void Stop(); @@ -61,14 +70,14 @@ namespace AZ::IO bool Thread_ExecuteRequests(); bool Thread_PrepareRequests(AZStd::vector& outstandingRequests); void Thread_ProcessTillIdle(); - void Thread_ProcessCancelRequest(FileRequest* request, FileRequest::CancelData& data); - void Thread_ProcessRescheduleRequest(FileRequest* request, FileRequest::RescheduleData& data); + void Thread_ProcessCancelRequest(FileRequest* request, Requests::CancelData& data); + void Thread_ProcessRescheduleRequest(FileRequest* request, Requests::RescheduleData& data); enum class Order { - FirstRequest, //< The first request is the most important to process next. - SecondRequest, //< The second request is the most important to process next. - Equal //< Both requests are equally important. + FirstRequest, //!< The first request is the most important to process next. + SecondRequest, //!< The second request is the most important to process next. + Equal //!< Both requests are equally important. }; //! Determine which of the two provided requests is more important to process next. Order Thread_PrioritizeRequests(const FileRequest* first, const FileRequest* second) const; diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp index cfd191b68f..701eb563ec 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp @@ -60,9 +60,9 @@ namespace AZ::IO AZ_PROFILE_FUNCTION(AzCore); AZ_Assert(request, "PrepareRequest was provided a null request."); - if (AZStd::holds_alternative(request->GetCommand())) + if (AZStd::holds_alternative(request->GetCommand())) { - auto& readRequest = AZStd::get(request->GetCommand()); + auto& readRequest = AZStd::get(request->GetCommand()); FileRequest* read = m_context->GetNewInternalRequest(); read->CreateRead(request, readRequest.m_output, readRequest.m_outputSize, readRequest.m_path, @@ -79,29 +79,29 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v || - AZStd::is_same_v || - AZStd::is_same_v) + if constexpr (AZStd::is_same_v || + AZStd::is_same_v || + AZStd::is_same_v) { m_pendingRequests.push_back(request); return; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { CancelRequest(request, args.m_target); return; } else { - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { FlushCache(args.m_path); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FlushEntireCache(); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { Report(args); } @@ -118,15 +118,15 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { ReadFile(request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FileExistsRequest(request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FileMetaDataRetrievalRequest(request); } @@ -199,25 +199,25 @@ namespace AZ::IO AZStd::visit([&](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { targetFile = &args.m_path; readSize = args.m_size; offset = args.m_offset; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { targetFile = &args.m_compressionInfo.m_archiveFilename; readSize = args.m_compressionInfo.m_compressedSize; offset = args.m_compressionInfo.m_offset; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { readSize = 0; AZStd::chrono::microseconds averageTime = m_getFileExistsTimeAverage.CalculateAverage(); startTime += averageTime; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { readSize = 0; AZStd::chrono::microseconds averageTime = m_getFileMetaDataTimeAverage.CalculateAverage(); @@ -254,7 +254,7 @@ namespace AZ::IO { AZ_PROFILE_FUNCTION(AzCore); - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); AZ_Assert(data, "FileRequest queued on StorageDrive to be read didn't contain read data."); SystemFile* file = nullptr; @@ -342,7 +342,7 @@ namespace AZ::IO AZ_PROFILE_FUNCTION(AzCore); TIMED_AVERAGE_WINDOW_SCOPE(m_getFileExistsTimeAverage); - auto& fileExists = AZStd::get(request->GetCommand()); + auto& fileExists = AZStd::get(request->GetCommand()); size_t cacheIndex = FindFileInCache(fileExists.m_path); if (cacheIndex != s_fileNotFound) { @@ -360,7 +360,7 @@ namespace AZ::IO AZ_PROFILE_FUNCTION(AzCore); TIMED_AVERAGE_WINDOW_SCOPE(m_getFileMetaDataTimeAverage); - auto& command = AZStd::get(request->GetCommand()); + auto& command = AZStd::get(request->GetCommand()); // If the file is already open, use the file handle which usually is cheaper than asking for the file by name. size_t cacheIndex = FindFileInCache(command.m_path); if (cacheIndex != s_fileNotFound) @@ -446,11 +446,11 @@ namespace AZ::IO } } - void StorageDrive::Report(const FileRequest::ReportData& data) const + void StorageDrive::Report(const Requests::ReportData& data) const { switch (data.m_reportType) { - case FileRequest::ReportData::ReportType::FileLocks: + case Requests::ReportType::FileLocks: for (u32 i = 0; i < m_fileHandles.size(); ++i) { if (m_fileHandles[i] != nullptr) diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h index d90b31eeec..25f3d7b353 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -16,6 +17,11 @@ #include #include +namespace AZ::IO::Requests +{ + struct ReportData; +} + namespace AZ::IO { struct StorageDriveConfig final : @@ -72,7 +78,7 @@ namespace AZ::IO void EstimateCompletionTimeForRequest(FileRequest* request, AZStd::chrono::system_clock::time_point& startTime, const RequestPath*& activeFile, u64& activeOffset) const; - void Report(const FileRequest::ReportData& data) const; + void Report(const Requests::ReportData& data) const; TimedAverageWindow m_fileOpenCloseTimeAverage; TimedAverageWindow m_getFileExistsTimeAverage; diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp index e4976f7d1c..dfc156bbee 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -210,7 +211,7 @@ namespace AZ::IO IStreamerTypes::ClaimMemory claimMemory) const { AZ_Assert(request.m_request, "The request handle provided to Streamer::GetReadRequestResult is invalid."); - auto readRequest = AZStd::get_if(&request.m_request->GetCommand()); + auto readRequest = AZStd::get_if(&request.m_request->GetCommand()); if (readRequest != nullptr) { buffer = readRequest->m_output; @@ -281,14 +282,14 @@ namespace AZ::IO } } - FileRequestPtr Streamer::Report(FileRequest::ReportData::ReportType reportType) + FileRequestPtr Streamer::Report(Requests::ReportType reportType) { FileRequestPtr result = CreateRequest(); Report(result, reportType); return result; } - FileRequestPtr& Streamer::Report(FileRequestPtr& request, FileRequest::ReportData::ReportType reportType) + FileRequestPtr& Streamer::Report(FileRequestPtr& request, Requests::ReportType reportType) { request->m_request.CreateReport(reportType); return request; diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.h b/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.h index bb363a0c64..7e3dd1a742 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.h @@ -20,6 +20,10 @@ namespace AZStd struct thread_desc; } +namespace AZ::IO::Requests +{ + enum class ReportType : int8_t; +} namespace AZ::IO { @@ -185,9 +189,9 @@ namespace AZ::IO void RecordStatistics(); //! Tells AZ::IO::Streamer the report the information for the report to the output. - FileRequestPtr Report(FileRequest::ReportData::ReportType reportType); + FileRequestPtr Report(Requests::ReportType reportType); //! Tells AZ::IO::Streamer the report the information for the report to the output. - FileRequestPtr& Report(FileRequestPtr& request, FileRequest::ReportData::ReportType reportType); + FileRequestPtr& Report(FileRequestPtr& request, Requests::ReportType reportType); Streamer(const AZStd::thread_desc& threadDesc, AZStd::unique_ptr streamStack); diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerComponent.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerComponent.cpp index 9a465021c2..25fdb9bdfb 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerComponent.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerComponent.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -207,7 +208,7 @@ namespace AZ { if (m_streamer) { - m_streamer->QueueRequest(m_streamer->Report(AZ::IO::FileRequest::ReportData::ReportType::FileLocks)); + m_streamer->QueueRequest(m_streamer->Report(AZ::IO::Requests::ReportType::FileLocks)); } } diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.cpp index 5cd483bc55..fc5d6468d8 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.cpp @@ -22,6 +22,10 @@ namespace AZ static constexpr char LatePredictionName[] = "Early completions"; static constexpr char MissedDeadlinesName[] = "Missed deadlines"; #endif // AZ_STREAMER_ADD_EXTRA_PROFILING_INFO + + StreamerContext::StreamerContext() + { + } StreamerContext::~StreamerContext() { for (FileRequest* entry : m_internalRecycleBin) @@ -204,7 +208,7 @@ namespace AZ m_latePredictionsPercentageStat.GetMostRecentSample()); } } - auto readRequest = AZStd::get_if(&top->GetCommand()); + auto readRequest = AZStd::get_if(&top->GetCommand()); if (readRequest != nullptr) { m_missedDeadlinePercentageStat.PushSample(now < readRequest->m_deadline ? 0.0 : 1.0); diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h index 356eb7ddac..f4caaffc70 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h @@ -7,23 +7,28 @@ */ #pragma once -#include -#include #include #include #include -#include -#include -#include #include +#include +#include +#include +#include namespace AZ::IO { + class FileRequest; + class ExternalFileRequest; + + using FileRequestPtr = AZStd::intrusive_ptr; + class StreamerContext { public: using PreparedQueue = AZStd::deque; + StreamerContext(); ~StreamerContext(); //! Gets a new file request, either by creating a new instance or diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp index feb8bce111..708bacd7cd 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp @@ -172,9 +172,9 @@ namespace AZ::IO AZ_PROFILE_FUNCTION(AzCore); AZ_Assert(request, "PrepareRequest was provided a null request."); - if (AZStd::holds_alternative(request->GetCommand())) + if (AZStd::holds_alternative(request->GetCommand())) { - auto& readRequest = AZStd::get(request->GetCommand()); + auto& readRequest = AZStd::get(request->GetCommand()); if (IsServicedByThisDrive(readRequest.m_path.GetAbsolutePath())) { FileRequest* read = m_context->GetNewInternalRequest(); @@ -195,7 +195,7 @@ namespace AZ::IO AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { if (IsServicedByThisDrive(args.m_path.GetAbsolutePath())) { @@ -203,8 +203,8 @@ namespace AZ::IO return; } } - else if constexpr (AZStd::is_same_v || - AZStd::is_same_v) + else if constexpr (AZStd::is_same_v || + AZStd::is_same_v) { if (IsServicedByThisDrive(args.m_path.GetAbsolutePath())) { @@ -212,7 +212,7 @@ namespace AZ::IO return; } } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { if (CancelRequest(request, args.m_target)) { @@ -221,15 +221,15 @@ namespace AZ::IO return; } } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FlushCache(args.m_path); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FlushEntireCache(); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { Report(args); } @@ -257,13 +257,13 @@ namespace AZ::IO hasWorked = AZStd::visit([this, request](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { FileExistsRequest(request); m_pendingRequests.pop_front(); return true; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FileMetaDataRetrievalRequest(request); m_pendingRequests.pop_front(); @@ -308,7 +308,7 @@ namespace AZ::IO FileReadInformation& read = m_readSlots_readInfo[i]; u64 totalBytesRead = m_readSizeAverage.GetTotal(); double totalReadTimeUSec = aznumeric_caster(m_readTimeAverage.GetTotal().count()); - auto readCommand = AZStd::get_if(&read.m_request->GetCommand()); + auto readCommand = AZStd::get_if(&read.m_request->GetCommand()); AZ_Assert(readCommand, "Request currently reading doesn't contain a read command."); auto endTime = read.m_startTime + AZStd::chrono::microseconds(aznumeric_cast((readCommand->m_size * totalReadTimeUSec) / totalBytesRead)); earliestSlot = AZStd::min(earliestSlot, endTime); @@ -354,25 +354,25 @@ namespace AZ::IO AZStd::visit([&](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { targetFile = &args.m_path; readSize = args.m_size; offset = args.m_offset; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { targetFile = &args.m_compressionInfo.m_archiveFilename; readSize = args.m_compressionInfo.m_compressedSize; offset = args.m_compressionInfo.m_offset; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { readSize = 0; AZStd::chrono::microseconds getFileExistsTimeAverage = m_getFileExistsTimeAverage.CalculateAverage(); startTime += getFileExistsTimeAverage; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { readSize = 0; AZStd::chrono::microseconds getFileExistsTimeAverage = m_getFileMetaDataRetrievalTimeAverage.CalculateAverage(); @@ -411,15 +411,15 @@ namespace AZ::IO AZStd::visit([&, this](auto&& args) { using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v || - AZStd::is_same_v) + if constexpr (AZStd::is_same_v || + AZStd::is_same_v) { if (IsServicedByThisDrive(args.m_path.GetAbsolutePath())) { EstimateCompletionTimeForRequest(request, startTime, activeFile, activeOffset); } } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { if (IsServicedByThisDrive(args.m_compressionInfo.m_archiveFilename.GetAbsolutePath())) { @@ -435,7 +435,7 @@ namespace AZ::IO aznumeric_cast(m_pendingRequests.size()) - m_activeReads_Count; } - auto StorageDriveWin::OpenFile(HANDLE& fileHandle, size_t& cacheSlot, FileRequest* request, const FileRequest::ReadData& data) -> OpenFileResult + auto StorageDriveWin::OpenFile(HANDLE& fileHandle, size_t& cacheSlot, FileRequest* request, const Requests::ReadData& data) -> OpenFileResult { HANDLE file = INVALID_HANDLE_VALUE; @@ -553,7 +553,7 @@ namespace AZ::IO return false; } - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); AZ_Assert(data, "Read request in StorageDriveWin doesn't contain read data."); HANDLE file = INVALID_HANDLE_VALUE; @@ -780,7 +780,7 @@ namespace AZ::IO void StorageDriveWin::FileExistsRequest(FileRequest* request) { - auto& fileExists = AZStd::get(request->GetCommand()); + auto& fileExists = AZStd::get(request->GetCommand()); AZ_PROFILE_SCOPE(AzCore, "StorageDriveWin::FileExistsRequest %s : %s", m_name.c_str(), fileExists.m_path.GetRelativePath()); @@ -836,7 +836,7 @@ namespace AZ::IO void StorageDriveWin::FileMetaDataRetrievalRequest(FileRequest* request) { - auto& command = AZStd::get(request->GetCommand()); + auto& command = AZStd::get(request->GetCommand()); AZ_PROFILE_SCOPE(AzCore, "StorageDriveWin::FileMetaDataRetrievalRequest %s : %s", m_name.c_str(), command.m_path.GetRelativePath()); @@ -1005,7 +1005,7 @@ namespace AZ::IO FileReadInformation& fileReadInfo = m_readSlots_readInfo[readSlot]; - auto readCommand = AZStd::get_if(&fileReadInfo.m_request->GetCommand()); + auto readCommand = AZStd::get_if(&fileReadInfo.m_request->GetCommand()); AZ_Assert(readCommand != nullptr, "Request stored with the overlapped I/O call did not contain a read request."); if (fileReadInfo.m_sectorAlignedOutput && !encounteredError) @@ -1147,11 +1147,11 @@ namespace AZ::IO StreamStackEntry::CollectStatistics(statistics); } - void StorageDriveWin::Report(const FileRequest::ReportData& data) const + void StorageDriveWin::Report(const Requests::ReportData& data) const { switch (data.m_reportType) { - case FileRequest::ReportData::ReportType::FileLocks: + case Requests::ReportType::FileLocks: if (m_cachesInitialized) { for (u32 i = 0; i < m_maxFileHandles; ++i) diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h index c70eb7804d..5207d094ef 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include #include @@ -19,6 +20,12 @@ #include #include +namespace AZ::IO::Requests +{ + struct ReadData; + struct ReportData; +} + namespace AZ::IO { class StorageDriveWin @@ -111,7 +118,7 @@ namespace AZ::IO CacheFull }; - OpenFileResult OpenFile(HANDLE& fileHandle, size_t& cacheSlot, FileRequest* request, const FileRequest::ReadData& data); + OpenFileResult OpenFile(HANDLE& fileHandle, size_t& cacheSlot, FileRequest* request, const Requests::ReadData& data); bool ReadRequest(FileRequest* request); bool ReadRequest(FileRequest* request, size_t readSlot); bool CancelRequest(FileRequest* cancelRequest, FileRequestPtr& target); @@ -137,7 +144,7 @@ namespace AZ::IO void FinalizeSingleRequest(FileReadStatus& status, size_t readSlot, DWORD numBytesTransferred, bool isCanceled, bool encounteredError); - void Report(const FileRequest::ReportData& data) const; + void Report(const Requests::ReportData& data) const; TimedAverageWindow m_fileOpenCloseTimeAverage; TimedAverageWindow m_getFileExistsTimeAverage; diff --git a/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp index 27903495f1..3846c6cf16 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetDataStreamTests.cpp @@ -6,6 +6,7 @@ * */ #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index e312e2058d..95b0626d7f 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -406,7 +406,7 @@ namespace AZ::IO request->CreateFileMetaDataRetrieval(path); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileMetaData = AZStd::get(request.GetCommand()); + auto& fileMetaData = AZStd::get(request.GetCommand()); EXPECT_FALSE(fileMetaData.m_found); EXPECT_EQ(0, fileMetaData.m_fileSize); }); @@ -424,7 +424,7 @@ namespace AZ::IO request->SetCompletionCallback([](const FileRequest& request) { - auto& fileMetaData = AZStd::get(request.GetCommand()); + auto& fileMetaData = AZStd::get(request.GetCommand()); EXPECT_TRUE(fileMetaData.m_found); EXPECT_EQ(4_kib, fileMetaData.m_fileSize); }); @@ -442,7 +442,7 @@ namespace AZ::IO request->CreateFileMetaDataRetrieval(path); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileMetaData = AZStd::get(request.GetCommand()); + auto& fileMetaData = AZStd::get(request.GetCommand()); EXPECT_FALSE(fileMetaData.m_found); EXPECT_EQ(0, fileMetaData.m_fileSize); }); @@ -460,7 +460,7 @@ namespace AZ::IO request->SetCompletionCallback([](const FileRequest& request) { - auto& fileMetaData = AZStd::get(request.GetCommand()); + auto& fileMetaData = AZStd::get(request.GetCommand()); EXPECT_TRUE(fileMetaData.m_found); EXPECT_EQ(16_kib, fileMetaData.m_fileSize); }); @@ -484,7 +484,7 @@ namespace AZ::IO request->SetCompletionCallback([](const FileRequest& request) { - auto& fileMetaData = AZStd::get(request.GetCommand()); + auto& fileMetaData = AZStd::get(request.GetCommand()); EXPECT_TRUE(fileMetaData.m_found); EXPECT_EQ(4_kib, fileMetaData.m_fileSize); }); @@ -502,7 +502,7 @@ namespace AZ::IO request->CreateFileExistsCheck(invalidPath); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileExistsCheck = AZStd::get(request.GetCommand()); + auto& fileExistsCheck = AZStd::get(request.GetCommand()); EXPECT_EQ(AZ::IO::IStreamerTypes::RequestStatus::Completed, request.GetStatus()); EXPECT_FALSE(fileExistsCheck.m_found); }); @@ -519,7 +519,7 @@ namespace AZ::IO request->CreateFileExistsCheck(path); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileExistsCheck = AZStd::get(request.GetCommand()); + auto& fileExistsCheck = AZStd::get(request.GetCommand()); EXPECT_EQ(AZ::IO::IStreamerTypes::RequestStatus::Completed, request.GetStatus()); EXPECT_FALSE(fileExistsCheck.m_found); }); @@ -535,7 +535,7 @@ namespace AZ::IO request->CreateFileExistsCheck(m_dummyRequestPath); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileExistsCheck = AZStd::get(request.GetCommand()); + auto& fileExistsCheck = AZStd::get(request.GetCommand()); EXPECT_EQ(AZ::IO::IStreamerTypes::RequestStatus::Completed, request.GetStatus()); EXPECT_TRUE(fileExistsCheck.m_found); }); @@ -551,7 +551,7 @@ namespace AZ::IO request->CreateFileExistsCheck(m_dummyRequestPath); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileExistsCheck = AZStd::get(request.GetCommand()); + auto& fileExistsCheck = AZStd::get(request.GetCommand()); EXPECT_EQ(AZ::IO::IStreamerTypes::RequestStatus::Completed, request.GetStatus()); EXPECT_TRUE(fileExistsCheck.m_found); }); @@ -573,7 +573,7 @@ namespace AZ::IO request->CreateFileExistsCheck(m_dummyRequestPath); request->SetCompletionCallback([](const FileRequest& request) { - auto& fileExistsCheck = AZStd::get(request.GetCommand()); + auto& fileExistsCheck = AZStd::get(request.GetCommand()); EXPECT_EQ(AZ::IO::IStreamerTypes::RequestStatus::Completed, request.GetStatus()); EXPECT_TRUE(fileExistsCheck.m_found); }); @@ -603,7 +603,7 @@ namespace AZ::IO AZ_POP_DISABLE_WARNING { EXPECT_EQ(request.GetStatus(), AZ::IO::IStreamerTypes::RequestStatus::Completed); - auto& readRequest = AZStd::get(request.GetCommand()); + auto& readRequest = AZStd::get(request.GetCommand()); EXPECT_EQ(readRequest.m_size, fileSize); EXPECT_STREQ(readRequest.m_path.GetAbsolutePath(), m_dummyFilepath.c_str()); }; @@ -648,7 +648,7 @@ namespace AZ::IO AZ_POP_DISABLE_WARNING { EXPECT_EQ(request.GetStatus(), AZ::IO::IStreamerTypes::RequestStatus::Completed); - auto& readRequest = AZStd::get(request.GetCommand()); + auto& readRequest = AZStd::get(request.GetCommand()); EXPECT_EQ(readRequest.m_size, unalignedSize); EXPECT_EQ(readRequest.m_offset, unalignedOffset); EXPECT_STREQ(readRequest.m_path.GetAbsolutePath(), m_dummyFilepath.c_str()); @@ -796,7 +796,7 @@ namespace AZ::IO AZ_POP_DISABLE_WARNING { EXPECT_EQ(request.GetStatus(), AZ::IO::IStreamerTypes::RequestStatus::Completed); - auto& readRequest = AZStd::get(request.GetCommand()); + auto& readRequest = AZStd::get(request.GetCommand()); EXPECT_EQ(readRequest.m_size, chunkSize); EXPECT_EQ(readRequest.m_offset, i * chunkSize); }; diff --git a/Code/Framework/AzCore/Tests/Streamer/BlockCacheTests.cpp b/Code/Framework/AzCore/Tests/Streamer/BlockCacheTests.cpp index 3a107da61d..d9d3623fbd 100644 --- a/Code/Framework/AzCore/Tests/Streamer/BlockCacheTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/BlockCacheTests.cpp @@ -100,7 +100,7 @@ namespace AZ::IO void QueueReadRequest(FileRequest* request) { - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); if (data) { if (m_fakeFileFound) @@ -122,15 +122,15 @@ namespace AZ::IO m_context->MarkRequestAsCompleted(request); } else if ( - AZStd::holds_alternative(request->GetCommand()) || - AZStd::holds_alternative(request->GetCommand())) + AZStd::holds_alternative(request->GetCommand()) || + AZStd::holds_alternative(request->GetCommand())) { request->SetStatus(IStreamerTypes::RequestStatus::Completed); m_context->MarkRequestAsCompleted(request); } - else if (AZStd::holds_alternative(request->GetCommand())) + else if (AZStd::holds_alternative(request->GetCommand())) { - auto& data2 = AZStd::get(request->GetCommand()); + auto& data2 = AZStd::get(request->GetCommand()); data2.m_found = m_fakeFileFound; data2.m_fileSize = m_fakeFileLength; request->SetStatus(m_fakeFileFound ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); @@ -158,16 +158,16 @@ namespace AZ::IO void QueueCanceledReadRequest(FileRequest* request) { - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); if (data) { ReadFile(data->m_output, data->m_path, data->m_offset, data->m_size); request->SetStatus(IStreamerTypes::RequestStatus::Canceled); m_context->MarkRequestAsCompleted(request); } - else if (AZStd::holds_alternative(request->GetCommand())) + else if (AZStd::holds_alternative(request->GetCommand())) { - auto& data2 = AZStd::get(request->GetCommand()); + auto& data2 = AZStd::get(request->GetCommand()); data2.m_found = true; data2.m_fileSize = m_fakeFileLength; request->SetStatus(IStreamerTypes::RequestStatus::Completed); diff --git a/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp b/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp index 9f2f0dbd6b..f465a0dafb 100644 --- a/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp @@ -145,7 +145,7 @@ namespace AZ::IO void PrepareReadRequest(FileRequest* request) { - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); ASSERT_NE(nullptr, data); u64 size = data->m_size >> 2; diff --git a/Code/Framework/AzCore/Tests/Streamer/IStreamerMock.h b/Code/Framework/AzCore/Tests/Streamer/IStreamerMock.h index 7b784caffd..0059a25b93 100644 --- a/Code/Framework/AzCore/Tests/Streamer/IStreamerMock.h +++ b/Code/Framework/AzCore/Tests/Streamer/IStreamerMock.h @@ -9,6 +9,7 @@ #include #include +#include using namespace AZ::IO; diff --git a/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp b/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp index a68ce091b8..01fe2f6a12 100644 --- a/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp @@ -155,7 +155,7 @@ namespace AZ::IO { EXPECT_EQ(subRequests[i]->GetParent(), readRequest); - FileRequest::ReadData* data = AZStd::get_if(&subRequests[i]->GetCommand()); + Requests::ReadData* data = AZStd::get_if(&subRequests[i]->GetCommand()); ASSERT_NE(nullptr, data); EXPECT_EQ(SplitSize, data->m_size); EXPECT_EQ(SplitSize * i, data->m_offset); @@ -210,7 +210,7 @@ namespace AZ::IO { EXPECT_EQ(subRequests[i]->GetParent(), readRequest); - FileRequest::ReadData* data = AZStd::get_if(&subRequests[i]->GetCommand()); + Requests::ReadData* data = AZStd::get_if(&subRequests[i]->GetCommand()); ASSERT_NE(nullptr, data); EXPECT_EQ(SplitSize, data->m_size); EXPECT_EQ(SplitSize * i, data->m_offset); @@ -230,7 +230,7 @@ namespace AZ::IO { EXPECT_EQ(subRequests[i]->GetParent(), readRequest); - FileRequest::ReadData* data = AZStd::get_if(&subRequests[i]->GetCommand()); + Requests::ReadData* data = AZStd::get_if(&subRequests[i]->GetCommand()); ASSERT_NE(nullptr, data); EXPECT_EQ(SplitSize, data->m_size); EXPECT_EQ(SplitSize * (batchSize + i), data->m_offset); @@ -265,7 +265,7 @@ namespace AZ::IO m_readSplitter->QueueRequest(readRequest); ASSERT_NE(nullptr, subRequest); - FileRequest::ReadData* data = AZStd::get_if(&subRequest->GetCommand()); + Requests::ReadData* data = AZStd::get_if(&subRequest->GetCommand()); EXPECT_NE(buffer, data->m_output); EXPECT_EQ(readSize, data->m_size); EXPECT_EQ(0, data->m_offset); @@ -311,7 +311,7 @@ namespace AZ::IO m_readSplitter->QueueRequest(readRequest); ASSERT_NE(nullptr, subRequest); - FileRequest::ReadData* data = AZStd::get_if(&subRequest->GetCommand()); + Requests::ReadData* data = AZStd::get_if(&subRequest->GetCommand()); EXPECT_NE(buffer, data->m_output); EXPECT_EQ(readSize + offsetAdjustment, data->m_size); EXPECT_EQ(0, data->m_offset); diff --git a/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp b/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp index 6c360b97de..d1484b7409 100644 --- a/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -86,7 +87,7 @@ namespace AZ::IO .WillOnce([this](FileRequest* request) { AZ_Assert(m_streamerContext, "AZ::IO::Streamer is not ready to process requests."); - auto readData = AZStd::get_if(&request->GetCommand()); + auto readData = AZStd::get_if(&request->GetCommand()); AZ_Assert(readData, "Test didn't pass in the correct request."); FileRequest* read = m_streamerContext->GetNewInternalRequest(); read->CreateRead(request, readData->m_output, readData->m_outputSize, readData->m_path, @@ -99,7 +100,7 @@ namespace AZ::IO .WillOnce([this](FileRequest* request) { AZ_Assert(m_streamerContext, "AZ::IO::Streamer is not ready to process requests."); - auto readData = AZStd::get_if(&request->GetCommand()); + auto readData = AZStd::get_if(&request->GetCommand()); AZ_Assert(readData, "Test didn't pass in the correct request."); auto output = reinterpret_cast(readData->m_output); AZ_Assert(output != nullptr, "Output buffer has not been set."); @@ -304,7 +305,7 @@ namespace AZ::IO EXPECT_CALL(*m_mock, QueueRequest(_)).Times(1) .WillOnce(Invoke([this](FileRequest* request) { - auto* read = request->GetCommandFromChain(); + auto* read = request->GetCommandFromChain(); ASSERT_NE(nullptr, read); EXPECT_LT(read->m_deadline, FileRequest::s_noDeadlineTime); EXPECT_EQ(read->m_priority, IStreamerTypes::s_priorityHighest); diff --git a/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h b/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h index 6cbec7ea8a..8a5805cccd 100644 --- a/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h +++ b/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/StreamerTests.cpp b/Code/Framework/AzCore/Tests/StreamerTests.cpp index 78f9f9060f..937b6d29de 100644 --- a/Code/Framework/AzCore/Tests/StreamerTests.cpp +++ b/Code/Framework/AzCore/Tests/StreamerTests.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp index bb361e56de..35c23d119a 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp index 589c805871..23d275cb78 100644 --- a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp +++ b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp @@ -83,9 +83,9 @@ namespace AzFramework AZ_PROFILE_FUNCTION(AzCore); AZ_Assert(request, "PrepareRequest was provided a null request."); - if (AZStd::holds_alternative(request->GetCommand())) + if (AZStd::holds_alternative(request->GetCommand())) { - auto& readRequest = AZStd::get(request->GetCommand()); + auto& readRequest = AZStd::get(request->GetCommand()); FileRequest* read = m_context->GetNewInternalRequest(); read->CreateRead(request, readRequest.m_output, readRequest.m_outputSize, readRequest.m_path, @@ -106,14 +106,14 @@ namespace AzFramework { using namespace AZ::IO; using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v || - AZStd::is_same_v || - AZStd::is_same_v) + if constexpr (AZStd::is_same_v || + AZStd::is_same_v || + AZStd::is_same_v) { m_pendingRequests.push_back(request); return; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { if (CancelRequest(request, args.m_target)) { @@ -124,15 +124,15 @@ namespace AzFramework } else { - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { FlushCache(args.m_path); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FlushEntireCache(); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { Report(args); } @@ -152,15 +152,15 @@ namespace AzFramework { using namespace AZ::IO; using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { ReadFile(request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FileExistsRequest(request); } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { FileMetaDataRetrievalRequest(request); } @@ -232,23 +232,23 @@ namespace AzFramework { using namespace AZ::IO; using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { targetFile = &args.m_path; readSize = args.m_size; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { targetFile = &args.m_compressionInfo.m_archiveFilename; readSize = args.m_compressionInfo.m_compressedSize; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { readSize = 0; AZStd::chrono::microseconds averageTime = m_getFileExistsTimeAverage.CalculateAverage(); startTime += averageTime; } - else if constexpr (AZStd::is_same_v) + else if constexpr (AZStd::is_same_v) { readSize = 0; AZStd::chrono::microseconds averageTime = m_getFileMetaDataTimeAverage.CalculateAverage(); @@ -280,7 +280,7 @@ namespace AzFramework AZ_PROFILE_FUNCTION(AzCore); - auto data = AZStd::get_if(&request->GetCommand()); + auto data = AZStd::get_if(&request->GetCommand()); AZ_Assert(data, "Request doing reading in the RemoteStorageDrive didn't contain read data."); HandleType file = InvalidHandle; @@ -397,7 +397,7 @@ namespace AzFramework TIMED_AVERAGE_WINDOW_SCOPE(m_getFileExistsTimeAverage); - auto& fileExists = AZStd::get(request->GetCommand()); + auto& fileExists = AZStd::get(request->GetCommand()); size_t cacheIndex = FindFileInCache(fileExists.m_path); if (cacheIndex != s_fileNotFound) { @@ -430,7 +430,7 @@ namespace AzFramework AZ::u64 fileSize = 0; bool found = false; - auto& command = AZStd::get(request->GetCommand()); + auto& command = AZStd::get(request->GetCommand()); // If the file is already open, use the file handle which usually is cheaper than asking for the file by name. size_t cacheIndex = FindFileInCache(command.m_path); if (cacheIndex != s_fileNotFound) @@ -526,13 +526,13 @@ namespace AzFramework StreamStackEntry::CollectStatistics(statistics); } - void RemoteStorageDrive::Report(const AZ::IO::FileRequest::ReportData& data) const + void RemoteStorageDrive::Report(const AZ::IO::Requests::ReportData& data) const { using namespace AZ::IO; switch (data.m_reportType) { - case FileRequest::ReportData::ReportType::FileLocks: + case Requests::ReportType::FileLocks: for (AZ::u32 i = 0; i < m_fileHandles.size(); ++i) { if (m_fileHandles[i] != InvalidHandle) diff --git a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h index c3e28f2e55..de0b855dcc 100644 --- a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h +++ b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h @@ -16,6 +16,15 @@ #include #include +namespace AZ::IO +{ + class RequestPath; + namespace Requests + { + struct ReportData; + } +} + namespace AzFramework { struct RemoteStorageDriveConfig final : @@ -63,7 +72,7 @@ namespace AzFramework const AZ::IO::RequestPath*& activeFile) const; void FlushCache(const AZ::IO::RequestPath& filePath); void FlushEntireCache(); - void Report(const AZ::IO::FileRequest::ReportData& data) const; + void Report(const AZ::IO::Requests::ReportData& data) const; AZ::IO::RemoteFileIO m_fileIO; AZ::IO::TimedAverageWindow m_fileOpenCloseTimeAverage; diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBody.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBody.cpp index 168152f686..bb1270a387 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBody.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBody.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyAutomation.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyAutomation.cpp index e78ff49f2d..a86ef12216 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyAutomation.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyAutomation.cpp @@ -8,6 +8,7 @@ #include +#include #include #include diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyEvents.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyEvents.cpp index b51298a797..005ce291f6 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyEvents.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSimulatedBodyEvents.cpp @@ -8,6 +8,7 @@ #include +#include #include #include #include diff --git a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp index a5ebdd04c6..1937c50555 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsScene.cpp @@ -9,6 +9,7 @@ #include #include +#include #include diff --git a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp index 2ff4780c9e..a0bb2d9366 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/PhysicsSystem.cpp @@ -8,6 +8,7 @@ #include +#include #include namespace AzPhysics diff --git a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp index 79365f1ebe..b2c36bc1c8 100644 --- a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/ToolsAssetCatalogComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/ToolsAssetCatalogComponent.h index a68b82468e..56a3e7005c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/ToolsAssetCatalogComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/ToolsAssetCatalogComponent.h @@ -7,6 +7,7 @@ */ #pragma once +#include #include #include #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h index 4596d70657..34b3a0a0b6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h @@ -10,12 +10,13 @@ #if !defined(Q_MOC_RUN) #include +#include #endif namespace AzToolsFramework { using namespace AzToolsFramework::AssetBrowser; - + //! Model storing all the files that can be suggested in the Asset Autocompleter for PropertyAssetCtrl class AssetCompleterModel : public QAbstractTableModel @@ -45,7 +46,7 @@ namespace AzToolsFramework void SetFetchEntryType(AssetBrowserEntry::AssetEntryType entryType); private: - struct AssetItem + struct AssetItem { AZStd::string m_displayName; AZStd::string m_path; diff --git a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp index 78244ab02c..78e71ab3f2 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h index 982de92739..838cdd2256 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h @@ -7,13 +7,15 @@ */ #pragma once -#include -#include #include #include #include #include +#include +#include +#include + namespace AZ { class ReflectContext; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/PrecompiledShaderAssetSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/PrecompiledShaderAssetSourceData.h index ce5a4c8a7a..701b90ace9 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/PrecompiledShaderAssetSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/PrecompiledShaderAssetSourceData.h @@ -10,6 +10,7 @@ #include #include +#include namespace AZ { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index bd196a2e2b..b97ffecccd 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -267,7 +267,7 @@ namespace AZ return m_visScene->GetEntryCount(); } - + struct WorklistData { CullingDebugContext* m_debugCtx = nullptr; @@ -296,13 +296,13 @@ namespace AZ #endif return worklistData; } - + constexpr size_t WorkListCapacity = 5; using WorkListType = AZStd::fixed_vector; #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED static MaskedOcclusionCulling::CullingResult TestOcclusionCulling( - const AZStd::shared_ptr& worklistData, + const AZStd::shared_ptr& worklistData, AzFramework::VisibilityEntry* visibleEntry); #endif @@ -320,8 +320,8 @@ namespace AZ for (const AzFramework::IVisibilityScene::NodeData& nodeData : worklist) { //If a node is entirely contained within the frustum, then we can skip the fine grained culling. - bool nodeIsContainedInFrustum = - !worklistData->m_debugCtx->m_enableFrustumCulling || + bool nodeIsContainedInFrustum = + !worklistData->m_debugCtx->m_enableFrustumCulling || ShapeIntersection::Contains(worklistData->m_frustum, nodeData.m_bounds); #ifdef AZ_CULL_PROFILE_VERBOSE @@ -460,12 +460,14 @@ namespace AZ cullStats.m_numVisibleCullables += numVisibleCullables; ++cullStats.m_numJobs; } +#else + (void)numDrawPackets; // prevent unused variable warning->error #endif //AZ_CULL_DEBUG_ENABLED } #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED static MaskedOcclusionCulling::CullingResult TestOcclusionCulling( - const AZStd::shared_ptr& worklistData, + const AZStd::shared_ptr& worklistData, AzFramework::VisibilityEntry* visibleEntry) { if (!worklistData->m_maskedOcclusionCulling) @@ -527,9 +529,9 @@ namespace AZ #endif void CullingScene::ProcessCullablesCommon( - const Scene& scene [[maybe_unused]], - View& view, - AZ::Frustum& frustum [[maybe_unused]], + const Scene& scene [[maybe_unused]], + View& view, + AZ::Frustum& frustum [[maybe_unused]], void*& maskedOcclusionCulling [[maybe_unused]]) { AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullablesCommon() - %s", view.GetName().GetCStr()); @@ -898,7 +900,7 @@ namespace AZ { const Matrix4x4& worldToClip = viewPtr->GetWorldToClipMatrix(); Frustum frustum = Frustum::CreateFromMatrixColumnMajor(worldToClip, Frustum::ReverseDepth::True); - m_debugCtx.m_frozenFrustums.insert({ viewPtr.get(), frustum }); + m_debugCtx.m_frozenFrustums.insert({ viewPtr.get(), frustum }); } } } @@ -911,7 +913,7 @@ namespace AZ } void CullingScene::EndCulling() - { + { m_cullDataConcurrencyCheck.soft_unlock(); } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Metrics/ShaderMetricsSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Metrics/ShaderMetricsSystem.cpp index e11624a921..460e671b4c 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Metrics/ShaderMetricsSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Metrics/ShaderMetricsSystem.cpp @@ -11,13 +11,13 @@ #include +#include +#include #include #include #include - #include -#include namespace AZ { diff --git a/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.cpp b/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.cpp index fd19c6bcb8..83e8dbf085 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.cpp +++ b/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.cpp @@ -7,6 +7,8 @@ */ #include "AssetManagerTestFixture.h" + +#include #include #include diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/AssetCollectionAsyncLoader.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/AssetCollectionAsyncLoader.h index d1027daa36..b974b4443d 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/AssetCollectionAsyncLoader.h +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/AssetCollectionAsyncLoader.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp index 58b3d8b56e..35ae1b1257 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp @@ -38,6 +38,8 @@ #include #include +#include + namespace AZ::Render { static constexpr uint32_t s_maxActiveWrinkleMasks = 16; diff --git a/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp b/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp index b31d9f8ae0..6f97613c89 100644 --- a/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp +++ b/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp @@ -16,6 +16,8 @@ #include #include +#include + namespace AZ::Render { //! Setting the constructor as private will create compile error to remind the developer to set diff --git a/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp b/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp index 2d95ddf4dd..ce17803531 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp @@ -8,6 +8,7 @@ #include +#include namespace Audio { @@ -285,5 +286,22 @@ namespace Audio return sResult; } + CATLAudioFileEntry::CATLAudioFileEntry(const char * const filePath, IATLAudioFileEntryData * const implData) + : m_filePath(filePath) + , m_fileSize(0) + , m_useCount(0) + , m_memoryBlockAlignment(AUDIO_MEMORY_ALIGNMENT) + , m_flags(eAFF_NOTFOUND) + , m_dataScope(eADS_ALL) + , m_memoryBlock(nullptr) + , m_implData(implData) + { + } + + CATLAudioFileEntry::~CATLAudioFileEntry() + { + + } + #endif // !AUDIO_RELEASE } // namespace Audio diff --git a/Gems/AudioSystem/Code/Source/Engine/ATLEntities.h b/Gems/AudioSystem/Code/Source/Engine/ATLEntities.h index f1ff74c370..4dfceeebfc 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATLEntities.h +++ b/Gems/AudioSystem/Code/Source/Engine/ATLEntities.h @@ -379,19 +379,9 @@ namespace Audio class CATLAudioFileEntry { public: - explicit CATLAudioFileEntry(const char* const filePath = nullptr, IATLAudioFileEntryData* const implData = nullptr) - : m_filePath(filePath) - , m_fileSize(0) - , m_useCount(0) - , m_memoryBlockAlignment(AUDIO_MEMORY_ALIGNMENT) - , m_flags(eAFF_NOTFOUND) - , m_dataScope(eADS_ALL) - , m_memoryBlock(nullptr) - , m_implData(implData) - { - } + explicit CATLAudioFileEntry(const char* const filePath = nullptr, IATLAudioFileEntryData* const implData = nullptr); - ~CATLAudioFileEntry() = default; + ~CATLAudioFileEntry(); AZStd::string m_filePath; size_t m_fileSize; diff --git a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp index ffa94ad956..d1f2187942 100644 --- a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp b/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp index 14e9f74fd2..a197fee96b 100644 --- a/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp +++ b/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h b/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h index 06646216ae..1fb48bb3fb 100644 --- a/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h +++ b/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h @@ -13,6 +13,11 @@ #include #include +namespace AZ::IO +{ + class FileRequestHandle; +} + namespace Audio { class FileCacheManagerMock diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp index c196f34716..bde1259c44 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp @@ -34,6 +34,8 @@ #include #include +#include + namespace EMotionFX { AZ_CLASS_ALLOCATOR_IMPL(ActorInstance, ActorInstanceAllocator, 0) diff --git a/Gems/EMotionFX/Code/Tests/TestAssetCode/SimpleActors.cpp b/Gems/EMotionFX/Code/Tests/TestAssetCode/SimpleActors.cpp index 3e1dac41c2..e6415817cc 100644 --- a/Gems/EMotionFX/Code/Tests/TestAssetCode/SimpleActors.cpp +++ b/Gems/EMotionFX/Code/Tests/TestAssetCode/SimpleActors.cpp @@ -15,6 +15,8 @@ #include #include +#include + namespace EMotionFX { SimpleJointChainActor::SimpleJointChainActor(size_t jointCount, const char* name) diff --git a/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp b/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp index acd1bc8dae..91ba63ddd1 100644 --- a/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp @@ -9,7 +9,9 @@ #include "AssetSystemDebugComponent.h" #include "ISystem.h" #include "IRenderAuxGeom.h" + #include "AzCore/Asset/AssetManager.h" +#include #include #include #include diff --git a/Gems/LmbrCentral/Code/Source/Audio/AudioAreaEnvironmentComponent.cpp b/Gems/LmbrCentral/Code/Source/Audio/AudioAreaEnvironmentComponent.cpp index 827e20b02b..3b14822076 100644 --- a/Gems/LmbrCentral/Code/Source/Audio/AudioAreaEnvironmentComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Audio/AudioAreaEnvironmentComponent.cpp @@ -8,6 +8,7 @@ #include "AudioAreaEnvironmentComponent.h" +#include #include #include #include diff --git a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.h b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.h index a400f742de..baac5b3776 100644 --- a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.h +++ b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothColliders.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace NvCloth diff --git a/Gems/NvCloth/Code/Source/Utils/AssetHelper.h b/Gems/NvCloth/Code/Source/Utils/AssetHelper.h index e3e5a5e7ad..4a40fe26f0 100644 --- a/Gems/NvCloth/Code/Source/Utils/AssetHelper.h +++ b/Gems/NvCloth/Code/Source/Utils/AssetHelper.h @@ -10,6 +10,7 @@ #include #include +#include #include diff --git a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.h b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.h index 3f6d001112..11215ef29b 100644 --- a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.h +++ b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeSnap.h b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeSnap.h index 843fffd4c8..c7a50c43f5 100644 --- a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeSnap.h +++ b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeSnap.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/Gems/PhysX/Code/Source/ForceRegionComponent.cpp b/Gems/PhysX/Code/Source/ForceRegionComponent.cpp index f8f5f1991e..eba902049d 100644 --- a/Gems/PhysX/Code/Source/ForceRegionComponent.cpp +++ b/Gems/PhysX/Code/Source/ForceRegionComponent.cpp @@ -9,6 +9,8 @@ #include #include +#include +#include #include #include #include diff --git a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp index 975fec2181..c02324ed18 100644 --- a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp +++ b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp @@ -6,18 +6,22 @@ * */ -#include -#include -#include -#include +#include #include #include #include #include -#include #include +#include +#include +#include +#include +#include + + + namespace PhysX::Utils { struct PxJointActorData diff --git a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h index da7b3dc4e2..d5aa082763 100644 --- a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h +++ b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h @@ -14,8 +14,15 @@ #include +#include + namespace PhysX { + struct D6JointLimitConfiguration; + struct FixedJointConfiguration; + struct BallJointConfiguration; + struct HingeJointConfiguration; + namespace JointConstants { // Setting joint limits to very small values can cause extreme stability problems, so clamp above a small diff --git a/Gems/PhysX/Code/Source/JointComponent.cpp b/Gems/PhysX/Code/Source/JointComponent.cpp index d5c04598a5..085fc34b12 100644 --- a/Gems/PhysX/Code/Source/JointComponent.cpp +++ b/Gems/PhysX/Code/Source/JointComponent.cpp @@ -5,17 +5,18 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ +#include +#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include #include -#include namespace PhysX { diff --git a/Gems/PhysX/Code/Source/Material.cpp b/Gems/PhysX/Code/Source/Material.cpp index be79728cc5..fa131b5159 100644 --- a/Gems/PhysX/Code/Source/Material.cpp +++ b/Gems/PhysX/Code/Source/Material.cpp @@ -7,9 +7,10 @@ */ #include "Material.h" +#include #include -#include #include +#include #include namespace PhysX diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp index f4cdd01889..fbadb8aa79 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp @@ -5,13 +5,10 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ - #include + #include #include -#include -#include -#include #include #include #include @@ -20,6 +17,12 @@ #include #include +#include +#include +#include + +#include + namespace PhysX::Utils::Characters { AZ::Outcome GetNodeIndex(const Physics::RagdollConfiguration& configuration, const AZStd::string& nodeName) diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp index 34fe3d0295..3e240f3611 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp @@ -5,16 +5,17 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ - -#include -#include -#include #include + #include #include #include - #include +#include +#include +#include +#include + namespace PhysX { diff --git a/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp b/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp index 2d05612d74..ece6acbd6f 100644 --- a/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp +++ b/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp @@ -6,15 +6,16 @@ * */ +#include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h b/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h index 15f9bfb36e..d987b7194c 100644 --- a/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h +++ b/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace PhysX diff --git a/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp b/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp index dfac43b703..6c02697e90 100644 --- a/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp +++ b/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp @@ -7,14 +7,6 @@ */ #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include @@ -31,6 +23,16 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + namespace PhysX { AZ_CLASS_ALLOCATOR_IMPL(PhysXScene, AZ::SystemAllocator, 0); diff --git a/Gems/PhysX/Code/Source/System/PhysXSystem.cpp b/Gems/PhysX/Code/Source/System/PhysXSystem.cpp index 168adc8910..d7ce797b47 100644 --- a/Gems/PhysX/Code/Source/System/PhysXSystem.cpp +++ b/Gems/PhysX/Code/Source/System/PhysXSystem.cpp @@ -5,18 +5,20 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include +#include + +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include - -#include +#include +#include +#include // only enable physx timestep warning when not running debug or in Release #if !defined(DEBUG) && !defined(RELEASE) diff --git a/Gems/PhysX/Code/Tests/PhysXTestUtil.cpp b/Gems/PhysX/Code/Tests/PhysXTestUtil.cpp index 2366f65e07..f79b7c8d34 100644 --- a/Gems/PhysX/Code/Tests/PhysXTestUtil.cpp +++ b/Gems/PhysX/Code/Tests/PhysXTestUtil.cpp @@ -9,6 +9,7 @@ #include "PhysXTestUtil.h" #include #include +#include namespace PhysX { diff --git a/Gems/PhysXDebug/Code/Source/SystemComponent.cpp b/Gems/PhysXDebug/Code/Source/SystemComponent.cpp index 65115f2790..746809a7ca 100644 --- a/Gems/PhysXDebug/Code/Source/SystemComponent.cpp +++ b/Gems/PhysXDebug/Code/Source/SystemComponent.cpp @@ -8,10 +8,7 @@ #include "SystemComponent.h" -#include -#include -#include -#include +#include #include #include @@ -19,20 +16,24 @@ #include #include +#include +#include +#include +#include + +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include +#include +#include -#include -#include - -#include namespace PhysXDebug { diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp index 439f9a8383..d9ec1de757 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp @@ -10,11 +10,14 @@ #include "ScriptCanvasMemoryAsset.h" #include "ScriptCanvasUndoHelper.h" -#include +#include +#include +#include #include -#include -#include #include +#include +#include +#include namespace ScriptCanvasEditor { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp index 49a35eac8a..95b4fbb843 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.h b/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.h index 64a0e49bca..922bfb1dbc 100644 --- a/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.h +++ b/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.h b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.h index a9565aedbe..d9bae70a31 100644 --- a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.h +++ b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include From 3bca63bb7187d640928505d1662c395afb9c4894 Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Sat, 11 Dec 2021 15:50:37 -0600 Subject: [PATCH 018/413] Temporary fix for material component losing image overrides with prefabs The bug reported that overridden texture properties would be lost whenever an entity was created, destroyed, or a prefab was created. Initially, it seemed like there was a problem with the custom JSON serializer for material properties. Debugging proved this to be incorrect because all of the data was converted to JSON values in the serializer on multiple passes. At some point during prefab patching, the data for the asset properties is lost while other values like colors and floats serialize correctly. Converting the asset data values into asset IDs resolves the immediate problem for the material component but the underlying issue is still under investigation by the prefab team. This change is being posted for review in case the underlying issue cannot be resolved in time for the next release. Signed-off-by: Guthrie Adams Fixing unittests and moving texture conversion into material component controller Signed-off-by: Guthrie Adams --- .../Material/MaterialAssignmentSerializer.cpp | 24 ++++++++++---- .../Material/MaterialAssignmentSerializer.h | 18 +++++++--- .../Code/Source/Util/MaterialPropertyUtil.cpp | 12 ++++--- .../Material/MaterialComponentController.cpp | 33 +++++++++++++++++++ .../Material/MaterialComponentController.h | 5 +++ 5 files changed, 76 insertions(+), 16 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp b/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp index b757e4bd7e..85dc26089f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp @@ -16,7 +16,9 @@ namespace AZ AZ_CLASS_ALLOCATOR_IMPL(JsonMaterialAssignmentSerializer, AZ::SystemAllocator, 0); JsonSerializationResult::Result JsonMaterialAssignmentSerializer::Load( - void* outputValue, [[maybe_unused]] const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + void* outputValue, + [[maybe_unused]] const Uuid& outputValueTypeId, + const rapidjson::Value& inputValue, JsonDeserializerContext& context) { namespace JSR = JsonSerializationResult; @@ -62,6 +64,7 @@ namespace AZ LoadAny(propertyValue, inputPropertyPair.value, context, result) || LoadAny(propertyValue, inputPropertyPair.value, context, result) || LoadAny(propertyValue, inputPropertyPair.value, context, result) || + LoadAny>(propertyValue, inputPropertyPair.value, context, result) || LoadAny>(propertyValue, inputPropertyPair.value, context, result) || LoadAny>(propertyValue, inputPropertyPair.value, context, result)) { @@ -78,7 +81,10 @@ namespace AZ } JsonSerializationResult::Result JsonMaterialAssignmentSerializer::Store( - rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, [[maybe_unused]] const Uuid& valueTypeId, + rapidjson::Value& outputValue, + const void* inputValue, + const void* defaultValue, + [[maybe_unused]] const Uuid& valueTypeId, JsonSerializerContext& context) { namespace JSR = AZ::JsonSerializationResult; @@ -138,9 +144,9 @@ namespace AZ StoreAny(propertyValue, outputPropertyValue, context, result) || StoreAny(propertyValue, outputPropertyValue, context, result) || StoreAny(propertyValue, outputPropertyValue, context, result) || + StoreAny>(propertyValue, outputPropertyValue, context, result) || StoreAny>(propertyValue, outputPropertyValue, context, result) || - StoreAny>( - propertyValue, outputPropertyValue, context, result)) + StoreAny>(propertyValue, outputPropertyValue, context, result)) { outputPropertyValueContainer.AddMember( rapidjson::Value::StringRefType(propertyName.GetCStr()), outputPropertyValue, @@ -164,7 +170,9 @@ namespace AZ template bool JsonMaterialAssignmentSerializer::LoadAny( - AZStd::any& propertyValue, const rapidjson::Value& inputPropertyValue, AZ::JsonDeserializerContext& context, + AZStd::any& propertyValue, + const rapidjson::Value& inputPropertyValue, + AZ::JsonDeserializerContext& context, AZ::JsonSerializationResult::ResultCode& result) { if (inputPropertyValue.IsObject() && inputPropertyValue.HasMember("Value") && inputPropertyValue.HasMember("$type")) @@ -187,7 +195,9 @@ namespace AZ template bool JsonMaterialAssignmentSerializer::StoreAny( - const AZStd::any& propertyValue, rapidjson::Value& outputPropertyValue, AZ::JsonSerializerContext& context, + const AZStd::any& propertyValue, + rapidjson::Value& outputPropertyValue, + AZ::JsonSerializerContext& context, AZ::JsonSerializationResult::ResultCode& result) { if (propertyValue.is()) @@ -199,7 +209,7 @@ namespace AZ result.Combine(StoreTypeId(typeValue, azrtti_typeid(), context)); outputPropertyValue.AddMember("$type", typeValue, context.GetJsonAllocator()); - T value = AZStd::any_cast(propertyValue); + const T& value = AZStd::any_cast(propertyValue); result.Combine( ContinueStoringToJsonObjectField(outputPropertyValue, "Value", &value, nullptr, azrtti_typeid(), context)); return true; diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.h b/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.h index e92d756639..069b4d4cdb 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.h +++ b/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.h @@ -25,21 +25,31 @@ namespace AZ AZ_CLASS_ALLOCATOR_DECL; JsonSerializationResult::Result Load( - void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + void* outputValue, + const Uuid& outputValueTypeId, + const rapidjson::Value& inputValue, JsonDeserializerContext& context) override; JsonSerializationResult::Result Store( - rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const Uuid& valueTypeId, + rapidjson::Value& outputValue, + const void* inputValue, + const void* defaultValue, + const Uuid& valueTypeId, JsonSerializerContext& context) override; private: template bool LoadAny( - AZStd::any& propertyValue, const rapidjson::Value& inputPropertyValue, AZ::JsonDeserializerContext& context, + AZStd::any& propertyValue, + const rapidjson::Value& inputPropertyValue, + AZ::JsonDeserializerContext& context, AZ::JsonSerializationResult::ResultCode& result); + template bool StoreAny( - const AZStd::any& propertyValue, rapidjson::Value& outputPropertyValue, AZ::JsonSerializerContext& context, + const AZStd::any& propertyValue, + rapidjson::Value& outputPropertyValue, + AZ::JsonSerializerContext& context, AZ::JsonSerializationResult::ResultCode& result); }; } // namespace Render diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp index 3ffd8efa6e..2ad4522094 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp @@ -33,11 +33,13 @@ namespace AtomToolsFramework { if (value.Is>()) { - const AZ::Data::Asset& imageAsset = value.GetValue>(); - return AZStd::any(AZ::Data::Asset( - imageAsset.GetId(), - azrtti_typeid(), - imageAsset.GetHint())); + const auto& imageAsset = value.GetValue>(); + return AZStd::any(AZ::Data::Asset(imageAsset.GetId(), azrtti_typeid(), imageAsset.GetHint())); + } + else if (value.Is>()) + { + const auto& image = value.GetValue>(); + return AZStd::any(AZ::Data::Asset(image->GetAssetId(), azrtti_typeid())); } return AZ::RPI::MaterialPropertyValue::ToAny(value); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp index 0ccdae28de..996a575c69 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp @@ -104,6 +104,7 @@ namespace AZ MaterialComponentController::MaterialComponentController(const MaterialComponentConfig& config) : m_configuration(config) { + ConvertAssetsForSerialization(); } void MaterialComponentController::Activate(EntityId entityId) @@ -135,6 +136,7 @@ namespace AZ void MaterialComponentController::SetConfiguration(const MaterialComponentConfig& config) { m_configuration = config; + ConvertAssetsForSerialization(); } const MaterialComponentConfig& MaterialComponentController::GetConfiguration() const @@ -338,6 +340,7 @@ namespace AZ // before LoadMaterials() is called [LYN-2249] auto temp = m_configuration.m_materials; m_configuration.m_materials = materials; + ConvertAssetsForSerialization(); LoadMaterials(); } @@ -489,6 +492,7 @@ namespace AZ auto& materialAssignment = m_configuration.m_materials[materialAssignmentId]; const bool wasEmpty = materialAssignment.m_propertyOverrides.empty(); materialAssignment.m_propertyOverrides[AZ::Name(propertyName)] = value; + ConvertAssetsForSerialization(); if (materialAssignment.RequiresLoading()) { @@ -586,6 +590,7 @@ namespace AZ auto& materialAssignment = m_configuration.m_materials[materialAssignmentId]; const bool wasEmpty = materialAssignment.m_propertyOverrides.empty(); materialAssignment.m_propertyOverrides = propertyOverrides; + ConvertAssetsForSerialization(); if (materialAssignment.RequiresLoading()) { @@ -667,5 +672,33 @@ namespace AZ TickBus::Handler::BusConnect(); } } + + void MaterialComponentController::ConvertAssetsForSerialization() + { + for (auto& materialAssignmentPair : m_configuration.m_materials) + { + MaterialAssignment& materialAssignment = materialAssignmentPair.second; + for (auto& propertyPair : materialAssignment.m_propertyOverrides) + { + auto& value = propertyPair.second; + if (value.is>()) + { + value = AZStd::any_cast>(value).GetId(); + } + else if (value.is>()) + { + value = AZStd::any_cast>(value).GetId(); + } + else if (value.is>()) + { + value = AZStd::any_cast>(value).GetId(); + } + else if (value.is>()) + { + value = AZStd::any_cast>(value)->GetAssetId(); + } + } + } + } } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.h index 74b1cfda4d..d3eaa4433d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.h @@ -99,6 +99,11 @@ namespace AZ //! Queue material instance recreation notifiucations until tick void QueueMaterialUpdateNotification(); + //! Converts property overrides storing image asset references into asset IDs. This addresses a problem where image property + //! overrides are lost during prefab serialization and patching. This suboptimal function will be removed once the underlying + //! problem is resolved. + void ConvertAssetsForSerialization(); + EntityId m_entityId; MaterialComponentConfig m_configuration; AZStd::unordered_set m_materialsWithDirtyProperties; From c019fe8946269e581683c383966651a81c5f9d38 Mon Sep 17 00:00:00 2001 From: Mike Chang Date: Thu, 2 Dec 2021 17:05:42 -0800 Subject: [PATCH 019/413] Add conditional to pull O3DE_BUILD_VERSION through environment var (#6096) Signed-off-by: Mike Chang --- cmake/Version.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index de93ebefef..c5504ec62a 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -16,3 +16,8 @@ if("$ENV{O3DE_VERSION}") # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() + +if("$ENV{O3DE_BUILD_VERSION}") + # Overriding through environment + set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") +endif() From f44697fbf45b6288d9f2995cd43b2cef4927b9dc Mon Sep 17 00:00:00 2001 From: AMZN-Phil Date: Tue, 7 Dec 2021 14:05:05 -0800 Subject: [PATCH 020/413] Check whether env variables are defined Signed-off-by: AMZN-Phil --- cmake/Version.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index c5504ec62a..6fa32e9c73 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -12,12 +12,12 @@ set(LY_VERSION_STRING "0.0.0.0" CACHE STRING "Open 3D Engine's version") set(LY_VERSION_BUILD_NUMBER 0 CACHE STRING "Open 3D Engine's build number") set(LY_VERSION_ENGINE_NAME "o3de" CACHE STRING "Open 3D Engine's engine name") -if("$ENV{O3DE_VERSION}") +if(DEFINED ENV{O3DE_VERSION}) # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() -if("$ENV{O3DE_BUILD_VERSION}") +if(DEFINED ENV{O3DE_BUILD_VERSION}) # Overriding through environment set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") endif() From 38c8d941564ae709a7839a25883807b723fa4657 Mon Sep 17 00:00:00 2001 From: AMZN-Phil Date: Tue, 7 Dec 2021 15:12:11 -0800 Subject: [PATCH 021/413] Use version check to allow for a defined empty string to fail and greater to check build number is a number greater than 0 Signed-off-by: AMZN-Phil --- cmake/Version.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 6fa32e9c73..d15d5b9f86 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -12,12 +12,12 @@ set(LY_VERSION_STRING "0.0.0.0" CACHE STRING "Open 3D Engine's version") set(LY_VERSION_BUILD_NUMBER 0 CACHE STRING "Open 3D Engine's build number") set(LY_VERSION_ENGINE_NAME "o3de" CACHE STRING "Open 3D Engine's engine name") -if(DEFINED ENV{O3DE_VERSION}) +if("$ENV{O3DE_VERSION}" VERSION_GREATER "0.0.0.0") # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() -if(DEFINED ENV{O3DE_BUILD_VERSION}) +if("$ENV{O3DE_BUILD_VERSION}" GREATER 0) # Overriding through environment set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") endif() From 82af1e6870ba7f8e705d5f0559591ce42fa57384 Mon Sep 17 00:00:00 2001 From: AMZN-Phil Date: Tue, 7 Dec 2021 17:10:26 -0800 Subject: [PATCH 022/413] Force a string check on the version numbers Signed-off-by: AMZN-Phil --- cmake/Version.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index d15d5b9f86..876c34f8c4 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -12,12 +12,12 @@ set(LY_VERSION_STRING "0.0.0.0" CACHE STRING "Open 3D Engine's version") set(LY_VERSION_BUILD_NUMBER 0 CACHE STRING "Open 3D Engine's build number") set(LY_VERSION_ENGINE_NAME "o3de" CACHE STRING "Open 3D Engine's engine name") -if("$ENV{O3DE_VERSION}" VERSION_GREATER "0.0.0.0") +if(NOT "$ENV{O3DE_VERSION}" STREQUAL "") # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() -if("$ENV{O3DE_BUILD_VERSION}" GREATER 0) +if(NOT "$ENV{O3DE_BUILD_VERSION}" STREQUAL "") # Overriding through environment set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") endif() From d108fe4804071e1f22612e897021d6653f6bea53 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 16 Dec 2021 18:31:19 -0800 Subject: [PATCH 023/413] Addresses PR comments Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Memory/AllocatorBase.cpp | 345 +++++++++--------- .../AzCore/Memory/BestFitExternalMapSchema.h | 2 +- .../AzCore/AzCore/Memory/IAllocator.h | 4 +- Code/Framework/AzCore/AzCore/Memory/Memory.h | 2 +- .../Tests/Memory/AllocatorBenchmarks.cpp | 4 +- 5 files changed, 181 insertions(+), 176 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index 4da9ab384f..e877739e29 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -9,11 +9,10 @@ #include #include -using namespace AZ; +// Only used to create recordings of memory operations to use for memory benchmarks +#define O3DE_RECORDING_ENABLED 0 -#define RECORDING_ENABLED 0 - -#if RECORDING_ENABLED +#if O3DE_RECORDING_ENABLED #include #include @@ -25,10 +24,10 @@ namespace class DebugAllocator { public: - typedef void* pointer_type; - typedef AZStd::size_t size_type; - typedef AZStd::ptrdiff_t difference_type; - typedef AZStd::false_type allow_memory_leaks; ///< Regular allocators should not leak. + using pointer_type = void*; + using size_type = AZStd::size_t; + using difference_type = AZStd::ptrdiff_t; + using allow_memory_leaks = AZStd::false_type; ///< Regular allocators should not leak. AZ_FORCE_INLINE pointer_type allocate(size_t byteSize, size_t alignment, int = 0) { @@ -64,7 +63,7 @@ namespace static constexpr size_t s_maxNumberOfAllocationsToRecord = 16384; static size_t s_numberOfAllocationsRecorded = 0; - static constexpr size_t s_allocationOperationCount = 5 * 1024; + static constexpr size_t s_allocationOperationCount = 8 * 1024; static AZStd::array s_operations = {}; static uint64_t s_operationCounter = 0; @@ -76,11 +75,12 @@ namespace void RecordAllocatorOperation(AllocatorOperation::OperationType type, void* ptr, size_t size = 0, size_t alignment = 0) { - AZStd::scoped_lock lock(s_operationsMutex); + AZStd::scoped_lock lock(s_operationsMutex); if (s_operationCounter == s_allocationOperationCount) { AZ::IO::SystemFile file; int mode = AZ::IO::SystemFile::OpenMode::SF_OPEN_APPEND | AZ::IO::SystemFile::OpenMode::SF_OPEN_WRITE_ONLY; + // memoryrecordings.bin is being output to the current working directory if (!file.Exists("memoryrecordings.bin")) { mode |= AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE; @@ -158,188 +158,195 @@ namespace } #endif -AllocatorBase::AllocatorBase(IAllocatorSchema* allocationSchema, const char* name, const char* desc) - : IAllocator(allocationSchema) - , m_name(name) - , m_desc(desc) +namespace AZ { -} - -AllocatorBase::~AllocatorBase() -{ - AZ_Assert(!m_isReady, "Allocator %s (%s) is being destructed without first having gone through proper calls to PreDestroy() and Destroy(). Use AllocatorInstance<> for global allocators or AllocatorWrapper<> for local allocators.", m_name, m_desc); -} - -const char* AllocatorBase::GetName() const -{ - return m_name; -} - -const char* AllocatorBase::GetDescription() const -{ - return m_desc; -} - -Debug::AllocationRecords* AllocatorBase::GetRecords() -{ - return m_records; -} - -void AllocatorBase::SetRecords(Debug::AllocationRecords* records) -{ - m_records = records; - m_memoryGuardSize = records ? records->MemoryGuardSize() : 0; -} - -bool AllocatorBase::IsReady() const -{ - return m_isReady; -} - -void AllocatorBase::PostCreate() -{ - if (m_registrationEnabled) + AllocatorBase::AllocatorBase(IAllocatorSchema* allocationSchema, const char* name, const char* desc) + : IAllocator(allocationSchema) + , m_name(name) + , m_desc(desc) { - if (AZ::Environment::IsReady()) + } + + AllocatorBase::~AllocatorBase() + { + AZ_Assert( + !m_isReady, + "Allocator %s (%s) is being destructed without first having gone through proper calls to PreDestroy() and Destroy(). Use " + "AllocatorInstance<> for global allocators or AllocatorWrapper<> for local allocators.", + m_name, m_desc); + } + + const char* AllocatorBase::GetName() const + { + return m_name; + } + + const char* AllocatorBase::GetDescription() const + { + return m_desc; + } + + Debug::AllocationRecords* AllocatorBase::GetRecords() + { + return m_records; + } + + void AllocatorBase::SetRecords(Debug::AllocationRecords* records) + { + m_records = records; + m_memoryGuardSize = records ? records->MemoryGuardSize() : 0; + } + + bool AllocatorBase::IsReady() const + { + return m_isReady; + } + + void AllocatorBase::PostCreate() + { + if (m_registrationEnabled) { - AllocatorManager::Instance().RegisterAllocator(this); + if (AZ::Environment::IsReady()) + { + AllocatorManager::Instance().RegisterAllocator(this); + } + else + { + AllocatorManager::PreRegisterAllocator(this); + } } - else + + const auto debugConfig = GetDebugConfig(); + if (!debugConfig.m_excludeFromDebugging) { - AllocatorManager::PreRegisterAllocator(this); + SetRecords(aznew Debug::AllocationRecords( + (unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, + GetName())); } + + m_isReady = true; } - const auto debugConfig = GetDebugConfig(); - if (!debugConfig.m_excludeFromDebugging) + void AllocatorBase::PreDestroy() { - SetRecords(aznew Debug::AllocationRecords((unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, GetName())); - } - - m_isReady = true; -} - -void AllocatorBase::PreDestroy() -{ - Debug::AllocationRecords* allocatorRecords = GetRecords(); - if(allocatorRecords) - { - delete allocatorRecords; - SetRecords(nullptr); - } - - if (m_registrationEnabled && AZ::AllocatorManager::IsReady()) - { - AllocatorManager::Instance().UnRegisterAllocator(this); - } - - m_isReady = false; -} - -void AllocatorBase::SetLazilyCreated(bool lazy) -{ - m_isLazilyCreated = lazy; -} - -bool AllocatorBase::IsLazilyCreated() const -{ - return m_isLazilyCreated; -} - -void AllocatorBase::SetProfilingActive(bool active) -{ - m_isProfilingActive = active; -} - -bool AllocatorBase::IsProfilingActive() const -{ - return m_isProfilingActive; -} - -void AllocatorBase::DisableRegistration() -{ - m_registrationEnabled = false; -} - -void AllocatorBase::ProfileAllocation(void* ptr, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, int suppressStackRecord) -{ - if (m_isProfilingActive) - { -#if defined(AZ_HAS_VARIADIC_TEMPLATES) && defined(AZ_DEBUG_BUILD) - ++suppressStackRecord; // one more for the fact the ebus is a function -#endif // AZ_HAS_VARIADIC_TEMPLATES - - auto records = GetRecords(); - if (records) + Debug::AllocationRecords* allocatorRecords = GetRecords(); + if (allocatorRecords) { - records->RegisterAllocation(ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1); + delete allocatorRecords; + SetRecords(nullptr); } + + if (m_registrationEnabled && AZ::AllocatorManager::IsReady()) + { + AllocatorManager::Instance().UnRegisterAllocator(this); + } + + m_isReady = false; } -#if RECORDING_ENABLED - RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, byteSize, alignment); + void AllocatorBase::SetLazilyCreated(bool lazy) + { + m_isLazilyCreated = lazy; + } + + bool AllocatorBase::IsLazilyCreated() const + { + return m_isLazilyCreated; + } + + void AllocatorBase::SetProfilingActive(bool active) + { + m_isProfilingActive = active; + } + + bool AllocatorBase::IsProfilingActive() const + { + return m_isProfilingActive; + } + + void AllocatorBase::DisableRegistration() + { + m_registrationEnabled = false; + } + + void AllocatorBase::ProfileAllocation( + void* ptr, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, int suppressStackRecord) + { + if (m_isProfilingActive) + { + auto records = GetRecords(); + if (records) + { + records->RegisterAllocation(ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1); + } + } + +#if O3DE_RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, byteSize, alignment); #endif -} + } -void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t alignment, Debug::AllocationInfo* info) -{ - if (m_isProfilingActive) + void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t alignment, Debug::AllocationInfo* info) { - auto records = GetRecords(); - if (records) + if (m_isProfilingActive) { - records->UnregisterAllocation(ptr, byteSize, alignment, info); + auto records = GetRecords(); + if (records) + { + records->UnregisterAllocation(ptr, byteSize, alignment, info); + } } - } -#if RECORDING_ENABLED - RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr, byteSize, alignment); +#if O3DE_RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr, byteSize, alignment); #endif -} - -void AllocatorBase::ProfileReallocationBegin([[maybe_unused]] void* ptr, [[maybe_unused]] size_t newSize) -{ -} - -void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) -{ - if (m_isProfilingActive) - { - Debug::AllocationInfo info; - ProfileDeallocation(ptr, 0, 0, &info); - ProfileAllocation(newPtr, newSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); } -#if RECORDING_ENABLED - RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr); - RecordAllocatorOperation(AllocatorOperation::ALLOCATE, newPtr, newSize, newAlignment); -#endif -} -void AllocatorBase::ProfileReallocation(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) -{ - ProfileReallocationEnd(ptr, newPtr, newSize, newAlignment); -} - -void AllocatorBase::ProfileResize(void* ptr, size_t newSize) -{ - if (newSize && m_isProfilingActive) + void AllocatorBase::ProfileReallocationBegin([[maybe_unused]] void* ptr, [[maybe_unused]] size_t newSize) { - auto records = GetRecords(); - if (records) + } + + void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) + { + if (m_isProfilingActive) { - records->ResizeAllocation(ptr, newSize); + Debug::AllocationInfo info; + ProfileDeallocation(ptr, 0, 0, &info); + ProfileAllocation(newPtr, newSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); } - } -#if RECORDING_ENABLED - RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, newSize); +#if O3DE_RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr); + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, newPtr, newSize, newAlignment); #endif -} - -bool AllocatorBase::OnOutOfMemory(size_t byteSize, size_t alignment, int flags, const char* name, const char* fileName, int lineNum) -{ - if (AllocatorManager::IsReady() && AllocatorManager::Instance().m_outOfMemoryListener) - { - AllocatorManager::Instance().m_outOfMemoryListener(this, byteSize, alignment, flags, name, fileName, lineNum); - return true; } - return false; -} + + void AllocatorBase::ProfileReallocation(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) + { + ProfileReallocationEnd(ptr, newPtr, newSize, newAlignment); + } + + void AllocatorBase::ProfileResize(void* ptr, size_t newSize) + { + if (newSize && m_isProfilingActive) + { + auto records = GetRecords(); + if (records) + { + records->ResizeAllocation(ptr, newSize); + } + } +#if O3DE_RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, newSize); +#endif + } + + bool AllocatorBase::OnOutOfMemory(size_t byteSize, size_t alignment, int flags, const char* name, const char* fileName, int lineNum) + { + if (AllocatorManager::IsReady() && AllocatorManager::Instance().m_outOfMemoryListener) + { + AllocatorManager::Instance().m_outOfMemoryListener(this, byteSize, alignment, flags, name, fileName, lineNum); + return true; + } + return false; + } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h index 63e9027dd2..21ce34eb80 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h @@ -50,7 +50,7 @@ namespace AZ BestFitExternalMapSchema(const Descriptor& desc); - pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override; + pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = nullptr, const char* fileName = nullptr, int lineNum = 0, unsigned int suppressStackRecord = 0) override; void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override; size_type Resize(pointer_type ptr, size_type newSize) override; pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override; diff --git a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h index 319175f9ee..4612b27249 100644 --- a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h @@ -37,9 +37,9 @@ namespace AZ typedef size_t size_type; typedef ptrdiff_t difference_type; - virtual ~IAllocatorSchema() {} + virtual ~IAllocatorSchema() = default; - virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) = 0; + virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = nullptr, const char* fileName = nullptr, int lineNum = 0, unsigned int suppressStackRecord = 0) = 0; virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) = 0; /// Resize an allocated memory block. Returns the new adjusted size (as close as possible or equal to the requested one) or 0 (if you don't support resize at all). virtual size_type Resize(pointer_type ptr, size_type newSize) = 0; diff --git a/Code/Framework/AzCore/AzCore/Memory/Memory.h b/Code/Framework/AzCore/AzCore/Memory/Memory.h index 2ecba6ebff..c87c9cd303 100644 --- a/Code/Framework/AzCore/AzCore/Memory/Memory.h +++ b/Code/Framework/AzCore/AzCore/Memory/Memory.h @@ -735,7 +735,7 @@ namespace AZ typedef typename Allocator::Descriptor Descriptor; // Maintained for backwards compatibility, prefer to use Get() instead. - // Get was previously used to get the the schema, however, that bypases what the allocators are doing. + // Get was previously used to get the the schema, however, that bypasses what the allocators are doing. // If the schema is needed, call Get().GetSchema() AZ_FORCE_INLINE static IAllocator& GetAllocator() { diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 7870749d24..0599038006 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -155,11 +155,9 @@ namespace Benchmark } private: - static size_t s_numAllocatedBytes; + inline static size_t s_numAllocatedBytes = 0; }; - size_t TestAllocatorWrapper::s_numAllocatedBytes = 0; - // Some allocator are not fully declared, those we simply setup from the schema class MallocSchemaAllocator : public AZ::SimpleSchemaAllocator { From 6643b4b53cb209e57904c5ff6b51e08d481c98eb Mon Sep 17 00:00:00 2001 From: "T.J. McGrath-Daly" Date: Mon, 6 Dec 2021 08:48:24 +0800 Subject: [PATCH 024/413] Fix: LOD stops animation Signed-off-by: T.J. McGrath-Daly --- .../SkinnedMeshFeatureProcessor.cpp | 65 ++++++++++++------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp index 37b18291dc..8cd20b77d5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp @@ -204,35 +204,56 @@ namespace AZ // do the enumeration for each view, keep track of the lowest lod for each entry, // and submit the appropriate dispatch item - //the [1][1] element of a perspective projection matrix stores cot(FovY/2) (equal to 2*nearPlaneDistance/nearPlaneHeight), - //which is used to determine the (vertical) projected size in screen space - const float yScale = viewToClip.GetElement(1, 1); - const bool isPerspective = viewToClip.GetElement(3, 3) == 0.f; - const Vector3 cameraPos = view->GetViewToWorldMatrix().GetTranslation(); - - const Vector3 pos = cullable.m_cullData.m_boundingSphere.GetCenter(); - - const float approxScreenPercentage = RPI::ModelLodUtils::ApproxScreenPercentage( - pos, cullable.m_lodData.m_lodSelectionRadius, cameraPos, yScale, isPerspective); - - for (size_t lodIndex = 0; lodIndex < cullable.m_lodData.m_lods.size(); ++lodIndex) + switch (cullable.m_lodData.m_lodConfiguration.m_lodType) { - const RPI::Cullable::LodData::Lod& lod = cullable.m_lodData.m_lods[lodIndex]; - - //Note that this supports overlapping lod ranges (to support cross-fading lods, for example) - if (approxScreenPercentage >= lod.m_screenCoverageMin && approxScreenPercentage <= lod.m_screenCoverageMax) + case RPI::Cullable::LodType::SpecificLod: + { + AZStd::lock_guard lock(m_dispatchItemMutex); + auto lodIndex = cullable.m_lodData.m_lodConfiguration.m_lodOverride; + m_skinningDispatches.insert(&renderProxy.m_dispatchItemsByLod[lodIndex]->GetRHIDispatchItem()); + for (size_t morphTargetIndex = 0; morphTargetIndex < renderProxy.m_morphTargetDispatchItemsByLod[lodIndex].size(); morphTargetIndex++) { - AZStd::lock_guard lock(m_dispatchItemMutex); - m_skinningDispatches.insert(&renderProxy.m_dispatchItemsByLod[lodIndex]->GetRHIDispatchItem()); - for (size_t morphTargetIndex = 0; morphTargetIndex < renderProxy.m_morphTargetDispatchItemsByLod[lodIndex].size(); morphTargetIndex++) + const MorphTargetDispatchItem* dispatchItem = renderProxy.m_morphTargetDispatchItemsByLod[lodIndex][morphTargetIndex].get(); + if (dispatchItem && dispatchItem->GetWeight() > AZ::Constants::FloatEpsilon) { - const MorphTargetDispatchItem* dispatchItem = renderProxy.m_morphTargetDispatchItemsByLod[lodIndex][morphTargetIndex].get(); - if (dispatchItem && dispatchItem->GetWeight() > AZ::Constants::FloatEpsilon) + m_morphTargetDispatches.insert(&dispatchItem->GetRHIDispatchItem()); + } + } + } + break; + case RPI::Cullable::LodType::ScreenCoverage: + default: + //the [1][1] element of a perspective projection matrix stores cot(FovY/2) (equal to 2*nearPlaneDistance/nearPlaneHeight), + //which is used to determine the (vertical) projected size in screen space + const float yScale = viewToClip.GetElement(1, 1); + const bool isPerspective = viewToClip.GetElement(3, 3) == 0.f; + const Vector3 cameraPos = view->GetViewToWorldMatrix().GetTranslation(); + + const Vector3 pos = cullable.m_cullData.m_boundingSphere.GetCenter(); + + const float approxScreenPercentage = RPI::ModelLodUtils::ApproxScreenPercentage( + pos, cullable.m_lodData.m_lodSelectionRadius, cameraPos, yScale, isPerspective); + + for (size_t lodIndex = 0; lodIndex < cullable.m_lodData.m_lods.size(); ++lodIndex) + { + const RPI::Cullable::LodData::Lod& lod = cullable.m_lodData.m_lods[lodIndex]; + + //Note that this supports overlapping lod ranges (to support cross-fading lods, for example) + if (approxScreenPercentage >= lod.m_screenCoverageMin && approxScreenPercentage <= lod.m_screenCoverageMax) + { + AZStd::lock_guard lock(m_dispatchItemMutex); + m_skinningDispatches.insert(&renderProxy.m_dispatchItemsByLod[lodIndex]->GetRHIDispatchItem()); + for (size_t morphTargetIndex = 0; morphTargetIndex < renderProxy.m_morphTargetDispatchItemsByLod[lodIndex].size(); morphTargetIndex++) { - m_morphTargetDispatches.insert(&dispatchItem->GetRHIDispatchItem()); + const MorphTargetDispatchItem* dispatchItem = renderProxy.m_morphTargetDispatchItemsByLod[lodIndex][morphTargetIndex].get(); + if (dispatchItem && dispatchItem->GetWeight() > AZ::Constants::FloatEpsilon) + { + m_morphTargetDispatches.insert(&dispatchItem->GetRHIDispatchItem()); + } } } } + break; } } } From af6af93dffe2764ccf5160436e64931775cc18ce Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 5 Jan 2022 14:23:32 -0800 Subject: [PATCH 025/413] Fixes Linux builds Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp | 4 ++-- Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp index 9561d1019c..5029e6349f 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp @@ -133,13 +133,13 @@ namespace AZ BestFitExternalMapSchema::size_type BestFitExternalMapSchema::Resize(pointer_type, size_type) { - AZ_Assert(false, AZ_FUNCTION_SIGNATURE " unsupported"); + AZ_Assert(false, "%s unsupported", AZ_FUNCTION_SIGNATURE); return 0; } BestFitExternalMapSchema::pointer_type BestFitExternalMapSchema::ReAllocate(pointer_type, size_type, size_type) { - AZ_Assert(false, AZ_FUNCTION_SIGNATURE " unsupported"); + AZ_Assert(false, "%s unsupported", AZ_FUNCTION_SIGNATURE); return nullptr; } diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp index 0599038006..e027b03a49 100644 --- a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include From ada7c41a34031b3d50807d7f86b0bc50cce66b83 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Wed, 15 Dec 2021 19:18:24 -0800 Subject: [PATCH 026/413] feature: add Exception Handler support for unix REF: https://github.com/o3de/o3de/issues/5886 Signed-off-by: Michael Pollind --- .../UnixLike/AzCore/Debug/Trace_UnixLike.cpp | 155 ++++++++++++------ Code/Legacy/CrySystem/SystemInit.cpp | 42 ----- 2 files changed, 105 insertions(+), 92 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp index 92a80b0d9a..b0ee4ea1e3 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp @@ -6,74 +6,129 @@ * */ +#include #include #include #include +#include #include #include -namespace AZ::Debug::Platform +namespace AZ::Debug { #if defined(AZ_ENABLE_DEBUG_TOOLS) - bool performDebuggerDetection() + void ExceptionHandler(int signal); +#endif + + constexpr int MaxMessageLength = 4096; + constexpr int MaxStackLines = 100; + + namespace Platform { - AZ::IO::SystemFile processStatusFile; - if (!processStatusFile.Open("/proc/self/status", AZ::IO::SystemFile::SF_OPEN_READ_ONLY)) +#if defined(AZ_ENABLE_DEBUG_TOOLS) + bool performDebuggerDetection() { - return false; - } - - char buffer[4096]; - AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); - - const AZStd::string_view processStatusView(buffer, buffer + numRead); - constexpr AZStd::string_view tracerPidString = "TracerPid:"; - const size_t tracerPidOffset = processStatusView.find(tracerPidString); - if (tracerPidOffset == AZStd::string_view::npos) - { - return false; - } - for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) - { - if (!::isspace(processStatusView[i])) + AZ::IO::SystemFile processStatusFile; + if (!processStatusFile.Open("/proc/self/status", AZ::IO::SystemFile::SF_OPEN_READ_ONLY)) { - return processStatusView[i] != '0'; + return false; + } + + char buffer[4096]; + AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); + + const AZStd::string_view processStatusView(buffer, buffer + numRead); + constexpr AZStd::string_view tracerPidString = "TracerPid:"; + const size_t tracerPidOffset = processStatusView.find(tracerPidString); + if (tracerPidOffset == AZStd::string_view::npos) + { + return false; + } + for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) + { + if (!::isspace(processStatusView[i])) + { + return processStatusView[i] != '0'; + } + } + return false; + } + + bool IsDebuggerPresent() + { + static bool s_detectionPerformed = false; + static bool s_debuggerDetected = false; + if (!s_detectionPerformed) + { + s_debuggerDetected = performDebuggerDetection(); + s_detectionPerformed = true; + } + return s_debuggerDetected; + } + + bool AttachDebugger() + { + // Not supported yet + AZ_Assert(false, "AttachDebugger() is not supported for Unix platform yet"); + return false; + } + + void SignalHandler(int handler) + { + } + + void HandleExceptions(bool isEnabled) + { + if (isEnabled) + { + signal(SIGSEGV, ExceptionHandler); + signal(SIGTRAP, ExceptionHandler); + signal(SIGILL, ExceptionHandler); + } + else + { + signal(SIGSEGV, SIG_DFL); + signal(SIGTRAP, SIG_DFL); + signal(SIGILL, SIG_DFL); } } - return false; - } - bool IsDebuggerPresent() - { - static bool s_detectionPerformed = false; - static bool s_debuggerDetected = false; - if (!s_detectionPerformed) + void DebugBreak() { - s_debuggerDetected = performDebuggerDetection(); - s_detectionPerformed = true; + raise(SIGINT); } - return s_debuggerDetected; - } - - bool AttachDebugger() - { - // Not supported yet - AZ_Assert(false, "AttachDebugger() is not supported for Unix platform yet"); - return false; - } - - void HandleExceptions(bool) - {} - - void DebugBreak() - { - raise(SIGINT); - } #endif // AZ_ENABLE_DEBUG_TOOLS - void Terminate(int exitCode) + void Terminate(int exitCode) + { + _exit(exitCode); + } + } // namespace Platform + +#if defined(AZ_ENABLE_DEBUG_TOOLS) + void ExceptionHandler(int signal) { - _exit(exitCode); + char message[MaxMessageLength]; + Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); + azsnprintf(message, MaxMessageLength, "Error: signal %s: \n", strsignal(signal)); + Debug::Trace::Instance().Output(nullptr, message); + + void* buffers[MaxStackLines]; + int numberBacktraceStrings = backtrace(buffers, MaxStackLines); + char** backtraceResults = backtrace_symbols(buffers, numberBacktraceStrings); + if (backtraceResults == nullptr) + { + Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); + return; + } + for (int j = 0; j < numberBacktraceStrings; j++) + { + Debug::Trace::Instance().Output(nullptr, backtraceResults[j]); + } + + Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); } -} // namespace AZ::Debug::Platform +#endif + +} // namespace AZ::Debug diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index 09bbc3773a..f3f9442322 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -115,43 +115,6 @@ extern LONG WINAPI CryEngineExceptionFilterWER(struct _EXCEPTION_POINTERS* pExce #include AZ_RESTRICTED_FILE(SystemInit_cpp) #endif -#if AZ_TRAIT_USE_CRY_SIGNAL_HANDLER - -#include -#include -void CryEngineSignalHandler(int signal) -{ - char resolvedPath[_MAX_PATH]; - - // it is assumed that @log@ points at the appropriate place (so for apple, to the user profile dir) - if (AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath("@log@/crash.log", resolvedPath, _MAX_PATH)) - { - fprintf(stderr, "Crash Signal Handler - logged to %s\n", resolvedPath); - FILE* file = fopen(resolvedPath, "a"); - if (file) - { - char sTime[128]; - time_t ltime; - time(<ime); - struct tm* today = localtime(<ime); - strftime(sTime, 40, "<%Y-%m-%d %H:%M:%S> ", today); - fprintf(file, "%s: Error: signal %s:\n", sTime, strsignal(signal)); - fflush(file); - void* array[100]; - int s = backtrace(array, 100); - backtrace_symbols_fd(array, s, fileno(file)); - fclose(file); - CryLogAlways("Successfully recorded crash file: '%s'", resolvedPath); - abort(); - } - } - - CryLogAlways("Could not record crash file..."); - abort(); -} - -#endif // AZ_TRAIT_USE_CRY_SIGNAL_HANDLER - ////////////////////////////////////////////////////////////////////////// #define DEFAULT_LOG_FILENAME "@log@/Log.txt" @@ -697,11 +660,6 @@ public: ///////////////////////////////////////////////////////////////////////////////// bool CSystem::Init(const SSystemInitParams& startupParams) { -#if AZ_TRAIT_USE_CRY_SIGNAL_HANDLER - signal(SIGSEGV, CryEngineSignalHandler); - signal(SIGTRAP, CryEngineSignalHandler); - signal(SIGILL, CryEngineSignalHandler); -#endif // AZ_TRAIT_USE_CRY_SIGNAL_HANDLER // Temporary Fix for an issue accessing gEnv from this object instance. The gEnv is not resolving to the // global gEnv, instead its resolving an some uninitialized gEnv elsewhere (NULL). Since gEnv is From 833598d68fc737c82982b85608be387ad9922886 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Thu, 16 Dec 2021 20:30:56 -0800 Subject: [PATCH 027/413] chore: remove signal handler Signed-off-by: Michael Pollind --- .../AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h | 1 - .../Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h | 1 - Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h | 1 - .../AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h | 1 - Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h | 1 - 5 files changed, 5 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h b/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h index e8efce1133..e99f29e051 100644 --- a/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h +++ b/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h @@ -98,7 +98,6 @@ #define AZ_TRAIT_THREAD_HARDWARE_CONCURRENCY_RETURN_VALUE static_cast(sysconf(_SC_NPROCESSORS_ONLN)); #define AZ_TRAIT_UNITTEST_NON_PREALLOCATED_HPHA_TEST 0 #define AZ_TRAIT_UNITTEST_USE_TEST_RUNNER_ENVIRONMENT 1 -#define AZ_TRAIT_USE_CRY_SIGNAL_HANDLER 0 #define AZ_TRAIT_USE_POSIX_STRERROR_R 1 #define AZ_TRAIT_USE_SECURE_CRT_FUNCTIONS 0 #define AZ_TRAIT_USE_WINDOWS_FILE_API 0 diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h b/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h index 59d5f3c5ed..e5e52995a1 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h @@ -98,7 +98,6 @@ #define AZ_TRAIT_THREAD_HARDWARE_CONCURRENCY_RETURN_VALUE static_cast(sysconf(_SC_NPROCESSORS_ONLN)); #define AZ_TRAIT_UNITTEST_NON_PREALLOCATED_HPHA_TEST 0 #define AZ_TRAIT_UNITTEST_USE_TEST_RUNNER_ENVIRONMENT 0 -#define AZ_TRAIT_USE_CRY_SIGNAL_HANDLER 1 #define AZ_TRAIT_USE_POSIX_STRERROR_R 1 #define AZ_TRAIT_USE_SECURE_CRT_FUNCTIONS 0 #define AZ_TRAIT_USE_WINDOWS_FILE_API 0 diff --git a/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h b/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h index 1a3d0663e1..9a6c76fe2d 100644 --- a/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h +++ b/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h @@ -98,7 +98,6 @@ #define AZ_TRAIT_THREAD_HARDWARE_CONCURRENCY_RETURN_VALUE static_cast(sysconf(_SC_NPROCESSORS_ONLN)); #define AZ_TRAIT_UNITTEST_NON_PREALLOCATED_HPHA_TEST 0 #define AZ_TRAIT_UNITTEST_USE_TEST_RUNNER_ENVIRONMENT 0 -#define AZ_TRAIT_USE_CRY_SIGNAL_HANDLER 1 #define AZ_TRAIT_USE_POSIX_STRERROR_R 1 #define AZ_TRAIT_USE_SECURE_CRT_FUNCTIONS 0 #define AZ_TRAIT_USE_WINDOWS_FILE_API 0 diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h index 1a83aba267..71d6b395c5 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h @@ -98,7 +98,6 @@ #define AZ_TRAIT_THREAD_HARDWARE_CONCURRENCY_RETURN_VALUE INVALID_RETURN_VALUE #define AZ_TRAIT_UNITTEST_NON_PREALLOCATED_HPHA_TEST 1 #define AZ_TRAIT_UNITTEST_USE_TEST_RUNNER_ENVIRONMENT 0 -#define AZ_TRAIT_USE_CRY_SIGNAL_HANDLER 0 #define AZ_TRAIT_USE_POSIX_STRERROR_R 0 #define AZ_TRAIT_USE_SECURE_CRT_FUNCTIONS 1 #define AZ_TRAIT_USE_WINDOWS_FILE_API 1 diff --git a/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h b/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h index 7a75af71fb..11a0ba84e0 100644 --- a/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h +++ b/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h @@ -99,7 +99,6 @@ #define AZ_TRAIT_THREAD_HARDWARE_CONCURRENCY_RETURN_VALUE static_cast(sysconf(_SC_NPROCESSORS_ONLN)); #define AZ_TRAIT_UNITTEST_NON_PREALLOCATED_HPHA_TEST 0 #define AZ_TRAIT_UNITTEST_USE_TEST_RUNNER_ENVIRONMENT 0 -#define AZ_TRAIT_USE_CRY_SIGNAL_HANDLER 1 #define AZ_TRAIT_USE_POSIX_STRERROR_R 1 #define AZ_TRAIT_USE_SECURE_CRT_FUNCTIONS 0 #define AZ_TRAIT_USE_WINDOWS_FILE_API 0 From 21850aa73ea90c6846f2b47903d5ac1b6b916b05 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Thu, 23 Dec 2021 15:09:29 -0800 Subject: [PATCH 028/413] chore: replace stack trace logic with StackRecorder Signed-off-by: Michael Pollind --- .../UnixLike/AzCore/Debug/Trace_UnixLike.cpp | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp index b0ee4ea1e3..67de4a3219 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp @@ -9,11 +9,9 @@ #include #include #include +#include -#include -#include #include -#include namespace AZ::Debug { @@ -114,19 +112,15 @@ namespace AZ::Debug azsnprintf(message, MaxMessageLength, "Error: signal %s: \n", strsignal(signal)); Debug::Trace::Instance().Output(nullptr, message); - void* buffers[MaxStackLines]; - int numberBacktraceStrings = backtrace(buffers, MaxStackLines); - char** backtraceResults = backtrace_symbols(buffers, numberBacktraceStrings); - if (backtraceResults == nullptr) - { - Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); - return; + StackFrame frames[MaxStackLines]; + SymbolStorage::StackLine stackLines[MaxStackLines]; + SymbolStorage decoder; + const unsigned int numberOfFrames = StackRecorder::Record(frames, MaxStackLines); + decoder.DecodeFrames(frames, numberOfFrames, stackLines); + for(int i = 0; i < numberOfFrames; ++i) { + azsnprintf(message, MaxMessageLength, "%s \n", stackLines[i]); + Debug::Trace::Instance().Output(nullptr, message); } - for (int j = 0; j < numberBacktraceStrings; j++) - { - Debug::Trace::Instance().Output(nullptr, backtraceResults[j]); - } - Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); } #endif From 39c09ba6f70fade423993b8d120b3fa66527ff60 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Tue, 4 Jan 2022 21:10:56 -0800 Subject: [PATCH 029/413] chore: correct formatting and address comments Signed-off-by: Michael Pollind --- .../UnixLike/AzCore/Debug/Trace_UnixLike.cpp | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp index 67de4a3219..e1f1a0f801 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp @@ -6,10 +6,10 @@ * */ +#include #include #include #include -#include #include @@ -33,7 +33,7 @@ namespace AZ::Debug return false; } - char buffer[4096]; + char buffer[MaxMessageLength]; AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); const AZStd::string_view processStatusView(buffer, buffer + numRead); @@ -72,10 +72,6 @@ namespace AZ::Debug return false; } - void SignalHandler(int handler) - { - } - void HandleExceptions(bool isEnabled) { if (isEnabled) @@ -108,20 +104,22 @@ namespace AZ::Debug void ExceptionHandler(int signal) { char message[MaxMessageLength]; - Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); + // Trace::RawOutput + Debug::Trace::Instance().RawOutput(nullptr, "==================================================================\n"); azsnprintf(message, MaxMessageLength, "Error: signal %s: \n", strsignal(signal)); - Debug::Trace::Instance().Output(nullptr, message); + Debug::Trace::Instance().RawOutput(nullptr, message); StackFrame frames[MaxStackLines]; SymbolStorage::StackLine stackLines[MaxStackLines]; SymbolStorage decoder; const unsigned int numberOfFrames = StackRecorder::Record(frames, MaxStackLines); - decoder.DecodeFrames(frames, numberOfFrames, stackLines); - for(int i = 0; i < numberOfFrames; ++i) { + decoder.DecodeFrames(frames, numberOfFrames, stackLines); + for (int i = 0; i < numberOfFrames; ++i) + { azsnprintf(message, MaxMessageLength, "%s \n", stackLines[i]); - Debug::Trace::Instance().Output(nullptr, message); + Debug::Trace::Instance().RawOutput(nullptr, message); } - Debug::Trace::Instance().Output(nullptr, "==================================================================\n"); + Debug::Trace::Instance().RawOutput(nullptr, "==================================================================\n"); } #endif From 7af3bef84c7170b0d91f812a30a476ffb37a4107 Mon Sep 17 00:00:00 2001 From: "T.J. McGrath-Daly" Date: Fri, 15 Oct 2021 15:15:26 +0800 Subject: [PATCH 030/413] Model drag causes crash Signed-off-by: T.J. McGrath-Daly --- Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp index 861271fdb3..0c05da6981 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp @@ -434,6 +434,17 @@ namespace EMotionFX m_morphSetups.resize(numLODs); AZStd::fill(begin(m_morphSetups), AZStd::next(begin(m_morphSetups), numLODs), nullptr); } + else + { + if (m_morphSetups.size() < numLODs) + { + AZ::u32 num = m_morphSetups.empty() ? 0 : (AZ::u32)m_morphSetups.size(); + for (AZ::u32 i = num; i < numLODs; ++i) + { + m_morphSetups.push_back(nullptr); + } + } + } } // removes all node meshes and stacks From 5231cb9b53b86d442effdbbfd46292b3f20732d5 Mon Sep 17 00:00:00 2001 From: "T.J. McGrath-Daly" Date: Fri, 15 Oct 2021 10:58:31 +0800 Subject: [PATCH 031/413] Shortcut keys issue Signed-off-by: T.J. McGrath-Daly --- .../Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp index b75fb71060..952b3134b6 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp @@ -532,7 +532,7 @@ namespace EMStudio QAction* characterLayoutAction = new QAction( "Character", this); - characterLayoutAction->setShortcut(Qt::Key_1 | Qt::AltModifier); + characterLayoutAction->setShortcut(Qt::Key_3 | Qt::AltModifier); m_shortcutManager->RegisterKeyboardShortcut(characterLayoutAction, layoutGroupName, false); connect(characterLayoutAction, &QAction::triggered, [this]{ m_applicationMode->setCurrentIndex(2); }); addAction(characterLayoutAction); From 90f710b8c2564547293487a53af0b474572a8481 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sun, 31 Oct 2021 09:48:06 -0700 Subject: [PATCH 032/413] feat: add cursor wrapped mode Signed-off-by: Michael Pollind --- Code/Editor/EditorViewportSettings.cpp | 11 ++ Code/Editor/EditorViewportSettings.h | 3 + .../test_ModularViewportCameraController.cpp | 4 +- .../Input/QtEventToAzInputMapper.cpp | 109 ++++++++++++++---- .../Input/QtEventToAzInputMapper.h | 19 ++- .../Source/Viewport/RenderViewportWidget.cpp | 4 +- 6 files changed, 122 insertions(+), 28 deletions(-) diff --git a/Code/Editor/EditorViewportSettings.cpp b/Code/Editor/EditorViewportSettings.cpp index e06b9696e1..5711d1c3d3 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -23,6 +23,7 @@ namespace SandboxEditor constexpr AZStd::string_view AngleSizeSetting = "/Amazon/Preferences/Editor/AngleSize"; constexpr AZStd::string_view ShowGridSetting = "/Amazon/Preferences/Editor/ShowGrid"; constexpr AZStd::string_view StickySelectSetting = "/Amazon/Preferences/Editor/StickySelect"; + constexpr AZStd::string_view ManipulatorMouseWrapSetting = "/Amazon/Preferences/Editor/Manipulator/MouseWrapping"; constexpr AZStd::string_view ManipulatorLineBoundWidthSetting = "/Amazon/Preferences/Editor/Manipulator/LineBoundWidth"; constexpr AZStd::string_view ManipulatorCircleBoundWidthSetting = "/Amazon/Preferences/Editor/Manipulator/CircleBoundWidth"; constexpr AZStd::string_view CameraTranslateSpeedSetting = "/Amazon/Preferences/Editor/Camera/TranslateSpeed"; @@ -186,6 +187,16 @@ namespace SandboxEditor AzToolsFramework::SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); } + bool ManipulatorMouseWrap() + { + return aznumeric_cast(GetRegistry(ManipulatorMouseWrapSetting, false)); + } + + void SetManipulatorMouseWrap(bool wrapping) + { + SetRegistry(ManipulatorMouseWrapSetting, wrapping); + } + float ManipulatorCircleBoundWidth() { return aznumeric_cast(AzToolsFramework::GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); diff --git a/Code/Editor/EditorViewportSettings.h b/Code/Editor/EditorViewportSettings.h index fe1253ed0c..975feff307 100644 --- a/Code/Editor/EditorViewportSettings.h +++ b/Code/Editor/EditorViewportSettings.h @@ -57,6 +57,9 @@ namespace SandboxEditor SANDBOX_API float ManipulatorLineBoundWidth(); SANDBOX_API void SetManipulatorLineBoundWidth(float lineBoundWidth); + SANDBOX_API bool ManipulatorMouseWrap(); + SANDBOX_API void SetManipulatorMouseWrap(bool wrapping); + SANDBOX_API float ManipulatorCircleBoundWidth(); SANDBOX_API void SetManipulatorCircleBoundWidth(float circleBoundWidth); diff --git a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp index 67d89ad967..f2ee3c79aa 100644 --- a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp +++ b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp @@ -47,12 +47,12 @@ namespace UnitTest void ViewportMouseCursorRequestImpl::BeginCursorCapture() { - m_inputChannelMapper->SetCursorCaptureEnabled(true); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_CAPTURED); } void ViewportMouseCursorRequestImpl::EndCursorCapture() { - m_inputChannelMapper->SetCursorCaptureEnabled(false); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_NONE); } bool ViewportMouseCursorRequestImpl::IsMouseOver() const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp index 066bdc1654..0b6df58c1a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp @@ -241,22 +241,39 @@ namespace AzToolsFramework } } + + void QtEventToAzInputMapper::SetCursorMode(QtEventToAzInputMapper::CursorInputMode mode) + { + if(mode != m_cursorMode) + { + m_cursorMode = mode; + switch(m_cursorMode) + { + case CURSOR_MODE_CAPTURED: + qApp->setOverrideCursor(Qt::BlankCursor); + m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::ConstrainedAndHidden); + break; + case CURSOR_MODE_WRAPPED: + qApp->restoreOverrideCursor(); + m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); + break; + case CURSOR_MODE_NONE: + qApp->restoreOverrideCursor(); + m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); + break; + } + } + } + void QtEventToAzInputMapper::SetCursorCaptureEnabled(bool enabled) { - if (m_capturingCursor != enabled) + if (enabled) { - m_capturingCursor = enabled; - - if (m_capturingCursor) - { - m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::ConstrainedAndHidden); - qApp->setOverrideCursor(Qt::BlankCursor); - } - else - { - m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); - qApp->restoreOverrideCursor(); - } + SetCursorMode(CURSOR_MODE_CAPTURED); + } + else + { + SetCursorMode(CURSOR_MODE_NONE); } } @@ -436,25 +453,73 @@ namespace AzToolsFramework return QPoint{ denormalizedX, denormalizedY }; } + void wrapCursorX(const QRect& rect, QPoint& point) { + if (rect.left() < point.x()) + { + point.setX(rect.right() - 1); + } + else if (rect.right() > point.x()) + { + point.setX(rect.left() + 1); + } + } + + void wrapCursorY(const QRect& rect, QPoint& point) { + if (rect.top() < point.y()) + { + point.setY(rect.bottom() - 1); + } + else if (rect.bottom() > point.y()) + { + point.setY(rect.top() + 1); + } + } + + void QtEventToAzInputMapper::HandleMouseMoveEvent(const QPoint& globalCursorPosition) { const QPoint cursorDelta = globalCursorPosition - m_previousGlobalCursorPosition; + QScreen* screen = m_sourceWidget->screen(); + const QRect widgetRect(m_sourceWidget->mapToGlobal(QPoint(0,0)), m_sourceWidget->size()); m_mouseDevice->m_cursorPositionData2D->m_normalizedPosition = WidgetPositionToNormalizedPosition(m_sourceWidget->mapFromGlobal(globalCursorPosition)); m_mouseDevice->m_cursorPositionData2D->m_normalizedPositionDelta = WidgetPositionToNormalizedPosition(cursorDelta); - ProcessPendingMouseEvents(cursorDelta); + switch(m_cursorMode) + { + case CURSOR_MODE_CAPTURED: + AzQtComponents::SetCursorPos(m_previousGlobalCursorPosition); + break; + case CURSOR_MODE_WRAPPED_X: + QPoint screenPos(globalCursorPosition); + wrapCursorX(widgetRect, screenPos); + QCursor::setPos(screen, screenPos); + QPoint screenDelta = globalCursorPosition - screenPos; + m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; + break; + case CURSOR_MODE_WRAPPED_Y: + QPoint screenPos(globalCursorPosition); + wrapCursorY(widgetRect, screenPos); + QCursor::setPos(screen, screenPos); + QPoint screenDelta = globalCursorPosition - screenPos; + m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; + break; + case CURSOR_MODE_WRAPPED: + QPoint screenPos(globalCursorPosition); + wrapCursorX(widgetRect, screenPos); + wrapCursorY(widgetRect, screenPos); + QCursor::setPos(screen, screenPos); + QPoint screenDelta = globalCursorPosition - screenPos; + m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; + break; + default: + m_previousGlobalCursorPosition = globalCursorPosition; + break; + - if (m_capturingCursor) - { - // Reset our cursor position to the previous point - AzQtComponents::SetCursorPos(m_previousGlobalCursorPosition); - } - else - { - m_previousGlobalCursorPosition = globalCursorPosition; } + ProcessPendingMouseEvents(cursorDelta); } void QtEventToAzInputMapper::HandleKeyEvent(QKeyEvent* keyEvent) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h index 373945d445..7ba4e21bd4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h @@ -41,6 +41,17 @@ namespace AzToolsFramework Q_OBJECT public: + enum CursorInputMode { + CURSOR_MODE_NONE, + CURSOR_MODE_CAPTURED, //< Sets whether or not the cursor should be constrained to the source widget and invisible. + //< Internally, this will reset the cursor position after each move event to ensure movement + //< events don't allow the cursor to escape. This can be used for typical camera controls + //< like a dolly or rotation, where mouse movement is important but cursor location is not. + CURSOR_MODE_WRAPPED, //< Flags whether the curser is going to wrap around the soruce widget. + CURSOR_MODE_WRAPPED_X, + CURSOR_MODE_WRAPPED_Y + }; + QtEventToAzInputMapper(QWidget* sourceWidget, int syntheticDeviceId = 0); ~QtEventToAzInputMapper() = default; @@ -56,8 +67,12 @@ namespace AzToolsFramework //! Internally, this will reset the cursor position after each move event to ensure movement //! events don't allow the cursor to escape. This can be used for typical camera controls //! like a dolly or rotation, where mouse movement is important but cursor location is not. + //! @deprecated Use #SetCursorMode() void SetCursorCaptureEnabled(bool enabled); + //! Set the cursor mode. + void SetCursorMode(QtEventToAzInputMapper::CursorInputMode mode); + void SetOverrideCursor(ViewportInteraction::CursorStyleOverride cursorStyleOverride); void ClearOverrideCursor(); @@ -176,8 +191,8 @@ namespace AzToolsFramework QWidget* m_sourceWidget; // Flags whether or not Qt events should currently be processed. bool m_enabled = true; - // Flags whether or not the cursor is being constrained to the source widget (for invisible mouse movement). - bool m_capturingCursor = false; + // Controls the cursor behavior. + QtEventToAzInputMapper::CursorInputMode m_cursorMode = CURSOR_MODE_NONE; // Flags whether the cursor has been overridden. bool m_overrideCursor = false; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index 505ff70122..cbede827e2 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -331,12 +331,12 @@ namespace AtomToolsFramework void RenderViewportWidget::BeginCursorCapture() { - m_inputChannelMapper->SetCursorCaptureEnabled(true); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_CAPTURED); } void RenderViewportWidget::EndCursorCapture() { - m_inputChannelMapper->SetCursorCaptureEnabled(false); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_NONE); } void RenderViewportWidget::SetOverrideCursor(AzToolsFramework::ViewportInteraction::CursorStyleOverride cursorStyleOverride) From fa809a76ca3804e95377c0776a40cf4004da90c8 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Mon, 13 Dec 2021 07:28:28 -0800 Subject: [PATCH 033/413] chore: address changes - updated checkstyle - update enum CursorInputMode - minor refeactor to QtEventToAzInputMapper Signed-off-by: Michael Pollind --- Code/Editor/EditorViewportSettings.cpp | 10 +- Code/Editor/EditorViewportSettings.h | 4 +- .../test_ModularViewportCameraController.cpp | 4 +- .../Input/QtEventToAzInputMapper.cpp | 116 +++++++++--------- .../Input/QtEventToAzInputMapper.h | 14 +-- .../Source/Viewport/RenderViewportWidget.cpp | 4 +- 6 files changed, 74 insertions(+), 78 deletions(-) diff --git a/Code/Editor/EditorViewportSettings.cpp b/Code/Editor/EditorViewportSettings.cpp index 5711d1c3d3..883eb91863 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -23,7 +23,7 @@ namespace SandboxEditor constexpr AZStd::string_view AngleSizeSetting = "/Amazon/Preferences/Editor/AngleSize"; constexpr AZStd::string_view ShowGridSetting = "/Amazon/Preferences/Editor/ShowGrid"; constexpr AZStd::string_view StickySelectSetting = "/Amazon/Preferences/Editor/StickySelect"; - constexpr AZStd::string_view ManipulatorMouseWrapSetting = "/Amazon/Preferences/Editor/Manipulator/MouseWrapping"; + constexpr AZStd::string_view ViewportMouseWrapSetting = "/Amazon/Preferences/Editor/Manipulator/MouseWrapping"; constexpr AZStd::string_view ManipulatorLineBoundWidthSetting = "/Amazon/Preferences/Editor/Manipulator/LineBoundWidth"; constexpr AZStd::string_view ManipulatorCircleBoundWidthSetting = "/Amazon/Preferences/Editor/Manipulator/CircleBoundWidth"; constexpr AZStd::string_view CameraTranslateSpeedSetting = "/Amazon/Preferences/Editor/Camera/TranslateSpeed"; @@ -187,14 +187,14 @@ namespace SandboxEditor AzToolsFramework::SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); } - bool ManipulatorMouseWrap() + bool ViewportMouseWrapSetting() { - return aznumeric_cast(GetRegistry(ManipulatorMouseWrapSetting, false)); + return aznumeric_cast(GetRegistry(ViewportMouseWrapSetting, false)); } - void SetManipulatorMouseWrap(bool wrapping) + void SetViewportMouseWrapSetting(bool wrapping) { - SetRegistry(ManipulatorMouseWrapSetting, wrapping); + SetRegistry(ViewportMouseWrapSetting, wrapping); } float ManipulatorCircleBoundWidth() diff --git a/Code/Editor/EditorViewportSettings.h b/Code/Editor/EditorViewportSettings.h index 975feff307..a27187bc55 100644 --- a/Code/Editor/EditorViewportSettings.h +++ b/Code/Editor/EditorViewportSettings.h @@ -57,8 +57,8 @@ namespace SandboxEditor SANDBOX_API float ManipulatorLineBoundWidth(); SANDBOX_API void SetManipulatorLineBoundWidth(float lineBoundWidth); - SANDBOX_API bool ManipulatorMouseWrap(); - SANDBOX_API void SetManipulatorMouseWrap(bool wrapping); + SANDBOX_API bool ViewportMouseWrapSetting(); + SANDBOX_API void SetViewportMouseWrapSetting(bool wrapping); SANDBOX_API float ManipulatorCircleBoundWidth(); SANDBOX_API void SetManipulatorCircleBoundWidth(float circleBoundWidth); diff --git a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp index f2ee3c79aa..9bfd9d396e 100644 --- a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp +++ b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp @@ -47,12 +47,12 @@ namespace UnitTest void ViewportMouseCursorRequestImpl::BeginCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_CAPTURED); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeCaptured); } void ViewportMouseCursorRequestImpl::EndCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_NONE); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeNone); } bool ViewportMouseCursorRequestImpl::IsMouseOver() const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp index 0b6df58c1a..77f297b98c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp @@ -241,40 +241,32 @@ namespace AzToolsFramework } } - - void QtEventToAzInputMapper::SetCursorMode(QtEventToAzInputMapper::CursorInputMode mode) + void QtEventToAzInputMapper::SetCursorMode(QtEventToAzInputMapper::CursorInputMode mode) { - if(mode != m_cursorMode) + if (mode != m_cursorMode) { m_cursorMode = mode; - switch(m_cursorMode) + switch (m_cursorMode) { - case CURSOR_MODE_CAPTURED: - qApp->setOverrideCursor(Qt::BlankCursor); - m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::ConstrainedAndHidden); - break; - case CURSOR_MODE_WRAPPED: - qApp->restoreOverrideCursor(); - m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); - break; - case CURSOR_MODE_NONE: - qApp->restoreOverrideCursor(); - m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); - break; + case CursorInputMode::CursorModeCaptured: + qApp->setOverrideCursor(Qt::BlankCursor); + m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::ConstrainedAndHidden); + break; + case CursorInputMode::CursorModeWrapped: + qApp->restoreOverrideCursor(); + m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); + break; + case CursorInputMode::CursorModeNone: + qApp->restoreOverrideCursor(); + m_mouseDevice->SetSystemCursorState(AzFramework::SystemCursorState::UnconstrainedAndVisible); + break; } } } void QtEventToAzInputMapper::SetCursorCaptureEnabled(bool enabled) { - if (enabled) - { - SetCursorMode(CURSOR_MODE_CAPTURED); - } - else - { - SetCursorMode(CURSOR_MODE_NONE); - } + SetCursorMode(enabled ? CursorInputMode::CursorModeCaptured : CursorInputMode::CursorModeNone); } bool QtEventToAzInputMapper::eventFilter(QObject* object, QEvent* event) @@ -453,71 +445,75 @@ namespace AzToolsFramework return QPoint{ denormalizedX, denormalizedY }; } - void wrapCursorX(const QRect& rect, QPoint& point) { - if (rect.left() < point.x()) + void wrapCursorX(const QRect& rect, QPoint& point) + { + if (rect.left() < point.x()) { point.setX(rect.right() - 1); } - else if (rect.right() > point.x()) + else if (rect.right() > point.x()) { point.setX(rect.left() + 1); } } - void wrapCursorY(const QRect& rect, QPoint& point) { - if (rect.top() < point.y()) + void wrapCursorY(const QRect& rect, QPoint& point) + { + if (rect.top() < point.y()) { point.setY(rect.bottom() - 1); } - else if (rect.bottom() > point.y()) + else if (rect.bottom() > point.y()) { point.setY(rect.top() + 1); } } - void QtEventToAzInputMapper::HandleMouseMoveEvent(const QPoint& globalCursorPosition) { const QPoint cursorDelta = globalCursorPosition - m_previousGlobalCursorPosition; QScreen* screen = m_sourceWidget->screen(); - const QRect widgetRect(m_sourceWidget->mapToGlobal(QPoint(0,0)), m_sourceWidget->size()); + const QRect widgetRect(m_sourceWidget->mapToGlobal(QPoint(0, 0)), m_sourceWidget->size()); m_mouseDevice->m_cursorPositionData2D->m_normalizedPosition = WidgetPositionToNormalizedPosition(m_sourceWidget->mapFromGlobal(globalCursorPosition)); m_mouseDevice->m_cursorPositionData2D->m_normalizedPositionDelta = WidgetPositionToNormalizedPosition(cursorDelta); - switch(m_cursorMode) + switch (m_cursorMode) { - case CURSOR_MODE_CAPTURED: - AzQtComponents::SetCursorPos(m_previousGlobalCursorPosition); - break; - case CURSOR_MODE_WRAPPED_X: + case CursorInputMode::CursorModeCaptured: + AzQtComponents::SetCursorPos(m_previousGlobalCursorPosition); + break; + case CursorInputMode::CursorModeWrappedX: + case CursorInputMode::CursorModeWrappedY: + case CursorInputMode::CursorModeWrapped: + { QPoint screenPos(globalCursorPosition); - wrapCursorX(widgetRect, screenPos); + switch (m_cursorMode) + { + case CursorInputMode::CursorModeWrappedX: + wrapCursorX(widgetRect, screenPos); + break; + case CursorInputMode::CursorModeWrappedY: + wrapCursorY(widgetRect, screenPos); + break; + case CursorInputMode::CursorModeWrapped: + wrapCursorX(widgetRect, screenPos); + wrapCursorY(widgetRect, screenPos); + break; + default: + // this should never happen + AZ_Assert(false, "Invalid Curosr Mode: %i.", m_cursorMode); + break; + } QCursor::setPos(screen, screenPos); - QPoint screenDelta = globalCursorPosition - screenPos; + const QPoint screenDelta = globalCursorPosition - screenPos; m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; - break; - case CURSOR_MODE_WRAPPED_Y: - QPoint screenPos(globalCursorPosition); - wrapCursorY(widgetRect, screenPos); - QCursor::setPos(screen, screenPos); - QPoint screenDelta = globalCursorPosition - screenPos; - m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; - break; - case CURSOR_MODE_WRAPPED: - QPoint screenPos(globalCursorPosition); - wrapCursorX(widgetRect, screenPos); - wrapCursorY(widgetRect, screenPos); - QCursor::setPos(screen, screenPos); - QPoint screenDelta = globalCursorPosition - screenPos; - m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; - break; - default: - m_previousGlobalCursorPosition = globalCursorPosition; - break; - - + } + break; + default: + AZ_Assert(false, "Invalid Curosr Mode: %i.", m_cursorMode); + break; } ProcessPendingMouseEvents(cursorDelta); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h index 7ba4e21bd4..a6d9fdd753 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h @@ -41,15 +41,15 @@ namespace AzToolsFramework Q_OBJECT public: - enum CursorInputMode { - CURSOR_MODE_NONE, - CURSOR_MODE_CAPTURED, //< Sets whether or not the cursor should be constrained to the source widget and invisible. + enum class CursorInputMode { + CursorModeNone, + CursorModeCaptured, //< Sets whether or not the cursor should be constrained to the source widget and invisible. //< Internally, this will reset the cursor position after each move event to ensure movement //< events don't allow the cursor to escape. This can be used for typical camera controls //< like a dolly or rotation, where mouse movement is important but cursor location is not. - CURSOR_MODE_WRAPPED, //< Flags whether the curser is going to wrap around the soruce widget. - CURSOR_MODE_WRAPPED_X, - CURSOR_MODE_WRAPPED_Y + CursorModeWrapped, //< Flags whether the curser is going to wrap around the soruce widget. + CursorModeWrappedX, + CursorModeWrappedY }; QtEventToAzInputMapper(QWidget* sourceWidget, int syntheticDeviceId = 0); @@ -192,7 +192,7 @@ namespace AzToolsFramework // Flags whether or not Qt events should currently be processed. bool m_enabled = true; // Controls the cursor behavior. - QtEventToAzInputMapper::CursorInputMode m_cursorMode = CURSOR_MODE_NONE; + QtEventToAzInputMapper::CursorInputMode m_cursorMode = CursorInputMode::CursorModeNone; // Flags whether the cursor has been overridden. bool m_overrideCursor = false; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index cbede827e2..ef23560d57 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -331,12 +331,12 @@ namespace AtomToolsFramework void RenderViewportWidget::BeginCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_CAPTURED); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeCaptured); } void RenderViewportWidget::EndCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CURSOR_MODE_NONE); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeNone); } void RenderViewportWidget::SetOverrideCursor(AzToolsFramework::ViewportInteraction::CursorStyleOverride cursorStyleOverride) From 3a6f877a9f79157424d5a86d05f9f1b7a98d1585 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Tue, 14 Dec 2021 23:05:13 -0800 Subject: [PATCH 034/413] chore: add first test Signed-off-by: Michael Pollind --- .../Input/QtEventToAzInputMapper.cpp | 8 ++--- .../Input/QtEventToAzInputMapperTests.cpp | 32 +++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp index 77f297b98c..7852a4a5d5 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp @@ -447,11 +447,11 @@ namespace AzToolsFramework void wrapCursorX(const QRect& rect, QPoint& point) { - if (rect.left() < point.x()) + if (point.x() < rect.left()) { point.setX(rect.right() - 1); } - else if (rect.right() > point.x()) + else if (point.x() > rect.right()) { point.setX(rect.left() + 1); } @@ -459,11 +459,11 @@ namespace AzToolsFramework void wrapCursorY(const QRect& rect, QPoint& point) { - if (rect.top() < point.y()) + if (point.y() < rect.top()) { point.setY(rect.bottom() - 1); } - else if (rect.bottom() > point.y()) + else if (point.y() > rect.bottom()) { point.setY(rect.top() + 1); } diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp index 4c813a4bdd..e645c365e2 100644 --- a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -44,6 +44,10 @@ namespace UnitTest QObject::connect(m_inputChannelMapper.get(), &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, m_rootWidget.get(), [this]([[maybe_unused]] const AzFramework::InputChannel* inputChannel, QEvent* event) { + if(event == nullptr) { + return; + } + const QEvent::Type eventType = event->type(); if (eventType == QEvent::Type::MouseButtonPress || @@ -512,4 +516,32 @@ namespace UnitTest return info.param.m_az.GetName(); } ); + + TEST_F(QtEventToAzInputMapperFixture, MouseWrapMouseViewportQtEventToAzInputMapperFixture) + { + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); + m_captureAzEvents = false; + + + const auto startPos = QPoint(WidgetSize.width() - 2, WidgetSize.height() / 2); + MouseMove(m_rootWidget.get(), startPos, QPoint(0,0)); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorInputMode::CursorModeWrappedX); + + const auto deltaPos = QPoint(200.0f, 0); + const auto expectedPosition = m_rootWidget->mapToGlobal(QPoint(200, WidgetSize.height() / 2)); + const int iterations = 50; + + for(float i = 0; i < iterations; i++) { + MouseMove(m_rootWidget.get(), m_rootWidget->mapFromGlobal(QCursor::pos()), (deltaPos / iterations)); + } + + QPointF endPosition = QCursor::pos(); + EXPECT_NEAR(endPosition.x(), expectedPosition.x(), 5.0f); + EXPECT_NEAR(endPosition.y(), expectedPosition.y(), 5.0f); + + // cleanup + m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorInputMode::CursorModeNone); + AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); + } + } // namespace UnitTest From 9e91c1872670c73cd1f3de98de616675ce9da8a5 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Wed, 15 Dec 2021 13:32:24 -0800 Subject: [PATCH 035/413] chore: address changes add test cases Signed-off-by: Michael Pollind --- Code/Editor/EditorViewportSettings.cpp | 2 +- .../Input/QtEventToAzInputMapper.cpp | 14 +- .../Input/QtEventToAzInputMapper.h | 26 +-- .../Input/QtEventToAzInputMapperTests.cpp | 151 +++++++++++++++--- 4 files changed, 153 insertions(+), 40 deletions(-) diff --git a/Code/Editor/EditorViewportSettings.cpp b/Code/Editor/EditorViewportSettings.cpp index 883eb91863..7108beca5a 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -189,7 +189,7 @@ namespace SandboxEditor bool ViewportMouseWrapSetting() { - return aznumeric_cast(GetRegistry(ViewportMouseWrapSetting, false)); + return GetRegistry(ViewportMouseWrapSetting, false); } void SetViewportMouseWrapSetting(bool wrapping) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp index 7852a4a5d5..edd45a7200 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp @@ -241,7 +241,7 @@ namespace AzToolsFramework } } - void QtEventToAzInputMapper::SetCursorMode(QtEventToAzInputMapper::CursorInputMode mode) + void QtEventToAzInputMapper::SetCursorMode(AzToolsFramework::CursorInputMode mode) { if (mode != m_cursorMode) { @@ -445,7 +445,7 @@ namespace AzToolsFramework return QPoint{ denormalizedX, denormalizedY }; } - void wrapCursorX(const QRect& rect, QPoint& point) + void WrapCursorX(const QRect& rect, QPoint& point) { if (point.x() < rect.left()) { @@ -457,7 +457,7 @@ namespace AzToolsFramework } } - void wrapCursorY(const QRect& rect, QPoint& point) + void WrapCursorY(const QRect& rect, QPoint& point) { if (point.y() < rect.top()) { @@ -492,14 +492,14 @@ namespace AzToolsFramework switch (m_cursorMode) { case CursorInputMode::CursorModeWrappedX: - wrapCursorX(widgetRect, screenPos); + WrapCursorX(widgetRect, screenPos); break; case CursorInputMode::CursorModeWrappedY: - wrapCursorY(widgetRect, screenPos); + WrapCursorY(widgetRect, screenPos); break; case CursorInputMode::CursorModeWrapped: - wrapCursorX(widgetRect, screenPos); - wrapCursorY(widgetRect, screenPos); + WrapCursorX(widgetRect, screenPos); + WrapCursorY(widgetRect, screenPos); break; default: // this should never happen diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h index a6d9fdd753..b84ac99c74 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h @@ -32,6 +32,17 @@ class QWheelEvent; namespace AzToolsFramework { + enum class CursorInputMode { + CursorModeNone, + CursorModeCaptured, //!< Sets whether or not the cursor should be constrained to the source widget and invisible. + //!< Internally, this will reset the cursor position after each move event to ensure movement + //!< events don't allow the cursor to escape. This can be used for typical camera controls + //!< like a dolly or rotation, where mouse movement is important but cursor location is not. + CursorModeWrapped, //!< Flags whether the curser is going to wrap around the soruce widget. + CursorModeWrappedX, + CursorModeWrappedY + }; + //! Maps events from the Qt input system to synthetic InputChannels in AzFramework //! that can be used by AzFramework::ViewportControllers. class QtEventToAzInputMapper final @@ -41,17 +52,6 @@ namespace AzToolsFramework Q_OBJECT public: - enum class CursorInputMode { - CursorModeNone, - CursorModeCaptured, //< Sets whether or not the cursor should be constrained to the source widget and invisible. - //< Internally, this will reset the cursor position after each move event to ensure movement - //< events don't allow the cursor to escape. This can be used for typical camera controls - //< like a dolly or rotation, where mouse movement is important but cursor location is not. - CursorModeWrapped, //< Flags whether the curser is going to wrap around the soruce widget. - CursorModeWrappedX, - CursorModeWrappedY - }; - QtEventToAzInputMapper(QWidget* sourceWidget, int syntheticDeviceId = 0); ~QtEventToAzInputMapper() = default; @@ -71,7 +71,7 @@ namespace AzToolsFramework void SetCursorCaptureEnabled(bool enabled); //! Set the cursor mode. - void SetCursorMode(QtEventToAzInputMapper::CursorInputMode mode); + void SetCursorMode(AzToolsFramework::CursorInputMode mode); void SetOverrideCursor(ViewportInteraction::CursorStyleOverride cursorStyleOverride); void ClearOverrideCursor(); @@ -192,7 +192,7 @@ namespace AzToolsFramework // Flags whether or not Qt events should currently be processed. bool m_enabled = true; // Controls the cursor behavior. - QtEventToAzInputMapper::CursorInputMode m_cursorMode = CursorInputMode::CursorModeNone; + AzToolsFramework::CursorInputMode m_cursorMode = AzToolsFramework::CursorInputMode::CursorModeNone; // Flags whether the cursor has been overridden. bool m_overrideCursor = false; diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp index e645c365e2..9af445850c 100644 --- a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -44,10 +44,10 @@ namespace UnitTest QObject::connect(m_inputChannelMapper.get(), &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, m_rootWidget.get(), [this]([[maybe_unused]] const AzFramework::InputChannel* inputChannel, QEvent* event) { - if(event == nullptr) { + if(event == nullptr) + { return; } - const QEvent::Type eventType = event->type(); if (eventType == QEvent::Type::MouseButtonPress || @@ -517,31 +517,144 @@ namespace UnitTest } ); - TEST_F(QtEventToAzInputMapperFixture, MouseWrapMouseViewportQtEventToAzInputMapperFixture) + struct MouseMoveParam { + AzToolsFramework::CursorInputMode mode; + int iterations; + QPoint startPos; + QPoint deltaPos; + QPoint expectedPos; + const char* name; + }; + + class MoveMoveWrapParamQtEventToAzInputMapperFixture + : public QtEventToAzInputMapperFixture + , public ::testing::WithParamInterface + { + }; + + TEST_P(MoveMoveWrapParamQtEventToAzInputMapperFixture, MouseMove_NoAzHandlers_VerifyMouseMovmentViewport) + { + // setup + const MouseMoveParam mouseMoveParam = GetParam(); + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); m_captureAzEvents = false; + m_inputChannelMapper->SetCursorMode(mouseMoveParam.mode); + m_rootWidget->move(100, 100); - - const auto startPos = QPoint(WidgetSize.width() - 2, WidgetSize.height() / 2); - MouseMove(m_rootWidget.get(), startPos, QPoint(0,0)); - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorInputMode::CursorModeWrappedX); - const auto deltaPos = QPoint(200.0f, 0); - const auto expectedPosition = m_rootWidget->mapToGlobal(QPoint(200, WidgetSize.height() / 2)); - const int iterations = 50; - - for(float i = 0; i < iterations; i++) { - MouseMove(m_rootWidget.get(), m_rootWidget->mapFromGlobal(QCursor::pos()), (deltaPos / iterations)); + MouseMove(m_rootWidget.get(), mouseMoveParam.startPos, QPoint(0,0)); + for(float i = 0; i < mouseMoveParam.iterations; i++) { + MouseMove(m_rootWidget.get(), m_rootWidget->mapFromGlobal(QCursor::pos()), (mouseMoveParam.deltaPos / mouseMoveParam.iterations)); } - - QPointF endPosition = QCursor::pos(); - EXPECT_NEAR(endPosition.x(), expectedPosition.x(), 5.0f); - EXPECT_NEAR(endPosition.y(), expectedPosition.y(), 5.0f); - + + QPointF endPosition = m_rootWidget->mapFromGlobal(QCursor::pos()); + EXPECT_NEAR(endPosition.x(), mouseMoveParam.expectedPos.x(), 1.0f); + EXPECT_NEAR(endPosition.y(), mouseMoveParam.expectedPos.y(), 1.0f); + // cleanup - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorInputMode::CursorModeNone); + m_rootWidget->move(0, 0); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::CursorInputMode::CursorModeNone); AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); } + INSTANTIATE_TEST_CASE_P(All, MoveMoveWrapParamQtEventToAzInputMapperFixture, + testing::Values( + // verify CursorModeWrappedX wrapping + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedX, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() - 20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + QPoint(40, 0), + QPoint(20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + "CursorModeWrappedX_Test_Right" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedX, + 40, + QPoint(20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + QPoint(-40, 0), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() - 20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + "CursorModeWrappedX_Test_Left" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedX, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, 20.0f), + QPoint(0, -40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, -20.0f), + "CursorModeWrappedX_Test_Top" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedX, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() - 20), + QPoint(0, 40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() + 20), + "CursorModeWrappedX_Test_Bottom" + }, + + // verify CursorModeWrappedY wrapping + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedY, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() - 20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + QPoint(40, 0), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() + 20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + "CursorModeWrappedY_Test_Right" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedY, + 40, + QPoint(20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + QPoint(-40, 0), + QPoint(-20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + "CursorModeWrappedY_Test_Left" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedY, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, 20.0f), + QPoint(0, -40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() - 20.0f), + "CursorModeWrappedY_Test_Top" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrappedY, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() - 20), + QPoint(0, 40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, 20), + "CursorModeWrappedY_Test_Bottom" + }, + + // verify CursorModeWrapped wrapping + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrapped, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() - 20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + QPoint(40, 0), + QPoint(20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + "CursorModeWrapped_Test_Right" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrapped, + 40, + QPoint(20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + QPoint(-40, 0), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() - 20, QtEventToAzInputMapperFixture::WidgetSize.height()/2.0f), + "CursorModeWrapped_Test_Left" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrapped, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, 20.0f), + QPoint(0, -40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() - 20.0f), + "CursorModeWrapped_Test_Top" + }, + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeWrapped, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() - 20), + QPoint(0, 40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, 20), + "CursorModeWrapped_Test_Bottom" + } + ), + [](const ::testing::TestParamInfo& info) + { + return info.param.name; + } + ); + } // namespace UnitTest From 1654ff052041567778624fd7078164533bc37f42 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Thu, 16 Dec 2021 22:37:31 -0800 Subject: [PATCH 036/413] chore: correct test case MouseMove_NoAzHandlers_VerifyMouseMovementViewport Signed-off-by: Michael Pollind --- .../Input/QtEventToAzInputMapper.cpp | 3 ++ .../Input/QtEventToAzInputMapper.h | 4 +- .../Input/QtEventToAzInputMapperTests.cpp | 43 ++++++++++++++++--- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp index edd45a7200..b660e87b56 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.cpp @@ -511,6 +511,9 @@ namespace AzToolsFramework m_previousGlobalCursorPosition = globalCursorPosition - screenDelta; } break; + case CursorInputMode::CursorModeNone: + m_previousGlobalCursorPosition = globalCursorPosition; + break; default: AZ_Assert(false, "Invalid Curosr Mode: %i.", m_cursorMode); break; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h index b84ac99c74..67ef195363 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputMapper.h @@ -39,8 +39,8 @@ namespace AzToolsFramework //!< events don't allow the cursor to escape. This can be used for typical camera controls //!< like a dolly or rotation, where mouse movement is important but cursor location is not. CursorModeWrapped, //!< Flags whether the curser is going to wrap around the soruce widget. - CursorModeWrappedX, - CursorModeWrappedY + CursorModeWrappedX, //!< Flags whether the curser is going to wrap around the soruce widget only on the left and right side. + CursorModeWrappedY //!< Flags whether the curser is going to wrap around the soruce widget only on the top and bottom side. }; //! Maps events from the Qt input system to synthetic InputChannels in AzFramework diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp index 9af445850c..0282812be7 100644 --- a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -533,23 +533,38 @@ namespace UnitTest { }; - TEST_P(MoveMoveWrapParamQtEventToAzInputMapperFixture, MouseMove_NoAzHandlers_VerifyMouseMovmentViewport) + TEST_P(MoveMoveWrapParamQtEventToAzInputMapperFixture, MouseMove_NoAzHandlers_VerifyMouseMovementViewport) { + //TODO: mouseMove is bugged mapToGlobal is called twice + auto mouseMoveFix = [](QWidget* wid, QPoint globalPos, QPoint deltaPos) + { + QPoint globalPosition = globalPos + deltaPos; + QPoint localPosition = wid->mapFromGlobal(globalPosition); + QTest::mouseMove(wid, localPosition); + QMouseEvent mouseMoveEvent(QEvent::MouseMove, localPosition, globalPosition, Qt::NoButton, Qt::NoButton, Qt::NoModifier); + QApplication::sendEvent(wid, &mouseMoveEvent); + }; + // setup const MouseMoveParam mouseMoveParam = GetParam(); AzFramework::InputChannelNotificationBus::Handler::BusConnect(); m_captureAzEvents = false; - m_inputChannelMapper->SetCursorMode(mouseMoveParam.mode); + m_rootWidget->move(100, 100); + mouseMoveFix(m_rootWidget.get(), m_rootWidget->mapToGlobal(mouseMoveParam.startPos), QPoint(0, 0)); + // given + m_inputChannelMapper->SetCursorMode(mouseMoveParam.mode); - MouseMove(m_rootWidget.get(), mouseMoveParam.startPos, QPoint(0,0)); - for(float i = 0; i < mouseMoveParam.iterations; i++) { - MouseMove(m_rootWidget.get(), m_rootWidget->mapFromGlobal(QCursor::pos()), (mouseMoveParam.deltaPos / mouseMoveParam.iterations)); + mouseMoveFix(m_rootWidget.get(), m_rootWidget->mapToGlobal(mouseMoveParam.startPos), QPoint(0, 0)); + for (float i = 0; i < mouseMoveParam.iterations; i++) + { + mouseMoveFix(m_rootWidget.get(), QCursor::pos(), (mouseMoveParam.deltaPos / mouseMoveParam.iterations)); } - QPointF endPosition = m_rootWidget->mapFromGlobal(QCursor::pos()); + // validate + QPoint endPosition = m_rootWidget->mapFromGlobal(QCursor::pos()); EXPECT_NEAR(endPosition.x(), mouseMoveParam.expectedPos.x(), 1.0f); EXPECT_NEAR(endPosition.y(), mouseMoveParam.expectedPos.y(), 1.0f); @@ -649,6 +664,22 @@ namespace UnitTest QPoint(0, 40), QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, 20), "CursorModeWrapped_Test_Bottom" + }, + // verify CursorModeCaptured + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeCaptured, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() / 2.0f), + QPoint(0, 40), + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() / 2.0f), + "CursorModeCaptured" + }, + // verify CursorModeNone + MouseMoveParam {AzToolsFramework::CursorInputMode::CursorModeNone, + 40, + QPoint(QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f, QtEventToAzInputMapperFixture::WidgetSize.height() / 2.0f), + QPoint(40.0f, 0), + QPoint((QtEventToAzInputMapperFixture::WidgetSize.width() / 2.0f) + 40.0f, (QtEventToAzInputMapperFixture::WidgetSize.height() / 2.0f)), + "CursorModeNone" } ), [](const ::testing::TestParamInfo& info) From 95c0c83642b2496f96418745b6c245ee50cf87b9 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sat, 18 Dec 2021 18:29:39 -0800 Subject: [PATCH 037/413] chore: remove unused setting and fixed compiling errors Signed-off-by: Michael Pollind --- Code/Editor/EditorViewportSettings.cpp | 11 ----------- Code/Editor/EditorViewportSettings.h | 3 --- .../Tests/test_ModularViewportCameraController.cpp | 4 ++-- .../Code/Source/Viewport/RenderViewportWidget.cpp | 4 ++-- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Code/Editor/EditorViewportSettings.cpp b/Code/Editor/EditorViewportSettings.cpp index 7108beca5a..e06b9696e1 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -23,7 +23,6 @@ namespace SandboxEditor constexpr AZStd::string_view AngleSizeSetting = "/Amazon/Preferences/Editor/AngleSize"; constexpr AZStd::string_view ShowGridSetting = "/Amazon/Preferences/Editor/ShowGrid"; constexpr AZStd::string_view StickySelectSetting = "/Amazon/Preferences/Editor/StickySelect"; - constexpr AZStd::string_view ViewportMouseWrapSetting = "/Amazon/Preferences/Editor/Manipulator/MouseWrapping"; constexpr AZStd::string_view ManipulatorLineBoundWidthSetting = "/Amazon/Preferences/Editor/Manipulator/LineBoundWidth"; constexpr AZStd::string_view ManipulatorCircleBoundWidthSetting = "/Amazon/Preferences/Editor/Manipulator/CircleBoundWidth"; constexpr AZStd::string_view CameraTranslateSpeedSetting = "/Amazon/Preferences/Editor/Camera/TranslateSpeed"; @@ -187,16 +186,6 @@ namespace SandboxEditor AzToolsFramework::SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); } - bool ViewportMouseWrapSetting() - { - return GetRegistry(ViewportMouseWrapSetting, false); - } - - void SetViewportMouseWrapSetting(bool wrapping) - { - SetRegistry(ViewportMouseWrapSetting, wrapping); - } - float ManipulatorCircleBoundWidth() { return aznumeric_cast(AzToolsFramework::GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); diff --git a/Code/Editor/EditorViewportSettings.h b/Code/Editor/EditorViewportSettings.h index a27187bc55..fe1253ed0c 100644 --- a/Code/Editor/EditorViewportSettings.h +++ b/Code/Editor/EditorViewportSettings.h @@ -57,9 +57,6 @@ namespace SandboxEditor SANDBOX_API float ManipulatorLineBoundWidth(); SANDBOX_API void SetManipulatorLineBoundWidth(float lineBoundWidth); - SANDBOX_API bool ViewportMouseWrapSetting(); - SANDBOX_API void SetViewportMouseWrapSetting(bool wrapping); - SANDBOX_API float ManipulatorCircleBoundWidth(); SANDBOX_API void SetManipulatorCircleBoundWidth(float circleBoundWidth); diff --git a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp index 9bfd9d396e..5009c626e2 100644 --- a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp +++ b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp @@ -47,12 +47,12 @@ namespace UnitTest void ViewportMouseCursorRequestImpl::BeginCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeCaptured); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::CursorInputMode::CursorModeCaptured); } void ViewportMouseCursorRequestImpl::EndCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeNone); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::CursorInputMode::CursorModeNone); } bool ViewportMouseCursorRequestImpl::IsMouseOver() const diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index ef23560d57..d6871a8795 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -331,12 +331,12 @@ namespace AtomToolsFramework void RenderViewportWidget::BeginCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeCaptured); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::CursorInputMode::CursorModeCaptured); } void RenderViewportWidget::EndCursorCapture() { - m_inputChannelMapper->SetCursorMode(AzToolsFramework::QtEventToAzInputMapper::CursorModeNone); + m_inputChannelMapper->SetCursorMode(AzToolsFramework::CursorInputMode::CursorModeNone); } void RenderViewportWidget::SetOverrideCursor(AzToolsFramework::ViewportInteraction::CursorStyleOverride cursorStyleOverride) From ed39c784c304c0cf9a374b297f3521f7f0787fc2 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sun, 19 Dec 2021 18:22:14 -0800 Subject: [PATCH 038/413] chore: add accumulated test for mouse position Signed-off-by: Michael Pollind --- .../Tests/Input/QtEventToAzInputMapperTests.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp index 0282812be7..5047c19044 100644 --- a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -100,6 +100,11 @@ namespace UnitTest m_azChannelEvents.push_back(AzEventInfo(inputChannel)); hasBeenConsumed = m_captureAzEvents; } + else if (inputChannelId == AzFramework::InputDeviceMouse::SystemCursorPosition) + { + m_azCursorPositions.push_back(*inputChannel.GetCustomData()); + hasBeenConsumed = m_captureAzEvents; + } } else if (AzFramework::InputDeviceKeyboard::IsKeyboardDevice(inputDeviceId)) { @@ -165,6 +170,7 @@ namespace UnitTest AZStd::vector m_signalEvents; AZStd::vector m_azChannelEvents; AZStd::vector m_azTextEvents; + AZStd::vector m_azCursorPositions; bool m_captureAzEvents{ false }; bool m_captureTextEvents{ false }; @@ -549,13 +555,14 @@ namespace UnitTest const MouseMoveParam mouseMoveParam = GetParam(); AzFramework::InputChannelNotificationBus::Handler::BusConnect(); - m_captureAzEvents = false; + m_captureAzEvents = true; m_rootWidget->move(100, 100); mouseMoveFix(m_rootWidget.get(), m_rootWidget->mapToGlobal(mouseMoveParam.startPos), QPoint(0, 0)); // given m_inputChannelMapper->SetCursorMode(mouseMoveParam.mode); + m_azCursorPositions.clear(); mouseMoveFix(m_rootWidget.get(), m_rootWidget->mapToGlobal(mouseMoveParam.startPos), QPoint(0, 0)); for (float i = 0; i < mouseMoveParam.iterations; i++) @@ -563,11 +570,19 @@ namespace UnitTest mouseMoveFix(m_rootWidget.get(), QCursor::pos(), (mouseMoveParam.deltaPos / mouseMoveParam.iterations)); } + AZ::Vector2 accumalatedPosition(0.0f,0.0f); + for(const auto& pos: m_azCursorPositions) { + accumalatedPosition += (pos.m_normalizedPositionDelta * AZ::Vector2(WidgetSize.width(), WidgetSize.height())); + } + // validate QPoint endPosition = m_rootWidget->mapFromGlobal(QCursor::pos()); EXPECT_NEAR(endPosition.x(), mouseMoveParam.expectedPos.x(), 1.0f); EXPECT_NEAR(endPosition.y(), mouseMoveParam.expectedPos.y(), 1.0f); + EXPECT_NEAR(accumalatedPosition.GetX(), mouseMoveParam.deltaPos.x(), 1.0f); + EXPECT_NEAR(accumalatedPosition.GetY(), mouseMoveParam.deltaPos.y(), 1.0f); + // cleanup m_rootWidget->move(0, 0); m_inputChannelMapper->SetCursorMode(AzToolsFramework::CursorInputMode::CursorModeNone); From 832c525f67a0ea24ad004066c0d556c8c449a9af Mon Sep 17 00:00:00 2001 From: nemerle <96597+nemerle@users.noreply.github.com> Date: Sat, 8 Jan 2022 23:22:04 +0100 Subject: [PATCH 039/413] Fix missing include file Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> --- .../Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h index 838cdd2256..60417adf36 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariantAsyncLoader.h @@ -15,6 +15,7 @@ #include #include #include +#include namespace AZ { From c65a903c7dc8ae5ce441df130f26e735534dd6bd Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sat, 8 Jan 2022 21:01:29 -0800 Subject: [PATCH 040/413] chore: fix unit test Signed-off-by: Michael Pollind --- .../Input/QtEventToAzInputMapperTests.cpp | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp index 5047c19044..d7ab896462 100644 --- a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -541,15 +541,6 @@ namespace UnitTest TEST_P(MoveMoveWrapParamQtEventToAzInputMapperFixture, MouseMove_NoAzHandlers_VerifyMouseMovementViewport) { - //TODO: mouseMove is bugged mapToGlobal is called twice - auto mouseMoveFix = [](QWidget* wid, QPoint globalPos, QPoint deltaPos) - { - QPoint globalPosition = globalPos + deltaPos; - QPoint localPosition = wid->mapFromGlobal(globalPosition); - QTest::mouseMove(wid, localPosition); - QMouseEvent mouseMoveEvent(QEvent::MouseMove, localPosition, globalPosition, Qt::NoButton, Qt::NoButton, Qt::NoModifier); - QApplication::sendEvent(wid, &mouseMoveEvent); - }; // setup const MouseMoveParam mouseMoveParam = GetParam(); @@ -558,30 +549,29 @@ namespace UnitTest m_captureAzEvents = true; m_rootWidget->move(100, 100); - mouseMoveFix(m_rootWidget.get(), m_rootWidget->mapToGlobal(mouseMoveParam.startPos), QPoint(0, 0)); + QScreen* screen = m_rootWidget->screen(); + MouseMove(m_rootWidget.get(), mouseMoveParam.startPos, QPoint(0, 0)); // given m_inputChannelMapper->SetCursorMode(mouseMoveParam.mode); m_azCursorPositions.clear(); - - mouseMoveFix(m_rootWidget.get(), m_rootWidget->mapToGlobal(mouseMoveParam.startPos), QPoint(0, 0)); for (float i = 0; i < mouseMoveParam.iterations; i++) { - mouseMoveFix(m_rootWidget.get(), QCursor::pos(), (mouseMoveParam.deltaPos / mouseMoveParam.iterations)); + MouseMove(m_rootWidget.get(), m_rootWidget->mapFromGlobal(QCursor::pos(screen)), (mouseMoveParam.deltaPos / mouseMoveParam.iterations)); } - AZ::Vector2 accumalatedPosition(0.0f,0.0f); + AZ::Vector2 accumulatedPosition(0.0f,0.0f); for(const auto& pos: m_azCursorPositions) { - accumalatedPosition += (pos.m_normalizedPositionDelta * AZ::Vector2(WidgetSize.width(), WidgetSize.height())); + accumulatedPosition += (pos.m_normalizedPositionDelta * AZ::Vector2(WidgetSize.width(), WidgetSize.height())); } // validate - QPoint endPosition = m_rootWidget->mapFromGlobal(QCursor::pos()); + const QPoint endPosition = m_rootWidget->mapFromGlobal(QCursor::pos(screen)); EXPECT_NEAR(endPosition.x(), mouseMoveParam.expectedPos.x(), 1.0f); EXPECT_NEAR(endPosition.y(), mouseMoveParam.expectedPos.y(), 1.0f); - EXPECT_NEAR(accumalatedPosition.GetX(), mouseMoveParam.deltaPos.x(), 1.0f); - EXPECT_NEAR(accumalatedPosition.GetY(), mouseMoveParam.deltaPos.y(), 1.0f); + EXPECT_NEAR(accumulatedPosition.GetX(), mouseMoveParam.deltaPos.x(), 1.0f); + EXPECT_NEAR(accumulatedPosition.GetY(), mouseMoveParam.deltaPos.y(), 1.0f); // cleanup m_rootWidget->move(0, 0); From 3cac520280a586e38292f6906947b143ac9147e7 Mon Sep 17 00:00:00 2001 From: nemerle <96597+nemerle@users.noreply.github.com> Date: Tue, 11 Jan 2022 00:47:00 +0100 Subject: [PATCH 041/413] Fix non-unity windows build Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> --- Code/Framework/AzCore/Tests/TestCatalog.h | 1 + Gems/Blast/Code/Include/Blast/BlastSystemBus.h | 1 + Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp | 1 + .../Code/Source/Components/TerrainPhysicsColliderComponent.cpp | 2 ++ 4 files changed, 5 insertions(+) diff --git a/Code/Framework/AzCore/Tests/TestCatalog.h b/Code/Framework/AzCore/Tests/TestCatalog.h index 9a1fb9b5e6..bbcd952f78 100644 --- a/Code/Framework/AzCore/Tests/TestCatalog.h +++ b/Code/Framework/AzCore/Tests/TestCatalog.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace UnitTest { diff --git a/Gems/Blast/Code/Include/Blast/BlastSystemBus.h b/Gems/Blast/Code/Include/Blast/BlastSystemBus.h index 95ffd75057..bda684181a 100644 --- a/Gems/Blast/Code/Include/Blast/BlastSystemBus.h +++ b/Gems/Blast/Code/Include/Blast/BlastSystemBus.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include #include diff --git a/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp b/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp index 56c785b310..70e7c28bac 100644 --- a/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp +++ b/Gems/Blast/Code/Source/Family/BlastFamilyImpl.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp index 8c2c0e80b6..fccbedd8fa 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp @@ -6,12 +6,14 @@ * */ + #include #include #include #include #include +#include #include #include #include From 7b6ce50fe87c8306bc6b3ab1b65e4ddbdaf463be Mon Sep 17 00:00:00 2001 From: nemerle <96597+nemerle@users.noreply.github.com> Date: Tue, 11 Jan 2022 00:52:21 +0100 Subject: [PATCH 042/413] Remove un-needed `Requests` namespace use Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> --- Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp index 90014578ea..13c01b2efc 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp @@ -139,7 +139,7 @@ namespace AZ::IO::Requests { } - Requests::ReportData::ReportData(ReportType reportType) + ReportData::ReportData(ReportType reportType) : m_reportType(reportType) { } From 5dc97e7e4b5e9272f4940628833315007a060c8b Mon Sep 17 00:00:00 2001 From: Nicholas Van Sickle Date: Tue, 11 Jan 2022 16:34:22 -0800 Subject: [PATCH 043/413] Fix Prefab instance assets not preloading PrefabCatchmentProcessor::ProcessPrefab was no longer updating the ProcessedObjectStore's referenced object list, this change exposes the referenced asset list in the new PrefabDocument API and uses them to update the referenced asset list. Signed-off-by: Nicholas Van Sickle --- .../Prefab/Spawnable/PrefabCatchmentProcessor.cpp | 1 + .../Prefab/Spawnable/PrefabDocument.cpp | 12 +++++++++++- .../Prefab/Spawnable/PrefabDocument.h | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabCatchmentProcessor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabCatchmentProcessor.cpp index 40cd52cac8..a5ca034c36 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabCatchmentProcessor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabCatchmentProcessor.cpp @@ -64,6 +64,7 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils AZStd::move(uniqueName), context.GetSourceUuid(), AZStd::move(serializer)); AZ_Assert(spawnable, "Failed to create a new spawnable."); + object.GetReferencedAssets() = prefab.GetReferencedAssets(); Instance& instance = prefab.GetInstance(); // Resolve entity aliases that store PrefabDOM information to use the spawnable instead. This is done before the entities are // moved from the instance as they'd otherwise can't be found. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.cpp index 04fdea30d2..230c2226cd 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.cpp @@ -124,12 +124,22 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils return *m_instance; } + AZStd::vector>& PrefabDocument::GetReferencedAssets() + { + return m_referencedAssets; + } + + const AZStd::vector>& PrefabDocument::GetReferencedAssets() const + { + return m_referencedAssets; + } + bool PrefabDocument::ConstructInstanceFromPrefabDom(const PrefabDom& prefab) { using namespace AzToolsFramework::Prefab; m_instance->Reset(); - if (PrefabDomUtils::LoadInstanceFromPrefabDom(*m_instance, prefab, PrefabDomUtils::LoadFlags::AssignRandomEntityId)) + if (PrefabDomUtils::LoadInstanceFromPrefabDom(*m_instance, prefab, m_referencedAssets, PrefabDomUtils::LoadFlags::AssignRandomEntityId)) { return true; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.h index 215daf7f71..661dba5edf 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/PrefabDocument.h @@ -53,12 +53,16 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils AzToolsFramework::Prefab::Instance& GetInstance(); const AzToolsFramework::Prefab::Instance& GetInstance() const; + AZStd::vector>& GetReferencedAssets(); + const AZStd::vector>& GetReferencedAssets() const; + private: bool ConstructInstanceFromPrefabDom(const PrefabDom& prefab); mutable PrefabDom m_dom; AZStd::unique_ptr m_instance; AZStd::string m_name; + AZStd::vector> m_referencedAssets; mutable bool m_isDirty{ false }; }; } // namespace AzToolsFramework::Prefab::PrefabConversionUtils From 2e19b703ef00e4f1bc94a904901c83f2e6fa3e3e Mon Sep 17 00:00:00 2001 From: nemerle <96597+nemerle@users.noreply.github.com> Date: Wed, 12 Jan 2022 01:37:02 +0100 Subject: [PATCH 044/413] fix release build Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> --- Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp b/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp index 45a95a71d7..f799e8e69f 100644 --- a/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/ATLEntities.cpp @@ -286,7 +286,9 @@ namespace Audio return sResult; } - CATLAudioFileEntry::CATLAudioFileEntry(const char * const filePath, IATLAudioFileEntryData * const implData) + +#endif // !AUDIO_RELEASE + CATLAudioFileEntry::CATLAudioFileEntry(const char* const filePath, IATLAudioFileEntryData* const implData) : m_filePath(filePath) , m_fileSize(0) , m_useCount(0) @@ -299,6 +301,4 @@ namespace Audio } CATLAudioFileEntry::~CATLAudioFileEntry() = default; - -#endif // !AUDIO_RELEASE } // namespace Audio From b772d7b3e8abd15acaf1db40d5a79357927f014d Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 11:10:34 -0800 Subject: [PATCH 045/413] Removing multiplayer script canvas translation files from the scriptcanvas gem; these will eventually move into AutomatedTesting project once repopulated (if needed). Signed-off-by: Gene Walters --- ...orityToAutonomousNoParamsNotifyEvent.names | 50 -- .../AuthorityToAutonomousNotifyEvent.names | 56 --- ...AuthorityToClientNoParamsNotifyEvent.names | 50 -- .../AuthorityToClientNotifyEvent.names | 56 --- ...nomousToAuthorityNoParamsNotifyEvent.names | 50 -- .../AutonomousToAuthorityNotifyEvent.names | 56 --- .../ServerToAuthorityNoParamNotifyEvent.names | 50 -- .../ServerToAuthorityNotifyEvent.names | 56 --- .../Classes/NetworkTestPlayerComponent.names | 438 ------------------ ...tworkTestPlayerComponentNetworkInput.names | 129 ------ 10 files changed, 991 deletions(-) delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names delete mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names deleted file mode 100644 index 216212ca4a..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names +++ /dev/null @@ -1,50 +0,0 @@ -{ - "entries": [ - { - "base": "AuthorityToAutonomousNoParams Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Authority To Autonomous No Params Notify Event" - }, - "slots": [ - { - "base": "AuthorityToAutonomousNoParams Notify Event", - "details": { - "name": "AuthorityToAutonomousNoParams Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names deleted file mode 100644 index 50c0ec6013..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names +++ /dev/null @@ -1,56 +0,0 @@ -{ - "entries": [ - { - "base": "AuthorityToAutonomous Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Authority To Autonomous Notify Event" - }, - "slots": [ - { - "base": "someFloat", - "details": { - "name": "someFloat" - } - }, - { - "base": "AuthorityToAutonomous Notify Event", - "details": { - "name": "AuthorityToAutonomous Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names deleted file mode 100644 index bf5b975d63..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names +++ /dev/null @@ -1,50 +0,0 @@ -{ - "entries": [ - { - "base": "AuthorityToClientNoParams Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Authority To Client No Params Notify Event" - }, - "slots": [ - { - "base": "AuthorityToClientNoParams Notify Event", - "details": { - "name": "AuthorityToClientNoParams Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names deleted file mode 100644 index d3ba2e9299..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names +++ /dev/null @@ -1,56 +0,0 @@ -{ - "entries": [ - { - "base": "AuthorityToClient Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Authority To Client Notify Event" - }, - "slots": [ - { - "base": "someFloat", - "details": { - "name": "someFloat" - } - }, - { - "base": "AuthorityToClient Notify Event", - "details": { - "name": "AuthorityToClient Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names deleted file mode 100644 index ba5f7aec0c..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names +++ /dev/null @@ -1,50 +0,0 @@ -{ - "entries": [ - { - "base": "AutonomousToAuthorityNoParams Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Autonomous To Authority No Params Notify Event" - }, - "slots": [ - { - "base": "AutonomousToAuthorityNoParams Notify Event", - "details": { - "name": "AutonomousToAuthorityNoParams Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names deleted file mode 100644 index 73566d177e..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names +++ /dev/null @@ -1,56 +0,0 @@ -{ - "entries": [ - { - "base": "AutonomousToAuthority Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Autonomous To Authority Notify Event" - }, - "slots": [ - { - "base": "someFloat", - "details": { - "name": "someFloat" - } - }, - { - "base": "AutonomousToAuthority Notify Event", - "details": { - "name": "AutonomousToAuthority Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names deleted file mode 100644 index b6694211cd..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names +++ /dev/null @@ -1,50 +0,0 @@ -{ - "entries": [ - { - "base": "ServerToAuthorityNoParam Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Server To Authority No Param Notify Event" - }, - "slots": [ - { - "base": "ServerToAuthorityNoParam Notify Event", - "details": { - "name": "ServerToAuthorityNoParam Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names deleted file mode 100644 index 71ab303260..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names +++ /dev/null @@ -1,56 +0,0 @@ -{ - "entries": [ - { - "base": "ServerToAuthority Notify Event", - "context": "AZEventHandler", - "variant": "", - "details": { - "name": "Server To Authority Notify Event" - }, - "slots": [ - { - "base": "someFloat", - "details": { - "name": "someFloat" - } - }, - { - "base": "ServerToAuthority Notify Event", - "details": { - "name": "ServerToAuthority Notify Event" - } - }, - { - "base": "Connect", - "details": { - "name": "Connect" - } - }, - { - "base": "Disconnect", - "details": { - "name": "Disconnect" - } - }, - { - "base": "On Connected", - "details": { - "name": "On Connected" - } - }, - { - "base": "On Disconnected", - "details": { - "name": "On Disconnected" - } - }, - { - "base": "OnEvent", - "details": { - "name": "OnEvent" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names deleted file mode 100644 index 22636e0453..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names +++ /dev/null @@ -1,438 +0,0 @@ -{ - "entries": [ - { - "base": "NetworkTestPlayerComponent", - "context": "BehaviorClass", - "variant": "", - "details": { - "name": "Network Test Player Component" - }, - "methods": [ - { - "base": "AutonomousToAuthority", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Autonomous To Authority" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Autonomous To Authority is invoked" - }, - "details": { - "name": "Autonomous To Authority" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "float" - } - } - ] - }, - { - "base": "ServerToAuthority", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Server To Authority" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Server To Authority is invoked" - }, - "details": { - "name": "Server To Authority" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "float" - } - } - ] - }, - { - "base": "AutonomousToAuthorityByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Autonomous To Authority By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Autonomous To Authority By Entity Id is invoked" - }, - "details": { - "name": "Autonomous To Authority By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "some Float" - } - } - ] - }, - { - "base": "ServerToAuthorityByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Server To Authority By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Server To Authority By Entity Id is invoked" - }, - "details": { - "name": "Server To Authority By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "some Float" - } - } - ] - }, - { - "base": "AutonomousToAuthorityNoParams", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Autonomous To Authority No Params" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Autonomous To Authority No Params is invoked" - }, - "details": { - "name": "Autonomous To Authority No Params" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - } - ] - }, - { - "base": "AuthorityToAutonomous", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Autonomous" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Autonomous is invoked" - }, - "details": { - "name": "Authority To Autonomous" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "float" - } - } - ] - }, - { - "base": "AuthorityToClientNoParams", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Client No Params" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Client No Params is invoked" - }, - "details": { - "name": "Authority To Client No Params" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - } - ] - }, - { - "base": "AuthorityToClientByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Client By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Client By Entity Id is invoked" - }, - "details": { - "name": "Authority To Client By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "some Float" - } - } - ] - }, - { - "base": "AuthorityToClient", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Client" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Client is invoked" - }, - "details": { - "name": "Authority To Client" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "float" - } - } - ] - }, - { - "base": "AuthorityToAutonomousNoParams", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Autonomous No Params" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Autonomous No Params is invoked" - }, - "details": { - "name": "Authority To Autonomous No Params" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - } - ] - }, - { - "base": "ServerToAuthorityNoParamByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Server To Authority No Param By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Server To Authority No Param By Entity Id is invoked" - }, - "details": { - "name": "Server To Authority No Param By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - } - ] - }, - { - "base": "AuthorityToClientNoParamsByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Client No Params By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Client No Params By Entity Id is invoked" - }, - "details": { - "name": "Authority To Client No Params By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - } - ] - }, - { - "base": "AuthorityToAutonomousByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Autonomous By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Autonomous By Entity Id is invoked" - }, - "details": { - "name": "Authority To Autonomous By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "some Float" - } - } - ] - }, - { - "base": "AutonomousToAuthorityNoParamsByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Autonomous To Authority No Params By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Autonomous To Authority No Params By Entity Id is invoked" - }, - "details": { - "name": "Autonomous To Authority No Params By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - } - ] - }, - { - "base": "AuthorityToAutonomousNoParamsByEntityId", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Authority To Autonomous No Params By Entity Id" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Authority To Autonomous No Params By Entity Id is invoked" - }, - "details": { - "name": "Authority To Autonomous No Params By Entity Id" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Source", - "tooltip": "The Source containing the NetworkTestPlayerComponentController" - } - } - ] - }, - { - "base": "ServerToAuthorityNoParam", - "context": "NetworkTestPlayerComponent", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Server To Authority No Param" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Server To Authority No Param is invoked" - }, - "details": { - "name": "Server To Authority No Param" - }, - "params": [ - { - "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", - "details": { - "name": "Network Test Player Component" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names deleted file mode 100644 index d8c016db0f..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names +++ /dev/null @@ -1,129 +0,0 @@ -{ - "entries": [ - { - "base": "NetworkTestPlayerComponentNetworkInput", - "context": "BehaviorClass", - "variant": "", - "details": { - "name": "Network Test Player Component Network Input" - }, - "methods": [ - { - "base": "CreateFromValues", - "context": "NetworkTestPlayerComponentNetworkInput", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke Create From Values" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after Create From Values is invoked" - }, - "details": { - "name": "Create From Values" - }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "left Right" - } - } - ], - "results": [ - { - "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", - "details": { - "name": "Network Test Player Component Network Input" - } - } - ] - }, - { - "base": "GetFwdBack", - "details": { - "name": "Get Fwd Back" - }, - "params": [ - { - "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", - "details": { - "name": "Network Test Player Component Network Input" - } - } - ], - "results": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Fwd Back" - } - } - ] - }, - { - "base": "SetFwdBack", - "details": { - "name": "Set Fwd Back" - }, - "params": [ - { - "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", - "details": { - "name": "Network Test Player Component Network Input" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Fwd Back" - } - } - ] - }, - { - "base": "GetLeftRight", - "details": { - "name": "Get Left Right" - }, - "params": [ - { - "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", - "details": { - "name": "Network Test Player Component Network Input" - } - } - ], - "results": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Left Right" - } - } - ] - }, - { - "base": "SetLeftRight", - "details": { - "name": "Set Left Right" - }, - "params": [ - { - "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", - "details": { - "name": "Network Test Player Component Network Input" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Left Right" - } - } - ] - } - ] - } - ] -} \ No newline at end of file From 561ff40c8154c335ad435086923a20aefa66a2d5 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 11:13:10 -0800 Subject: [PATCH 046/413] Creating a new multiplayer component which we'll assign to a networked level entity (as opposed to a network player). Signed-off-by: Gene Walters --- ...workTestLevelEntityComponent.AutoComponent.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml diff --git a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml new file mode 100644 index 0000000000..2fd196a2f6 --- /dev/null +++ b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml @@ -0,0 +1,15 @@ + + + + + + + + + From ee3196d64a9d31929951ad60134b22dbe4b1db02 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 11:31:45 -0800 Subject: [PATCH 047/413] Removed an RPC that's now being used inside the NetLevelEntity autocomponent Signed-off-by: Gene Walters --- .../Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml index 251d2b25af..b4dd35d741 100644 --- a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml +++ b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml @@ -29,8 +29,6 @@ - - From 3b84049a1d12409d0cfa7bffcd5a059cc592915f Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 12:18:06 -0800 Subject: [PATCH 048/413] Adding NetworkTestLevelEntityComponent to cmake for compilation Signed-off-by: Gene Walters --- AutomatedTesting/Gem/Code/automatedtesting_files.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/AutomatedTesting/Gem/Code/automatedtesting_files.cmake b/AutomatedTesting/Gem/Code/automatedtesting_files.cmake index eb619104a4..1f6dbbd772 100644 --- a/AutomatedTesting/Gem/Code/automatedtesting_files.cmake +++ b/AutomatedTesting/Gem/Code/automatedtesting_files.cmake @@ -12,4 +12,5 @@ set(FILES Source/AutomatedTestingSystemComponent.cpp Source/AutomatedTestingSystemComponent.h Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml + Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml ) From 4e811d5af8383844889ed45f903b8650319c0d08 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 12:19:59 -0800 Subject: [PATCH 049/413] Small update: adding the component type to a warning in order to help debug what component is failing Signed-off-by: Gene Walters --- Code/Framework/AzCore/AzCore/Component/Component.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Component/Component.cpp b/Code/Framework/AzCore/AzCore/Component/Component.cpp index c9829c6dd8..c11e4ef69f 100644 --- a/Code/Framework/AzCore/AzCore/Component/Component.cpp +++ b/Code/Framework/AzCore/AzCore/Component/Component.cpp @@ -49,7 +49,7 @@ namespace AZ return m_entity->GetId(); } - AZ_Warning("System", false, "Can't get component %p entity ID as it is not attached to an entity yet!", this); + AZ_Warning("System", false, "Can't get component (type: %s, addr: %p) entity ID as it is not attached to an entity yet!", RTTI_GetTypeName(), this); return EntityId(); } @@ -60,7 +60,7 @@ namespace AZ return NamedEntityId(m_entity->GetId(), m_entity->GetName()); } - AZ_Warning("System", false, "Can't get component %p entity ID as it is not attached to an entity yet!", this); + AZ_Warning("System", false, "Can't get component (type: %s, addr: %p) entity ID as it is not attached to an entity yet!", RTTI_GetTypeName(), this); return NamedEntityId(); } From a635e935e3893ad974e92a52fe4c71a115f1a325 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 12:20:46 -0800 Subject: [PATCH 050/413] minor typo fix on code warning Signed-off-by: Gene Walters --- Code/Framework/AzCore/AzCore/Component/Entity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/AzCore/Component/Entity.cpp b/Code/Framework/AzCore/AzCore/Component/Entity.cpp index c5cda98f2c..db9ead93ad 100644 --- a/Code/Framework/AzCore/AzCore/Component/Entity.cpp +++ b/Code/Framework/AzCore/AzCore/Component/Entity.cpp @@ -230,7 +230,7 @@ namespace AZ EBUS_EVENT_ID(m_id, EntityBus, OnEntityDeactivated, m_id); EBUS_EVENT(EntitySystemBus, OnEntityDeactivated, m_id); - AZ_Assert(m_state == State::Active, "Component should be in Active state to br Deactivated!"); + AZ_Assert(m_state == State::Active, "Component should be in Active state to be Deactivated!"); SetState(State::Deactivating); for (ComponentArrayType::reverse_iterator it = m_components.rbegin(); it != m_components.rend(); ++it) From 49a0c78013391ca62424560a05a59434ff30c8f9 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 12:33:28 -0800 Subject: [PATCH 051/413] Check if transform component is attached to an entity before sending out notifications that rely upon having an entity; this stops runtime warnings when calling GetEntityId() Signed-off-by: Gene Walters --- .../Components/TransformComponent.cpp | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp index 809f664a10..e4e0ea08b2 100644 --- a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp @@ -585,21 +585,25 @@ namespace AzFramework EBUS_EVENT_PTR(m_notificationBus, AZ::TransformNotificationBus, OnParentChanged, oldParent, parentId); m_parentChangedEvent.Signal(oldParent, parentId); - if (oldParent != parentId) // Don't send removal notification while activating. + // Check if we're attached to an entity; the following notifications rely upon having a valid entity id + if (m_entity != nullptr) { - EBUS_EVENT_ID(oldParent, AZ::TransformNotificationBus, OnChildRemoved, GetEntityId()); - auto oldParentTransform = AZ::TransformBus::FindFirstHandler(oldParent); - if (oldParentTransform) + if (oldParent != parentId) // Don't send removal notification while activating. { - oldParentTransform->NotifyChildChangedEvent(AZ::ChildChangeType::Removed, GetEntityId()); + EBUS_EVENT_ID(oldParent, AZ::TransformNotificationBus, OnChildRemoved, GetEntityId()); + auto oldParentTransform = AZ::TransformBus::FindFirstHandler(oldParent); + if (oldParentTransform) + { + oldParentTransform->NotifyChildChangedEvent(AZ::ChildChangeType::Removed, GetEntityId()); + } } - } - EBUS_EVENT_ID(parentId, AZ::TransformNotificationBus, OnChildAdded, GetEntityId()); - auto newParentTransform = AZ::TransformBus::FindFirstHandler(parentId); - if (newParentTransform) - { - newParentTransform->NotifyChildChangedEvent(AZ::ChildChangeType::Added, GetEntityId()); + EBUS_EVENT_ID(parentId, AZ::TransformNotificationBus, OnChildAdded, GetEntityId()); + auto newParentTransform = AZ::TransformBus::FindFirstHandler(parentId); + if (newParentTransform) + { + newParentTransform->NotifyChildChangedEvent(AZ::ChildChangeType::Added, GetEntityId()); + } } } From ffde76208154d9e6c20f44f1d151eff82e763e9e Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 12 Jan 2022 12:43:39 -0800 Subject: [PATCH 052/413] Minor comment tweak, and code readability Signed-off-by: Gene Walters --- .../Code/Source/Editor/MultiplayerEditorConnection.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index c8c1ed15bd..3ae4eb6444 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -100,8 +100,8 @@ namespace Multiplayer { // Editor Server Init is intended for non-release targets m_byteStream.Write(packet.GetAssetData().GetSize(), reinterpret_cast(packet.ModifyAssetData().GetBuffer())); - - // In case if this is the last update, process the byteStream buffer. Otherwise more packets are expected + + // If this is the last update then process the byteStream buffer. Otherwise more packets are expected if (packet.GetLastUpdate()) { // This is the last expected packet @@ -150,9 +150,8 @@ namespace Multiplayer AZ::Interface::Get()->BuildSpawnablesList(); // Load the level via the root spawnable that was registered - const AZ::CVarFixedString loadLevelString = "LoadLevel Root.spawnable"; const auto console = AZ::Interface::Get(); - console->PerformCommand(loadLevelString.c_str()); + console->PerformCommand("LoadLevel Root.spawnable"); // Setup the normal multiplayer connection AZ::Interface::Get()->InitializeMultiplayer(MultiplayerAgentType::DedicatedServer); From fabb2b186c4d3f0b9cd2aa49a1233977fa796e12 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Wed, 12 Jan 2022 20:52:57 -0800 Subject: [PATCH 053/413] chore: disable mouse move test Signed-off-by: Michael Pollind --- .../Tests/Input/QtEventToAzInputMapperTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp index d7ab896462..31193f6f05 100644 --- a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -539,7 +539,7 @@ namespace UnitTest { }; - TEST_P(MoveMoveWrapParamQtEventToAzInputMapperFixture, MouseMove_NoAzHandlers_VerifyMouseMovementViewport) + TEST_P(MoveMoveWrapParamQtEventToAzInputMapperFixture, DISABLED_MouseMove_NoAzHandlers_VerifyMouseMovementViewport) { // setup From 56837f48d9c75e3f5e0a8b3e7fa560b0e71287f7 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Fri, 14 Jan 2022 16:29:00 +0000 Subject: [PATCH 054/413] Remove error state when user attempts to save empty script event. Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Include/ScriptEvents/ScriptEventDefinition.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.cpp b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.cpp index e6c40cf789..3a6a411611 100644 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.cpp +++ b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.cpp @@ -131,10 +131,7 @@ namespace ScriptEvents return AZ::Failure(AZStd::string::format("%s, invalid name specified, event name must only have alpha numeric characters, may not start with a number and may not have white space", name.c_str())); } - if (m_methods.empty()) - { - return AZ::Failure(AZStd::string::format("Script Events (%s) must provide at least one event otherwise they are unusable, be sure to add an event before saving.", name.c_str())); - } + AZ_Warning("Script Events", !m_methods.empty(), AZStd::string::format("Script Events (%s) must provide at least one event, otherwise they are unusable.", name.c_str()).c_str()); // Validate each method AZStd::string methodName; From 641e76eca9f2c0b7f4d5bf1f83d6b8b884d9ecc5 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Fri, 14 Jan 2022 10:09:14 -0800 Subject: [PATCH 055/413] Convert the loops using the Get* functions in Terrain physics and debugger components to use the new ProcessRegion* functions. Signed-off-by: amzn-sj --- .../TerrainPhysicsColliderComponent.cpp | 80 ++++++++----------- .../TerrainWorldDebuggerComponent.cpp | 37 +++------ 2 files changed, 45 insertions(+), 72 deletions(-) diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp index c51728a5c3..4a8b4680b3 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp @@ -284,21 +284,14 @@ namespace Terrain heights.clear(); heights.reserve(gridWidth * gridHeight); - for (int32_t row = 0; row < gridHeight; row++) + auto perPositionHeightCallback = [&heights, worldCenterZ] + ([[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { - const float y = row * gridResolution.GetY() + worldSize.GetMin().GetY(); - for (int32_t col = 0; col < gridWidth; col++) - { - const float x = col * gridResolution.GetX() + worldSize.GetMin().GetX(); - float height = 0.0f; + heights.emplace_back(surfacePoint.m_position.GetZ() - worldCenterZ); + }; - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - height, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y, - AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT, nullptr); - - heights.emplace_back(height - worldCenterZ); - } - } + AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::ProcessHeightsFromRegion, + worldSize, gridResolution, perPositionHeightCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT); } uint8_t TerrainPhysicsColliderComponent::GetMaterialIdIndex(const Physics::MaterialId& materialId, const AZStd::vector& materialList) const @@ -350,42 +343,37 @@ namespace Terrain AZStd::vector materialList = GetMaterialList(); - for (int32_t row = 0; row < gridHeight; row++) + auto perPositionCallback = [&heightMaterials, &materialList, this, worldCenterZ, worldHeightBoundsMin, worldHeightBoundsMax] + (size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, bool terrainExists) { - const float y = row * gridResolution.GetY() + worldSize.GetMin().GetY(); - for (int32_t col = 0; col < gridWidth; col++) + float height = surfacePoint.m_position.GetZ(); + + // Any heights that fall outside the range of our bounding box will get turned into holes. + if ((height < worldHeightBoundsMin) || (height > worldHeightBoundsMax)) { - const float x = col * gridResolution.GetX() + worldSize.GetMin().GetX(); - float height = 0.0f; - - bool terrainExists = true; - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - height, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y, - AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT, &terrainExists); - - // Any heights that fall outside the range of our bounding box will get turned into holes. - if ((height < worldHeightBoundsMin) || (height > worldHeightBoundsMax)) - { - height = worldHeightBoundsMin; - terrainExists = false; - } - - // Find the best surface tag at this point. - AzFramework::SurfaceData::SurfaceTagWeight surfaceWeight; - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - surfaceWeight, &AzFramework::Terrain::TerrainDataRequests::GetMaxSurfaceWeightFromFloats, x, y, - AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT, nullptr); - - Physics::HeightMaterialPoint point; - point.m_height = height - worldCenterZ; - point.m_quadMeshType = terrainExists ? Physics::QuadMeshType::SubdivideUpperLeftToBottomRight : Physics::QuadMeshType::Hole; - - Physics::MaterialId materialId = FindMaterialIdForSurfaceTag(surfaceWeight.m_surfaceType); - point.m_materialIndex = GetMaterialIdIndex(materialId, materialList); - - heightMaterials.emplace_back(point); + height = worldHeightBoundsMin; + terrainExists = false; } - } + + // Find the best surface tag at this point. + // We want the MaxSurfaceWeight. The ProcessSurfacePoints callback has surface weights sorted. + // So, we pick the value at the front of the list. + AzFramework::SurfaceData::SurfaceTagWeight surfaceWeight; + if (!surfacePoint.m_surfaceTags.empty()) + { + surfaceWeight = *surfacePoint.m_surfaceTags.begin(); + } + + Physics::HeightMaterialPoint point; + point.m_height = height - worldCenterZ; + point.m_quadMeshType = terrainExists ? Physics::QuadMeshType::SubdivideUpperLeftToBottomRight : Physics::QuadMeshType::Hole; + Physics::MaterialId materialId = FindMaterialIdForSurfaceTag(surfaceWeight.m_surfaceType); + point.m_materialIndex = GetMaterialIdIndex(materialId, materialList); + heightMaterials.emplace_back(point); + }; + + AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::ProcessSurfacePointsFromRegion, + worldSize, gridResolution, perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT); } AZ::Vector2 TerrainPhysicsColliderComponent::GetHeightfieldGridSpacing() const diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp index f3e0d59537..46be621307 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp @@ -354,44 +354,29 @@ namespace Terrain // For each terrain height value in the region, create the _| grid lines for that point and cache off the height value // for use with subsequent grid line calculations. auto ProcessHeightValue = [gridResolution, &previousHeight, &rowHeights, §or] - (uint32_t xIndex, uint32_t yIndex, const AZ::Vector3& position, [[maybe_unused]] bool terrainExists) + (uint32_t xIndex, uint32_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { // Don't add any vertices for the first column or first row. These grid lines will be handled by an adjacent sector, if // there is one. if ((xIndex > 0) && (yIndex > 0)) { - float x = position.GetX() - gridResolution.GetX(); - float y = position.GetY() - gridResolution.GetY(); + float x = surfacePoint.m_position.GetX() - gridResolution.GetX(); + float y = surfacePoint.m_position.GetY() - gridResolution.GetY(); - sector.m_lineVertices.emplace_back(AZ::Vector3(x, position.GetY(), previousHeight)); - sector.m_lineVertices.emplace_back(position); + sector.m_lineVertices.emplace_back(AZ::Vector3(x, surfacePoint.m_position.GetY(), previousHeight)); + sector.m_lineVertices.emplace_back(surfacePoint.m_position); - sector.m_lineVertices.emplace_back(AZ::Vector3(position.GetX(), y, rowHeights[xIndex])); - sector.m_lineVertices.emplace_back(position); + sector.m_lineVertices.emplace_back(AZ::Vector3(surfacePoint.m_position.GetX(), y, rowHeights[xIndex])); + sector.m_lineVertices.emplace_back(surfacePoint.m_position); } // Save off the heights so that we can use them to draw subsequent columns and rows. - previousHeight = position.GetZ(); - rowHeights[xIndex] = position.GetZ(); + previousHeight = surfacePoint.m_position.GetZ(); + rowHeights[xIndex] = surfacePoint.m_position.GetZ(); }; - // This set of nested loops will get replaced with a call to ProcessHeightsFromRegion once the API exists. - for (size_t yIndex = 0; yIndex < numSamplesY; yIndex++) - { - float y = region.GetMin().GetY() + (gridResolution.GetY() * yIndex); - for (size_t xIndex = 0; xIndex < numSamplesX; xIndex++) - { - float x = region.GetMin().GetX() + (gridResolution.GetX() * xIndex); - - float height = worldMinZ; - bool terrainExists = false; - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - height, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y, - AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); - ProcessHeightValue( - aznumeric_cast(xIndex), aznumeric_cast(yIndex), AZ::Vector3(x, y, height), terrainExists); - } - } + AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::ProcessHeightsFromRegion, + region, gridResolution, ProcessHeightValue, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); } void TerrainWorldDebuggerComponent::OnTerrainDataChanged(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) From c8e5bcc901c989c12c3e485df9427d0546d8d7ac Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Fri, 14 Jan 2022 12:01:32 -0800 Subject: [PATCH 056/413] Dont allow spawning netbound entities by default, we first need to initialize multiplayer and know our network agent type (dedicated-server/client-server/client). This will stop the editor playmode (which doesn't init multiplayer until it connects to the server) from spawning netbound entities Signed-off-by: Gene Walters --- Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h index dd2e7956ca..47238cc729 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h @@ -184,7 +184,7 @@ namespace Multiplayer double m_serverSendAccumulator = 0.0; float m_renderBlendFactor = 0.0f; float m_tickFactor = 0.0f; - bool m_spawnNetboundEntities = true; + bool m_spawnNetboundEntities = false; #if !defined(AZ_RELEASE_BUILD) MultiplayerEditorConnection m_editorConnectionListener; From e4bd28f636d9421bb1807bac8c1586afa26afe37 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Fri, 14 Jan 2022 13:48:37 -0800 Subject: [PATCH 057/413] Update NetworkSpawnableLibrary to only hold onto network.spawnables (instead of all spawnables) Signed-off-by: Gene Walters --- .../Source/NetworkEntity/NetworkSpawnableLibrary.cpp | 4 ++-- .../Code/Source/NetworkEntity/NetworkSpawnableLibrary.h | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp index f60778dbb4..7fb7bfdc39 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace Multiplayer @@ -42,7 +41,8 @@ namespace Multiplayer auto enumerateCallback = [this](const AZ::Data::AssetId id, const AZ::Data::AssetInfo& info) { - if (info.m_assetType == AZ::AzTypeInfo::Uuid()) + if (info.m_assetType == AZ::AzTypeInfo::Uuid() && + info.m_relativePath.ends_with(".network.spawnable")) { ProcessSpawnableAsset(info.m_relativePath, id); } diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h index 0fc3ae07cc..db22ccf9de 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h @@ -22,13 +22,16 @@ namespace Multiplayer NetworkSpawnableLibrary(); ~NetworkSpawnableLibrary(); - - /// INetworkSpawnableLibrary overrides. + + //! INetworkSpawnableLibrary overrides. + //! @{ + // Iterates over all assets (on-disk and in-memory) and stores any spawnables that are "network.spawnables" + // This allows us to look up network spawnable assets by name or id for later use void BuildSpawnablesList() override; void ProcessSpawnableAsset(const AZStd::string& relativePath, AZ::Data::AssetId id) override; AZ::Name GetSpawnableNameFromAssetId(AZ::Data::AssetId assetId) override; AZ::Data::AssetId GetAssetIdByName(AZ::Name name) override; - + //! @} private: AZStd::unordered_map m_spawnables; From 6ac1211ae92889e0d8c8c72a2bdc18df1c2bfd24 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Fri, 14 Jan 2022 16:40:08 -0800 Subject: [PATCH 058/413] Add unit tests for ProcessSurfaceWeightsFromRegion and ProcessSurfacePointsFromRegion. Signed-off-by: amzn-sj --- Gems/Terrain/Code/Tests/TerrainSystemTest.cpp | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp index a5798a3dad..2eebc1b824 100644 --- a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp @@ -902,4 +902,168 @@ namespace UnitTest terrainSystem->ProcessNormalsFromRegion(testRegionBox, stepSize, perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR); } + + TEST_F(TerrainSystemTest, TerrainProcessSurfaceWeightsFromRegion) + { + const AZ::Aabb spawnerBox = AZ::Aabb::CreateFromMinMaxValues(-10.0f, -10.0f, -5.0f, 10.0f, 10.0f, 15.0f); + auto entity = CreateAndActivateMockTerrainLayerSpawner( + spawnerBox, + [](AZ::Vector3& position, bool& terrainExists) + { + position.SetZ(1.0f); + terrainExists = true; + }); + + // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution at 1 meter intervals. + const AZ::Vector2 queryResolution(1.0f); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); + + const AZ::Aabb testRegionBox = AZ::Aabb::CreateFromMinMaxValues(-3.0f, -3.0f, -1.0f, 3.0f, 3.0f, 1.0f); + const AZ::Vector2 stepSize(1.0f); + + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + const SurfaceData::SurfaceTag tag3 = SurfaceData::SurfaceTag("tag3"); + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight1; + tagWeight1.m_surfaceType = tag1; + tagWeight1.m_weight = 1.0f; + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight2; + tagWeight2.m_surfaceType = tag2; + tagWeight2.m_weight = 0.7f; + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight3; + tagWeight3.m_surfaceType = tag3; + tagWeight3.m_weight = 0.3f; + + NiceMock mockSurfaceRequests(entity->GetId()); + ON_CALL(mockSurfaceRequests, GetSurfaceWeights).WillByDefault( + [&tagWeight1, &tagWeight2, &tagWeight3](const AZ::Vector3& position, AzFramework::SurfaceData::SurfaceTagWeightList& surfaceWeights) + { + surfaceWeights.clear(); + float absYPos = fabsf(position.GetY()); + if (absYPos < 1.0f) + { + surfaceWeights.push_back(tagWeight1); + } + else if(absYPos < 2.0f) + { + surfaceWeights.push_back(tagWeight2); + } + else + { + surfaceWeights.push_back(tagWeight3); + } + } + ); + + auto perPositionCallback = [&tagWeight1, &tagWeight2, &tagWeight3](size_t xIndex, size_t yIndex, + const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) + { + constexpr float epsilon = 0.0001f; + float absYPos = fabsf(surfacePoint.m_position.GetY()); + if (absYPos < 1.0f) + { + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight1.m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight1.m_weight, epsilon); + } + else if(absYPos < 2.0f) + { + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight2.m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight2.m_weight, epsilon); + } + else + { + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight3.m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight3.m_weight, epsilon); + } + }; + + terrainSystem->ProcessSurfaceWeightsFromRegion(testRegionBox, stepSize, perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR); + } + + TEST_F(TerrainSystemTest, TerrainProcessSurfacePointsFromRegion) + { + const AZ::Aabb spawnerBox = AZ::Aabb::CreateFromMinMaxValues(-10.0f, -10.0f, -5.0f, 10.0f, 10.0f, 15.0f); + auto entity = CreateAndActivateMockTerrainLayerSpawner( + spawnerBox, + [](AZ::Vector3& position, bool& terrainExists) + { + position.SetZ(position.GetX() + position.GetY()); + terrainExists = true; + }); + + // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution at 1 meter intervals. + const AZ::Vector2 queryResolution(1.0f); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); + + const AZ::Aabb testRegionBox = AZ::Aabb::CreateFromMinMaxValues(-3.0f, -3.0f, -1.0f, 3.0f, 3.0f, 1.0f); + const AZ::Vector2 stepSize(1.0f); + + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + const SurfaceData::SurfaceTag tag3 = SurfaceData::SurfaceTag("tag3"); + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight1; + tagWeight1.m_surfaceType = tag1; + tagWeight1.m_weight = 1.0f; + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight2; + tagWeight2.m_surfaceType = tag2; + tagWeight2.m_weight = 0.7f; + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight3; + tagWeight3.m_surfaceType = tag3; + tagWeight3.m_weight = 0.3f; + + NiceMock mockSurfaceRequests(entity->GetId()); + ON_CALL(mockSurfaceRequests, GetSurfaceWeights).WillByDefault( + [&tagWeight1, &tagWeight2, &tagWeight3](const AZ::Vector3& position, AzFramework::SurfaceData::SurfaceTagWeightList& surfaceWeights) + { + surfaceWeights.clear(); + float absYPos = fabsf(position.GetY()); + if (absYPos < 1.0f) + { + surfaceWeights.push_back(tagWeight1); + } + else if(absYPos < 2.0f) + { + surfaceWeights.push_back(tagWeight2); + } + else + { + surfaceWeights.push_back(tagWeight3); + } + } + ); + + auto perPositionCallback = [&tagWeight1, &tagWeight2, &tagWeight3](size_t xIndex, size_t yIndex, + const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) + { + constexpr float epsilon = 0.0001f; + float expectedHeight = surfacePoint.m_position.GetX() + surfacePoint.m_position.GetY(); + + EXPECT_NEAR(surfacePoint.m_position.GetZ(), expectedHeight, epsilon); + + float absYPos = fabsf(surfacePoint.m_position.GetY()); + if (absYPos < 1.0f) + { + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight1.m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight1.m_weight, epsilon); + } + else if(absYPos < 2.0f) + { + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight2.m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight2.m_weight, epsilon); + } + else + { + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight3.m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight3.m_weight, epsilon); + } + }; + + terrainSystem->ProcessSurfacePointsFromRegion(testRegionBox, stepSize, perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); + } } // namespace UnitTest From 8fa04400308138ae9af64c396380a3ee2718d60b Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Fri, 14 Jan 2022 16:59:26 -0800 Subject: [PATCH 059/413] Update TerrainPhysicsColliderTests to add mocks for the ProcessRegion functions since the TerrainPhysicsColliderComponent now uses the ProcessRegion functions Signed-off-by: amzn-sj --- .../Tests/TerrainPhysicsColliderTests.cpp | 96 ++++++++++++++++--- 1 file changed, 84 insertions(+), 12 deletions(-) diff --git a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp index 340acfbaac..859e618983 100644 --- a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp @@ -238,6 +238,33 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsRetu AZ::Vector2 mockHeightResolution = AZ::Vector2(1.0f); NiceMock terrainListener; ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); + ON_CALL(terrainListener, ProcessHeightsFromRegion).WillByDefault( + [](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, + AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) + { + if (!perPositionCallback) + { + return; + } + + const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); + + AzFramework::SurfaceData::SurfacePoint surfacePoint; + for (size_t y = 0; y < numSamplesY; y++) + { + float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); + for (size_t x = 0; x < numSamplesX; x++) + { + bool terrainExists = false; + float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); + surfacePoint.m_position.Set(fx, fy, 0.0f); + perPositionCallback(x, y, surfacePoint, terrainExists); + } + } + } + ); int32_t cols, rows; Physics::HeightfieldProviderRequestsBus::Event( @@ -271,8 +298,34 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsRelativ AZ::Vector2 mockHeightResolution = AZ::Vector2(1.0f); NiceMock terrainListener; - ON_CALL(terrainListener, GetHeightFromFloats).WillByDefault(Return(mockHeight)); ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); + ON_CALL(terrainListener, ProcessHeightsFromRegion).WillByDefault( + [mockHeight](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, + AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) + { + if (!perPositionCallback) + { + return; + } + + const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); + + AzFramework::SurfaceData::SurfacePoint surfacePoint; + for (size_t y = 0; y < numSamplesY; y++) + { + float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); + for (size_t x = 0; x < numSamplesX; x++) + { + bool terrainExists = false; + float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); + surfacePoint.m_position.Set(fx, fy, mockHeight); + perPositionCallback(x, y, surfacePoint, terrainExists); + } + } + } + ); // Just return the bounds as setup. This is equivalent to the box being at the origin. NiceMock boxShape(m_entity->GetId()); @@ -416,20 +469,39 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsAndM NiceMock terrainListener; ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); - ON_CALL(terrainListener, GetHeightFromFloats).WillByDefault(Return(mockHeight)); - ON_CALL(terrainListener, GetMaxSurfaceWeightFromFloats) - .WillByDefault( - [return1, return2]( - [[maybe_unused]] float x, [[maybe_unused]] float y, - [[maybe_unused]] AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter, [[maybe_unused]] bool* terrainExistsPtr) + ON_CALL(terrainListener, ProcessSurfacePointsFromRegion).WillByDefault( + [mockHeight, return1, return2](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, + AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) + { + if (!perPositionCallback) { - // return tag1 for the first half of the rows, tag2 for the rest. - if (y < 128.0) + return; + } + + const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); + + AzFramework::SurfaceData::SurfacePoint surfacePoint; + for (size_t y = 0; y < numSamplesY; y++) + { + float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); + for (size_t x = 0; x < numSamplesX; x++) { - return return1; + surfacePoint.m_surfaceTags.clear(); + bool terrainExists = false; + float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); + surfacePoint.m_position.Set(fx, fy, mockHeight); + if (fy < 128.0) + { + surfacePoint.m_surfaceTags.push_back(return1); + } + surfacePoint.m_surfaceTags.push_back(return2); + perPositionCallback(x, y, surfacePoint, terrainExists); } - return return2; - }); + } + } + ); AZStd::vector heightsAndMaterials; From 646443cfe56c2dde2d466aa8bc38743fa09c506b Mon Sep 17 00:00:00 2001 From: Roddie Kieley Date: Sat, 15 Jan 2022 14:15:27 -0330 Subject: [PATCH 060/413] issue5299: Resolved via change to not disable custom window decorations. Signed-off-by: Roddie Kieley --- .../Platform/Linux/source/utils/GUIApplicationManager_Linux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Tools/AssetBundler/Platform/Linux/source/utils/GUIApplicationManager_Linux.cpp b/Code/Tools/AssetBundler/Platform/Linux/source/utils/GUIApplicationManager_Linux.cpp index 04f579cc66..5c2ac13d0e 100644 --- a/Code/Tools/AssetBundler/Platform/Linux/source/utils/GUIApplicationManager_Linux.cpp +++ b/Code/Tools/AssetBundler/Platform/Linux/source/utils/GUIApplicationManager_Linux.cpp @@ -12,6 +12,6 @@ namespace Platform { AzQtComponents::WindowDecorationWrapper::Option GetWindowDecorationWrapperOption() { - return AzQtComponents::WindowDecorationWrapper::OptionDisabled; + return AzQtComponents::WindowDecorationWrapper::OptionNone; } } \ No newline at end of file From f05ca0897e0a180123ebb172a5d7bf23ad8eeda1 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Sat, 15 Jan 2022 14:26:58 -0800 Subject: [PATCH 061/413] Fix some warnings and remove an unused function parameter Signed-off-by: amzn-sj --- .../Source/Components/TerrainPhysicsColliderComponent.cpp | 2 +- .../Source/Components/TerrainWorldDebuggerComponent.cpp | 6 +++--- .../Code/Source/Components/TerrainWorldDebuggerComponent.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp index 4a8b4680b3..c74a478dad 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp @@ -344,7 +344,7 @@ namespace Terrain AZStd::vector materialList = GetMaterialList(); auto perPositionCallback = [&heightMaterials, &materialList, this, worldCenterZ, worldHeightBoundsMin, worldHeightBoundsMax] - (size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, bool terrainExists) + ([[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, bool terrainExists) { float height = surfacePoint.m_position.GetZ(); diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp index 46be621307..f684727d33 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp @@ -297,7 +297,7 @@ namespace Terrain { if (sector.m_isDirty) { - RebuildSectorWireframe(sector, heightDataResolution, worldMinZ); + RebuildSectorWireframe(sector, heightDataResolution); } if (!sector.m_lineVertices.empty()) @@ -317,7 +317,7 @@ namespace Terrain } - void TerrainWorldDebuggerComponent::RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution, float worldMinZ) + void TerrainWorldDebuggerComponent::RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution) { if (!sector.m_isDirty) { @@ -354,7 +354,7 @@ namespace Terrain // For each terrain height value in the region, create the _| grid lines for that point and cache off the height value // for use with subsequent grid line calculations. auto ProcessHeightValue = [gridResolution, &previousHeight, &rowHeights, §or] - (uint32_t xIndex, uint32_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) + (size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { // Don't add any vertices for the first column or first row. These grid lines will be handled by an adjacent sector, if // there is one. diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h index f3bcead8c3..cb308effe6 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h @@ -93,7 +93,7 @@ namespace Terrain bool m_isDirty{ true }; }; - void RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution, float worldMinZ); + void RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution); void MarkDirtySectors(const AZ::Aabb& dirtyRegion); void DrawWorldBounds(AzFramework::DebugDisplayRequests& debugDisplay); void DrawWireframe(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay); From 392d08e2f0272c3bbe62207124e6664fb4c77a4e Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Mon, 17 Jan 2022 17:09:30 -0800 Subject: [PATCH 062/413] Update Terrain renderer code to use the ProcessRegion API functions instead of the Get* functions Signed-off-by: amzn-sj --- .../TerrainDetailMaterialManager.cpp | 76 ++++++++++--------- .../TerrainFeatureProcessor.cpp | 33 ++++---- 2 files changed, 58 insertions(+), 51 deletions(-) diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp index 2bc9e42bff..1f43b476a1 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp @@ -751,50 +751,56 @@ namespace Terrain pixels.resize((quadrantWorldArea.m_max.m_x - quadrantWorldArea.m_min.m_x) * (quadrantWorldArea.m_max.m_y - quadrantWorldArea.m_min.m_y)); uint32_t index = 0; - for (int yPos = quadrantWorldArea.m_min.m_y; yPos < quadrantWorldArea.m_max.m_y; ++yPos) + auto perPositionCallback = [this, &pixels, &index]( + [[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, + const AzFramework::SurfaceData::SurfacePoint& surfacePoint, + [[maybe_unused]] bool terrainExists) { - for (int xPos = quadrantWorldArea.m_min.m_x; xPos < quadrantWorldArea.m_max.m_x; ++xPos) + // Store the top two surface weights in the texture with m_blend storing the relative weight. + bool isFirstMaterial = true; + float firstWeight = 0.0f; + AZ::Vector2 position(surfacePoint.m_position.GetX(), surfacePoint.m_position.GetY()); + for (const auto& surfaceTagWeight : surfacePoint.m_surfaceTags) { - AZ::Vector2 position = AZ::Vector2(xPos * DetailTextureScale, yPos * DetailTextureScale); - AzFramework::SurfaceData::SurfaceTagWeightList surfaceWeights; - AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::GetSurfaceWeightsFromVector2, position, surfaceWeights, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, nullptr); - - // Store the top two surface weights in the texture with m_blend storing the relative weight. - bool isFirstMaterial = true; - float firstWeight = 0.0f; - for (const auto& surfaceTagWeight : surfaceWeights) + if (surfaceTagWeight.m_weight > 0.0f) { - if (surfaceTagWeight.m_weight > 0.0f) + AZ::Crc32 surfaceType = surfaceTagWeight.m_surfaceType; + uint16_t materialId = GetDetailMaterialForSurfaceTypeAndPosition(surfaceType, position); + if (materialId != m_detailMaterials.NoFreeSlot && materialId < 255) { - AZ::Crc32 surfaceType = surfaceTagWeight.m_surfaceType; - uint16_t materialId = GetDetailMaterialForSurfaceTypeAndPosition(surfaceType, position); - if (materialId != m_detailMaterials.NoFreeSlot && materialId < 255) + if (isFirstMaterial) { - if (isFirstMaterial) - { - pixels.at(index).m_material1 = aznumeric_cast(materialId); - firstWeight = surfaceTagWeight.m_weight; - // m_blend only needs to be calculated is material 2 is found, otherwise the initial value of 0 is correct. - isFirstMaterial = false; - } - else - { - pixels.at(index).m_material2 = aznumeric_cast(materialId); - float totalWeight = firstWeight + surfaceTagWeight.m_weight; - float blendWeight = 1.0f - (firstWeight / totalWeight); - pixels.at(index).m_blend = aznumeric_cast(AZStd::round(blendWeight * 255.0f)); - break; - } + pixels.at(index).m_material1 = aznumeric_cast(materialId); + firstWeight = surfaceTagWeight.m_weight; + // m_blend only needs to be calculated is material 2 is found, otherwise the initial value of 0 is correct. + isFirstMaterial = false; + } + else + { + pixels.at(index).m_material2 = aznumeric_cast(materialId); + float totalWeight = firstWeight + surfaceTagWeight.m_weight; + float blendWeight = 1.0f - (firstWeight / totalWeight); + pixels.at(index).m_blend = aznumeric_cast(AZStd::round(blendWeight * 255.0f)); + break; } } - else - { - break; // since the list is ordered, no other materials are in the list with positive weights. - } } - ++index; + else + { + break; // since the list is ordered, no other materials are in the list with positive weights. + } } - } + ++index; + }; + + AZ::Vector3 worldMin(quadrantWorldArea.m_min.m_x * DetailTextureScale, quadrantWorldArea.m_min.m_y * DetailTextureScale, 0.0f); + AZ::Vector3 worldMax(quadrantWorldArea.m_max.m_x * DetailTextureScale, quadrantWorldArea.m_max.m_y * DetailTextureScale, 0.0f); + AZ::Vector2 stepSize(DetailTextureScale); + AZ::Aabb region; + region.Set(worldMin, worldMax); + + AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::ProcessSurfaceWeightsFromRegion, + region, stepSize, perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); const int32_t left = quadrantTextureArea.m_min.m_x; const int32_t top = quadrantTextureArea.m_min.m_y; diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp index 351c34308a..ebc8a16fcb 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp @@ -226,25 +226,26 @@ namespace Terrain auto& surfaceDataContext = SurfaceData::SurfaceDataSystemRequestBus::GetOrCreateContext(false); typename SurfaceData::SurfaceDataSystemRequestBus::Context::DispatchLockGuard scopeLock(surfaceDataContext.m_contextMutex); - for (int32_t y = yStart; y < yEnd; y++) + auto perPositionCallback = [this, &pixels] + ([[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, + const AzFramework::SurfaceData::SurfacePoint& surfacePoint, + [[maybe_unused]] bool terrainExists) { - for (int32_t x = xStart; x < xEnd; x++) - { - bool terrainExists = true; - float terrainHeight = 0.0f; - float xPos = x * m_sampleSpacing; - float yPos = y * m_sampleSpacing; - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - terrainHeight, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, - xPos, yPos, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + const float clampedHeight = AZ::GetClamp((surfacePoint.m_position.GetZ() - m_terrainBounds.GetMin().GetZ()) / m_terrainBounds.GetExtents().GetZ(), 0.0f, 1.0f); + const float expandedHeight = AZStd::roundf(clampedHeight * AZStd::numeric_limits::max()); + const uint16_t uint16Height = aznumeric_cast(expandedHeight); - const float clampedHeight = AZ::GetClamp((terrainHeight - m_terrainBounds.GetMin().GetZ()) / m_terrainBounds.GetExtents().GetZ(), 0.0f, 1.0f); - const float expandedHeight = AZStd::roundf(clampedHeight * AZStd::numeric_limits::max()); - const uint16_t uint16Height = aznumeric_cast(expandedHeight); + pixels.push_back(uint16Height); + }; - pixels.push_back(uint16Height); - } - } + AZ::Vector2 stepSize(m_sampleSpacing); + AZ::Vector3 maxBound( + m_dirtyRegion.GetMax().GetX() + m_sampleSpacing, m_dirtyRegion.GetMax().GetY() + m_sampleSpacing, 0.0f); + AZ::Aabb region; + region.Set(m_dirtyRegion.GetMin(), maxBound); + AzFramework::Terrain::TerrainDataRequestBus::Broadcast( + &AzFramework::Terrain::TerrainDataRequests::ProcessHeightsFromRegion, + region, stepSize, perPositionCallback,AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); } if (m_heightmapImage) From 786d6b5f85e7c1f5bf1f9ce8d24a0571c8d06ba1 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Tue, 18 Jan 2022 10:22:31 -0800 Subject: [PATCH 063/413] minor code readability tweak Signed-off-by: Gene Walters --- .../Code/Source/NetworkEntity/NetworkEntityManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp index fa524d464a..0a6aeea8a8 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp @@ -542,7 +542,7 @@ namespace Multiplayer optionalArgs.m_preInsertionCallback = [netSpawnableName, rootTransform = transform] (AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableEntityContainerView entities) { - bool shouldUpdateTransform = (rootTransform.IsClose(AZ::Transform::Identity()) == false); + const bool shouldUpdateTransform = !rootTransform.IsClose(AZ::Transform::Identity()); for (uint32_t netEntityIndex = 0, entitiesSize = aznumeric_cast(entities.size()); netEntityIndex < entitiesSize; ++netEntityIndex) From c262696056811660aa3e55cb6a83136232fb12fb Mon Sep 17 00:00:00 2001 From: abrmich Date: Tue, 18 Jan 2022 16:13:28 -0800 Subject: [PATCH 064/413] Move remaining two LyShine headers to the gem Signed-off-by: abrmich --- Code/Legacy/CryCommon/crycommon_files.cmake | 2 -- Code/Legacy/CrySystem/System.cpp | 3 --- Code/Legacy/CrySystem/XConsole.cpp | 5 ----- .../FontBuilderWorker/FontBuilderWorker.cpp | 4 ++-- .../Code/Tests/Builders/CopyDependencyBuilderTest.cpp | 2 -- .../LyShine/Code/Include}/LyShine/Bus/UiCursorBus.h | 0 .../LyShine/Code/Include}/LyShine/UiAssetTypes.h | 0 Gems/LyShine/Code/lyshine_static_files.cmake | 2 ++ 8 files changed, 4 insertions(+), 14 deletions(-) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiCursorBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/UiAssetTypes.h (100%) diff --git a/Code/Legacy/CryCommon/crycommon_files.cmake b/Code/Legacy/CryCommon/crycommon_files.cmake index a4d87c207a..479f0ec879 100644 --- a/Code/Legacy/CryCommon/crycommon_files.cmake +++ b/Code/Legacy/CryCommon/crycommon_files.cmake @@ -100,8 +100,6 @@ set(FILES platform_impl.cpp Win32specific.h Win64specific.h - LyShine/UiAssetTypes.h - LyShine/Bus/UiCursorBus.h Maestro/Bus/EditorSequenceAgentComponentBus.h Maestro/Bus/EditorSequenceBus.h Maestro/Bus/EditorSequenceComponentBus.h diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index 7cf066f72e..0439b69efc 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -134,7 +134,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include -#include #include #include @@ -1374,7 +1373,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam // Fall through intended case WM_ENTERMENULOOP: { - UiCursorBus::Broadcast(&UiCursorInterface::IncrementVisibleCounter); return true; } case WM_CAPTURECHANGED: @@ -1392,7 +1390,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam // Fall through intended case WM_EXITMENULOOP: { - UiCursorBus::Broadcast(&UiCursorInterface::DecrementVisibleCounter); return (uMsg != WM_CAPTURECHANGED); } case WM_SYSKEYUP: diff --git a/Code/Legacy/CrySystem/XConsole.cpp b/Code/Legacy/CrySystem/XConsole.cpp index df82e34abe..e74b1e7c56 100644 --- a/Code/Legacy/CrySystem/XConsole.cpp +++ b/Code/Legacy/CrySystem/XConsole.cpp @@ -29,7 +29,6 @@ #include #include -#include //#define DEFENCE_CVAR_HASH_LOGGING // s should point to a buffer at least 65 chars long @@ -749,8 +748,6 @@ void CXConsole::ShowConsole(bool show, const int iRequestScrollMax) if (show && !m_bConsoleActive) { - UiCursorBus::Broadcast(&UiCursorBus::Events::IncrementVisibleCounter); - AzFramework::InputSystemCursorRequestBus::EventResult(m_previousSystemCursorState, AzFramework::InputDeviceMouse::Id, &AzFramework::InputSystemCursorRequests::GetSystemCursorState); @@ -760,8 +757,6 @@ void CXConsole::ShowConsole(bool show, const int iRequestScrollMax) } else if (!show && m_bConsoleActive) { - UiCursorBus::Broadcast(&UiCursorBus::Events::DecrementVisibleCounter); - AzFramework::InputSystemCursorRequestBus::Event(AzFramework::InputDeviceMouse::Id, &AzFramework::InputSystemCursorRequests::SetSystemCursorState, m_previousSystemCursorState); diff --git a/Gems/LmbrCentral/Code/Source/Builders/CopyDependencyBuilder/FontBuilderWorker/FontBuilderWorker.cpp b/Gems/LmbrCentral/Code/Source/Builders/CopyDependencyBuilder/FontBuilderWorker/FontBuilderWorker.cpp index 3fe399d05d..ccaa1700f9 100644 --- a/Gems/LmbrCentral/Code/Source/Builders/CopyDependencyBuilder/FontBuilderWorker/FontBuilderWorker.cpp +++ b/Gems/LmbrCentral/Code/Source/Builders/CopyDependencyBuilder/FontBuilderWorker/FontBuilderWorker.cpp @@ -9,7 +9,6 @@ #include "FontBuilderWorker.h" #include -#include #include #include @@ -52,7 +51,8 @@ namespace CopyDependencyBuilder if (fileExtension == "font" || fileExtension == "fontfamily") { - return azrtti_typeid(); + static AZ::Data::AssetType fontAssetType("{57767D37-0EBE-43BE-8F60-AB36D2056EF8}"); // form UiAssetTypes.h in the LyShine gem + return fontAssetType; } return AZ::Data::AssetType::CreateNull(); diff --git a/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp b/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp index 8b697f35f2..7767e4f239 100644 --- a/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp +++ b/Gems/LmbrCentral/Code/Tests/Builders/CopyDependencyBuilderTest.cpp @@ -19,8 +19,6 @@ #include #include -#include - #include #include #include diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCursorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCursorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCursorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCursorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/UiAssetTypes.h b/Gems/LyShine/Code/Include/LyShine/UiAssetTypes.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiAssetTypes.h rename to Gems/LyShine/Code/Include/LyShine/UiAssetTypes.h diff --git a/Gems/LyShine/Code/lyshine_static_files.cmake b/Gems/LyShine/Code/lyshine_static_files.cmake index 925658e756..c1515f5978 100644 --- a/Gems/LyShine/Code/lyshine_static_files.cmake +++ b/Gems/LyShine/Code/lyshine_static_files.cmake @@ -11,6 +11,7 @@ set(FILES Include/LyShine/IRenderGraph.h Include/LyShine/ISprite.h Include/LyShine/ILyShine.h + Include/LyShine/UiAssetTypes.h Include/LyShine/UiBase.h Include/LyShine/UiLayoutCellBase.h Include/LyShine/UiSerializeHelpers.h @@ -26,6 +27,7 @@ set(FILES Include/LyShine/Bus/UiCanvasManagerBus.h Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h Include/LyShine/Bus/UiCheckboxBus.h + Include/LyShine/Bus/UiCursorBus.h Include/LyShine/Bus/UiDraggableBus.h Include/LyShine/Bus/UiDropdownBus.h Include/LyShine/Bus/UiDropdownOptionBus.h From a896ff11bc3aa8f13696e078e66fee1dbcf269ae Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Fri, 14 Jan 2022 12:57:52 -0800 Subject: [PATCH 065/413] Changed .material serialization to avoid loading the .materialtype file, since the .material builder doesn't declare a source dependency on the .materialtype. Otherwise there can be ambiguous edge cases where changes to the .materialtype might or might not impact the baked MaterialAsset. Note that another option would have been to add a the appropriate source dependency, but that would hurt iteration time as any change to the .materialtype file would cause every .material file and .fbx to rebuild. These changes have the added benefit of simplifying some of the serialization code. MaterialSourceDataSerializer is no longer needed, as its main purpose was to pass the MaterialTypeSourceData down to the MaterialPropertyValueSerializer. Before, the JSON serialization system gave a lot of data flexibility because it did best-effort conversions, like allowing a float to be loaded as an int for example. But now the material serialization code doesn't know target data type, so it has to assume the data type based on what's in the .material file, and then the MaterialAsset will convert the data to the appropriate type later when Finalize() is called. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../MaterialPropertyValueSerializer.h | 7 - .../MaterialPropertyValueSourceData.h | 2 +- .../Material/MaterialSourceDataSerializer.h | 40 -- .../Material/MaterialTypeSourceData.h | 6 +- .../MaterialPropertyValueSerializer.cpp | 106 +++-- .../RPI.Edit/Material/MaterialSourceData.cpp | 21 +- .../Material/MaterialSourceDataSerializer.cpp | 162 ------- .../Material/MaterialTypeSourceData.cpp | 11 +- .../RPI.Reflect/Material/MaterialAsset.cpp | 132 +++++- .../Tests/Material/MaterialAssetTests.cpp | 32 +- .../Material/MaterialSourceDataTests.cpp | 410 ++++++++++-------- Gems/Atom/RPI/Code/atom_rpi_edit_files.cmake | 2 - 12 files changed, 450 insertions(+), 481 deletions(-) delete mode 100644 Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceDataSerializer.h delete mode 100644 Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceDataSerializer.cpp diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSerializer.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSerializer.h index 29371618cf..befbb7c990 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSerializer.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSerializer.h @@ -24,13 +24,6 @@ namespace AZ AZ_RTTI(AZ::RPI::JsonMaterialPropertyValueSerializer, "{A52B1ED8-C849-4269-9AA7-9D0814D2EC59}", BaseJsonSerializer); AZ_CLASS_ALLOCATOR_DECL; - //! A LoadContext object must be passed down to the serializer via JsonDeserializerContext::GetMetadata().Add(...) - struct LoadContext - { - AZ_TYPE_INFO(JsonMaterialPropertyValueSerializer::LoadContext, "{5E0A891A-27F6-4AD7-88A5-B9EA50F88B45}"); - uint32_t m_materialTypeVersion; //!< The version number from the .materialtype file - }; - JsonSerializationResult::Result Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, JsonDeserializerContext& context) override; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSourceData.h index 178cacba15..a0640a1522 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialPropertyValueSourceData.h @@ -54,7 +54,7 @@ namespace AZ //! The resolved value with a valid type of a property. It needs to be mutable to allow post-resolving when parent objects are declared as const. mutable MaterialPropertyValue m_resolvedValue; //! Candidate values from serialization. - AZStd::map m_possibleValues; + AZStd::map m_possibleValues; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceDataSerializer.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceDataSerializer.h deleted file mode 100644 index 301b80ed82..0000000000 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceDataSerializer.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace AZ -{ - class ReflectContext; - - namespace RPI - { - //! This custom serializer is needed to load the material type file and saves its data in the - //! JsonDeserializerSettings for JsonMaterialPropertyValueSerializer to use. - //! (Note we could have made a custom serializer specifically for the 'materialType' field but that - //! would require 'materialType' to appear before 'properties'. By having a custom serializer for the common - //! parent of 'materialType' and 'properties', we can avoid an order dependency within the JSON file). - class JsonMaterialSourceDataSerializer - : public BaseJsonSerializer - { - public: - AZ_RTTI(AZ::RPI::JsonMaterialSourceDataSerializer, "{008A7423-8DF6-4BA3-BF5E-B0C189CCBE58}", BaseJsonSerializer); - AZ_CLASS_ALLOCATOR_DECL; - - JsonSerializationResult::Result Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, - JsonDeserializerContext& context) override; - - JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, - const void* defaultValue, const Uuid& valueTypeId, JsonSerializerContext& context) override; - }; - - } // namespace RPI -} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h index f5336807c7..9333880594 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h @@ -186,9 +186,8 @@ namespace AZ //! Searches for a specific property. //! Note this function can find properties using old versions of the property name; in that case, //! the name in the returned PropertyDefinition* will not match the @propertyName that was searched for. - //! @param materialTypeVersion indicates the version number of the property name being passed in. Only renames above this version number will be applied. //! @return the requested property, or null if it could not be found - const PropertyDefinition* FindProperty(AZStd::string_view groupName, AZStd::string_view propertyName, uint32_t materialTypeVersion = 0) const; + const PropertyDefinition* FindProperty(AZStd::string_view groupName, AZStd::string_view propertyName) const; //! Construct a complete list of group definitions, including implicit groups, arranged in the same order as the source data //! Groups with the same name will be consolidated into a single entry @@ -212,9 +211,8 @@ namespace AZ Outcome> CreateMaterialTypeAsset(Data::AssetId assetId, AZStd::string_view materialTypeSourceFilePath = "", bool elevateWarnings = true) const; //! Possibly renames @propertyId based on the material version update steps. - //! @param materialTypeVersion indicates the version number of the property name being passed in. Only renames above this version number will be applied. //! @return true if the property was renamed - bool ApplyPropertyRenames(MaterialPropertyId& propertyId, uint32_t materialTypeVersion = 0) const; + bool ApplyPropertyRenames(MaterialPropertyId& propertyId) const; }; //! The wrapper class for derived material functors. diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp index 5e04365ffb..10b45ca8df 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -55,15 +54,6 @@ namespace AZ MaterialSourceData::Property* property = reinterpret_cast(outputValue); AZ_Assert(property, "Output value for JsonMaterialPropertyValueSerializer can't be null."); - const MaterialTypeSourceData* materialType = context.GetMetadata().Find(); - if (!materialType) - { - AZ_Assert(false, "Material type reference not found"); - return context.Report(JsonSerializationResult::Tasks::ReadField, JsonSerializationResult::Outcomes::Catastrophic, "Material type reference not found."); - } - - const JsonMaterialPropertyValueSerializer::LoadContext* loadContext = context.GetMetadata().Find(); - // Construct the full property name (groupName.propertyName) by parsing it from the JSON path string. size_t startPropertyName = context.GetPath().Get().rfind('/'); size_t startGroupName = context.GetPath().Get().rfind('/', startPropertyName-1); @@ -72,47 +62,69 @@ namespace AZ JSR::ResultCode result(JSR::Tasks::ReadField); - auto propertyDefinition = materialType->FindProperty(groupName, propertyName, loadContext->m_materialTypeVersion); - if (!propertyDefinition) + if (inputValue.IsBool()) { - AZStd::string message = AZStd::string::format("Property '%.*s.%.*s' not found in material type.", AZ_STRING_ARG(groupName), AZ_STRING_ARG(propertyName)); - return context.Report(JsonSerializationResult::Tasks::ReadField, JsonSerializationResult::Outcomes::Unsupported, message); + result.Combine(LoadVariant(property->m_value, false, inputValue, context)); + } + else if (inputValue.IsInt() || inputValue.IsInt64()) + { + result.Combine(LoadVariant(property->m_value, 0, inputValue, context)); + } + else if (inputValue.IsUint() || inputValue.IsUint64()) + { + result.Combine(LoadVariant(property->m_value, 0u, inputValue, context)); + } + else if (inputValue.IsFloat() || inputValue.IsDouble()) + { + result.Combine(LoadVariant(property->m_value, 0.0f, inputValue, context)); + } + else if (inputValue.IsArray() && inputValue.Size() == 4) + { + result.Combine(LoadVariant(property->m_value, Vector4{0.0f, 0.0f, 0.0f, 0.0f}, inputValue, context)); + } + else if (inputValue.IsArray() && inputValue.Size() == 3) + { + result.Combine(LoadVariant(property->m_value, Vector3{0.0f, 0.0f, 0.0f}, inputValue, context)); + } + else if (inputValue.IsArray() && inputValue.Size() == 2) + { + result.Combine(LoadVariant(property->m_value, Vector2{0.0f, 0.0f}, inputValue, context)); + } + else if (inputValue.IsObject()) + { + JsonSerializationResult::ResultCode resultCode = LoadVariant(property->m_value, Color::CreateZero(), inputValue, context); + + if(resultCode.GetProcessing() != JsonSerializationResult::Processing::Completed) + { + resultCode = LoadVariant(property->m_value, Vector4::CreateZero(), inputValue, context); + } + + if(resultCode.GetProcessing() != JsonSerializationResult::Processing::Completed) + { + resultCode = LoadVariant(property->m_value, Vector3::CreateZero(), inputValue, context); + } + + if(resultCode.GetProcessing() != JsonSerializationResult::Processing::Completed) + { + resultCode = LoadVariant(property->m_value, Vector2::CreateZero(), inputValue, context); + } + + if(resultCode.GetProcessing() == JsonSerializationResult::Processing::Completed) + { + result.Combine(resultCode); + } + else + { + return context.Report(JsonSerializationResult::Tasks::ReadField, JsonSerializationResult::Outcomes::Unsupported, "Unknown data type"); + } + } + else if (inputValue.IsString()) + { + result.Combine(LoadVariant(property->m_value, AZStd::string{}, inputValue, context)); } else { - switch (propertyDefinition->m_dataType) - { - case MaterialPropertyDataType::Bool: - result.Combine(LoadVariant(property->m_value, false, inputValue, context)); - break; - case MaterialPropertyDataType::Int: - result.Combine(LoadVariant(property->m_value, 0, inputValue, context)); - break; - case MaterialPropertyDataType::UInt: - result.Combine(LoadVariant(property->m_value, 0u, inputValue, context)); - break; - case MaterialPropertyDataType::Float: - result.Combine(LoadVariant(property->m_value, 0.0f, inputValue, context)); - break; - case MaterialPropertyDataType::Vector2: - result.Combine(LoadVariant(property->m_value, Vector2{0.0f, 0.0f}, inputValue, context)); - break; - case MaterialPropertyDataType::Vector3: - result.Combine(LoadVariant(property->m_value, Vector3{0.0f, 0.0f, 0.0f}, inputValue, context)); - break; - case MaterialPropertyDataType::Vector4: - result.Combine(LoadVariant(property->m_value, Vector4{0.0f, 0.0f, 0.0f, 0.0f}, inputValue, context)); - break; - case MaterialPropertyDataType::Color: - result.Combine(LoadVariant(property->m_value, AZ::Colors::White, inputValue, context)); - break; - case MaterialPropertyDataType::Image: - case MaterialPropertyDataType::Enum: - result.Combine(LoadVariant(property->m_value, AZStd::string{}, inputValue, context)); - break; - default: - return context.Report(JsonSerializationResult::Tasks::ReadField, JsonSerializationResult::Outcomes::Unsupported, "Unknown data type"); - } + return context.Report(JsonSerializationResult::Tasks::ReadField, JsonSerializationResult::Outcomes::Unsupported, "Unknown data type"); } if (result.GetProcessing() == JsonSerializationResult::Processing::Completed) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp index bc764ec7fb..b921b186c0 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -45,13 +44,17 @@ namespace AZ { if (JsonRegistrationContext* jsonContext = azrtti_cast(context)) { - jsonContext->Serializer()->HandlesType(); jsonContext->Serializer()->HandlesType(); } else if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(1) + ->Version(2) + ->Field("description", &MaterialSourceData::m_description) + ->Field("materialType", &MaterialSourceData::m_materialType) + ->Field("materialTypeVersion", &MaterialSourceData::m_materialTypeVersion) + ->Field("parentMaterial", &MaterialSourceData::m_parentMaterial) + ->Field("properties", &MaterialSourceData::m_properties) ; serializeContext->RegisterGenericType(); @@ -80,6 +83,12 @@ namespace AZ MaterialAssetCreator materialAssetCreator; materialAssetCreator.SetElevateWarnings(elevateWarnings); + if (m_materialType.empty()) + { + AZ_Error("MaterialSourceData", false, "materialType was not specified"); + return Failure(); + } + Outcome materialTypeAssetId = AssetUtils::MakeAssetId(materialSourceFilePath, m_materialType, 0); if (!materialTypeAssetId) { @@ -194,6 +203,12 @@ namespace AZ bool elevateWarnings, AZStd::unordered_set* sourceDependencies) const { + if (m_materialType.empty()) + { + AZ_Error("MaterialSourceData", false, "materialType was not specified"); + return Failure(); + } + const auto materialTypeSourcePath = AssetUtils::ResolvePathReference(materialSourceFilePath, m_materialType); const auto materialTypeAssetId = AssetUtils::MakeAssetId(materialTypeSourcePath, 0); if (!materialTypeAssetId.IsSuccess()) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceDataSerializer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceDataSerializer.cpp deleted file mode 100644 index 2a504fc345..0000000000 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceDataSerializer.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace AZ -{ - namespace RPI - { - AZ_CLASS_ALLOCATOR_IMPL(JsonMaterialSourceDataSerializer, SystemAllocator, 0); - - JsonSerializationResult::Result JsonMaterialSourceDataSerializer::Load(void* outputValue, const Uuid& outputValueTypeId, - const rapidjson::Value& inputValue, JsonDeserializerContext& context) - { - namespace JSR = JsonSerializationResult; - - AZ_Assert(azrtti_typeid() == outputValueTypeId, - "Unable to deserialize material to json because the provided type is %s", - outputValueTypeId.ToString().c_str()); - AZ_UNUSED(outputValueTypeId); - - MaterialSourceData* materialSourceData = reinterpret_cast(outputValue); - AZ_Assert(materialSourceData, "Output value for JsonMaterialSourceDataSerializer can't be null."); - - JSR::ResultCode result(JSR::Tasks::ReadField); - - if (!inputValue.IsObject()) - { - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, "Material data must be a JSON object"); - } - - result.Combine(ContinueLoadingFromJsonObjectField(&materialSourceData->m_description, azrtti_typeid(), inputValue, "description", context)); - result.Combine(ContinueLoadingFromJsonObjectField(&materialSourceData->m_parentMaterial, azrtti_typeid(), inputValue, "parentMaterial", context)); - result.Combine(ContinueLoadingFromJsonObjectField(&materialSourceData->m_materialType, azrtti_typeid(), inputValue, "materialType", context)); - result.Combine(ContinueLoadingFromJsonObjectField(&materialSourceData->m_materialTypeVersion, azrtti_typeid(), inputValue, "materialTypeVersion", context)); - - if (materialSourceData->m_materialType.empty()) - { - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Catastrophic, "Required field 'materialType' is missing or invalid"); - } - - JsonFileLoadContext* jsonFileLoadContext = context.GetMetadata().Find(); - - if (!jsonFileLoadContext) - { - // Go ahead and create a JsonFileLoadContext because we'll need to use it below when loading the material type - context.GetMetadata().Add(JsonFileLoadContext{}); - jsonFileLoadContext = context.GetMetadata().Find(); - } - - // Load the material type file because we need the property type information in order to know how to read the property values - MaterialTypeSourceData materialTypeData; - { - AZStd::string materialTypePath = AssetUtils::ResolvePathReference(jsonFileLoadContext->GetFilePath(), materialSourceData->m_materialType); - - auto materialTypeJson = JsonSerializationUtils::ReadJsonFile(materialTypePath, AZ::RPI::JsonUtils::DefaultMaxFileSize); - if (!materialTypeJson.IsSuccess()) - { - AZStd::string failureMessage; - failureMessage = AZStd::string::format("Failed to load material-type file '%s': %s", materialTypePath.c_str(), materialTypeJson.GetError().c_str()); - ScopedContextPath subPath{context, "materialType"}; - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Catastrophic, failureMessage); - } - else - { - // Since we're about to load a different file the JsonFileLoadContext needs to be changed to reflect the file that's being loaded. - jsonFileLoadContext->PushFilePath(materialTypePath); - - // We also need a special reporting function for the material type, to note the fact that the issue is in the material type not this file. - auto reportingPrev = context.GetReporter(); - context.PushReporter([materialTypePath, reportingPrev](AZStd::string_view message, JSR::ResultCode result, AZStd::string_view path) -> JSR::ResultCode - { - AZStd::string materialTypeFilename; - if (!AzFramework::StringFunc::Path::GetFullFileName(materialTypePath.c_str(), materialTypeFilename)) - { - materialTypeFilename = materialTypePath; - } - - AZStd::string newPath = AZStd::string::format("[%.*s]%.*s", AZ_STRING_ARG(materialTypeFilename), AZ_STRING_ARG(path)); - return reportingPrev(message, result, newPath); - }); - - JsonDeserializerSettings settings; - settings.m_metadata = context.GetMetadata(); - settings.m_reporting = context.GetReporter(); - settings.m_registrationContext = context.GetRegistrationContext(); - settings.m_serializeContext = context.GetSerializeContext(); - settings.m_clearContainers = context.ShouldClearContainers(); - - JsonSerializationResult::ResultCode materialTypeLoadResult = JsonSerialization::Load(materialTypeData, materialTypeJson.GetValue(), settings); - materialTypeData.ResolveUvEnums(); - - // Restore prior configuration - context.PopReporter(); - jsonFileLoadContext->PopFilePath(); - - // Even though results from the material type file is a separate JSON serialization, we combine the results to make sure - // any issues are bubbled up. I'm not sure if this is the most desirable approach, but better to over-report issues than - // under-report them. - result.Combine(materialTypeLoadResult); - } - } - - context.GetMetadata().Add(AZStd::move(materialTypeData)); - - JsonMaterialPropertyValueSerializer::LoadContext materialPropertyValueLoadContext; - materialPropertyValueLoadContext.m_materialTypeVersion = materialSourceData->m_materialTypeVersion; - context.GetMetadata().Add(materialPropertyValueLoadContext); - - result.Combine(ContinueLoadingFromJsonObjectField(&materialSourceData->m_properties, azrtti_typeid(), inputValue, "properties", context)); - - if (result.GetProcessing() == JsonSerializationResult::Processing::Completed) - { - return context.Report(result, "Successfully loaded material."); - } - else - { - return context.Report(result, "Partially loaded material."); - } - } - - - JsonSerializationResult::Result JsonMaterialSourceDataSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, - [[maybe_unused]] const void* defaultValue, const Uuid& valueTypeId, JsonSerializerContext& context) - { - namespace JSR = JsonSerializationResult; - - AZ_Assert(azrtti_typeid() == valueTypeId, - "Unable to serialize material to json because the provided type is %s", - valueTypeId.ToString().c_str()); - AZ_UNUSED(valueTypeId); - - const MaterialSourceData* materialSourceData = reinterpret_cast(inputValue); - AZ_Assert(materialSourceData, "Input value for JsonMaterialSourceDataSerializer can't be null."); - - JSR::ResultCode resultCode(JSR::Tasks::ReadField); - resultCode.Combine(ContinueStoringToJsonObjectField(outputValue, "description", &materialSourceData->m_description, nullptr, azrtti_typeid(), context)); - resultCode.Combine(ContinueStoringToJsonObjectField(outputValue, "parentMaterial", &materialSourceData->m_parentMaterial, nullptr, azrtti_typeid(), context)); - resultCode.Combine(ContinueStoringToJsonObjectField(outputValue, "materialType", &materialSourceData->m_materialType, nullptr, azrtti_typeid(), context)); - resultCode.Combine(ContinueStoringToJsonObjectField(outputValue, "materialTypeVersion", &materialSourceData->m_materialTypeVersion, nullptr, azrtti_typeid(), context)); - resultCode.Combine(ContinueStoringToJsonObjectField(outputValue, "properties", &materialSourceData->m_properties, nullptr, azrtti_typeid(), context)); - - return context.Report(resultCode, "Processed material."); - } - } // namespace RPI -} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp index d8e6c156be..87c064f571 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp @@ -130,17 +130,12 @@ namespace AZ return nullptr; } - bool MaterialTypeSourceData::ApplyPropertyRenames(MaterialPropertyId& propertyId, uint32_t materialTypeVersion) const + bool MaterialTypeSourceData::ApplyPropertyRenames(MaterialPropertyId& propertyId) const { bool renamed = false; for (const VersionUpdateDefinition& versionUpdate : m_versionUpdates) { - if (materialTypeVersion >= versionUpdate.m_toVersion) - { - continue; - } - for (const VersionUpdatesRenameOperationDefinition& action : versionUpdate.m_actions) { if (action.m_operation == "rename") @@ -161,7 +156,7 @@ namespace AZ return renamed; } - const MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::string_view groupName, AZStd::string_view propertyName, uint32_t materialTypeVersion) const + const MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::string_view groupName, AZStd::string_view propertyName) const { auto groupIter = m_propertyLayout.m_properties.find(groupName); if (groupIter != m_propertyLayout.m_properties.end()) @@ -178,7 +173,7 @@ namespace AZ // Property has not been found, try looking for renames in the version history MaterialPropertyId propertyId = MaterialPropertyId{groupName, propertyName}; - ApplyPropertyRenames(propertyId, materialTypeVersion); + ApplyPropertyRenames(propertyId); // Do the search again with the new names diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp index 309daf8b62..8bf975fd82 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp @@ -109,6 +109,77 @@ namespace AZ return m_wasPreFinalized; } + template + MaterialPropertyValue CastNumericMaterialPropertyValue(const MaterialPropertyValue& value) + { + TypeId typeId = value.GetTypeId(); + + if (typeId == azrtti_typeid()) + { + return aznumeric_cast(value.GetValue()); + } + else if (typeId == azrtti_typeid()) + { + return aznumeric_cast(value.GetValue()); + } + else if (typeId == azrtti_typeid()) + { + return aznumeric_cast(value.GetValue()); + } + else if (typeId == azrtti_typeid()) + { + return aznumeric_cast(value.GetValue()); + } + else + { + return value; + } + } + + + + template + MaterialPropertyValue CastVectorMaterialPropertyValue(const MaterialPropertyValue& value) + { + float values[4] = {}; + + TypeId typeId = value.GetTypeId(); + if (typeId == azrtti_typeid()) + { + value.GetValue().StoreToFloat2(values); + } + else if (typeId == azrtti_typeid()) + { + value.GetValue().StoreToFloat3(values); + } + else if (typeId == azrtti_typeid()) + { + value.GetValue().StoreToFloat4(values); + } + else + { + return value; + } + + typeId = azrtti_typeid(); + if (typeId == azrtti_typeid()) + { + return Vector2::CreateFromFloat2(values); + } + else if (typeId == azrtti_typeid()) + { + return Vector3::CreateFromFloat3(values); + } + else if (typeId == azrtti_typeid()) + { + return Vector4::CreateFromFloat4(values); + } + else + { + return value; + } + } + void MaterialAsset::Finalize(AZStd::function reportWarning, AZStd::function reportError) { if (m_wasPreFinalized) @@ -180,9 +251,66 @@ namespace AZ } else { - if (ValidateMaterialPropertyDataType(value.GetTypeId(), name, propertyDescriptor, reportError)) + // The material asset could be finalized sometime after the original JSON is loaded, and the material type might not have been available + // at that time, so the data type would not be known for each property. So each raw property's type could be based on what appeared in the JSON + // and this is the first opportunity we have to resolve that value with the actual type. For example, a float property could have been specified in + // the JSON as 7 instead of 7.0, which is valid. Similarly, a Color and a Vector3 can both be specified as "[0.0,0.0,0.0]" in the JSON file. + + MaterialPropertyValue finalValue = value; + + switch (propertyDescriptor->GetDataType()) { - finalizedPropertyValues[propertyIndex.GetIndex()] = value; + case MaterialPropertyDataType::Bool: + finalValue = CastNumericMaterialPropertyValue(value); + break; + case MaterialPropertyDataType::Int: + finalValue = CastNumericMaterialPropertyValue(value); + break; + case MaterialPropertyDataType::UInt: + finalValue = CastNumericMaterialPropertyValue(value); + break; + case MaterialPropertyDataType::Float: + finalValue = CastNumericMaterialPropertyValue(value); + break; + case MaterialPropertyDataType::Color: + if (value.GetTypeId() == azrtti_typeid()) + { + finalValue = Color::CreateFromVector3(value.GetValue()); + } + else if (value.GetTypeId() == azrtti_typeid()) + { + Vector4 vector4 = value.GetValue(); + finalValue = Color::CreateFromVector3AndFloat(vector4.GetAsVector3(), vector4.GetW()); + } + break; + case MaterialPropertyDataType::Vector2: + finalValue = CastVectorMaterialPropertyValue(value); + break; + case MaterialPropertyDataType::Vector3: + if (value.GetTypeId() == azrtti_typeid()) + { + finalValue = value.GetValue().GetAsVector3(); + } + else + { + finalValue = CastVectorMaterialPropertyValue(value); + } + break; + case MaterialPropertyDataType::Vector4: + if (value.GetTypeId() == azrtti_typeid()) + { + finalValue = value.GetValue().GetAsVector4(); + } + else + { + finalValue = CastVectorMaterialPropertyValue(value); + } + break; + } + + if (ValidateMaterialPropertyDataType(finalValue.GetTypeId(), name, propertyDescriptor, reportError)) + { + finalizedPropertyValues[propertyIndex.GetIndex()] = finalValue; } } } diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp index 61e1283f52..ea637fb17d 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialAssetTests.cpp @@ -449,37 +449,7 @@ namespace UnitTest expectCreatorError("Type mismatch", [](MaterialAssetCreator& creator) { - creator.SetPropertyValue(Name{ "MyInt" }, 0.0f); - }); - - expectCreatorError("Type mismatch", - [](MaterialAssetCreator& creator) - { - creator.SetPropertyValue(Name{ "MyUInt" }, -1); - }); - - expectCreatorError("Type mismatch", - [](MaterialAssetCreator& creator) - { - creator.SetPropertyValue(Name{ "MyFloat" }, 10u); - }); - - expectCreatorError("Type mismatch", - [](MaterialAssetCreator& creator) - { - creator.SetPropertyValue(Name{ "MyFloat2" }, 1.0f); - }); - - expectCreatorError("Type mismatch", - [](MaterialAssetCreator& creator) - { - creator.SetPropertyValue(Name{ "MyFloat3" }, AZ::Vector4{}); - }); - - expectCreatorError("Type mismatch", - [](MaterialAssetCreator& creator) - { - creator.SetPropertyValue(Name{ "MyFloat4" }, AZ::Vector3{}); + creator.SetPropertyValue(Name{ "MyFloat" }, AZ::Vector4{}); }); expectCreatorError("Type mismatch", diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp index ef89e0138c..5e09fe6612 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp @@ -297,6 +297,63 @@ namespace UnitTest checkRawPropertyValues(); } + // Can return a Vector4 or a Color as a Vector4 + Vector4 GetAsVector4(const MaterialPropertyValue& value) + { + if (value.GetTypeId() == azrtti_typeid()) + { + return value.GetValue(); + } + else if (value.GetTypeId() == azrtti_typeid()) + { + return value.GetValue().GetAsVector4(); + } + else + { + return Vector4::CreateZero(); + } + } + + // Can return a Int or a UInt as a Int + int32_t GetAsInt(const MaterialPropertyValue& value) + { + if (value.GetTypeId() == azrtti_typeid()) + { + return value.GetValue(); + } + else if (value.GetTypeId() == azrtti_typeid()) + { + return aznumeric_cast(value.GetValue()); + } + else + { + return 0; + } + } + + template + bool AreTypesCompatible(const MaterialPropertyValue& a, const MaterialPropertyValue& b) + { + auto fixupType = [](TypeId t) + { + if (t == azrtti_typeid()) + { + return azrtti_typeid(); + } + + if (t == azrtti_typeid()) + { + return azrtti_typeid(); + } + + return t; + }; + + TypeId targetTypeId = azrtti_typeid(); + + return fixupType(a.GetTypeId()) == fixupType(targetTypeId) && fixupType(b.GetTypeId()) == fixupType(targetTypeId); + } + void CheckEqual(MaterialSourceData& a, MaterialSourceData& b) { EXPECT_STREQ(a.m_materialType.data(), b.m_materialType.data()); @@ -334,27 +391,41 @@ namespace UnitTest auto& propertyA = propertyIterA.second; auto& propertyB = propertyIterB->second; - bool typesMatch = propertyA.m_value.GetTypeId() == propertyB.m_value.GetTypeId(); - EXPECT_TRUE(typesMatch); - if (typesMatch) + AZStd::string propertyReference = AZStd::string::format(" for property '%s.%s'", groupName.c_str(), propertyName.c_str()); + + // We allow some types like Vector4 and Color or Int and UInt to be interchangeable since they serialize the same and can be converted when the MaterialAsset is finalized. + + if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) { - AZStd::string propertyReference = AZStd::string::format(" for property '%s.%s'", groupName.c_str(), propertyName.c_str()); - - auto typeId = propertyA.m_value.GetTypeId(); - - if (typeId == azrtti_typeid()) { EXPECT_EQ(propertyA.m_value.GetValue(), propertyB.m_value.GetValue()) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_EQ(propertyA.m_value.GetValue(), propertyB.m_value.GetValue()) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_EQ(propertyA.m_value.GetValue(), propertyB.m_value.GetValue()) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_NEAR(propertyA.m_value.GetValue(), propertyB.m_value.GetValue(), 0.01) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_TRUE(propertyA.m_value.GetValue().IsClose(propertyB.m_value.GetValue())) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_TRUE(propertyA.m_value.GetValue().IsClose(propertyB.m_value.GetValue())) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_TRUE(propertyA.m_value.GetValue().IsClose(propertyB.m_value.GetValue())) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_TRUE(propertyA.m_value.GetValue().IsClose(propertyB.m_value.GetValue())) << propertyReference.c_str(); } - else if (typeId == azrtti_typeid()) { EXPECT_STREQ(propertyA.m_value.GetValue().c_str(), propertyB.m_value.GetValue().c_str()) << propertyReference.c_str(); } - else - { - ADD_FAILURE(); - } + EXPECT_EQ(propertyA.m_value.GetValue(), propertyB.m_value.GetValue()) << propertyReference.c_str(); + } + else if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) + { + EXPECT_EQ(GetAsInt(propertyA.m_value), GetAsInt(propertyB.m_value)) << propertyReference.c_str(); + } + else if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) + { + EXPECT_NEAR(propertyA.m_value.GetValue(), propertyB.m_value.GetValue(), 0.01) << propertyReference.c_str(); + } + else if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) + { + EXPECT_TRUE(propertyA.m_value.GetValue().IsClose(propertyB.m_value.GetValue())) << propertyReference.c_str(); + } + else if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) + { + EXPECT_TRUE(propertyA.m_value.GetValue().IsClose(propertyB.m_value.GetValue())) << propertyReference.c_str(); + } + else if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) + { + EXPECT_TRUE(GetAsVector4(propertyA.m_value).IsClose(GetAsVector4(propertyB.m_value))) << propertyReference.c_str(); + } + else if (AreTypesCompatible(propertyA.m_value, propertyB.m_value)) + { + EXPECT_STREQ(propertyA.m_value.GetValue().c_str(), propertyB.m_value.GetValue().c_str()) << propertyReference.c_str(); + } + else + { + ADD_FAILURE(); } } } @@ -363,42 +434,8 @@ namespace UnitTest TEST_F(MaterialSourceDataTests, TestJsonRoundTrip) { - const char* materialTypeJson = - "{ \n" - " \"propertyLayout\": { \n" - " \"version\": 1, \n" - " \"groups\": [ \n" - " { \"name\": \"groupA\" }, \n" - " { \"name\": \"groupB\" }, \n" - " { \"name\": \"groupC\" } \n" - " ], \n" - " \"properties\": { \n" - " \"groupA\": [ \n" - " {\"name\": \"MyBool\", \"type\": \"bool\"}, \n" - " {\"name\": \"MyInt\", \"type\": \"int\"}, \n" - " {\"name\": \"MyUInt\", \"type\": \"uint\"} \n" - " ], \n" - " \"groupB\": [ \n" - " {\"name\": \"MyFloat\", \"type\": \"float\"}, \n" - " {\"name\": \"MyFloat2\", \"type\": \"vector2\"}, \n" - " {\"name\": \"MyFloat3\", \"type\": \"vector3\"} \n" - " ], \n" - " \"groupC\": [ \n" - " {\"name\": \"MyFloat4\", \"type\": \"vector4\"}, \n" - " {\"name\": \"MyColor\", \"type\": \"color\"}, \n" - " {\"name\": \"MyImage\", \"type\": \"image\"} \n" - " ] \n" - " } \n" - " } \n" - "} \n"; - const char* materialTypeFilePath = "@exefolder@/Temp/roundTripTest.materialtype"; - AZ::IO::FileIOStream file; - EXPECT_TRUE(file.Open(materialTypeFilePath, AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath)); - file.Write(strlen(materialTypeJson), materialTypeJson); - file.Close(); - MaterialSourceData sourceDataOriginal; sourceDataOriginal.m_materialType = materialTypeFilePath; sourceDataOriginal.m_parentMaterial = materialTypeFilePath; @@ -434,8 +471,8 @@ namespace UnitTest "properties": { "general": [ { - "name": "testColor", - "type": "color" + "name": "testValue", + "type": "Float" } ] } @@ -456,7 +493,7 @@ namespace UnitTest { "properties": { "general": { - "testColor": [0.1,0.2,0.3] + "testValue": 1.2 } }, "materialType": "@exefolder@/Temp/simpleMaterialType.materialtype" @@ -469,27 +506,11 @@ namespace UnitTest EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); EXPECT_EQ(AZ::JsonSerializationResult::Processing::Completed, loadResult.m_jsonResultCode.GetProcessing()); - AZ::Color testColor = material.m_properties["general"]["testColor"].m_value.GetValue(); - EXPECT_TRUE(AZ::Color(0.1f, 0.2f, 0.3f, 1.0f).IsClose(testColor, 0.01)); + float testValue = material.m_properties["general"]["testValue"].m_value.GetValue(); + EXPECT_FLOAT_EQ(1.2f, testValue); } - - TEST_F(MaterialSourceDataTests, Load_Error_NotAnObject) - { - const AZStd::string inputJson = R"( - [] - )"; - - MaterialSourceData material; - JsonTestResult loadResult = LoadTestDataFromJson(material, inputJson); - - EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); - EXPECT_EQ(AZ::JsonSerializationResult::Processing::Altered, loadResult.m_jsonResultCode.GetProcessing()); - EXPECT_EQ(AZ::JsonSerializationResult::Outcomes::Unsupported, loadResult.m_jsonResultCode.GetOutcome()); - - EXPECT_TRUE(loadResult.ContainsMessage("", "Material data must be a JSON object")); - } - - TEST_F(MaterialSourceDataTests, Load_Error_NoMaterialType) + + TEST_F(MaterialSourceDataTests, CreateMaterialAsset_NoMaterialType) { const AZStd::string inputJson = R"( { @@ -505,14 +526,29 @@ namespace UnitTest MaterialSourceData material; JsonTestResult loadResult = LoadTestDataFromJson(material, inputJson); - EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); - EXPECT_EQ(AZ::JsonSerializationResult::Processing::Halted, loadResult.m_jsonResultCode.GetProcessing()); - EXPECT_EQ(AZ::JsonSerializationResult::Outcomes::Catastrophic, loadResult.m_jsonResultCode.GetOutcome()); + const bool elevateWarnings = false; - EXPECT_TRUE(loadResult.ContainsMessage("", "Required field 'materialType' is missing")); + ErrorMessageFinder errorMessageFinder; + + errorMessageFinder.AddExpectedErrorMessage("materialType was not specified"); + auto result = material.CreateMaterialAsset(AZ::Uuid::CreateRandom(), "test.material", AZ::RPI::MaterialAssetProcessingMode::DeferredBake, elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); + + errorMessageFinder.Reset(); + errorMessageFinder.AddExpectedErrorMessage("materialType was not specified"); + result = material.CreateMaterialAsset(AZ::Uuid::CreateRandom(), "test.material", AZ::RPI::MaterialAssetProcessingMode::PreBake, elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); + + errorMessageFinder.Reset(); + errorMessageFinder.AddExpectedErrorMessage("materialType was not specified"); + result = material.CreateMaterialAssetFromSourceData(AZ::Uuid::CreateRandom(), "test.material", elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); } - - TEST_F(MaterialSourceDataTests, Load_Error_MaterialTypeDoesNotExist) + + TEST_F(MaterialSourceDataTests, CreateMaterialAsset_MaterialTypeDoesNotExist) { const AZStd::string inputJson = R"( { @@ -529,102 +565,43 @@ namespace UnitTest MaterialSourceData material; JsonTestResult loadResult = LoadTestDataFromJson(material, inputJson); - EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); - EXPECT_EQ(AZ::JsonSerializationResult::Processing::Halted, loadResult.m_jsonResultCode.GetProcessing()); - EXPECT_EQ(AZ::JsonSerializationResult::Outcomes::Catastrophic, loadResult.m_jsonResultCode.GetOutcome()); + const bool elevateWarnings = false; - EXPECT_TRUE(loadResult.ContainsMessage("/materialType", "Failed to load material-type file")); + ErrorMessageFinder errorMessageFinder; + + errorMessageFinder.AddExpectedErrorMessage("Could not find asset [DoesNotExist.materialtype]"); + auto result = material.CreateMaterialAsset(AZ::Uuid::CreateRandom(), "test.material", AZ::RPI::MaterialAssetProcessingMode::DeferredBake, elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); + + errorMessageFinder.Reset(); + errorMessageFinder.AddExpectedErrorMessage("Could not find asset [DoesNotExist.materialtype]"); + result = material.CreateMaterialAsset(AZ::Uuid::CreateRandom(), "test.material", AZ::RPI::MaterialAssetProcessingMode::PreBake, elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); + + errorMessageFinder.Reset(); + errorMessageFinder.AddExpectedErrorMessage("Could not find asset [DoesNotExist.materialtype]"); + errorMessageFinder.AddIgnoredErrorMessage("Failed to create material type asset ID", true); + result = material.CreateMaterialAssetFromSourceData(AZ::Uuid::CreateRandom(), "test.material", elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); } - - TEST_F(MaterialSourceDataTests, Load_MaterialTypeMessagesAreReported) + + TEST_F(MaterialSourceDataTests, CreateMaterialAsset_MaterialPropertyNotFound) { - const AZStd::string simpleMaterialTypeJson = R"( - { - "propertyLayout": { - "properties": { - "general": [ - { - "name": "testColor", - "type": "color" - } - ] - } - } - } - )"; - - const char* materialTypeFilePath = "@exefolder@/Temp/simpleMaterialType.materialtype"; - - AZ::IO::FileIOStream file; - EXPECT_TRUE(file.Open(materialTypeFilePath, AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath)); - file.Write(simpleMaterialTypeJson.size(), simpleMaterialTypeJson.data()); - file.Close(); - - const AZStd::string inputJson = R"( - { - "materialType": "@exefolder@/Temp/simpleMaterialType.materialtype", - "materialTypeVersion": 1, - "properties": { - "general": { - "testColor": [1.0,1.0,1.0] - } - } - } - )"; - MaterialSourceData material; - JsonTestResult loadResult = LoadTestDataFromJson(material, inputJson); + material.m_materialType = "@exefolder@/Temp/test.materialtype"; + AddPropertyGroup(material, "general"); + AddProperty(material, "general", "FieldDoesNotExist", 1.5f); + + const bool elevateWarnings = true; - EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); - EXPECT_EQ(AZ::JsonSerializationResult::Processing::Completed, loadResult.m_jsonResultCode.GetProcessing()); - - // propertyLayout is a field in the material type, not the material - EXPECT_TRUE(loadResult.ContainsMessage("[simpleMaterialType.materialtype]/propertyLayout/properties", "Successfully read")); - } - - TEST_F(MaterialSourceDataTests, Load_Error_PropertyNotFound) - { - const AZStd::string simpleMaterialTypeJson = R"( - { - "propertyLayout": { - "properties": { - "general": [ - { - "name": "testColor", - "type": "color" - } - ] - } - } - } - )"; - - const char* materialTypeFilePath = "@exefolder@/Temp/simpleMaterialType.materialtype"; - - AZ::IO::FileIOStream file; - EXPECT_TRUE(file.Open(materialTypeFilePath, AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath)); - file.Write(simpleMaterialTypeJson.size(), simpleMaterialTypeJson.data()); - file.Close(); - - const AZStd::string inputJson = R"( - { - "materialType": "@exefolder@/Temp/simpleMaterialType.materialtype", - "materialTypeVersion": 1, - "properties": { - "general": { - "doesNotExist": [1.0,1.0,1.0] - } - } - } - )"; - - MaterialSourceData material; - JsonTestResult loadResult = LoadTestDataFromJson(material, inputJson); - - EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); - EXPECT_EQ(AZ::JsonSerializationResult::Processing::PartialAlter, loadResult.m_jsonResultCode.GetProcessing()); - - EXPECT_TRUE(loadResult.ContainsMessage("/properties/general/doesNotExist", "Property 'general.doesNotExist' not found in material type.")); + ErrorMessageFinder errorMessageFinder("\"general.FieldDoesNotExist\" is not found"); + errorMessageFinder.AddIgnoredErrorMessage("Failed to build MaterialAsset", true); + auto result = material.CreateMaterialAsset(AZ::Uuid::CreateRandom(), "test.material", AZ::RPI::MaterialAssetProcessingMode::PreBake, elevateWarnings); + EXPECT_FALSE(result.IsSuccess()); + errorMessageFinder.CheckExpectedErrorsFound(); } TEST_F(MaterialSourceDataTests, CreateMaterialAsset_MultiLevelDataInheritance) @@ -896,7 +873,92 @@ namespace UnitTest AddProperty(materialSourceData, "general", "MyImage", AZStd::string("doesNotExist.streamingimage")); }, true); // In this case, the warning does happen even when the asset is not finalized, because the image path is checked earlier than that } + + template + void CheckSimilar(PropertyTypeT a, PropertyTypeT b); + + template<> void CheckSimilar(float a, float b) { EXPECT_FLOAT_EQ(a, b); } + template<> void CheckSimilar(Vector2 a, Vector2 b) { EXPECT_TRUE(a.IsClose(b)); } + template<> void CheckSimilar(Vector3 a, Vector3 b) { EXPECT_TRUE(a.IsClose(b)); } + template<> void CheckSimilar(Vector4 a, Vector4 b) { EXPECT_TRUE(a.IsClose(b)); } + template<> void CheckSimilar(Color a, Color b) { EXPECT_TRUE(a.IsClose(b)); } + template void CheckSimilar(PropertyTypeT a, PropertyTypeT b) { EXPECT_EQ(a, b); } + + template + void CheckEndToEndDataTypeResolution(const char* propertyName, const char* jsonValue, PropertyTypeT expectedFinalValue) + { + const char* groupName = "general"; + + const AZStd::string inputJson = AZStd::string::format(R"( + { + "materialType": "@exefolder@/Temp/test.materialtype", + "properties": { + "%s": { + "%s": %s + } + } + } + )", groupName, propertyName, jsonValue); + + MaterialSourceData material; + JsonTestResult loadResult = LoadTestDataFromJson(material, inputJson); + auto materialAssetResult = material.CreateMaterialAsset(Uuid::CreateRandom(), "test.material", AZ::RPI::MaterialAssetProcessingMode::PreBake); + EXPECT_TRUE(materialAssetResult); + MaterialPropertyIndex propertyIndex = materialAssetResult.GetValue()->GetMaterialPropertiesLayout()->FindPropertyIndex(MaterialPropertyId{groupName, propertyName}.GetFullName()); + CheckSimilar(expectedFinalValue, materialAssetResult.GetValue()->GetPropertyValues()[propertyIndex.GetIndex()].GetValue()); + } + + TEST_F(MaterialSourceDataTests, TestEndToEndDataTypeResolution) + { + // Data types in .material files don't have to exactly match the types in .materialtype files as specified in the properties layout. + // The exact location of the data type resolution has moved around over the life of the project, but the important thing is that + // the data type in the source .material file gets applied correctly by the time a finalized MaterialAsset comes out the other side. + + CheckEndToEndDataTypeResolution("MyBool", "true", true); + CheckEndToEndDataTypeResolution("MyBool", "false", false); + CheckEndToEndDataTypeResolution("MyBool", "1", true); + CheckEndToEndDataTypeResolution("MyBool", "0", false); + CheckEndToEndDataTypeResolution("MyBool", "1.0", true); + CheckEndToEndDataTypeResolution("MyBool", "0.0", false); + + CheckEndToEndDataTypeResolution("MyInt", "5", 5); + CheckEndToEndDataTypeResolution("MyInt", "-6", -6); + CheckEndToEndDataTypeResolution("MyInt", "-7.0", -7); + CheckEndToEndDataTypeResolution("MyInt", "false", 0); + CheckEndToEndDataTypeResolution("MyInt", "true", 1); + + CheckEndToEndDataTypeResolution("MyUInt", "8", 8u); + CheckEndToEndDataTypeResolution("MyUInt", "9.0", 9u); + CheckEndToEndDataTypeResolution("MyUInt", "false", 0u); + CheckEndToEndDataTypeResolution("MyUInt", "true", 1u); + + CheckEndToEndDataTypeResolution("MyFloat", "2", 2.0f); + CheckEndToEndDataTypeResolution("MyFloat", "-2", -2.0f); + CheckEndToEndDataTypeResolution("MyFloat", "2.1", 2.1f); + CheckEndToEndDataTypeResolution("MyFloat", "false", 0.0f); + CheckEndToEndDataTypeResolution("MyFloat", "true", 1.0f); + + CheckEndToEndDataTypeResolution("MyColor", "[0.1,0.2,0.3]", Color{0.1f, 0.2f, 0.3f, 1.0}); + CheckEndToEndDataTypeResolution("MyColor", "[0.1, 0.2, 0.3, 0.5]", Color{0.1f, 0.2f, 0.3f, 0.5f}); + CheckEndToEndDataTypeResolution("MyColor", "{\"RGB8\": [255, 0, 255, 0]}", Color{1.0f, 0.0f, 1.0f, 0.0f}); + + CheckEndToEndDataTypeResolution("MyFloat2", "[0.1,0.2]", Vector2{0.1f, 0.2f}); + CheckEndToEndDataTypeResolution("MyFloat2", "{\"y\":0.2, \"x\":0.1}", Vector2{0.1f, 0.2f}); + CheckEndToEndDataTypeResolution("MyFloat2", "{\"y\":0.2, \"x\":0.1, \"Z\":0.3}", Vector2{0.1f, 0.2f}); + CheckEndToEndDataTypeResolution("MyFloat2", "{\"y\":0.2, \"W\":0.4, \"x\":0.1, \"Z\":0.3}", Vector2{0.1f, 0.2f}); + + CheckEndToEndDataTypeResolution("MyFloat3", "[0.1,0.2,0.3]", Vector3{0.1f, 0.2f, 0.3f}); + CheckEndToEndDataTypeResolution("MyFloat3", "{\"y\":0.2, \"x\":0.1}", Vector3{0.1f, 0.2f, 0.0f}); + CheckEndToEndDataTypeResolution("MyFloat3", "{\"y\":0.2, \"x\":0.1, \"Z\":0.3}", Vector3{0.1f, 0.2f, 0.3f}); + CheckEndToEndDataTypeResolution("MyFloat3", "{\"y\":0.2, \"W\":0.4, \"x\":0.1, \"Z\":0.3}", Vector3{0.1f, 0.2f, 0.3f}); + + CheckEndToEndDataTypeResolution("MyFloat4", "[0.1,0.2,0.3,0.4]", Vector4{0.1f, 0.2f, 0.3f, 0.4f}); + CheckEndToEndDataTypeResolution("MyFloat4", "{\"y\":0.2, \"x\":0.1}", Vector4{0.1f, 0.2f, 0.0f, 0.0f}); + CheckEndToEndDataTypeResolution("MyFloat4", "{\"y\":0.2, \"x\":0.1, \"Z\":0.3}", Vector4{0.1f, 0.2f, 0.3f, 0.0f}); + CheckEndToEndDataTypeResolution("MyFloat4", "{\"y\":0.2, \"W\":0.4, \"x\":0.1, \"Z\":0.3}", Vector4{0.1f, 0.2f, 0.3f, 0.4f}); + } + } diff --git a/Gems/Atom/RPI/Code/atom_rpi_edit_files.cmake b/Gems/Atom/RPI/Code/atom_rpi_edit_files.cmake index e32d19ffd7..3c345cc00b 100644 --- a/Gems/Atom/RPI/Code/atom_rpi_edit_files.cmake +++ b/Gems/Atom/RPI/Code/atom_rpi_edit_files.cmake @@ -25,7 +25,6 @@ set(FILES Include/Atom/RPI.Edit/Material/MaterialPropertyValueSourceData.h Include/Atom/RPI.Edit/Material/MaterialPropertyValueSourceDataSerializer.h Include/Atom/RPI.Edit/Material/MaterialSourceData.h - Include/Atom/RPI.Edit/Material/MaterialSourceDataSerializer.h Include/Atom/RPI.Edit/Material/MaterialFunctorSourceData.h Include/Atom/RPI.Edit/Material/MaterialFunctorSourceDataSerializer.h Include/Atom/RPI.Edit/Material/MaterialFunctorSourceDataRegistration.h @@ -45,7 +44,6 @@ set(FILES Source/RPI.Edit/Material/MaterialPropertyValueSourceData.cpp Source/RPI.Edit/Material/MaterialPropertyValueSourceDataSerializer.cpp Source/RPI.Edit/Material/MaterialSourceData.cpp - Source/RPI.Edit/Material/MaterialSourceDataSerializer.cpp Source/RPI.Edit/Material/MaterialFunctorSourceData.cpp Source/RPI.Edit/Material/MaterialFunctorSourceDataSerializer.cpp Source/RPI.Edit/Material/MaterialFunctorSourceDataRegistration.cpp From 638fc027f5ea03c2a86a0e454022ccebd640eaa8 Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Fri, 14 Jan 2022 13:05:59 -0800 Subject: [PATCH 066/413] Updated material builder version numbers in case my prior changes were impactful (it might not be necessary but I'm not sure, so just in case) Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp | 2 +- .../Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp index 768890a29b..cadb182d03 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp @@ -52,7 +52,7 @@ namespace AZ { AssetBuilderSDK::AssetBuilderDesc materialBuilderDescriptor; materialBuilderDescriptor.m_name = JobKey; - materialBuilderDescriptor.m_version = 115; // material dependency improvements updated + materialBuilderDescriptor.m_version = 116; // more material dependency improvements materialBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.material", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); materialBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.materialtype", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); materialBuilderDescriptor.m_busId = azrtti_typeid(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp index 9a92e7b762..35a903dac0 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/MaterialAssetBuilderComponent.cpp @@ -128,7 +128,7 @@ namespace AZ if (auto* serialize = azrtti_cast(context)) { serialize->Class() - ->Version(21); // material dependency improvements updated + ->Version(22); // more material dependency improvements } } From f87d0f83869426b584d4ef9c0b83749e7c27850c Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Fri, 14 Jan 2022 16:18:26 -0800 Subject: [PATCH 067/413] Updated all .material files to have materialTypeVersion instead of propertyLayoutVersion. This was renamed in code at some point but we forgot to rename in the files. Before this was silently ignored but since I removed MaterialSourceDataSerializer, this started being reported as a warning. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../TestData/Test_Sponza_Material_Conversion_black.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_green.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_mat_arch.material | 2 +- .../Test_Sponza_Material_Conversion_mat_bricks.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_mat_floor.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_mat_roof.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_phong5.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_red.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_white.material | 2 +- .../Gem/Sponza/Assets/objects/lightBlocker_lambert1.material | 2 +- .../Levels/Graphics/PbrMaterialChart/materials/basic.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r00.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r01.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r02.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r03.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r04.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r05.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r06.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r07.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r08.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r09.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m00_r10.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r00.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r01.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r02.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r03.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r04.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r05.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r06.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r07.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r08.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r09.material | 2 +- .../Graphics/PbrMaterialChart/materials/basic_m10_r10.material | 2 +- AutomatedTesting/Materials/DefaultPBRTransparent.material | 2 +- AutomatedTesting/Materials/basic_grey.material | 2 +- .../Objects/MorphTargets/DisplayWrinkleMaskBlendValues.material | 2 +- .../OcclusionCullingPlaneTransparentVisualization.material | 2 +- .../OcclusionCullingPlaneVisualization.material | 2 +- .../Common/Assets/Materials/Presets/PBR/default_grid.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_aluminum.material | 2 +- .../Assets/Materials/Presets/PBR/metal_aluminum_matte.material | 2 +- .../Materials/Presets/PBR/metal_aluminum_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_brass.material | 2 +- .../Assets/Materials/Presets/PBR/metal_brass_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_brass_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_chrome.material | 2 +- .../Assets/Materials/Presets/PBR/metal_chrome_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_chrome_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_cobalt.material | 2 +- .../Assets/Materials/Presets/PBR/metal_cobalt_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_cobalt_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_copper.material | 2 +- .../Assets/Materials/Presets/PBR/metal_copper_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_copper_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_gold.material | 2 +- .../Assets/Materials/Presets/PBR/metal_gold_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_gold_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_iron.material | 2 +- .../Assets/Materials/Presets/PBR/metal_iron_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_iron_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_mercury.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_nickel.material | 2 +- .../Assets/Materials/Presets/PBR/metal_nickel_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_nickel_polished.material | 2 +- .../Assets/Materials/Presets/PBR/metal_palladium.material | 2 +- .../Assets/Materials/Presets/PBR/metal_palladium_matte.material | 2 +- .../Materials/Presets/PBR/metal_palladium_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_platinum.material | 2 +- .../Assets/Materials/Presets/PBR/metal_platinum_matte.material | 2 +- .../Materials/Presets/PBR/metal_platinum_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_silver.material | 2 +- .../Assets/Materials/Presets/PBR/metal_silver_matte.material | 2 +- .../Assets/Materials/Presets/PBR/metal_silver_polished.material | 2 +- .../Common/Assets/Materials/Presets/PBR/metal_titanium.material | 2 +- .../Assets/Materials/Presets/PBR/metal_titanium_matte.material | 2 +- .../Materials/Presets/PBR/metal_titanium_polished.material | 2 +- .../ReflectionProbe/ReflectionProbeVisualization.material | 2 +- Gems/Atom/Feature/Common/Assets/Materials/basic_grey.material | 2 +- Gems/Atom/TestData/TestData/Materials/AutoBrick/Brick.material | 2 +- Gems/Atom/TestData/TestData/Materials/AutoBrick/Tile.material | 2 +- Gems/Atom/TestData/TestData/Materials/ParallaxRock.material | 2 +- .../SkinTestCases/001_hermanubis_regression_test.material | 2 +- .../SkinTestCases/002_wrinkle_regression_test.material | 2 +- .../StandardMultilayerPbrTestCases/001_ManyFeatures.material | 2 +- .../001_ManyFeatures_Layer2Off.material | 2 +- .../001_ManyFeatures_Layer3Off.material | 2 +- .../StandardMultilayerPbrTestCases/002_ParallaxPdo.material | 2 +- .../StandardMultilayerPbrTestCases/003_Debug_BlendMask.material | 2 +- .../003_Debug_BlendWeights.material | 2 +- .../003_Debug_Displacement.material | 2 +- .../StandardMultilayerPbrTestCases/004_UseVertexColors.material | 2 +- .../StandardMultilayerPbrTestCases/005_UseDisplacement.material | 2 +- .../005_UseDisplacement_Layer2Off.material | 2 +- .../005_UseDisplacement_Layer3Off.material | 2 +- .../005_UseDisplacement_With_BlendMaskTexture.material | 2 +- ...UseDisplacement_With_BlendMaskTexture_AllSameHeight.material | 2 +- ..._UseDisplacement_With_BlendMaskTexture_NoHeightmaps.material | 2 +- .../005_UseDisplacement_With_BlendMaskVertexColors.material | 2 +- .../Materials/StandardPbrTestCases/001_DefaultWhite.material | 2 +- .../Materials/StandardPbrTestCases/002_BaseColorLerp.material | 2 +- .../StandardPbrTestCases/002_BaseColorLinearLight.material | 2 +- .../StandardPbrTestCases/002_BaseColorMultiply.material | 2 +- .../Materials/StandardPbrTestCases/003_MetalMatte.material | 2 +- .../Materials/StandardPbrTestCases/003_MetalPolished.material | 2 +- .../Materials/StandardPbrTestCases/004_MetalMap.material | 2 +- .../Materials/StandardPbrTestCases/005_RoughnessMap.material | 2 +- .../Materials/StandardPbrTestCases/006_SpecularF0Map.material | 2 +- .../007_MultiscatteringCompensationOff.material | 2 +- .../007_MultiscatteringCompensationOn.material | 2 +- .../Materials/StandardPbrTestCases/008_NormalMap.material | 2 +- .../StandardPbrTestCases/008_NormalMap_Bevels.material | 2 +- .../Materials/StandardPbrTestCases/009_Opacity_Blended.material | 2 +- .../009_Opacity_Blended_Alpha_Affects_Specular.material | 2 +- .../009_Opacity_Cutout_PackedAlpha_DoubleSided.material | 2 +- .../009_Opacity_Cutout_SplitAlpha_DoubleSided.material | 2 +- .../009_Opacity_Cutout_SplitAlpha_SingleSided.material | 2 +- .../009_Opacity_Opaque_DoubleSided.material | 2 +- .../StandardPbrTestCases/009_Opacity_TintedTransparent.material | 2 +- .../StandardPbrTestCases/010_AmbientOcclusion.material | 2 +- .../Materials/StandardPbrTestCases/010_BothOcclusion.material | 2 +- .../Materials/StandardPbrTestCases/010_OcclusionBase.material | 2 +- .../StandardPbrTestCases/010_SpecularOcclusion.material | 2 +- .../Materials/StandardPbrTestCases/011_Emissive.material | 2 +- .../Materials/StandardPbrTestCases/012_Parallax_POM.material | 2 +- .../StandardPbrTestCases/012_Parallax_POM_Cutout.material | 2 +- .../Materials/StandardPbrTestCases/013_SpecularAA_Off.material | 2 +- .../Materials/StandardPbrTestCases/013_SpecularAA_On.material | 2 +- .../Materials/StandardPbrTestCases/014_ClearCoat.material | 2 +- .../StandardPbrTestCases/014_ClearCoat_NormalMap.material | 2 +- .../StandardPbrTestCases/014_ClearCoat_NormalMap_2ndUv.material | 2 +- .../StandardPbrTestCases/014_ClearCoat_RoughnessMap.material | 2 +- .../StandardPbrTestCases/015_SubsurfaceScattering.material | 2 +- .../015_SubsurfaceScattering_Transmission.material | 2 +- .../StandardPbrTestCases/100_UvTiling_AmbientOcclusion.material | 2 +- .../StandardPbrTestCases/100_UvTiling_BaseColor.material | 2 +- .../StandardPbrTestCases/100_UvTiling_Emissive.material | 2 +- .../StandardPbrTestCases/100_UvTiling_Metallic.material | 2 +- .../Materials/StandardPbrTestCases/100_UvTiling_Normal.material | 2 +- .../100_UvTiling_Normal_Dome_Rotate20.material | 2 +- .../100_UvTiling_Normal_Dome_Rotate90.material | 2 +- .../100_UvTiling_Normal_Dome_ScaleOnlyU.material | 2 +- .../100_UvTiling_Normal_Dome_ScaleOnlyV.material | 2 +- .../100_UvTiling_Normal_Dome_ScaleUniform.material | 2 +- .../100_UvTiling_Normal_Dome_TransformAll.material | 2 +- .../StandardPbrTestCases/100_UvTiling_Opacity.material | 2 +- .../StandardPbrTestCases/100_UvTiling_Parallax_A.material | 2 +- .../StandardPbrTestCases/100_UvTiling_Parallax_B.material | 2 +- .../StandardPbrTestCases/100_UvTiling_Roughness.material | 2 +- .../StandardPbrTestCases/100_UvTiling_SpecularF0.material | 2 +- .../101_DetailMaps_BaseNoDetailMaps.material | 2 +- .../Materials/StandardPbrTestCases/102_DetailMaps_All.material | 2 +- .../StandardPbrTestCases/103_DetailMaps_BaseColor.material | 2 +- .../103_DetailMaps_BaseColorWithMask.material | 2 +- .../StandardPbrTestCases/104_DetailMaps_Normal.material | 2 +- .../StandardPbrTestCases/104_DetailMaps_NormalWithMask.material | 2 +- .../105_DetailMaps_BlendMaskUsingDetailUVs.material | 2 +- .../Materials/StandardPbrTestCases/UvTilingBase.material | 2 +- .../TestData/Objects/ModelHotReload/DisplayVertexColor.material | 2 +- .../Assets/Materials/AnodizedMetal/anodized_metal.material | 2 +- .../Assets/Materials/Asphalt/asphalt.material | 2 +- .../Assets/Materials/BasicFabric/basic_fabric.material | 2 +- .../Assets/Materials/BrushedSteel/brushed_steel.material | 2 +- .../Assets/Materials/CarPaint/car_paint.material | 2 +- .../ReferenceMaterials/Assets/Materials/Coal/coal.material | 2 +- .../Assets/Materials/ConcreteStucco/concrete_stucco.material | 2 +- .../ReferenceMaterials/Assets/Materials/Copper/copper.material | 2 +- .../ReferenceMaterials/Assets/Materials/Fabric/fabric.material | 2 +- .../Assets/Materials/GalvanizedSteel/galvanized_steel.material | 2 +- .../Assets/Materials/GlazedClay/glazed_clay.material | 2 +- .../ReferenceMaterials/Assets/Materials/Gloss/gloss.material | 2 +- .../ReferenceMaterials/Assets/Materials/Gold/gold.material | 2 +- .../ReferenceMaterials/Assets/Materials/Ground/ground.material | 2 +- .../ReferenceMaterials/Assets/Materials/Iron/iron.material | 2 +- .../Assets/Materials/Leather/dark_leather.material | 2 +- .../Assets/Materials/Light_Leather/light_leather.material | 2 +- .../Materials/MicrofiberFabric/microfiber_fabric.material | 2 +- .../Assets/Materials/MixedStones/mixed_stones.material | 2 +- .../ReferenceMaterials/Assets/Materials/Nickle/nickle.material | 2 +- .../Assets/Materials/Plaster/plaster.material | 2 +- .../Assets/Materials/Plastic_01/plastic_01.material | 2 +- .../Assets/Materials/Plastic_02/plastic_02.material | 2 +- .../Assets/Materials/Plastic_03/plastic_03.material | 2 +- .../Assets/Materials/Platinum/platinum.material | 2 +- .../Assets/Materials/Porcelain/porcelain.material | 2 +- .../Materials/RotaryBrushedSteel/rotary_brushed_steel.material | 2 +- .../ReferenceMaterials/Assets/Materials/Rust/rust.material | 2 +- .../ReferenceMaterials/Assets/Materials/Suede/suede.material | 2 +- .../Assets/Materials/TireRubber/tire_rubber.material | 2 +- .../Assets/Materials/WoodPlanks/wood_planks.material | 2 +- .../Assets/Materials/WornMetal/warn_metal.material | 2 +- .../ReferenceMaterials/Assets/Materials/black.material | 2 +- .../ReferenceMaterials/Assets/Materials/blue.material | 2 +- .../ReferenceMaterials/Assets/Materials/green.material | 2 +- .../ReferenceMaterials/Assets/Materials/grey.material | 2 +- .../ReferenceMaterials/Assets/Materials/red.material | 2 +- .../ReferenceMaterials/Assets/Materials/white.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_black.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_green.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_mat_arch.material | 2 +- .../Test_Sponza_Material_Conversion_mat_bricks.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_mat_floor.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_mat_roof.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_phong5.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_red.material | 2 +- .../TestData/Test_Sponza_Material_Conversion_white.material | 2 +- .../Sponza/Assets/objects/lightBlocker_lambert1.material | 2 +- .../Atom/Scripts/Python/DCC_Materials/maya_materials_export.py | 2 +- .../SDK/Atom/Scripts/Python/DCC_Materials/pbr.material | 2 +- .../SDK/Maya/Scripts/Python/dcc_materials/main.py | 2 +- .../SDK/Maya/Scripts/Python/dcc_materials/materials_export.py | 2 +- .../SDK/Maya/Scripts/Python/dcc_materials/pbr.material | 2 +- .../Python/kitbash_converter/standardPBR.template.material | 2 +- .../Python/legacy_asset_converter/standardPBR.template.material | 2 +- .../Scripts/Python/maya_dcc_materials/maya_materials_export.py | 2 +- .../Python/maya_dcc_materials/standardpbr.template.material | 2 +- .../stingraypbs_converter/StandardPBR_AllProperties.material | 2 +- .../Substance/resources/atom/StandardPBR_AllProperties.material | 2 +- .../SDK/Substance/resources/atom/atom.material | 2 +- .../SDK/Substance/resources/atom/atom_variant00.material | 2 +- .../Tools/Resources/Atom/StandardPBR_AllProperties.material | 2 +- .../cloth/Chicken/Actor/chicken_chicken_body_mat.material | 2 +- .../cloth/Chicken/Actor/chicken_chicken_eye_mat.material | 2 +- .../Assets/Objects/cloth/Environment/cloth_blinds.material | 2 +- .../Objects/cloth/Environment/cloth_blinds_broken.material | 2 +- .../cloth/Environment/cloth_locked_corners_four.material | 2 +- .../Objects/cloth/Environment/cloth_locked_corners_two.material | 2 +- .../Assets/Objects/cloth/Environment/cloth_locked_edge.material | 2 +- .../Assets/Objects/_Primitives/_Box_1x1_MiddleGrey.material | 2 +- .../Objects/_Primitives/_Cylinder_1x1_MiddleGrey.material | 2 +- .../Assets/Objects/_Primitives/_Sphere_1x1_MiddleGrey.material | 2 +- .../Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material | 2 +- 231 files changed, 231 insertions(+), 231 deletions(-) diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material index cc2c9e785b..d15aa620c7 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material index a4bfb73d12..579359b085 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material index fe9c54bc02..88d5fc0fc6 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material index a19afa33e2..7244397ee9 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material index 0c1208d8fb..8a3f289c26 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material index 6aad4d644a..7bc193978f 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material index 302589dc85..a53cbef4e4 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material index 5217a4e4be..6ddb645319 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material index dba44f7b49..e3d310cd15 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "emissive": { "color": [ diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material b/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material index c8e9f1f8f7..35677a81c6 100644 --- a/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "emissive": { "color": [ diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material index 32ac8dfd10..6af3ceb0c1 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material @@ -1,6 +1,6 @@ { "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "baseColor": { "color": [ 1.0, 1.0, 1.0 ], diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material index 1c1096bf12..541bd83981 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material index 33148f3f73..19691258e0 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material index 38339454cb..46fda2aab1 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material index e21ab5775a..79cf4bf401 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material index 0272e66081..9aabf3e158 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material index 67d51777a4..8b02f225fc 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material index 3136f654e6..5b089da4bd 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material index a79744ea11..25741cf689 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material index 1372283500..04103273f2 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material index d1c951e53c..74eb68da99 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material index d34fc46530..3533ca6676 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 0.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material index 92ddfec7c4..d2ce0fadc9 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material index 874422384a..8d96ea6217 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material index b017add10b..e8feb87283 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material index 5353d651c8..c14591bd52 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material index 6dd47e4e3b..60a3167f02 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material index 04912cbfd4..d71ff06961 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material index 27f7f6ff42..6fa8cfe1a6 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material index e2b5df681c..773cc66f03 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material index 5418f9c855..6971597d1d 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material index dd1ec3489a..c2d8cc47bd 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material index 5f9317d2cc..906879b0ea 100644 --- a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material @@ -1,7 +1,7 @@ { "parentMaterial": "./basic.material", "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "metallic": { "factor": 1.0 diff --git a/AutomatedTesting/Materials/DefaultPBRTransparent.material b/AutomatedTesting/Materials/DefaultPBRTransparent.material index 7c8aa6cf94..a7000d5371 100644 --- a/AutomatedTesting/Materials/DefaultPBRTransparent.material +++ b/AutomatedTesting/Materials/DefaultPBRTransparent.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/Presets/PBR/default_grid.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "opacity": { "mode": "Blended" diff --git a/AutomatedTesting/Materials/basic_grey.material b/AutomatedTesting/Materials/basic_grey.material index 0b890db4c6..6ecc1e029a 100644 --- a/AutomatedTesting/Materials/basic_grey.material +++ b/AutomatedTesting/Materials/basic_grey.material @@ -1,6 +1,6 @@ { "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "baseColor": { "color": [ 0.18, 0.18, 0.18 ], diff --git a/AutomatedTesting/Objects/MorphTargets/DisplayWrinkleMaskBlendValues.material b/AutomatedTesting/Objects/MorphTargets/DisplayWrinkleMaskBlendValues.material index 878b3ac39f..52c323b454 100644 --- a/AutomatedTesting/Objects/MorphTargets/DisplayWrinkleMaskBlendValues.material +++ b/AutomatedTesting/Objects/MorphTargets/DisplayWrinkleMaskBlendValues.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/Skin.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "wrinkleLayers": { "count": 3, diff --git a/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneTransparentVisualization.material b/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneTransparentVisualization.material index 981e392eef..11d8d44e94 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneTransparentVisualization.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneTransparentVisualization.material @@ -1,6 +1,6 @@ { "materialType": "Materials\\Types\\StandardPBR.materialtype", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "enableShadows": false, diff --git a/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneVisualization.material b/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneVisualization.material index 4446cc2d9d..50440b714f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneVisualization.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/OcclusionCullingPlane/OcclusionCullingPlaneVisualization.material @@ -1,6 +1,6 @@ { "materialType": "Materials\\Types\\StandardPBR.materialtype", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "enableShadows": false, diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/default_grid.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/default_grid.material index 387d022bd2..05345a1649 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/default_grid.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/default_grid.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Textures/Default/default_basecolor.tif" diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum.material index ece08a3492..38ebe17687 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_matte.material index afc2bb56f3..c3ec8a9266 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_polished.material index 27fa2bb11e..90c62b6d76 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_aluminum_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass.material index 77f658aafa..e456d147e1 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_matte.material index d9c72471c8..11705a2bf8 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_polished.material index 57b5a15e54..5a2b2433d4 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_brass_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome.material index 50e21d481c..cb8a8fad1e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_matte.material index 55e1b0c3bc..1592c4c095 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_polished.material index ce6599837c..6c2e403fc9 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_chrome_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt.material index be4067570d..ea399542c0 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_matte.material index 09aed7ba63..c20f50c95e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_polished.material index c1e6ca7798..7f00525f4d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_cobalt_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper.material index 3970606e7d..23b9fba63d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_matte.material index d0385eebde..e16cf0bb4e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_polished.material index 5e52702d21..53fac02767 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_copper_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold.material index 2638e76a74..6ee7eed53f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_matte.material index fd21141048..6fa842b6f7 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_polished.material index 5861c7b533..55a5412af1 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_gold_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron.material index c35f8ca755..cac874c583 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_matte.material index 1ed1dd4dad..1373ff0108 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_polished.material index e60d31bd6d..59e1330993 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_iron_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_mercury.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_mercury.material index e2d304ab32..82fbde8db3 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_mercury.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_mercury.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel.material index a158fa2777..0e3aacc785 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_matte.material index 4ae75d3a42..db72087d30 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_polished.material index 48effb1c94..d4467508ae 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_nickel_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium.material index 2b2a6f148a..0e91117519 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_matte.material index 1ab89f90ad..b7a5648fcf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_polished.material index 5b7879c3fa..d8e398a7de 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_palladium_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum.material index 678c3321ce..f450fb66b0 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_matte.material index 7afa0809bb..a515ba5aaf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_polished.material index df6a8fb595..5b3d184631 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_platinum_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver.material index a53c252144..14247e6421 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_matte.material index 588f90c3d1..e98fd5376d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_polished.material index 96fbdee686..ae757460a5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_silver_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium.material index a34430bd7d..c3ce0014a1 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_matte.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_matte.material index 52ebc71d9c..0745b4894d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_matte.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_matte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_polished.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_polished.material index b9dd832849..ff2d7734ad 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_polished.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/PBR/metal_titanium_polished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.material b/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.material index e9bb191532..f4063ba923 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.material @@ -1,6 +1,6 @@ { "materialType": "ReflectionProbeVisualization.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "general": { "enableShadows": false, diff --git a/Gems/Atom/Feature/Common/Assets/Materials/basic_grey.material b/Gems/Atom/Feature/Common/Assets/Materials/basic_grey.material index 0b890db4c6..6ecc1e029a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/basic_grey.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/basic_grey.material @@ -1,6 +1,6 @@ { "materialType": "Materials/Types/StandardPBR.materialtype", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "baseColor": { "color": [ 0.18, 0.18, 0.18 ], diff --git a/Gems/Atom/TestData/TestData/Materials/AutoBrick/Brick.material b/Gems/Atom/TestData/TestData/Materials/AutoBrick/Brick.material index aaa2dc455f..061510d4c2 100644 --- a/Gems/Atom/TestData/TestData/Materials/AutoBrick/Brick.material +++ b/Gems/Atom/TestData/TestData/Materials/AutoBrick/Brick.material @@ -2,7 +2,7 @@ "description": "", "materialType": "TestData/Materials/Types/AutoBrick.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "appearance": { "ao": 0.5252525210380554, diff --git a/Gems/Atom/TestData/TestData/Materials/AutoBrick/Tile.material b/Gems/Atom/TestData/TestData/Materials/AutoBrick/Tile.material index 37c17e5616..b81ff4110b 100644 --- a/Gems/Atom/TestData/TestData/Materials/AutoBrick/Tile.material +++ b/Gems/Atom/TestData/TestData/Materials/AutoBrick/Tile.material @@ -2,7 +2,7 @@ "description": "", "materialType": "TestData/Materials/Types/AutoBrick.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "appearance": { "ao": 0.010100999847054482, diff --git a/Gems/Atom/TestData/TestData/Materials/ParallaxRock.material b/Gems/Atom/TestData/TestData/Materials/ParallaxRock.material index c9276216eb..1e140b9cf7 100644 --- a/Gems/Atom/TestData/TestData/Materials/ParallaxRock.material +++ b/Gems/Atom/TestData/TestData/Materials/ParallaxRock.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/Presets/PBR/default_grid.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseTextureMap": "TestData/Textures/cc0/Rock030_2K_AmbientOcclusion.jpg" diff --git a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material index e6c032b0f9..be607e7721 100644 --- a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material +++ b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/Skin.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material index 9b955ddb1d..4222108b5e 100644 --- a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material +++ b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/Skin.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material index 415bd36dcf..f683ad052d 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "enableLayer2": true, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer2Off.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer2Off.material index d91cfb34eb..042f31f3ec 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer2Off.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer2Off.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "enableLayer2": false diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer3Off.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer3Off.material index 3ee48df612..59fc168a6c 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer3Off.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures_Layer3Off.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/001_ManyFeatures.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "enableLayer3": false diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material index 64adf317a9..a1d3c288ea 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "enableLayer2": true, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendMask.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendMask.material index ffcbf3ce7e..b7be8ab18f 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendMask.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendMask.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "debugDrawMode": "BlendMask" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendWeights.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendWeights.material index 8d13ac781f..99a9c9f382 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendWeights.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_BlendWeights.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "debugDrawMode": "FinalBlendWeights" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_Displacement.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_Displacement.material index 7aff50cb56..6dbee69845 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_Displacement.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/003_Debug_Displacement.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "debugDrawMode": "Displacement" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/004_UseVertexColors.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/004_UseVertexColors.material index ea3ea8b519..b53df9a505 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/004_UseVertexColors.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/004_UseVertexColors.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/002_ParallaxPdo.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "blendSource": "BlendMaskVertexColors" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material index 9163fe0a0c..f313080cce 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "blendSource": "Displacement", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer2Off.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer2Off.material index 9413e35128..6f64bcd49f 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer2Off.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer2Off.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "enableLayer2": false diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer3Off.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer3Off.material index 93e0b21780..8b32223c82 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer3Off.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_Layer3Off.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "enableLayer3": false diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture.material index 6b062f6d1e..023316c5f6 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "blendSource": "Displacement_With_BlendMaskTexture" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_AllSameHeight.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_AllSameHeight.material index 0e6519afd4..d88802d4de 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_AllSameHeight.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_AllSameHeight.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "displacementBlendDistance": 0.0010000000474974514 diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_NoHeightmaps.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_NoHeightmaps.material index b5b5656084..9ba4d20a9a 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_NoHeightmaps.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture_NoHeightmaps.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskTexture.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "layer1_parallax": { "offset": -0.03200000151991844, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskVertexColors.material b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskVertexColors.material index 8461ea429c..51219aa180 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskVertexColors.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement_With_BlendMaskVertexColors.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "TestData/Materials/StandardMultilayerPbrTestCases/005_UseDisplacement.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "blendSource": "Displacement_With_BlendMaskVertexColors", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/001_DefaultWhite.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/001_DefaultWhite.material index 2e4eee7f8e..164b73c892 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/001_DefaultWhite.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/001_DefaultWhite.material @@ -2,5 +2,5 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3 + "materialTypeVersion": 3 } \ No newline at end of file diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLerp.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLerp.material index f8214e1b2e..29329a03a2 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLerp.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLerp.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLinearLight.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLinearLight.material index bf31a4a111..46a8fd70ef 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLinearLight.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorLinearLight.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorMultiply.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorMultiply.material index b3b67448ea..7abf4ca40c 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorMultiply.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/002_BaseColorMultiply.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalMatte.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalMatte.material index 12690076c3..73ad13e27b 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalMatte.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalMatte.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalPolished.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalPolished.material index 41496bd801..9dea40d6ec 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalPolished.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/003_MetalPolished.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/004_MetalMap.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/004_MetalMap.material index ebc65557ec..d20e354a53 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/004_MetalMap.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/004_MetalMap.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/005_RoughnessMap.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/005_RoughnessMap.material index e770537005..283c6ac60b 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/005_RoughnessMap.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/005_RoughnessMap.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/006_SpecularF0Map.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/006_SpecularF0Map.material index d0e0dccf1e..11228e2199 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/006_SpecularF0Map.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/006_SpecularF0Map.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOff.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOff.material index de9886ac46..3b9779aac1 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOff.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOff.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOn.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOn.material index 411646effc..dbbcdc631d 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOn.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/007_MultiscatteringCompensationOn.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap.material index c5561823ed..4b2842a594 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap_Bevels.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap_Bevels.material index b26cb927d0..aec3bbf478 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap_Bevels.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/008_NormalMap_Bevels.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.30000001192092898, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended.material index 98dd6baecd..1528403868 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended_Alpha_Affects_Specular.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended_Alpha_Affects_Specular.material index dbaec36136..20f5ccf098 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended_Alpha_Affects_Specular.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Blended_Alpha_Affects_Specular.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_PackedAlpha_DoubleSided.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_PackedAlpha_DoubleSided.material index 5545e5a482..d8683681c4 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_PackedAlpha_DoubleSided.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_PackedAlpha_DoubleSided.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "TestData/Textures/Foliage_Leaves_0_BaseColor.dds" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_DoubleSided.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_DoubleSided.material index 960a8b0700..8e8dad46d8 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_DoubleSided.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_DoubleSided.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "opacity": { "alphaSource": "Split", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_SingleSided.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_SingleSided.material index 2adc42141c..2d9b4c514b 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_SingleSided.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Cutout_SplitAlpha_SingleSided.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "opacity": { "alphaSource": "Split", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Opaque_DoubleSided.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Opaque_DoubleSided.material index a26bf6e045..f7ac93a7ac 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Opaque_DoubleSided.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_Opaque_DoubleSided.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Textures/Default/checker_uv_basecolor.png" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_TintedTransparent.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_TintedTransparent.material index 1716792af1..9d36d0a7e6 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_TintedTransparent.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/009_Opacity_TintedTransparent.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_AmbientOcclusion.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_AmbientOcclusion.material index 28f43a9a57..a7fe0d1d4d 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_AmbientOcclusion.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_AmbientOcclusion.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "010_OcclusionBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseFactor": 2.0, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_BothOcclusion.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_BothOcclusion.material index cee64dd107..1f9c94db47 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_BothOcclusion.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_BothOcclusion.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "010_OcclusionBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseFactor": 2.0, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_OcclusionBase.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_OcclusionBase.material index 9a41a7d191..534305b68a 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_OcclusionBase.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_OcclusionBase.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_SpecularOcclusion.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_SpecularOcclusion.material index 703088d6f8..6403bc5c14 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_SpecularOcclusion.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/010_SpecularOcclusion.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "010_OcclusionBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "specularFactor": 2.0, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/011_Emissive.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/011_Emissive.material index 97d657b82b..dc42c0d6b5 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/011_Emissive.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/011_Emissive.material @@ -1,7 +1,7 @@ { "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Textures/Default/default_basecolor.tif" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM.material index ed070d5de2..fee4a30f77 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM.material @@ -1,7 +1,7 @@ { "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "TestData/Textures/TextureHaven/4k_castle_brick_02_red/4k_castle_brick_02_red_bc.png" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM_Cutout.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM_Cutout.material index f5ec0e8287..d69b75285e 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM_Cutout.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/012_Parallax_POM_Cutout.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "TestData/Textures/TextureHaven/4k_castle_brick_02_red/4k_castle_brick_02_red_bc.png" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_Off.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_Off.material index 666bf45d57..a1da93acbb 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_Off.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_Off.material @@ -1,7 +1,7 @@ { "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "metallic": { "factor": 1.0 diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_On.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_On.material index 0581280d67..07018e9140 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_On.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/013_SpecularAA_On.material @@ -1,7 +1,7 @@ { "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "applySpecularAA": true diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat.material index c23f71e7df..e02a8b5fc2 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap.material index caa9f88818..56d8515305 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap_2ndUv.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap_2ndUv.material index 04d2051e8e..e7575d8bd6 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap_2ndUv.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_NormalMap_2ndUv.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_RoughnessMap.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_RoughnessMap.material index 51915a7bb0..3ccbfeacc1 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_RoughnessMap.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/014_ClearCoat_RoughnessMap.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering.material index 37a9b1144e..fb3621f056 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "subsurfaceScattering": { "enableSubsurfaceScattering": true, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission.material index 38adbc70cd..eff175be77 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "subsurfaceScattering": { "enableSubsurfaceScattering": true, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_AmbientOcclusion.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_AmbientOcclusion.material index e1260ab4f2..d88c1f151f 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_AmbientOcclusion.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_AmbientOcclusion.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseTextureMap": "TestData/Objects/cube/cube_diff.tif" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_BaseColor.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_BaseColor.material index 5dd3b88e1b..89bd1005a5 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_BaseColor.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_BaseColor.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "TestData/Objects/cube/cube_diff.tif" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Emissive.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Emissive.material index 21f2733d94..564de16cc2 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Emissive.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Emissive.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Metallic.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Metallic.material index 6c5f72faa1..0eff6198dd 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Metallic.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Metallic.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "metallic": { "factor": 1.0, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal.material index d53fbec47e..e50c669114 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "textureMap": "TestData/Objects/cube/cube_diff.tif" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate20.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate20.material index d693224e78..0b3d678bdd 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate20.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate20.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.15000000596046449, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate90.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate90.material index 19e3fce5e6..4a7ade8b30 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate90.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_Rotate90.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.15000000596046449, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyU.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyU.material index 44345f37c9..c0477ac5cf 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyU.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyU.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.15000000596046449, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyV.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyV.material index 2fadfa6e22..b088a0c090 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyV.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleOnlyV.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.15000000596046449, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleUniform.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleUniform.material index 476ba647be..c7c3fac87f 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleUniform.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_ScaleUniform.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.15000000596046449, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_TransformAll.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_TransformAll.material index d3db77e1eb..849e926031 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_TransformAll.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Normal_Dome_TransformAll.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "normal": { "factor": 0.15000000596046449, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Opacity.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Opacity.material index 5e8a0438dd..b203ec5318 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Opacity.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Opacity.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "opacity": { "alphaSource": "Split", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_A.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_A.material index b3e69212db..ad2e27063b 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_A.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_A.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "TestData/Materials/StandardPbrTestCases/UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "TestData/Objects/cube/cube_diff.tif" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_B.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_B.material index 3d52f3b9e6..75646e5191 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_B.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Parallax_B.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "TestData/Materials/StandardPbrTestCases/UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "TestData/Objects/cube/cube_diff.tif" diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Roughness.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Roughness.material index 4aa4b4a651..49ff9555f1 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Roughness.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_Roughness.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "metallic": { "factor": 1.0 diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_SpecularF0.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_SpecularF0.material index bf53b57022..a750e30d80 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_SpecularF0.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/100_UvTiling_SpecularF0.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material index 82192bac41..30959fc972 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material index dd31d00db0..2cb14b490e 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material index eda8ef12de..826ae2d737 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "detailLayerGroup": { "baseColorDetailBlend": 0.800000011920929, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColorWithMask.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColorWithMask.material index 28c922a240..1c2214a031 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColorWithMask.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColorWithMask.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "detailLayerGroup": { "baseColorDetailBlend": 1.0, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material index 291f0fc828..9a80cfaaa0 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "detailLayerGroup": { "enableDetailLayer": true, diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_NormalWithMask.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_NormalWithMask.material index 1c11d653c0..0ee81633ae 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_NormalWithMask.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_NormalWithMask.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "detailLayerGroup": { "blendDetailMask": "TestData/Textures/checker8x8_gray_512.png", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material index 6964342447..b2747ead21 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/UvTilingBase.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/UvTilingBase.material index 48c287552f..be607db929 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/UvTilingBase.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/UvTilingBase.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "uv": { "center": [ diff --git a/Gems/Atom/TestData/TestData/Objects/ModelHotReload/DisplayVertexColor.material b/Gems/Atom/TestData/TestData/Objects/ModelHotReload/DisplayVertexColor.material index 104d675387..8a2f45260a 100644 --- a/Gems/Atom/TestData/TestData/Objects/ModelHotReload/DisplayVertexColor.material +++ b/Gems/Atom/TestData/TestData/Objects/ModelHotReload/DisplayVertexColor.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardMultilayerPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "blend": { "blendSource": "BlendMaskVertexColors", diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/AnodizedMetal/anodized_metal.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/AnodizedMetal/anodized_metal.material index cb2c725678..9672075409 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/AnodizedMetal/anodized_metal.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/AnodizedMetal/anodized_metal.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Asphalt/asphalt.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Asphalt/asphalt.material index a004cefd18..76cabce752 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Asphalt/asphalt.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Asphalt/asphalt.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Asphalt/asphalt_basecolor.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BasicFabric/basic_fabric.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BasicFabric/basic_fabric.material index bf26749d3c..30a203a43a 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BasicFabric/basic_fabric.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BasicFabric/basic_fabric.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/BasicFabric/basic_fabric_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BrushedSteel/brushed_steel.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BrushedSteel/brushed_steel.material index 0a98da1143..8feed25399 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BrushedSteel/brushed_steel.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/BrushedSteel/brushed_steel.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "factor": 0.9292929172515869, diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/CarPaint/car_paint.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/CarPaint/car_paint.material index 3cd0e542fa..92544dd7be 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/CarPaint/car_paint.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/CarPaint/car_paint.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Coal/coal.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Coal/coal.material index 78ceb399ee..4c377178d3 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Coal/coal.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Coal/coal.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/ConcreteStucco/concrete_stucco.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/ConcreteStucco/concrete_stucco.material index d4e2016022..c5c2e24a2a 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/ConcreteStucco/concrete_stucco.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/ConcreteStucco/concrete_stucco.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Copper/copper.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Copper/copper.material index 80b7ea29f3..56d0fb1357 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Copper/copper.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Copper/copper.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Fabric/fabric.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Fabric/fabric.material index ff3a250b96..c2a71513ff 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Fabric/fabric.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Fabric/fabric.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Fabric/fabric_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GalvanizedSteel/galvanized_steel.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GalvanizedSteel/galvanized_steel.material index aca0648374..83dc076c23 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GalvanizedSteel/galvanized_steel.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GalvanizedSteel/galvanized_steel.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/GalvanizedSteel/galvanized_steel.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GlazedClay/glazed_clay.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GlazedClay/glazed_clay.material index 66f4dd7d00..ff82c9b03f 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GlazedClay/glazed_clay.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/GlazedClay/glazed_clay.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gloss/gloss.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gloss/gloss.material index ceaca4a274..3e2b1fb56e 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gloss/gloss.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gloss/gloss.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gold/gold.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gold/gold.material index b9ee3e5a12..a5e0fa4dba 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gold/gold.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Gold/gold.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Ground/ground.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Ground/ground.material index 86f84d4c84..63e9c49fba 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Ground/ground.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Ground/ground.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Ground/ground_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Iron/iron.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Iron/iron.material index d859a4a4cf..0ec8cc4819 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Iron/iron.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Iron/iron.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Leather/dark_leather.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Leather/dark_leather.material index 6c14a0c7fe..46d8511186 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Leather/dark_leather.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Leather/dark_leather.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Leather/leather_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Light_Leather/light_leather.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Light_Leather/light_leather.material index 1ae26a8e0d..a73e80b6cb 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Light_Leather/light_leather.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Light_Leather/light_leather.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Light_Leather/light_leather_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MicrofiberFabric/microfiber_fabric.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MicrofiberFabric/microfiber_fabric.material index d2f5964457..5d6b123c5d 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MicrofiberFabric/microfiber_fabric.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MicrofiberFabric/microfiber_fabric.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MixedStones/mixed_stones.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MixedStones/mixed_stones.material index b6dea22b24..c3a916b0bb 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MixedStones/mixed_stones.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/MixedStones/mixed_stones.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/MixedStones/mixed_stones_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Nickle/nickle.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Nickle/nickle.material index 82ff63aa20..9bec82bfd2 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Nickle/nickle.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Nickle/nickle.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plaster/plaster.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plaster/plaster.material index cdf76f612d..73ff1024e3 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plaster/plaster.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plaster/plaster.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_01/plastic_01.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_01/plastic_01.material index 227017e1ab..bbac80a528 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_01/plastic_01.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_01/plastic_01.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_02/plastic_02.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_02/plastic_02.material index c30c3234c0..52c7ec11fb 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_02/plastic_02.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_02/plastic_02.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_03/plastic_03.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_03/plastic_03.material index 433c56251d..e7feda6620 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_03/plastic_03.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Plastic_03/plastic_03.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Platinum/platinum.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Platinum/platinum.material index 6613a21f2c..95b9f5767c 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Platinum/platinum.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Platinum/platinum.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Porcelain/porcelain.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Porcelain/porcelain.material index cef8ed194e..9b481628b5 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Porcelain/porcelain.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Porcelain/porcelain.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/RotaryBrushedSteel/rotary_brushed_steel.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/RotaryBrushedSteel/rotary_brushed_steel.material index 866c18d650..ae6753bffc 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/RotaryBrushedSteel/rotary_brushed_steel.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/RotaryBrushedSteel/rotary_brushed_steel.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Rust/rust.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Rust/rust.material index f6f2bdc52b..0ef4da333e 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Rust/rust.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Rust/rust.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Rust/rust_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Suede/suede.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Suede/suede.material index 782ed7451c..ae3288cbe9 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Suede/suede.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/Suede/suede.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/Suede/suede_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/TireRubber/tire_rubber.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/TireRubber/tire_rubber.material index 2fc5cec7a4..1cbd3a168a 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/TireRubber/tire_rubber.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/TireRubber/tire_rubber.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WoodPlanks/wood_planks.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WoodPlanks/wood_planks.material index 91f89a0a1b..0320a9a0f7 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WoodPlanks/wood_planks.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WoodPlanks/wood_planks.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/WoodPlanks/wood_planks_diffuse.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WornMetal/warn_metal.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WornMetal/warn_metal.material index cfdba2d2ef..876b404156 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WornMetal/warn_metal.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/WornMetal/warn_metal.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Materials/WornMetal/worn_metal_basecolor.jpg" diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/black.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/black.material index 56759107c9..f610fd7da0 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/black.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/black.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/white.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/blue.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/blue.material index 4691b674e0..1318552396 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/blue.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/blue.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/white.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/green.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/green.material index 6e118ddc7c..c378e48167 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/green.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/green.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/white.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/grey.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/grey.material index 82e8b17127..751561f5d1 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/grey.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/grey.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/white.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/red.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/red.material index 2527f82148..edb1cde854 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/red.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/red.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "Materials/white.material", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/white.material b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/white.material index bfb95933c4..b7383ff5e0 100644 --- a/Gems/AtomContent/ReferenceMaterials/Assets/Materials/white.material +++ b/Gems/AtomContent/ReferenceMaterials/Assets/Materials/white.material @@ -2,5 +2,5 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3 + "materialTypeVersion": 3 } diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material index cc2c9e785b..d15aa620c7 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material index a4bfb73d12..579359b085 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material index fe9c54bc02..88d5fc0fc6 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material index a19afa33e2..7244397ee9 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material index 0c1208d8fb..8a3f289c26 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material index 6aad4d644a..7bc193978f 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material index 302589dc85..a53cbef4e4 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material index 5217a4e4be..6ddb645319 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material index dba44f7b49..e3d310cd15 100644 --- a/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material +++ b/Gems/AtomContent/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "emissive": { "color": [ diff --git a/Gems/AtomContent/Sponza/Assets/objects/lightBlocker_lambert1.material b/Gems/AtomContent/Sponza/Assets/objects/lightBlocker_lambert1.material index c8e9f1f8f7..35677a81c6 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/lightBlocker_lambert1.material +++ b/Gems/AtomContent/Sponza/Assets/objects/lightBlocker_lambert1.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "emissive": { "color": [ diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py index d7280dc8cc..d5593002c9 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py @@ -382,7 +382,7 @@ class MayaToLumberyard(QtWidgets.QWidget): material = {'description': name, 'materialType': default_settings.get('materialType'), 'parentMaterial': default_settings.get('parentMaterial'), - 'propertyLayoutVersion': default_settings.get('propertyLayoutVersion'), + 'materialTypeVersion': default_settings.get('materialTypeVersion'), 'properties': self.get_shader_properties(name, material_type, file_connections)} self.material_definitions[name if name not in self.material_definitions.keys() else self.get_increment(name)] = material diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/pbr.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/pbr.material index 94fc5a16bd..f156f60d33 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/pbr.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/pbr.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseFactor": 1.0, diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/main.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/main.py index 860273d1eb..869f9bafc5 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/main.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/main.py @@ -628,7 +628,7 @@ class MaterialsToLumberyard(QtWidgets.QWidget): 'description': name, 'materialType': default_settings.get('materialType'), 'parentMaterial': default_settings.get('parentMaterial'), - 'propertyLayoutVersion': default_settings.get('propertyLayoutVersion'), + 'materialTypeVersion': default_settings.get('materialTypeVersion'), 'properties': self.get_lumberyard_material_properties(name, dcc_app, material_type, file_connections)} self.lumberyard_materials_dictionary[name if name not in self.lumberyard_materials_dictionary.keys() else self.get_filename_increment(name)] = material diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/materials_export.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/materials_export.py index ea0182bb9b..5243a45ec9 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/materials_export.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/materials_export.py @@ -546,7 +546,7 @@ class MaterialsToLumberyard(QtWidgets.QWidget): 'description': name, 'materialType': default_settings.get('materialType'), 'parentMaterial': default_settings.get('parentMaterial'), - 'propertyLayoutVersion': default_settings.get('propertyLayoutVersion'), + 'materialTypeVersion': default_settings.get('materialTypeVersion'), 'properties': self.get_lumberyard_material_properties(name, material_type, file_connections)} self.material_definitions[name if name not in self.material_definitions.keys() else self.get_filename_increment(name)] = material diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/pbr.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/pbr.material index 94fc5a16bd..f156f60d33 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/pbr.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/dcc_materials/pbr.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseFactor": 1.0, diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standardPBR.template.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standardPBR.template.material index cc2c548174..71d3df3471 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standardPBR.template.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standardPBR.template.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "texcoord": 0 diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/legacy_asset_converter/standardPBR.template.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/legacy_asset_converter/standardPBR.template.material index 78891d6c46..fe2a22a1fe 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/legacy_asset_converter/standardPBR.template.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/legacy_asset_converter/standardPBR.template.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "texcoord": 0 diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/maya_materials_export.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/maya_materials_export.py index ad481ba5b1..e7ec878397 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/maya_materials_export.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/maya_materials_export.py @@ -387,7 +387,7 @@ class MayaToLumberyard(QtWidgets.QWidget): material = {'description': name, 'materialType': default_settings.get('materialType'), 'parentMaterial': default_settings.get('parentMaterial'), - 'propertyLayoutVersion': default_settings.get('propertyLayoutVersion'), + 'materialTypeVersion': default_settings.get('materialTypeVersion'), 'properties': self.get_shader_properties(name, material_type, file_connections)} self.material_definitions[name if name not in self.material_definitions.keys() else self.get_increment(name)] = material diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/standardpbr.template.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/standardpbr.template.material index 30d895f9ac..936b6a0eb1 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/standardpbr.template.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/maya_dcc_materials/standardpbr.template.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseFactor": 1.0, diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/stingraypbs_converter/StandardPBR_AllProperties.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/stingraypbs_converter/StandardPBR_AllProperties.material index 00ff63829f..c5f8395e5e 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/stingraypbs_converter/StandardPBR_AllProperties.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/stingraypbs_converter/StandardPBR_AllProperties.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "occlusion": { "diffuseFactor": 1.0, diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/StandardPBR_AllProperties.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/StandardPBR_AllProperties.material index 7d38d1a1a3..052c0a3dcb 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/StandardPBR_AllProperties.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/StandardPBR_AllProperties.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "texcoord": 0 diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom.material index 26f4dd7508..60b3f7021f 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom.material @@ -1,7 +1,7 @@ { "material": { "baseMaterial": "StaticMesh.basematerial", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "general": { "DiffuseColor": [ 1.0, 0.5, 0.5, 1.0 ], diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom_variant00.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom_variant00.material index 26d30908b8..dc4e2293b9 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom_variant00.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/resources/atom/atom_variant00.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials\\StandardPBR\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "texcoord": 0 diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Resources/Atom/StandardPBR_AllProperties.material b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Resources/Atom/StandardPBR_AllProperties.material index 7d38d1a1a3..052c0a3dcb 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Resources/Atom/StandardPBR_AllProperties.material +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Resources/Atom/StandardPBR_AllProperties.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "general": { "texcoord": 0 diff --git a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_body_mat.material b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_body_mat.material index 2ebfc261b7..8e7c325700 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_body_mat.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_body_mat.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_eye_mat.material b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_eye_mat.material index 87c8b7dab5..61041448c5 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_eye_mat.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_chicken_eye_mat.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.material b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.material index 8d645287f6..1350910624 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.material b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.material index 9340723882..64db8c1444 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.material b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.material index 682be41887..a55b9cc715 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.material b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.material index 6ff5a554d3..0294285d36 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.material b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.material index c65a3afdbe..1f86911beb 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "color": [ diff --git a/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Box_1x1_MiddleGrey.material b/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Box_1x1_MiddleGrey.material index dee26ff898..586af47cbc 100644 --- a/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Box_1x1_MiddleGrey.material +++ b/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Box_1x1_MiddleGrey.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Textures/_Primitives/Middle_Gray_Checker.tif" diff --git a/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Cylinder_1x1_MiddleGrey.material b/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Cylinder_1x1_MiddleGrey.material index dee26ff898..586af47cbc 100644 --- a/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Cylinder_1x1_MiddleGrey.material +++ b/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Cylinder_1x1_MiddleGrey.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Textures/_Primitives/Middle_Gray_Checker.tif" diff --git a/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Sphere_1x1_MiddleGrey.material b/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Sphere_1x1_MiddleGrey.material index 718d951bb2..db9e3624be 100644 --- a/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Sphere_1x1_MiddleGrey.material +++ b/Gems/PrimitiveAssets/Assets/Objects/_Primitives/_Sphere_1x1_MiddleGrey.material @@ -2,7 +2,7 @@ "description": "", "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialTypeVersion": 3, "properties": { "baseColor": { "textureMap": "Textures/_Primitives/Middle_Gray_Checker.tif" diff --git a/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material b/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material index da2fc95293..fca5130653 100644 --- a/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material +++ b/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material @@ -2,7 +2,7 @@ "description": "", "materialType": "PbrTerrain.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 1, + "materialTypeVersion": 1, "properties": { "baseColor": { "color": [ 0.18, 0.18, 0.18 ] From b61238e50c0e7c9dc0c44e757be657a82881903a Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Wed, 19 Jan 2022 12:30:51 -0800 Subject: [PATCH 068/413] Minor fixes to whitespace and comments. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp index 8bf975fd82..f2a9efd896 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp @@ -136,8 +136,6 @@ namespace AZ } } - - template MaterialPropertyValue CastVectorMaterialPropertyValue(const MaterialPropertyValue& value) { @@ -252,8 +250,8 @@ namespace AZ else { // The material asset could be finalized sometime after the original JSON is loaded, and the material type might not have been available - // at that time, so the data type would not be known for each property. So each raw property's type could be based on what appeared in the JSON - // and this is the first opportunity we have to resolve that value with the actual type. For example, a float property could have been specified in + // at that time, so the data type would not be known for each property. So each raw property's type was based on what appeared in the JSON + // and here we have the first opportunity to resolve that value with the actual type. For example, a float property could have been specified in // the JSON as 7 instead of 7.0, which is valid. Similarly, a Color and a Vector3 can both be specified as "[0.0,0.0,0.0]" in the JSON file. MaterialPropertyValue finalValue = value; From 3506a3975987fe1c9af8dd0ed57e89649aa49d80 Mon Sep 17 00:00:00 2001 From: Mikhail Naumov Date: Wed, 19 Jan 2022 15:01:21 -0600 Subject: [PATCH 069/413] Merge branch 'mnaumov/FixingEOOrdering' of https://github.com/aws-lumberyard-dev/o3de into mnaumov/FixingEOOrdering_signofffix Signed-off-by: Mikhail Naumov --- .../Entity/EditorEntityContextBus.h | 7 ++----- .../Entity/EditorEntityHelpers.cpp | 4 ++-- .../Entity/EditorEntityModel.cpp | 9 ++------ .../Entity/EditorEntityModel.h | 4 +--- .../Prefab/PrefabPublicHandler.cpp | 21 +++++++++++++++++-- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h index 30ffb461fa..21c87da7b8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h @@ -201,11 +201,8 @@ namespace AzToolsFramework //! Fired after the EditorEntityContext fails to export the root level slice to the game stream virtual void OnSaveStreamForGameFailure(AZStd::string_view /*failureString*/) {} - //! Fired when the user triggers a clone of ComponentEntity object(s), before operation begins - virtual void OnEntitiesAboutToBeCloned() {} - - //! Fires when the user triggers a clone of ComponentEntity object(s)), after operation completes - virtual void OnEntitiesCloned() {} + //! Preserve entity order when re-parenting entities + virtual void ForceAddEntitiesToBack(bool /*forceAddToBack*/) {} }; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp index 3e256430a2..265924e996 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp @@ -1157,7 +1157,7 @@ namespace AzToolsFramework bool CloneInstantiatedEntities(const EntityIdSet& entitiesToClone, EntityIdSet& clonedEntities) { - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::OnEntitiesAboutToBeCloned); + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, true); ScopedUndoBatch undoBatch("Clone Selection"); // Track the mapping of source to cloned entity. This both helps make sure that an entity is not accidentally @@ -1199,7 +1199,7 @@ namespace AzToolsFramework // Also replace the selection with the entities that have been cloned. Internal::UpdateUndoStackAndSelectClonedEntities(allEntityClonesContainer.m_entities, undoBatch); - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::OnEntitiesCloned); + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, false); for (const AZ::Entity* entity : allEntityClonesContainer.m_entities) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp index e4d4f40bce..88db0b049c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp @@ -643,14 +643,9 @@ namespace AzToolsFramework } } - void EditorEntityModel::OnEntitiesAboutToBeCloned() + void EditorEntityModel::ForceAddEntitiesToBack(bool forceAddToBack) { - m_forceAddToBack = true; - } - - void EditorEntityModel::OnEntitiesCloned() - { - m_forceAddToBack = false; + m_forceAddToBack = forceAddToBack; } void EditorEntityModel::ChildEntityOrderArrayUpdated() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h index 45d3d4ea59..de6b598dfc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h @@ -94,9 +94,7 @@ namespace AzToolsFramework void OnEntityStreamLoadBegin() override; void OnEntityStreamLoadSuccess() override; void OnEntityStreamLoadFailed() override; - void OnEntitiesAboutToBeCloned() override; - void OnEntitiesCloned() override; - + void ForceAddEntitiesToBack(bool forceAddToBack) override; //////////////////////////////////////////////// // AzFramework::EntityContextEventBus::Handler diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index aaf6141e12..99806ca239 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -83,6 +84,20 @@ namespace AzToolsFramework return AZ::Failure(findCommonRootOutcome.TakeError()); } + // order entities by their respective position within Entity Outliner + EditorEntitySortRequestBus::Event( + commonRootEntityId, + [&topLevelEntities](EditorEntitySortRequestBus::Events* sortRequests) + { + AZStd::sort( + topLevelEntities.begin(), topLevelEntities.end(), + [&sortRequests](AZ::Entity* entity1, AZ::Entity* entity2) + { + return sortRequests->GetChildEntityIndex(entity1->GetId()) < + sortRequests->GetChildEntityIndex(entity2->GetId()); + }); + }); + AZ::EntityId containerEntityId; InstanceOptionalReference instanceToCreate; @@ -153,8 +168,6 @@ namespace AzToolsFramework } // Create the Prefab - AZ_Assert(filePath.IsAbsolute(), "CreatePrefabInMemory requires an absolute file path."); - instanceToCreate = prefabEditorEntityOwnershipInterface->CreatePrefab( entities, AZStd::move(instancePtrs), m_prefabLoaderInterface->GenerateRelativePath(filePath), commonRootEntityOwningInstance); @@ -172,6 +185,7 @@ namespace AzToolsFramework // Parent the non-container top level entities to the container entity. // Parenting the top level container entities will be done during the creation of links. + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, true); for (AZ::Entity* topLevelEntity : topLevelEntities) { if (!IsInstanceContainerEntity(topLevelEntity->GetId())) @@ -179,6 +193,7 @@ namespace AzToolsFramework AZ::TransformBus::Event(topLevelEntity->GetId(), &AZ::TransformBus::Events::SetParent, containerEntityId); } } + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, false); // Update the template of the instance since the entities are modified since the template creation. Prefab::PrefabDom serializedInstance; @@ -279,6 +294,8 @@ namespace AzToolsFramework CreatePrefabResult PrefabPublicHandler::CreatePrefabInDisk(const EntityIdList& entityIds, AZ::IO::PathView filePath) { + AZ_Assert(filePath.IsAbsolute(), "CreatePrefabInDisk requires an absolute file path."); + auto result = CreatePrefabInMemory(entityIds, filePath); if (result.IsSuccess()) { From f7c120b4b7571ab790ad34bffbaddafaf4d35717 Mon Sep 17 00:00:00 2001 From: Mikhail Naumov Date: Wed, 19 Jan 2022 15:15:15 -0600 Subject: [PATCH 070/413] PR feedback Signed-off-by: Mikhail Naumov --- .../AzToolsFramework/Entity/EditorEntityContextBus.h | 2 +- .../AzToolsFramework/Entity/EditorEntityHelpers.cpp | 4 ++-- .../AzToolsFramework/Entity/EditorEntityModel.cpp | 2 +- .../AzToolsFramework/Entity/EditorEntityModel.h | 2 +- .../AzToolsFramework/Prefab/PrefabPublicHandler.cpp | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h index 21c87da7b8..1a5ba60bdf 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityContextBus.h @@ -202,7 +202,7 @@ namespace AzToolsFramework virtual void OnSaveStreamForGameFailure(AZStd::string_view /*failureString*/) {} //! Preserve entity order when re-parenting entities - virtual void ForceAddEntitiesToBack(bool /*forceAddToBack*/) {} + virtual void SetForceAddEntitiesToBackFlag(bool /*forceAddToBack*/) {} }; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp index 265924e996..dc0f5e9654 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityHelpers.cpp @@ -1157,7 +1157,7 @@ namespace AzToolsFramework bool CloneInstantiatedEntities(const EntityIdSet& entitiesToClone, EntityIdSet& clonedEntities) { - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, true); + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, true); ScopedUndoBatch undoBatch("Clone Selection"); // Track the mapping of source to cloned entity. This both helps make sure that an entity is not accidentally @@ -1199,7 +1199,7 @@ namespace AzToolsFramework // Also replace the selection with the entities that have been cloned. Internal::UpdateUndoStackAndSelectClonedEntities(allEntityClonesContainer.m_entities, undoBatch); - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, false); + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, false); for (const AZ::Entity* entity : allEntityClonesContainer.m_entities) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp index 88db0b049c..adf062875e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.cpp @@ -643,7 +643,7 @@ namespace AzToolsFramework } } - void EditorEntityModel::ForceAddEntitiesToBack(bool forceAddToBack) + void EditorEntityModel::SetForceAddEntitiesToBackFlag(bool forceAddToBack) { m_forceAddToBack = forceAddToBack; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h index de6b598dfc..c2574a9940 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/EditorEntityModel.h @@ -94,7 +94,7 @@ namespace AzToolsFramework void OnEntityStreamLoadBegin() override; void OnEntityStreamLoadSuccess() override; void OnEntityStreamLoadFailed() override; - void ForceAddEntitiesToBack(bool forceAddToBack) override; + void SetForceAddEntitiesToBackFlag(bool forceAddToBack) override; //////////////////////////////////////////////// // AzFramework::EntityContextEventBus::Handler diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index 99806ca239..bde5de2f64 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -185,7 +185,7 @@ namespace AzToolsFramework // Parent the non-container top level entities to the container entity. // Parenting the top level container entities will be done during the creation of links. - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, true); + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, true); for (AZ::Entity* topLevelEntity : topLevelEntities) { if (!IsInstanceContainerEntity(topLevelEntity->GetId())) @@ -193,7 +193,7 @@ namespace AzToolsFramework AZ::TransformBus::Event(topLevelEntity->GetId(), &AZ::TransformBus::Events::SetParent, containerEntityId); } } - EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, false); + EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, false); // Update the template of the instance since the entities are modified since the template creation. Prefab::PrefabDom serializedInstance; From 4b5f4042f201c35c94f1a60c82975342670972d9 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Wed, 19 Jan 2022 16:05:51 -0800 Subject: [PATCH 071/413] Move common code used by multiple tests into functions to reduce code duplication. Signed-off-by: amzn-sj --- .../Tests/TerrainPhysicsColliderTests.cpp | 117 ++++++-------- Gems/Terrain/Code/Tests/TerrainSystemTest.cpp | 149 ++++++++---------- 2 files changed, 111 insertions(+), 155 deletions(-) diff --git a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp index 859e618983..2d0933c367 100644 --- a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp @@ -69,6 +69,46 @@ protected: m_colliderComponent = m_entity->CreateComponent(Terrain::TerrainPhysicsColliderConfig()); m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); } + + void ProcessRegionLoop(const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, + AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter, + AzFramework::SurfaceData::SurfaceTagWeightList* surfaceTags, + float mockHeight) + { + if (!perPositionCallback) + { + return; + } + + const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); + + AzFramework::SurfaceData::SurfacePoint surfacePoint; + for (size_t y = 0; y < numSamplesY; y++) + { + float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); + for (size_t x = 0; x < numSamplesX; x++) + { + bool terrainExists = false; + float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); + surfacePoint.m_position.Set(fx, fy, mockHeight); + if (surfaceTags) + { + surfacePoint.m_surfaceTags.clear(); + if (fy < 128.0) + { + surfacePoint.m_surfaceTags.push_back(surfaceTags->at(0)); + } + else + { + surfacePoint.m_surfaceTags.push_back(surfaceTags->at(1)); + } + } + perPositionCallback(x, y, surfacePoint, terrainExists); + } + } + } }; TEST_F(TerrainPhysicsColliderComponentTest, ActivateEntityActivateSuccess) @@ -239,30 +279,11 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsRetu NiceMock terrainListener; ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); ON_CALL(terrainListener, ProcessHeightsFromRegion).WillByDefault( - [](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + [this](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) { - if (!perPositionCallback) - { - return; - } - - const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); - const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); - - AzFramework::SurfaceData::SurfacePoint surfacePoint; - for (size_t y = 0; y < numSamplesY; y++) - { - float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); - for (size_t x = 0; x < numSamplesX; x++) - { - bool terrainExists = false; - float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); - surfacePoint.m_position.Set(fx, fy, 0.0f); - perPositionCallback(x, y, surfacePoint, terrainExists); - } - } + ProcessRegionLoop(inRegion, stepSize, perPositionCallback, sampleFilter, nullptr, 0.0f); } ); @@ -300,30 +321,11 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsRelativ NiceMock terrainListener; ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); ON_CALL(terrainListener, ProcessHeightsFromRegion).WillByDefault( - [mockHeight](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + [this, mockHeight](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) { - if (!perPositionCallback) - { - return; - } - - const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); - const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); - - AzFramework::SurfaceData::SurfacePoint surfacePoint; - for (size_t y = 0; y < numSamplesY; y++) - { - float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); - for (size_t x = 0; x < numSamplesX; x++) - { - bool terrainExists = false; - float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); - surfacePoint.m_position.Set(fx, fy, mockHeight); - perPositionCallback(x, y, surfacePoint, terrainExists); - } - } + ProcessRegionLoop(inRegion, stepSize, perPositionCallback, sampleFilter, nullptr, mockHeight); } ); @@ -467,39 +469,16 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsAndM return2.m_surfaceType = tag2; return2.m_weight = 1.0f; + AzFramework::SurfaceData::SurfaceTagWeightList surfaceTags = { return1, return2 }; + NiceMock terrainListener; ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); ON_CALL(terrainListener, ProcessSurfacePointsFromRegion).WillByDefault( - [mockHeight, return1, return2](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, + [this, mockHeight, &surfaceTags](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) { - if (!perPositionCallback) - { - return; - } - - const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); - const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); - - AzFramework::SurfaceData::SurfacePoint surfacePoint; - for (size_t y = 0; y < numSamplesY; y++) - { - float fy = aznumeric_cast(inRegion.GetMin().GetY() + (y * stepSize.GetY())); - for (size_t x = 0; x < numSamplesX; x++) - { - surfacePoint.m_surfaceTags.clear(); - bool terrainExists = false; - float fx = aznumeric_cast(inRegion.GetMin().GetX() + (x * stepSize.GetX())); - surfacePoint.m_position.Set(fx, fy, mockHeight); - if (fy < 128.0) - { - surfacePoint.m_surfaceTags.push_back(return1); - } - surfacePoint.m_surfaceTags.push_back(return2); - perPositionCallback(x, y, surfacePoint, terrainExists); - } - } + ProcessRegionLoop(inRegion, stepSize, perPositionCallback, sampleFilter, &surfaceTags, mockHeight); } ); diff --git a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp index 2eebc1b824..ab0847e634 100644 --- a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp @@ -68,6 +68,7 @@ namespace UnitTest AZStd::unique_ptr> m_boxShapeRequests; AZStd::unique_ptr> m_shapeRequests; AZStd::unique_ptr> m_terrainAreaHeightRequests; + AZStd::unique_ptr> m_terrainAreaSurfaceRequests; void SetUp() override { @@ -84,6 +85,7 @@ namespace UnitTest m_boxShapeRequests.reset(); m_shapeRequests.reset(); m_terrainAreaHeightRequests.reset(); + m_terrainAreaSurfaceRequests.reset(); m_app.Destroy(); } @@ -160,6 +162,49 @@ namespace UnitTest ActivateEntity(entity.get()); return entity; } + + void SetupSurfaceWeightMocks(AZ::Entity* entity, AzFramework::SurfaceData::SurfaceTagWeightList& expectedTags) + { + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + const SurfaceData::SurfaceTag tag3 = SurfaceData::SurfaceTag("tag3"); + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight1; + tagWeight1.m_surfaceType = tag1; + tagWeight1.m_weight = 1.0f; + expectedTags.push_back(tagWeight1); + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight2; + tagWeight2.m_surfaceType = tag2; + tagWeight2.m_weight = 0.7f; + expectedTags.push_back(tagWeight2); + + AzFramework::SurfaceData::SurfaceTagWeight tagWeight3; + tagWeight3.m_surfaceType = tag3; + tagWeight3.m_weight = 0.3f; + expectedTags.push_back(tagWeight3); + + m_terrainAreaSurfaceRequests = AZStd::make_unique>(entity->GetId()); + ON_CALL(*m_terrainAreaSurfaceRequests, GetSurfaceWeights).WillByDefault( + [tagWeight1, tagWeight2, tagWeight3](const AZ::Vector3& position, AzFramework::SurfaceData::SurfaceTagWeightList& surfaceWeights) + { + surfaceWeights.clear(); + float absYPos = fabsf(position.GetY()); + if (absYPos < 1.0f) + { + surfaceWeights.push_back(tagWeight1); + } + else if(absYPos < 2.0f) + { + surfaceWeights.push_back(tagWeight2); + } + else + { + surfaceWeights.push_back(tagWeight3); + } + } + ); + } }; TEST_F(TerrainSystemTest, TrivialCreateDestroy) @@ -921,62 +966,28 @@ namespace UnitTest const AZ::Aabb testRegionBox = AZ::Aabb::CreateFromMinMaxValues(-3.0f, -3.0f, -1.0f, 3.0f, 3.0f, 1.0f); const AZ::Vector2 stepSize(1.0f); - const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); - const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); - const SurfaceData::SurfaceTag tag3 = SurfaceData::SurfaceTag("tag3"); + AzFramework::SurfaceData::SurfaceTagWeightList expectedTags; + SetupSurfaceWeightMocks(entity.get(), expectedTags); - AzFramework::SurfaceData::SurfaceTagWeight tagWeight1; - tagWeight1.m_surfaceType = tag1; - tagWeight1.m_weight = 1.0f; - - AzFramework::SurfaceData::SurfaceTagWeight tagWeight2; - tagWeight2.m_surfaceType = tag2; - tagWeight2.m_weight = 0.7f; - - AzFramework::SurfaceData::SurfaceTagWeight tagWeight3; - tagWeight3.m_surfaceType = tag3; - tagWeight3.m_weight = 0.3f; - - NiceMock mockSurfaceRequests(entity->GetId()); - ON_CALL(mockSurfaceRequests, GetSurfaceWeights).WillByDefault( - [&tagWeight1, &tagWeight2, &tagWeight3](const AZ::Vector3& position, AzFramework::SurfaceData::SurfaceTagWeightList& surfaceWeights) - { - surfaceWeights.clear(); - float absYPos = fabsf(position.GetY()); - if (absYPos < 1.0f) - { - surfaceWeights.push_back(tagWeight1); - } - else if(absYPos < 2.0f) - { - surfaceWeights.push_back(tagWeight2); - } - else - { - surfaceWeights.push_back(tagWeight3); - } - } - ); - - auto perPositionCallback = [&tagWeight1, &tagWeight2, &tagWeight3](size_t xIndex, size_t yIndex, + auto perPositionCallback = [&expectedTags](size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { constexpr float epsilon = 0.0001f; float absYPos = fabsf(surfacePoint.m_position.GetY()); if (absYPos < 1.0f) { - EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight1.m_surfaceType); - EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight1.m_weight, epsilon); + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, expectedTags[0].m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, expectedTags[0].m_weight, epsilon); } else if(absYPos < 2.0f) { - EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight2.m_surfaceType); - EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight2.m_weight, epsilon); + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, expectedTags[1].m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, expectedTags[1].m_weight, epsilon); } else { - EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight3.m_surfaceType); - EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight3.m_weight, epsilon); + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, expectedTags[2].m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, expectedTags[2].m_weight, epsilon); } }; @@ -1001,44 +1012,10 @@ namespace UnitTest const AZ::Aabb testRegionBox = AZ::Aabb::CreateFromMinMaxValues(-3.0f, -3.0f, -1.0f, 3.0f, 3.0f, 1.0f); const AZ::Vector2 stepSize(1.0f); - const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); - const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); - const SurfaceData::SurfaceTag tag3 = SurfaceData::SurfaceTag("tag3"); + AzFramework::SurfaceData::SurfaceTagWeightList expectedTags; + SetupSurfaceWeightMocks(entity.get(), expectedTags); - AzFramework::SurfaceData::SurfaceTagWeight tagWeight1; - tagWeight1.m_surfaceType = tag1; - tagWeight1.m_weight = 1.0f; - - AzFramework::SurfaceData::SurfaceTagWeight tagWeight2; - tagWeight2.m_surfaceType = tag2; - tagWeight2.m_weight = 0.7f; - - AzFramework::SurfaceData::SurfaceTagWeight tagWeight3; - tagWeight3.m_surfaceType = tag3; - tagWeight3.m_weight = 0.3f; - - NiceMock mockSurfaceRequests(entity->GetId()); - ON_CALL(mockSurfaceRequests, GetSurfaceWeights).WillByDefault( - [&tagWeight1, &tagWeight2, &tagWeight3](const AZ::Vector3& position, AzFramework::SurfaceData::SurfaceTagWeightList& surfaceWeights) - { - surfaceWeights.clear(); - float absYPos = fabsf(position.GetY()); - if (absYPos < 1.0f) - { - surfaceWeights.push_back(tagWeight1); - } - else if(absYPos < 2.0f) - { - surfaceWeights.push_back(tagWeight2); - } - else - { - surfaceWeights.push_back(tagWeight3); - } - } - ); - - auto perPositionCallback = [&tagWeight1, &tagWeight2, &tagWeight3](size_t xIndex, size_t yIndex, + auto perPositionCallback = [&expectedTags](size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { constexpr float epsilon = 0.0001f; @@ -1049,18 +1026,18 @@ namespace UnitTest float absYPos = fabsf(surfacePoint.m_position.GetY()); if (absYPos < 1.0f) { - EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight1.m_surfaceType); - EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight1.m_weight, epsilon); + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, expectedTags[0].m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, expectedTags[0].m_weight, epsilon); } else if(absYPos < 2.0f) { - EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight2.m_surfaceType); - EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight2.m_weight, epsilon); + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, expectedTags[1].m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, expectedTags[1].m_weight, epsilon); } else { - EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, tagWeight3.m_surfaceType); - EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, tagWeight3.m_weight, epsilon); + EXPECT_EQ(surfacePoint.m_surfaceTags[0].m_surfaceType, expectedTags[2].m_surfaceType); + EXPECT_NEAR(surfacePoint.m_surfaceTags[0].m_weight, expectedTags[2].m_weight, epsilon); } }; From 66f0f1cf5a03c1196ef029f95cac99f58970d471 Mon Sep 17 00:00:00 2001 From: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> Date: Wed, 19 Jan 2022 17:55:05 -0800 Subject: [PATCH 072/413] Duplicate engine detection and help in Project Manager (#6984) Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> --- .../ProjectManager/Source/Application.cpp | 86 ++++++++ .../Tools/ProjectManager/Source/Application.h | 1 + Code/Tools/ProjectManager/Source/EngineInfo.h | 5 +- .../Source/EngineSettingsScreen.cpp | 5 +- .../Source/GemRepo/GemRepoScreen.cpp | 19 +- .../ProjectManager/Source/ProjectUtils.cpp | 19 ++ .../ProjectManager/Source/ProjectUtils.h | 9 + .../ProjectManager/Source/PythonBindings.cpp | 185 ++++++++++-------- .../ProjectManager/Source/PythonBindings.h | 12 +- .../Source/PythonBindingsInterface.h | 24 ++- scripts/o3de/o3de/engine_properties.py | 5 + scripts/o3de/o3de/manifest.py | 108 +++++----- 12 files changed, 324 insertions(+), 154 deletions(-) diff --git a/Code/Tools/ProjectManager/Source/Application.cpp b/Code/Tools/ProjectManager/Source/Application.cpp index 29e0df3c3a..08a812999f 100644 --- a/Code/Tools/ProjectManager/Source/Application.cpp +++ b/Code/Tools/ProjectManager/Source/Application.cpp @@ -21,6 +21,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -111,6 +112,11 @@ namespace O3DE::ProjectManager } } + if (!RegisterEngine(interactive)) + { + return false; + } + const AZ::CommandLine* commandLine = GetCommandLine(); AZ_Assert(commandLine, "Failed to get command line"); @@ -165,6 +171,86 @@ namespace O3DE::ProjectManager return m_entity != nullptr; } + bool Application::RegisterEngine(bool interactive) + { + // get this engine's info + auto engineInfoOutcome = m_pythonBindings->GetEngineInfo(); + if (!engineInfoOutcome) + { + if (interactive) + { + QMessageBox::critical(nullptr, + QObject::tr("Failed to get engine info"), + QObject::tr("A valid engine.json could not be found or loaded. " + "Please verify a valid engine.json file exists in %1") + .arg(GetEngineRoot())); + } + + AZ_Error("Project Manager", false, "Failed to get engine info"); + return false; + } + + EngineInfo engineInfo = engineInfoOutcome.GetValue(); + if (engineInfo.m_registered) + { + return true; + } + + bool forceRegistration = false; + + // check if an engine with this name is already registered + auto existingEngineResult = m_pythonBindings->GetEngineInfo(engineInfo.m_name); + if (existingEngineResult) + { + if (!interactive) + { + AZ_Error("Project Manager", false, "An engine with the name %s is already registered with the path %s", + engineInfo.m_name.toUtf8().constData(), engineInfo.m_path.toUtf8().constData()); + return false; + } + + // get the updated engine name unless the user wants to cancel + bool okPressed = false; + const EngineInfo& otherEngineInfo = existingEngineResult.GetValue(); + + engineInfo.m_name = QInputDialog::getText(nullptr, + QObject::tr("Engine '%1' already registered").arg(engineInfo.m_name), + QObject::tr("An engine named '%1' is already registered.

" + "Current path
%2

" + "New path
%3

" + "Press 'OK' to force registration, or provide a new engine name below.
" + "Alternatively, press `Cancel` to close the Project Manager and resolve the issue manually.") + .arg(engineInfo.m_name, otherEngineInfo.m_path, engineInfo.m_path), + QLineEdit::Normal, + engineInfo.m_name, + &okPressed); + + if (!okPressed) + { + // user elected not to change the name or force registration + return false; + } + + forceRegistration = true; + } + + auto registerOutcome = m_pythonBindings->SetEngineInfo(engineInfo, forceRegistration); + if (!registerOutcome) + { + if (interactive) + { + ProjectUtils::DisplayDetailedError(QObject::tr("Failed to register engine"), registerOutcome); + } + + AZ_Error("Project Manager", false, "Failed to register engine %s : %s", + engineInfo.m_path.toUtf8().constData(), registerOutcome.GetError().first.c_str()); + + return false; + } + + return true; + } + void Application::TearDown() { if (m_entity) diff --git a/Code/Tools/ProjectManager/Source/Application.h b/Code/Tools/ProjectManager/Source/Application.h index ad55694b18..8f633b28c4 100644 --- a/Code/Tools/ProjectManager/Source/Application.h +++ b/Code/Tools/ProjectManager/Source/Application.h @@ -34,6 +34,7 @@ namespace O3DE::ProjectManager private: bool InitLog(const char* logName); + bool RegisterEngine(bool interactive); AZStd::unique_ptr m_pythonBindings; QSharedPointer m_app; diff --git a/Code/Tools/ProjectManager/Source/EngineInfo.h b/Code/Tools/ProjectManager/Source/EngineInfo.h index 5fd3faf2ea..c28aede030 100644 --- a/Code/Tools/ProjectManager/Source/EngineInfo.h +++ b/Code/Tools/ProjectManager/Source/EngineInfo.h @@ -25,13 +25,16 @@ namespace O3DE::ProjectManager QString m_name; QString m_thirdPartyPath; - // from o3de_manifest.json QString m_path; + + // from o3de_manifest.json QString m_defaultProjectsFolder; QString m_defaultGemsFolder; QString m_defaultTemplatesFolder; QString m_defaultRestrictedFolder; + bool m_registered = false; + bool IsValid() const; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp index c7df00f423..26f5b8ae11 100644 --- a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -114,10 +115,10 @@ namespace O3DE::ProjectManager engineInfo.m_defaultGemsFolder = m_defaultGems->lineEdit()->text(); engineInfo.m_defaultTemplatesFolder = m_defaultProjectTemplates->lineEdit()->text(); - bool result = PythonBindingsInterface::Get()->SetEngineInfo(engineInfo); + auto result = PythonBindingsInterface::Get()->SetEngineInfo(engineInfo); if (!result) { - QMessageBox::critical(this, tr("Engine Settings"), tr("Failed to save engine settings.")); + ProjectUtils::DisplayDetailedError(tr("Failed to save engine settings"), result, this); } } else diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp index f62c30c280..843538d9da 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -92,8 +93,7 @@ namespace O3DE::ProjectManager return; } - AZ::Outcome < void, - AZStd::pair> addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); + auto addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); if (addGemRepoResult.IsSuccess()) { Reinit(); @@ -102,20 +102,7 @@ namespace O3DE::ProjectManager else { QString failureMessage = tr("Failed to add gem repo: %1.").arg(repoUri); - if (!addGemRepoResult.GetError().second.empty()) - { - QMessageBox addRepoError; - addRepoError.setIcon(QMessageBox::Critical); - addRepoError.setWindowTitle(failureMessage); - addRepoError.setText(addGemRepoResult.GetError().first.c_str()); - addRepoError.setDetailedText(addGemRepoResult.GetError().second.c_str()); - addRepoError.exec(); - } - else - { - QMessageBox::critical(this, failureMessage, addGemRepoResult.GetError().first.c_str()); - } - + ProjectUtils::DisplayDetailedError(failureMessage, addGemRepoResult, this); AZ_Error("Project Manager", false, failureMessage.toUtf8()); } } diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index b7748d8aa2..209140a004 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -659,5 +659,24 @@ namespace O3DE::ProjectManager return AZ::Success(QString(projectBuildPath.c_str())); } + void DisplayDetailedError(const QString& title, const AZ::Outcome>& outcome, QWidget* parent) + { + const AZStd::string& generalError = outcome.GetError().first; + const AZStd::string& detailedError = outcome.GetError().second; + + if (!detailedError.empty()) + { + QMessageBox errorDialog(parent); + errorDialog.setIcon(QMessageBox::Critical); + errorDialog.setWindowTitle(title); + errorDialog.setText(generalError.c_str()); + errorDialog.setDetailedText(detailedError.c_str()); + errorDialog.exec(); + } + else + { + QMessageBox::critical(parent, title, generalError.c_str()); + } + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.h b/Code/Tools/ProjectManager/Source/ProjectUtils.h index 713803c20b..8602ffa692 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.h +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.h @@ -98,5 +98,14 @@ namespace O3DE::ProjectManager */ AZ::IO::FixedMaxPath GetEditorExecutablePath(const AZ::IO::PathView& projectPath); + + /** + * Display a dialog with general and detailed sections for the given AZ::Outcome + * @param title Dialog title + * @param outcome The AZ::Outcome with general and detailed error messages + * @param parent Optional QWidget parent + */ + void DisplayDetailedError(const QString& title, const AZ::Outcome>& outcome, QWidget* parent = nullptr); + } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 12f97e6d2e..00ece7396d 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -312,6 +312,7 @@ namespace O3DE::ProjectManager m_register = pybind11::module::import("o3de.register"); m_manifest = pybind11::module::import("o3de.manifest"); m_engineTemplate = pybind11::module::import("o3de.engine_template"); + m_engineProperties = pybind11::module::import("o3de.engine_properties"); m_enableGemProject = pybind11::module::import("o3de.enable_gem"); m_disableGemProject = pybind11::module::import("o3de.disable_gem"); m_editProjectProperties = pybind11::module::import("o3de.project_properties"); @@ -319,9 +320,6 @@ namespace O3DE::ProjectManager m_repo = pybind11::module::import("o3de.repo"); m_pathlib = pybind11::module::import("pathlib"); - // make sure the engine is registered - RegisterThisEngine(); - m_pythonStarted = !PyErr_Occurred(); return m_pythonStarted; } @@ -346,36 +344,6 @@ namespace O3DE::ProjectManager return !PyErr_Occurred(); } - bool PythonBindings::RegisterThisEngine() - { - bool registrationResult = true; // already registered is considered successful - bool pythonResult = ExecuteWithLock( - [&] - { - // check current engine path against all other registered engines - // to see if we are already registered - auto allEngines = m_manifest.attr("get_engines")(); - if (pybind11::isinstance(allEngines)) - { - for (auto engine : allEngines) - { - AZ::IO::FixedMaxPath enginePath(Py_To_String(engine)); - if (enginePath.Compare(m_enginePath) == 0) - { - return; - } - } - } - - auto result = m_register.attr("register")(QString_To_Py_Path(QString(m_enginePath.c_str()))); - registrationResult = (result.cast() == 0); - }); - - bool finalResult = (registrationResult && pythonResult); - AZ_Assert(finalResult, "Registration of this engine failed!"); - return finalResult; - } - AZ::Outcome PythonBindings::ExecuteWithLockErrorHandling(AZStd::function executionCallback) { if (!Py_IsInitialized()) @@ -407,16 +375,22 @@ namespace O3DE::ProjectManager return ExecuteWithLockErrorHandling(executionCallback).IsSuccess(); } - AZ::Outcome PythonBindings::GetEngineInfo() + EngineInfo PythonBindings::EngineInfoFromPath(pybind11::handle enginePath) { EngineInfo engineInfo; - bool result = ExecuteWithLock([&] { - auto enginePath = m_manifest.attr("get_this_engine_path")(); + try + { + auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); + if (pybind11::isinstance(engineData)) + { + engineInfo.m_version = Py_To_String_Optional(engineData, "O3DEVersion", "0.0.0.0"); + engineInfo.m_name = Py_To_String_Optional(engineData, "engine_name", "O3DE"); + engineInfo.m_path = Py_To_String(enginePath); + } auto o3deData = m_manifest.attr("load_o3de_manifest")(); if (pybind11::isinstance(o3deData)) { - engineInfo.m_path = Py_To_String(enginePath); auto defaultGemsFolder = m_manifest.attr("get_o3de_gems_folder")(); engineInfo.m_defaultGemsFolder = Py_To_String_Optional(o3deData, "default_gems_folder", Py_To_String(defaultGemsFolder)); @@ -433,19 +407,59 @@ namespace O3DE::ProjectManager engineInfo.m_thirdPartyPath = Py_To_String_Optional(o3deData, "default_third_party_folder", Py_To_String(defaultThirdPartyFolder)); } - auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); - if (pybind11::isinstance(engineData)) + // check if engine path is registered + auto allEngines = m_manifest.attr("get_engines")(); + if (pybind11::isinstance(allEngines)) { - try + const AZ::IO::FixedMaxPath enginePathFixed(Py_To_String(enginePath)); + for (auto engine : allEngines) { - engineInfo.m_version = Py_To_String_Optional(engineData, "O3DEVersion", "0.0.0.0"); - engineInfo.m_name = Py_To_String_Optional(engineData, "engine_name", "O3DE"); - } - catch ([[maybe_unused]] const std::exception& e) - { - AZ_Warning("PythonBindings", false, "Failed to get EngineInfo from %s", Py_To_String(enginePath)); + AZ::IO::FixedMaxPath otherEnginePath(Py_To_String(engine)); + if (otherEnginePath.Compare(enginePathFixed) == 0) + { + engineInfo.m_registered = true; + break; + } } } + } + catch ([[maybe_unused]] const std::exception& e) + { + AZ_Warning("PythonBindings", false, "Failed to get EngineInfo from %s", Py_To_String(enginePath)); + } + return engineInfo; + } + + AZ::Outcome PythonBindings::GetEngineInfo() + { + EngineInfo engineInfo; + + bool result = ExecuteWithLock([&] { + auto enginePath = m_manifest.attr("get_this_engine_path")(); + engineInfo = EngineInfoFromPath(enginePath); + }); + + if (!result || !engineInfo.IsValid()) + { + return AZ::Failure(); + } + else + { + return AZ::Success(AZStd::move(engineInfo)); + } + } + + AZ::Outcome PythonBindings::GetEngineInfo(const QString& engineName) + { + EngineInfo engineInfo; + bool result = ExecuteWithLock([&] { + auto enginePathResult = m_manifest.attr("get_registered")(QString_To_Py_String(engineName)); + + // if a valid registered object is not found None is returned + if (!pybind11::isinstance(enginePathResult)) + { + engineInfo = EngineInfoFromPath(enginePathResult); + } }); if (!result || !engineInfo.IsValid()) @@ -458,10 +472,32 @@ namespace O3DE::ProjectManager } } - bool PythonBindings::SetEngineInfo(const EngineInfo& engineInfo) + IPythonBindings::DetailedOutcome PythonBindings::SetEngineInfo(const EngineInfo& engineInfo, bool force) { - bool result = ExecuteWithLock([&] { - auto registrationResult = m_register.attr("register")( + bool registrationSuccess = false; + bool pythonSuccess = ExecuteWithLock([&] { + + EngineInfo currentEngine = EngineInfoFromPath(QString_To_Py_Path(engineInfo.m_path)); + + // be kind to source control and avoid needlessly updating engine.json + if (currentEngine.IsValid() && + (currentEngine.m_name.compare(engineInfo.m_name) != 0 || currentEngine.m_version.compare(engineInfo.m_version) != 0)) + { + auto enginePropsResult = m_engineProperties.attr("edit_engine_props")( + QString_To_Py_Path(engineInfo.m_path), + pybind11::none(), // existing engine_name + QString_To_Py_String(engineInfo.m_name), + QString_To_Py_String(engineInfo.m_version) + ); + + if (enginePropsResult.cast() != 0) + { + // do not proceed with registration + return; + } + } + + auto result = m_register.attr("register")( QString_To_Py_Path(engineInfo.m_path), pybind11::none(), // project_path pybind11::none(), // gem_path @@ -474,16 +510,22 @@ namespace O3DE::ProjectManager QString_To_Py_Path(engineInfo.m_defaultGemsFolder), QString_To_Py_Path(engineInfo.m_defaultTemplatesFolder), pybind11::none(), // default_restricted_folder - QString_To_Py_Path(engineInfo.m_thirdPartyPath) - ); + QString_To_Py_Path(engineInfo.m_thirdPartyPath), + pybind11::none(), // external_subdir_engine_path + pybind11::none(), // external_subdir_project_path + false, // remove + force + ); - if (registrationResult.cast() != 0) - { - result = false; - } + registrationSuccess = result.cast() == 0; }); - return result; + if (pythonSuccess && registrationSuccess) + { + return AZ::Success(); + } + + return AZ::Failure(GetErrorPair()); } AZ::Outcome PythonBindings::GetGemInfo(const QString& path, const QString& projectPath) @@ -1064,7 +1106,7 @@ namespace O3DE::ProjectManager return result && refreshResult; } - AZ::Outcome> PythonBindings::AddGemRepo(const QString& repoUri) + IPythonBindings::DetailedOutcome PythonBindings::AddGemRepo(const QString& repoUri) { bool registrationResult = false; bool result = ExecuteWithLock( @@ -1080,7 +1122,7 @@ namespace O3DE::ProjectManager if (!result || !registrationResult) { - return AZ::Failure>(GetSimpleDetailedErrorPair()); + return AZ::Failure(GetErrorPair()); } return AZ::Success(); @@ -1170,13 +1212,10 @@ namespace O3DE::ProjectManager return gemRepoInfo; } -//#define MOCK_GEM_REPO_INFO true - AZ::Outcome, AZStd::string> PythonBindings::GetAllGemRepoInfos() { QVector gemRepos; -#ifndef MOCK_GEM_REPO_INFO auto result = ExecuteWithLockErrorHandling( [&] { @@ -1189,18 +1228,6 @@ namespace O3DE::ProjectManager { return AZ::Failure(result.GetError().c_str()); } -#else - GemRepoInfo mockJohnRepo("JohnCreates", "John Smith", QDateTime(QDate(2021, 8, 31), QTime(11, 57)), true); - mockJohnRepo.m_summary = "John's Summary. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitudin dapibus urna"; - mockJohnRepo.m_repoUri = "https://github.com/o3de/o3de"; - mockJohnRepo.m_additionalInfo = "John's additional info. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitu."; - gemRepos.push_back(mockJohnRepo); - - GemRepoInfo mockJaneRepo("JanesGems", "Jane Doe", QDateTime(QDate(2021, 9, 10), QTime(18, 23)), false); - mockJaneRepo.m_summary = "Jane's Summary."; - mockJaneRepo.m_repoUri = "https://github.com/o3de/o3de.org"; - gemRepos.push_back(mockJaneRepo); -#endif // MOCK_GEM_REPO_INFO std::sort(gemRepos.begin(), gemRepos.end()); return AZ::Success(AZStd::move(gemRepos)); @@ -1261,7 +1288,7 @@ namespace O3DE::ProjectManager return AZ::Success(AZStd::move(gemInfos)); } - AZ::Outcome> PythonBindings::DownloadGem( + IPythonBindings::DetailedOutcome PythonBindings::DownloadGem( const QString& gemName, std::function gemProgressCallback, bool force) { // This process is currently limited to download a single gem at a time. @@ -1290,12 +1317,12 @@ namespace O3DE::ProjectManager if (!result.IsSuccess()) { - AZStd::pair pythonRunError(result.GetError(), result.GetError()); - return AZ::Failure>(AZStd::move(pythonRunError)); + IPythonBindings::ErrorPair pythonRunError(result.GetError(), result.GetError()); + return AZ::Failure(AZStd::move(pythonRunError)); } else if (!downloadSucceeded) { - return AZ::Failure>(GetSimpleDetailedErrorPair()); + return AZ::Failure(GetErrorPair()); } return AZ::Success(); @@ -1322,13 +1349,13 @@ namespace O3DE::ProjectManager return result && updateAvaliableResult; } - AZStd::pair PythonBindings::GetSimpleDetailedErrorPair() + IPythonBindings::ErrorPair PythonBindings::GetErrorPair() { AZStd::string detailedString = m_pythonErrorStrings.size() == 1 ? "" : AZStd::accumulate(m_pythonErrorStrings.begin(), m_pythonErrorStrings.end(), AZStd::string("")); - return AZStd::pair(m_pythonErrorStrings.front(), detailedString); + return IPythonBindings::ErrorPair(m_pythonErrorStrings.front(), detailedString); } void PythonBindings::AddErrorString(AZStd::string errorString) diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.h b/Code/Tools/ProjectManager/Source/PythonBindings.h index 48841b6565..e2a8109128 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.h +++ b/Code/Tools/ProjectManager/Source/PythonBindings.h @@ -35,7 +35,8 @@ namespace O3DE::ProjectManager // Engine AZ::Outcome GetEngineInfo() override; - bool SetEngineInfo(const EngineInfo& engineInfo) override; + AZ::Outcome GetEngineInfo(const QString& engineName) override; + DetailedOutcome SetEngineInfo(const EngineInfo& engineInfo, bool force = false) override; // Gem AZ::Outcome GetGemInfo(const QString& path, const QString& projectPath = {}) override; @@ -62,12 +63,12 @@ namespace O3DE::ProjectManager // Gem Repos AZ::Outcome RefreshGemRepo(const QString& repoUri) override; bool RefreshAllGemRepos() override; - AZ::Outcome> AddGemRepo(const QString& repoUri) override; + DetailedOutcome AddGemRepo(const QString& repoUri) override; bool RemoveGemRepo(const QString& repoUri) override; AZ::Outcome, AZStd::string> GetAllGemRepoInfos() override; AZ::Outcome, AZStd::string> GetGemInfosForRepo(const QString& repoUri) override; AZ::Outcome, AZStd::string> GetGemInfosForAllRepos() override; - AZ::Outcome> DownloadGem( + DetailedOutcome DownloadGem( const QString& gemName, std::function gemProgressCallback, bool force = false) override; void CancelDownload() override; bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) override; @@ -80,14 +81,14 @@ namespace O3DE::ProjectManager AZ::Outcome ExecuteWithLockErrorHandling(AZStd::function executionCallback); bool ExecuteWithLock(AZStd::function executionCallback); + EngineInfo EngineInfoFromPath(pybind11::handle enginePath); GemInfo GemInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); GemRepoInfo GetGemRepoInfo(pybind11::handle repoUri); ProjectInfo ProjectInfoFromPath(pybind11::handle path); ProjectTemplateInfo ProjectTemplateInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); AZ::Outcome GemRegistration(const QString& gemPath, const QString& projectPath, bool remove = false); - bool RegisterThisEngine(); bool StopPython(); - AZStd::pair GetSimpleDetailedErrorPair(); + IPythonBindings::ErrorPair GetErrorPair(); bool m_pythonStarted = false; @@ -96,6 +97,7 @@ namespace O3DE::ProjectManager AZStd::recursive_mutex m_lock; pybind11::handle m_engineTemplate; + pybind11::handle m_engineProperties; pybind11::handle m_cmake; pybind11::handle m_register; pybind11::handle m_manifest; diff --git a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h index c7c8af2ce1..a42ff310c3 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h +++ b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h @@ -31,6 +31,10 @@ namespace O3DE::ProjectManager IPythonBindings() = default; virtual ~IPythonBindings() = default; + //! First string in pair is general error, second is detailed + using ErrorPair = AZStd::pair; + using DetailedOutcome = AZ::Outcome; + /** * Get whether Python was started or not. All Python functionality will fail if Python * failed to start. @@ -49,17 +53,25 @@ namespace O3DE::ProjectManager // Engine /** - * Get info about the engine + * Get info about the current engine * @return an outcome with EngineInfo on success */ virtual AZ::Outcome GetEngineInfo() = 0; /** - * Set info about the engine - * @param engineInfo an EngineInfo object + * Get info about an engine by name + * @param engineName The name of the engine to get info about + * @return an outcome with EngineInfo on success */ - virtual bool SetEngineInfo(const EngineInfo& engineInfo) = 0; + virtual AZ::Outcome GetEngineInfo(const QString& engineName) = 0; + /** + * Set info about the engine + * @param force True to force registration even if an engine with the same name is already registered + * @param engineInfo an EngineInfo object + * @return a detailed error outcome on failure. + */ + virtual DetailedOutcome SetEngineInfo(const EngineInfo& engineInfo, bool force = false) = 0; // Gems @@ -202,7 +214,7 @@ namespace O3DE::ProjectManager * @param repoUri the absolute filesystem path or url to the gem repo. * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual AZ::Outcome> AddGemRepo(const QString& repoUri) = 0; + virtual DetailedOutcome AddGemRepo(const QString& repoUri) = 0; /** * Unregisters this gem repo with the current engine. @@ -237,7 +249,7 @@ namespace O3DE::ProjectManager * @param force should we forcibly overwrite the old version of the gem. * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual AZ::Outcome> DownloadGem( + virtual DetailedOutcome DownloadGem( const QString& gemName, std::function gemProgressCallback, bool force = false) = 0; /** diff --git a/scripts/o3de/o3de/engine_properties.py b/scripts/o3de/o3de/engine_properties.py index 92930dbb1c..56cb71f258 100644 --- a/scripts/o3de/o3de/engine_properties.py +++ b/scripts/o3de/o3de/engine_properties.py @@ -25,6 +25,11 @@ def edit_engine_props(engine_path: pathlib.Path = None, if not engine_path and not engine_name: logger.error(f'Either a engine path or a engine name must be supplied to lookup engine.json') return 1 + + if not new_name and not new_version: + logger.error('A new engine name or new version, or both must be supplied.') + return 1 + if not engine_path: engine_path = manifest.get_registered(engine_name=engine_name) diff --git a/scripts/o3de/o3de/manifest.py b/scripts/o3de/o3de/manifest.py index e46b819a7c..c06a4d12fc 100644 --- a/scripts/o3de/o3de/manifest.py +++ b/scripts/o3de/o3de/manifest.py @@ -599,75 +599,93 @@ def get_registered(engine_name: str = None, engine_path = pathlib.Path(engine).resolve() engine_json = engine_path / 'engine.json' - with engine_json.open('r') as f: - try: - engine_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{engine_json} failed to load: {str(e)}') - else: - this_engines_name = engine_json_data['engine_name'] - if this_engines_name == engine_name: - return engine_path + if not pathlib.Path(engine_json).is_file(): + logger.warning(f'{engine_json} does not exist') + else: + with engine_json.open('r') as f: + try: + engine_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{engine_json} failed to load: {str(e)}') + else: + this_engines_name = engine_json_data['engine_name'] + if this_engines_name == engine_name: + return engine_path + engines_path = json_data.get('engines_path', {}) + if engine_name in engines_path: + return pathlib.Path(engines_path[engine_name]).resolve() elif isinstance(project_name, str): projects = get_all_projects() for project_path in projects: project_path = pathlib.Path(project_path).resolve() project_json = project_path / 'project.json' - with project_json.open('r') as f: - try: - project_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{project_json} failed to load: {str(e)}') - else: - this_projects_name = project_json_data['project_name'] - if this_projects_name == project_name: - return project_path + if not pathlib.Path(project_json).is_file(): + logger.warning(f'{project_json} does not exist') + else: + with project_json.open('r') as f: + try: + project_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{project_json} failed to load: {str(e)}') + else: + this_projects_name = project_json_data['project_name'] + if this_projects_name == project_name: + return project_path elif isinstance(gem_name, str): gems = get_all_gems(project_path) for gem_path in gems: gem_path = pathlib.Path(gem_path).resolve() gem_json = gem_path / 'gem.json' - with gem_json.open('r') as f: - try: - gem_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{gem_json} failed to load: {str(e)}') - else: - this_gems_name = gem_json_data['gem_name'] - if this_gems_name == gem_name: - return gem_path + if not pathlib.Path(gem_json).is_file(): + logger.warning(f'{gem_json} does not exist') + else: + with gem_json.open('r') as f: + try: + gem_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{gem_json} failed to load: {str(e)}') + else: + this_gems_name = gem_json_data['gem_name'] + if this_gems_name == gem_name: + return gem_path elif isinstance(template_name, str): templates = get_all_templates(project_path) for template_path in templates: template_path = pathlib.Path(template_path).resolve() template_json = template_path / 'template.json' - with template_json.open('r') as f: - try: - template_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{template_path} failed to load: {str(e)}') - else: - this_templates_name = template_json_data['template_name'] - if this_templates_name == template_name: - return template_path + if not pathlib.Path(template_json).is_file(): + logger.warning(f'{template_json} does not exist') + else: + with template_json.open('r') as f: + try: + template_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{template_path} failed to load: {str(e)}') + else: + this_templates_name = template_json_data['template_name'] + if this_templates_name == template_name: + return template_path elif isinstance(restricted_name, str): restricted = get_all_restricted(project_path) for restricted_path in restricted: restricted_path = pathlib.Path(restricted_path).resolve() restricted_json = restricted_path / 'restricted.json' - with restricted_json.open('r') as f: - try: - restricted_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{restricted_json} failed to load: {str(e)}') - else: - this_restricted_name = restricted_json_data['restricted_name'] - if this_restricted_name == restricted_name: - return restricted_path + if not pathlib.Path(restricted_json).is_file(): + logger.warning(f'{restricted_json} does not exist') + else: + with restricted_json.open('r') as f: + try: + restricted_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{restricted_json} failed to load: {str(e)}') + else: + this_restricted_name = restricted_json_data['restricted_name'] + if this_restricted_name == restricted_name: + return restricted_path elif isinstance(default_folder, str): if default_folder == 'engines': From 7bba4172ece3aa4d44c9ac1970d7e8c667fc582a Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Wed, 19 Jan 2022 18:04:56 -0800 Subject: [PATCH 073/413] Add a GetNumSamplesFromRegion function which returns the number of samples given a region and step size. Update Terrain Feature Processor to use this function to get the number of samples instead of computing num samples independently. Signed-off-by: amzn-sj --- .../Terrain/TerrainDataRequestBus.h | 4 ++++ .../Mocks/Terrain/MockTerrainDataRequestBus.h | 2 ++ .../TerrainFeatureProcessor.cpp | 24 +++++++++++-------- .../Source/TerrainSystem/TerrainSystem.cpp | 10 ++++++++ .../Code/Source/TerrainSystem/TerrainSystem.h | 4 ++++ 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h index 0d16bf3460..9379485646 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h @@ -161,6 +161,10 @@ namespace AzFramework SurfacePointListFillCallback perPositionCallback, Sampler sampleFilter = Sampler::DEFAULT) const = 0; + //! Returns the number of samples for a given region and step size. + virtual AZStd::pair GetNumSamplesFromRegion(const AZ::Aabb& inRegion, + const AZ::Vector2& stepSize) const = 0; + //! Given a region(aabb) and a step size, call the provided callback function with surface data corresponding to the //! coordinates in the region. virtual void ProcessHeightsFromRegion(const AZ::Aabb& inRegion, diff --git a/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h b/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h index f3a6cc07b3..52ac28ef63 100644 --- a/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h +++ b/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h @@ -92,6 +92,8 @@ namespace UnitTest ProcessSurfaceWeightsFromListOfVector2, void(const AZStd::span&, AzFramework::Terrain::SurfacePointListFillCallback, Sampler)); MOCK_CONST_METHOD3( ProcessSurfacePointsFromListOfVector2, void(const AZStd::span&, AzFramework::Terrain::SurfacePointListFillCallback, Sampler)); + MOCK_CONST_METHOD2( + GetNumSamplesFromRegion, AZStd::pair(const AZ::Aabb&, const AZ::Vector2&)); MOCK_CONST_METHOD4( ProcessHeightsFromRegion, void(const AZ::Aabb&, const AZ::Vector2&, AzFramework::Terrain::SurfacePointRegionFillCallback, Sampler)); MOCK_CONST_METHOD4( diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp index ebc8a16fcb..4232a37264 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp @@ -208,12 +208,21 @@ namespace Terrain } int32_t xStart = aznumeric_cast(AZStd::ceilf(m_dirtyRegion.GetMin().GetX() / m_sampleSpacing)); - int32_t xEnd = aznumeric_cast(AZStd::floorf(m_dirtyRegion.GetMax().GetX() / m_sampleSpacing)) + 1; int32_t yStart = aznumeric_cast(AZStd::ceilf(m_dirtyRegion.GetMin().GetY() / m_sampleSpacing)); - int32_t yEnd = aznumeric_cast(AZStd::floorf(m_dirtyRegion.GetMax().GetY() / m_sampleSpacing)) + 1; - uint32_t updateWidth = xEnd - xStart; - uint32_t updateHeight = yEnd - yStart; + AZ::Vector2 stepSize(m_sampleSpacing); + AZ::Vector3 maxBound( + m_dirtyRegion.GetMax().GetX() + m_sampleSpacing, m_dirtyRegion.GetMax().GetY() + m_sampleSpacing, 0.0f); + AZ::Aabb region; + region.Set(m_dirtyRegion.GetMin(), maxBound); + + AZStd::pair numSamples; + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + numSamples, &AzFramework::Terrain::TerrainDataRequests::GetNumSamplesFromRegion, + region, stepSize); + + uint32_t updateWidth = numSamples.first; + uint32_t updateHeight = numSamples.second; AZStd::vector pixels; pixels.reserve(updateWidth * updateHeight); { @@ -238,14 +247,9 @@ namespace Terrain pixels.push_back(uint16Height); }; - AZ::Vector2 stepSize(m_sampleSpacing); - AZ::Vector3 maxBound( - m_dirtyRegion.GetMax().GetX() + m_sampleSpacing, m_dirtyRegion.GetMax().GetY() + m_sampleSpacing, 0.0f); - AZ::Aabb region; - region.Set(m_dirtyRegion.GetMin(), maxBound); AzFramework::Terrain::TerrainDataRequestBus::Broadcast( &AzFramework::Terrain::TerrainDataRequests::ProcessHeightsFromRegion, - region, stepSize, perPositionCallback,AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); + region, stepSize, perPositionCallback, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); } if (m_heightmapImage) diff --git a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp index 2ecd13b5ad..4dfa03ed53 100644 --- a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp +++ b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp @@ -690,6 +690,16 @@ void TerrainSystem::ProcessSurfacePointsFromListOfVector2( } } +AZStd::pair TerrainSystem::GetNumSamplesFromRegion( + const AZ::Aabb& inRegion, + const AZ::Vector2& stepSize) const +{ + const size_t numSamplesX = aznumeric_cast(ceil(inRegion.GetExtents().GetX() / stepSize.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(inRegion.GetExtents().GetY() / stepSize.GetY())); + + return AZStd::make_pair(numSamplesX, numSamplesY); +} + void TerrainSystem::ProcessHeightsFromRegion( const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, diff --git a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h index 7c6e0cd91e..2296d48843 100644 --- a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h +++ b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h @@ -163,6 +163,10 @@ namespace Terrain AzFramework::Terrain::SurfacePointListFillCallback perPositionCallback, Sampler sampleFilter = Sampler::DEFAULT) const override; + //! Returns the number of samples for a given region and step size. + virtual AZStd::pair GetNumSamplesFromRegion(const AZ::Aabb& inRegion, + const AZ::Vector2& stepSize) const override; + //! Given a region(aabb) and a step size, call the provided callback function with surface data corresponding to the //! coordinates in the region. virtual void ProcessHeightsFromRegion(const AZ::Aabb& inRegion, From c27f73c66be8e8b86456f9601bab218c8be6ab31 Mon Sep 17 00:00:00 2001 From: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com> Date: Wed, 19 Jan 2022 20:17:15 -0700 Subject: [PATCH 074/413] Added a NumRaysPerProbe DiffuseProbeGrid setting Added supervariants to the precompiled DiffuseProbeGrid shaders for the NumRaysPerProbe values Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com> --- ...seProbeGridBlendDistance.precompiledshader | 126 ++++++++++++++++++ ...ProbeGridBlendIrradiance.precompiledshader | 126 ++++++++++++++++++ ...eProbeGridClassification.precompiledshader | 126 ++++++++++++++++++ ...numraysperprobe1008_dx12_0.azshadervariant | Bin 0 -> 8338 bytes ...numraysperprobe1008_null_0.azshadervariant | Bin 0 -> 486 bytes ...mraysperprobe1008_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes ...-numraysperprobe144_dx12_0.azshadervariant | Bin 0 -> 8306 bytes ...-numraysperprobe144_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe144_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes ...-numraysperprobe288_dx12_0.azshadervariant | Bin 0 -> 8338 bytes ...-numraysperprobe288_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe288_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes ...-numraysperprobe432_dx12_0.azshadervariant | Bin 0 -> 8338 bytes ...-numraysperprobe432_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe432_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes ...-numraysperprobe576_dx12_0.azshadervariant | Bin 0 -> 8338 bytes ...-numraysperprobe576_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe576_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes ...-numraysperprobe720_dx12_0.azshadervariant | Bin 0 -> 8338 bytes ...-numraysperprobe720_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe720_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes ...-numraysperprobe864_dx12_0.azshadervariant | Bin 0 -> 8338 bytes ...-numraysperprobe864_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe864_vulkan_0.azshadervariant | Bin 0 -> 12618 bytes .../diffuseprobegridblenddistance.azshader | Bin 79451 -> 626455 bytes ...begridblenddistance_dx12_0.azshadervariant | Bin 8338 -> 8338 bytes ...begridblenddistance_null_0.azshadervariant | Bin 486 -> 486 bytes ...gridblenddistance_vulkan_0.azshadervariant | Bin 12618 -> 12618 bytes ...numraysperprobe1008_dx12_0.azshadervariant | Bin 0 -> 9310 bytes ...numraysperprobe1008_null_0.azshadervariant | Bin 0 -> 486 bytes ...mraysperprobe1008_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes ...-numraysperprobe144_dx12_0.azshadervariant | Bin 0 -> 9314 bytes ...-numraysperprobe144_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe144_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes ...-numraysperprobe288_dx12_0.azshadervariant | Bin 0 -> 9314 bytes ...-numraysperprobe288_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe288_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes ...-numraysperprobe432_dx12_0.azshadervariant | Bin 0 -> 9310 bytes ...-numraysperprobe432_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe432_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes ...-numraysperprobe576_dx12_0.azshadervariant | Bin 0 -> 9314 bytes ...-numraysperprobe576_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe576_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes ...-numraysperprobe720_dx12_0.azshadervariant | Bin 0 -> 9310 bytes ...-numraysperprobe720_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe720_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes ...-numraysperprobe864_dx12_0.azshadervariant | Bin 0 -> 9310 bytes ...-numraysperprobe864_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe864_vulkan_0.azshadervariant | Bin 0 -> 15030 bytes .../diffuseprobegridblendirradiance.azshader | Bin 79495 -> 626793 bytes ...gridblendirradiance_dx12_0.azshadervariant | Bin 9314 -> 9314 bytes ...gridblendirradiance_null_0.azshadervariant | Bin 486 -> 486 bytes ...idblendirradiance_vulkan_0.azshadervariant | Bin 15030 -> 15030 bytes ...iffuseprobegridborderupdatecolumn.azshader | Bin 27583 -> 27583 bytes ...dborderupdatecolumn_dx12_0.azshadervariant | Bin 4522 -> 4522 bytes ...dborderupdatecolumn_null_0.azshadervariant | Bin 486 -> 486 bytes ...orderupdatecolumn_vulkan_0.azshadervariant | Bin 2701 -> 2701 bytes .../diffuseprobegridborderupdaterow.azshader | Bin 27580 -> 27580 bytes ...gridborderupdaterow_dx12_0.azshadervariant | Bin 4338 -> 4338 bytes ...gridborderupdaterow_null_0.azshadervariant | Bin 486 -> 486 bytes ...idborderupdaterow_vulkan_0.azshadervariant | Bin 2222 -> 2222 bytes ...numraysperprobe1008_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...numraysperprobe1008_null_0.azshadervariant | Bin 0 -> 486 bytes ...mraysperprobe1008_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes ...-numraysperprobe144_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...-numraysperprobe144_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe144_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes ...-numraysperprobe288_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...-numraysperprobe288_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe288_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes ...-numraysperprobe432_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...-numraysperprobe432_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe432_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes ...-numraysperprobe576_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...-numraysperprobe576_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe576_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes ...-numraysperprobe720_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...-numraysperprobe720_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe720_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes ...-numraysperprobe864_dx12_0.azshadervariant | Bin 0 -> 6994 bytes ...-numraysperprobe864_null_0.azshadervariant | Bin 0 -> 486 bytes ...umraysperprobe864_vulkan_0.azshadervariant | Bin 0 -> 10274 bytes .../diffuseprobegridclassification.azshader | Bin 76956 -> 606488 bytes ...egridclassification_dx12_0.azshadervariant | Bin 6994 -> 6994 bytes ...egridclassification_null_0.azshadervariant | Bin 486 -> 486 bytes ...ridclassification_vulkan_0.azshadervariant | Bin 10274 -> 10274 bytes .../diffuseprobegridraytracing.azshader | Bin 141617 -> 141617 bytes ...probegridraytracing_dx12_0.azshadervariant | Bin 31886 -> 31886 bytes ...probegridraytracing_null_0.azshadervariant | Bin 486 -> 486 bytes ...obegridraytracing_vulkan_0.azshadervariant | Bin 36188 -> 36188 bytes ...fuseprobegridraytracingclosesthit.azshader | Bin 141627 -> 141627 bytes ...aytracingclosesthit_dx12_0.azshadervariant | Bin 13174 -> 13174 bytes ...aytracingclosesthit_null_0.azshadervariant | Bin 486 -> 486 bytes ...tracingclosesthit_vulkan_0.azshadervariant | Bin 5364 -> 5364 bytes .../diffuseprobegridraytracingmiss.azshader | Bin 141621 -> 141621 bytes ...egridraytracingmiss_dx12_0.azshadervariant | Bin 13314 -> 13314 bytes ...egridraytracingmiss_null_0.azshadervariant | Bin 486 -> 486 bytes ...ridraytracingmiss_vulkan_0.azshadervariant | Bin 6396 -> 6396 bytes .../diffuseprobegridrelocation.azshader | Bin 79904 -> 79904 bytes ...probegridrelocation_dx12_0.azshadervariant | Bin 7994 -> 7994 bytes ...probegridrelocation_null_0.azshadervariant | Bin 486 -> 486 bytes ...obegridrelocation_vulkan_0.azshadervariant | Bin 11362 -> 11362 bytes .../diffuseprobegridrender.azshader | Bin 219075 -> 219075 bytes ...fuseprobegridrender_dx12_0.azshadervariant | Bin 30575 -> 30575 bytes ...fuseprobegridrender_null_0.azshadervariant | Bin 589 -> 589 bytes ...seprobegridrender_vulkan_0.azshadervariant | Bin 24081 -> 24081 bytes ...iffuseProbeGridFeatureProcessorInterface.h | 37 +++++ .../DiffuseProbeGrid.cpp | 10 +- .../DiffuseProbeGrid.h | 8 +- .../DiffuseProbeGridBlendDistancePass.cpp | 54 ++++---- .../DiffuseProbeGridBlendDistancePass.h | 16 ++- .../DiffuseProbeGridBlendIrradiancePass.cpp | 54 ++++---- .../DiffuseProbeGridBlendIrradiancePass.h | 16 ++- .../DiffuseProbeGridClassificationPass.cpp | 54 ++++---- .../DiffuseProbeGridClassificationPass.h | 14 +- .../DiffuseProbeGridFeatureProcessor.cpp | 6 + .../DiffuseProbeGridFeatureProcessor.h | 1 + .../DiffuseProbeGridRayTracingPass.cpp | 2 +- .../Code/Include/Atom/RPI.Public/RPIUtils.h | 6 +- .../RPI/Code/Source/RPI.Public/RPIUtils.cpp | 12 +- .../DiffuseProbeGridComponentConstants.h | 1 + .../DiffuseProbeGridComponentController.cpp | 15 ++- .../DiffuseProbeGridComponentController.h | 2 + .../EditorDiffuseProbeGridComponent.cpp | 23 ++++ .../EditorDiffuseProbeGridComponent.h | 3 + 125 files changed, 613 insertions(+), 99 deletions(-) create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe144_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe144_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe144_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe864_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe864_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe864_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe1008_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe1008_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe1008_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_vulkan_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_dx12_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_null_0.azshadervariant create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_vulkan_0.azshadervariant diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistance.precompiledshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistance.precompiledshader index 81d6bde5f0..98c327665e 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistance.precompiledshader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistance.precompiledshader @@ -29,6 +29,132 @@ "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance_null_0.azshadervariant" } ] + }, + { + "Name": "NumRaysPerProbe144", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe144_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe144_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe144_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe288", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe288_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe288_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe288_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe432", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe432_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe432_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe432_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe576", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe576_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe576_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe576_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe720", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe720_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe720_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe720_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe864", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe864_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe864_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe864_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe1008", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe1008_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe1008_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblenddistance-numraysperprobe1008_null_0.azshadervariant" + } + ] } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiance.precompiledshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiance.precompiledshader index 9fa8e27461..c4d2dac642 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiance.precompiledshader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiance.precompiledshader @@ -29,6 +29,132 @@ "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance_null_0.azshadervariant" } ] + }, + { + "Name": "NumRaysPerProbe144", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe144_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe144_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe144_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe288", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe288_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe288_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe288_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe432", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe432_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe432_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe432_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe576", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe576_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe576_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe576_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe720", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe720_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe720_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe720_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe864", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe864_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe864_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe864_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe1008", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe1008_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe1008_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridblendirradiance-numraysperprobe1008_null_0.azshadervariant" + } + ] } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader index 66671fd7bc..5a34cc5b15 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.precompiledshader @@ -29,6 +29,132 @@ "RootShaderVariantAssetFileName": "diffuseprobegridclassification_null_0.azshadervariant" } ] + }, + { + "Name": "NumRaysPerProbe144", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe144_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe144_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe144_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe288", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe288_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe288_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe288_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe432", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe432_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe432_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe432_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe576", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe576_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe576_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe576_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe720", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe720_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe720_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe720_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe864", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe864_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe864_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe864_null_0.azshadervariant" + } + ] + }, + { + "Name": "NumRaysPerProbe1008", + "RootShaderVariantAssets": + [ + { + "APIName": "dx12", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe1008_dx12_0.azshadervariant" + }, + { + "APIName": "vulkan", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe1008_vulkan_0.azshadervariant" + }, + { + "APIName": "null", + "RootShaderVariantAssetFileName": "diffuseprobegridclassification-numraysperprobe1008_null_0.azshadervariant" + } + ] } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a66f166a0b39ae1bdf4bb4f050550388cd6394a4 GIT binary patch literal 8338 zcmeHMc~n!^x<5%yMlv!62yntABGp5{0D_nRLQs^Ts5tZ*Konb`!Kt9sW?(i-Kt&YW z22qQxwLvKrYi$M!5l~aL8kKrMBelH_h_=OE+xzwj=ySby*L!Qd_x^Zqt+!Xs$)3Jp z|GsbUZ+{5{K@g!DmvPSKCbWr}+EKq_|JbtnjOA*>vYEKg=e#Fy6DEY#JZmijw&T4ZUh_S0ii`x-nw?5i*Bk9;)nW{p!9dxGG#cj^1@n9=`y z8npZ`cOxF?`l{)l+Y|d63YH(2q-Hw<(LY^I^sq-<>ItW=ywlm=`q7K@xn&Zu=r1v! zT>kh@L*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hOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe1008_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..ad037d61ed839c55427acbad0d479203306a748f GIT binary patch literal 12618 zcmbuG2bfjWwZ|_YO%NMJPyrPSmJy}cqI3q7GBSe#B6t}tFfs*a24si@tUyo+F<7J6 z6>O-n#aN@k7Gp<^i6Ok=dx`NqpD~gc^ZT8979K~w@4fGPJ9oMN>%Z1sd+oLNKIhI1 z$>nmnR?AwP{N$!CgEkHAwCdAdcYVEZ#^W2`T7Bxk7WWN4_sA}Th8?{8vzvPMI&JFp zxs6Y*JnQfl?@z0&Shuw7q-9TC{`t}#kLRboa?z&3@b_2EJNM6H@4RZ&#Y5Y?`Q?Sg zrHvjp_=~9rZurNuD_4}hyLQ0r_FLN@GN5V2s`YpEeQ9;~Zd+!&cFllKUO9bvhsSm) z4#@ns>HNCq`u*>2xhd2C(EpEXUs~4jzAeLFUR^!q?$KlNyD|00Zw&9YrT=R$9MS%? z%@4nP%Z-1ZF!G$yLx)U1X5AZiY+ilEjMD4YH?E(ssPClQ|C`-t*p|1qDP3{Z$3qUg zW8tz->fe9i%VH7V-IRO%#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_ghoS6duPYjoS>7 z+E2i@!?O)2Y362q4~$na(^IXzSl_rQQDb2(^>y?nAbtwqBirJ9wdTVaLWa{rQQVZ! zv9K)AxxIqsF`Q$Ce8j}@LDJb?Br%SQe-gH+p>BsT(8pCdp8nq1UgK~>9dMldaQX|j zi?x>~jFZsD!t&&GLRfPgr8-Ot0hTSN0lTbGUcEQtith_g-ga;z*Z%x}p&v>JKKQ7!RX zl8siQF}pzTr2ltvLk>B=kUJ+$?pvn2+2Fdl+5oGgFgx!R>m$Us(|vWzP|N8hh0d^19&lkWVr$Rq<*s{kVZU z-6g~U5rWS{`VGZG_b|UN@HYj7VX;Ryz)IFA91;*<$zIds@o+Ds=(b-QZy%F375IIf zu~&)IUzk9ARc8rTB8zsh^M z_}A8X|WMhH6e~0I_eQtgtB-5{#i>|)E&QIK6${NvMRU9 zXpy6#4-Vu^;(qcKSwF%xd4k$xO8>L}m(jjI|I-{Q-!S_{(7*e88~lm8_3he&GXUMc E0i-*z!TaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe144_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe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V@%?5Bys^xC8oW01IfLF7 z-&dxin~Qxs(`JAjvlo7jITLJi4chX^OvG^sCR3lIm2l>5Znn7Nv(UA9wp_0{IMx_3 zX94V-e&2G=*{#m_+yZp{VlNhgZEE5VM_ z7Jiq5<(2Te0<535j=VRV_ewAy{@%iO0f2WypIFzb)ZQCT-{60c@}1yaW6Zl6tj%%Z z`$I6FV?C=^O9&AAyab&D=eQYv^sBL-+e?M9y<4b{^kb*MRvX?=9naW<2-$ z=^yXPYr)=K#b)Qb@&e);=Q;>|;@NjSSYMxg!QFtapDnl_r<`RBN%Xs(t+_(wO z@%n2we&n_mtX;9$IrggbOxz5ij}kS%1#Ao@_WD+^y#9X2b6r0HTNiB+@3xf7#=9L( z-ZL6w*P-j9%`rea+zsfC(H3#<0vlUf?CsrP zKFQu{&+e^z9N%m10ecQS7mjh?ea@fA*n7b{(R=TG&a3Nhta0?76Z`o2^d#_!h(8zT zGdA^^K>s0U#dm>nQfj|1wcDGId%Y3dncgw?BM+oDzjr(c_W7pmr>QO8B@dy;JEtE$ z@h*87UfV|2)EE8{uyN%5{`4rlbJ)Bu+STP-kGN05Yl~;XQ(!*H-)XhQ8F?D4&F7IZ$J0N99x)F| zW17da@Y*7;Ux4`}KO>o=cGv1V{yDJk_*kpspNA{*#qaCCMCU^#infTmDdm07=wptN z?+ak<&K=x~DJLJ?OJI5Z;yLg#*zww|qc-n==f<<*+0iG?qi4kY<2=TBb8q8a^$OUt z5YK^Mf#nV*X5{iJx_k*-Jg0t*?tDJu!tXV7@2a+_#p_@`$=+)>R=ls?0Q>IHC!S|- zf{m-#?0lZZbLA}veH9Vq=m)~46y{!Lz zXB8Izc}wfBr|a8l{e~gaN~g}g@$t959REQ13+caRPvSJUIrH}a&j7hab%VY*@H_u( PpCX-q*7BPUX59Y(c**qV literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c3925d31857fc8a0569df7cbefc7bac250293d8a GIT binary patch literal 8338 zcmeHMdsI``nmSwm^fgf>N6YZ=(cM zM6qoUwc4r;N~u_D^Pms`m8#XK)C(G^?L|ejE%w@W_6g{9-MMRKt(o~_X06#P=Vb41 z@9(jH-?txM0znW&sv@MHw>S$dB9>;<``DkGSDiIqt6w^U@Y(G5_|Ag(;OeK%UfwH~ zAAro~)kV_@w^rt4e4>!dtNME9&kFamSu6X>EV&7{G;hE6IQ8gWO}PlU`dkI%f+C(j z``6`DTK_PrYm#qhBi7JtIhXy!I}6{~Z(d zpAUnU{pDWxh_}F7_~ouJ+KRjFy)7TTNSjkC7770n z{mGS&@7C9@N^bgeAwUse*Hd@;@3!O3}gSGR8_Rd=F5bVTwX7Fszq^5)Zj0VWB| z$lYXS8NTOM7LH~J8@MIdw#{E8Z^2cc_|bsMb0)$15)}Gd>}LJvFrG zlj;%6-`e9xrhidK0O00%K@bAIqrf8uPbN+S&j{XTLC~V46pRY$knIIQDT|WBCaX45 z+CQ}=i9av3i|AnsEywd^idRkbs{sIg0T6~^@K7; z0GaCM1#i!mbLSA_>+Rw@*?gxcDt8{8pIs%^IH3tiRfi!re!Nx8(s2AbC8BhNdPsG@ z1`bO?(z!r3km;cw#HUOV5|1(~M)4{MC47fukKM!@aFEA|jc46p?}z$C~~DUC-{ zsTDK=0jfqJND63t-zplqx*T@&J5&Z<_sW_zP7bMRwOv_fD%)&e=rJOpFA=$?XANQY zPY01xGP^bjYg}mmGirYyr5w^zevz>53GE-F_N7wR$S7+_XrB)u8wV-UK}rx+ES3e-CMgdz>3(Abm_AOH6Q4((}tako7k_)ONvLCd}mU-?JbtTJn* zFgygNpE|g*ax<^Hh({^NRj?jLfhdL4XZgZz(JCJ~2?`1!$)E@q7>{U3-qTXi`;o3v zQ(D+k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>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe288_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..ec0413a6b7a8199aaaa80b83afafbd16f994533a GIT binary patch literal 12618 zcmbuG36xdUm4+W6lORqEf(ocO;83CrPElqGl%b?b1w`;sJfNfotSYdIIDjJ%R6-1n zQPenr6Kb4d9HYT0#u+sxhR}A~ofx}qV>B`L_uY3lUQ5>MUaL>u_Wb+b`|PvNKIh!~ zs*2=txm=rNtxkM=Q@0_ThId)@NuN8uUNrO3jc=?zWpJx|hMseHw;>}AT>j~ez5ARx z?Yi8?$5)x$2_f?Oy-l z0^-ufP8j<6wEZ{y^XZi0T-Dud>x3()?apgzD z4!Ld7vXATEeeR255#QdFd-eFPh1<-XY`9`WUK&69dex%#cC%>zqcp0x3iohv`x zeDBpqclhvyx3;XBe^FCzdjBKd`E(n_Y{QCrJ+raPQ}6F~N$n>U!`AH9JmB0#50x%< z>bt(0I{(bGPU?B(GsYVvan=xuWyu;g-O`G$t_`nfY}W-h3&n^l;cZ?34%R~8aGiMOlaow=E$c*GLE4w z=Pj+TnoZpHx$Uuy8dW;(P3r3!^Nm$? zu*G@wwRW-U$=|XU=dsQ;b&Co$h1$jn>W50iqRsjzW6KxhE30bf7H!4(taoA?S+}sZ zv0>{N>z(iu7uHbdhT@p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J{r>a_y>r;SFWS}RU7tAW@hI4OINtc~>CeIPaXuac zk3r0k?-?h?am$C3n?cb+>2m&{o*$DtfMyXfak`u;@QzB&ZB3<{Np^vd2?^$ zUG*~9vk=dLUxVciA!g+A3c7p=Ts)_KgYJAjCc4kgZU)2Gp^(Hi#q-etdA|Y-=~~( z?EMEQ`f7`JZmjDMaIUM8Rf=7Y{x+XO^Xa|I_Fs|Bk!CbyTmRmjpN}5sv+4a@v^n#(|IYxq=DNXO U9Ppigwoj4HJ!AO|2Qlt{09sP^)&Kwi literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..bfebe1ed5625c8bc5183744581d6c5d67a2acb55 GIT binary patch literal 8338 zcmeHsdsI``*6&WTv-2Pc3C{olc6ft;HVO^Q|4w&+*+e?j7TP_m6wWxNBtZ ztToq~kM)~#J!S$y5JajXq@T083aw(6cEtDCzc#NtW4T(tWIExiSsw~qh4CTP&zgOF zmoGa2S>Xl8ps7j zGH=%J%OZm4{o>fTkX)n9%p##UGmX7 zGxon81}**D-SCIHo+`#ywuIjL{H4bwDOpZH^{2Py25D7@3i-}eEKSFcBw=x z`djqpmp{8xU%N87>5GkDq!mwI1pT+E7F;aB>%=`_L(iOloZ0Zx^{IE4&mITyx)u6y zj!WvS&uk}GrAPkJRg&hOx$oN2lJMjUX_gL7&a*rEeKV*ZHth;db(vobt(Y8n0eW+!Act=5La>;Htm;bLsmca-JQDC^;xzC)#M>+gT9}lAQ9&KDzaS`OVRG0+ z)lN$LFKy|<#aJmA9)R=woANJE$ZyeMP{&xol6&FS4p%kXhKreVaP)eZsSeP}Z5swip=(j7aE9MD7|` zLzv^ULFA;|p-svf6FL5dI^IJmhY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=AEfE=WIPf5!rkEOFqV%j}PI^uyIhm4xFV*Ua4mV%%1Sp z^#fYThhTfemp&Vj3;aj<{$MWyn>}!wS!PCky^xoUY(qB{fB=tpgkd0P)ta=w1?bV) zz*Y7$B1=Ch?y~PD0ob1=R-LkEUz8hlbYggF#?^pKqambZG#%1#NF?BW%bfBw6-SL% zPtU(MPt}QoOdV|<1j}?SVk}( o-~^v2ng8zpXT0y<|EUg@tegHa_<#8O8~n+;?Y-(xrvSeH0E>CaS^xk5 literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..77ed6f870a18eb2b6af3df5fbc1e3822381271a1 GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe432_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..7ec21da8d223cb477db7bb1dc7145d6cb32d4b76 GIT binary patch literal 12618 zcmbuG2bfjWwZ|_YO%N;;K`AO0EF(&>Md=JEWn@qR5xfi+7?^@H12V({HcC(lF<7Ih zv4IV{##p1l7Gp<^i6Ok=dx`NqpD~&k^ZT8979K~w@4fGPJ9oMN>%Z1sd+oLNKIhI1 z$>nmn7Au;a{KS^dgSHIqu;!CqcYM8Q#$%h`TzlHUX7>y}_sGtJh8?`}(;IvCI(_PO zxy?_kKI`yi?@geT~2e))`*?H=8= zI3V-i#`9~R?f1XC<)%#kL;pXne{n_od$tXKX>HY%J4cVn@6Oa8y*|9_w*Id^e?;5U zw?6dJ%{Tmg!pL(*4;?c7m<_Mrwsr00GfJ=B*syWJ;=ZTk{@?6o!#2OQRq3iLKN@n_ zZHrcXT=(AdUlfb@&X(M3Cw3Y;__l5L%{uw0FQ0Fm&~@_FZ%=9LU;4^~&5!O@@#)rk zuRgZTgEziDuScsrHsz-EJ?h<0cTmh0tf>35n>#%H!Jf-&KAALR-JXs8&Rg_w=@O^D z>#HgA&pP{*ZdXoxeCXxd`c{-|Y0-SY*123W%Gn{e)sD7Xu6e?=%e6}S(y`@ZOX?eD zl?)izPkVnMh#MLg z6iSYqRZ>} zVsA}^@7nVXdB%3gwZ)dqIlQ*UAq~S8&YoSUD~b8aCzgh#zPzDsVMRlZeA*=A7}|8+ z(z?o7#BH718QX{vrDIO5ty)-J7*VLNC@nh$&Q)r&)z($csjQJ}m2lRiuC^iHP+1FG zoJU`47ptE5Eqieu>s(#Cs8C&~X_!R)P>EQyS^s2g`GR~!WzC$TtvH|cPHe+#7uGb? zZy#g56Mp={Y6@Ln9J6zhqqPp(n7X?BtV+u~sj#?EmHM?!{H%HS#b$(8eR+_8i-VeSB?Qb-rp?W&WG|+lTGc%EH-+#d;L;+9hle zapd9!wKWtD-l{mSXEd2Rv%tBeH@CKG7N+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lPqO#gjTP^!H^9C- z^oi%$n_%NAHankZ@mzTeLLbM*e!mTl{qBdaXUP3}2VR@HzXR9;_V1 z_!;j#IOi!Z(n$_sdmr9$lQOpW+3Pp(&Z+pm^k>2kz)96Xfv9;qkr$t&qojR+Pu7M*`+s@ zOfTzq@4Uj2KW%OK^>lq(Y}hz>TItl;*FXN&m*eg)e`9!aHfP@P{}~|HSUd2G TgTC|6_9@bN^H$z)2;=?<46yYe literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..f75dc925c1504bba412fca78afbc543edb84d267 GIT binary patch literal 8338 zcmeHMc~n!^x<5%yMlv!62yntABGp5{0D_nRLQs^Ts5tZ*KoncR;8aj*GcX$^pdyNG zgP_&c+Mtw*wKfBV$e^iOMWtTQNNukJqHVFYy>Fj@KG%JBy|>o8?~nJ^dVA%Z?CBf! z@B8-t_Lo2q1Q9B6Y3B!AgacxxcGTzi-?y$lYq?stY$oorIqwQwgmJ-DPn*1bR<1Y% zSJ(cv&Z1KHydCN~ok~1BF=pQe~yV=4nb%jz_-f8b`{_sWW+!Bdc^p~iQ zFMo8Wu4Z*o<0qRxNiCYX1p1eIEf`yz=gE7*`kr}zJG<$->(lS9oI3&H^#SPHdCn8z%bGKbF5;_|6jd{fo|tYiv`qy>k;X;^IeKvLD|0 zYt$R7`gw#65l00$0B)`~1d+gZBzPp?$-w%+^8jlzA!u=8GD-n;$o_($OZuli^H0j(K_R}@4}&^pYW!<`SQXRh_42Zf>5M%u+ZY}8V0>Pd#p&Yo zbOr=vK}2W?z$qakIRy`hFgY=xKQ7*In@@+J6fowXLhSTTV2rHvs})<|WD;8tRfj93 z2M{Ul-tf*W1$Qn!uFfH@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mTr^pD_flBdjQw9o8@c1+so=urdu^pRgy@jW1iqtb43<{*un;-KazmM$(Bz7n2C5F z5xbrT3x}Giap*ym(oF4?6^c8%ZK}$eej?{Xj+zLG(Sd>NnIt~9)KDE4>q>djI#gRj z-CdG*#uk>P#~in@q_Z5(q;Aa6xsA2Tz~Ii3ybN2m1@eg}jdKNtZUaQ2e~So2W})(o8h)$`CfisXfQj{n?A zYh6F2mAng%M{Mh}NpgYT7~c<^W#F&}W;4soh>s`fc>~+fO#vXlqwb+7a9Xt{^)LQ< zWG*n3Jw{~er^H_N*&+bv)8wvG_8f?GrHoBZPf5S(pJ6lv7muYu8V-Q~tZ$iDma5{Y zvFe$H_ZFx+F_0-^twUg&u7`Y_E<>?LTW}>IjDaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe576_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..b532faae4b4c3b6c491e91716b2f5b6d7654ea5f GIT binary patch literal 12618 zcmbuG2bh-CmB&9onjkicpaLouEF(&>OBrB5DIyKD?z+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Q%!-GHv2Ew~@2oOEzErkwH1dH4F< zxCzej`fE3SK-Wi`XV!Rkf{m%IWBR?~E-;_u_pAClU*x$CY>wHu>(L#fE#lq{Hnz6d z+k3!#lD*ZQ-COrKzSrCf_8fRF9OJ(GoIi=N_knk!_ul)QSJ&TIW9U66_VM%S$>5U^ ze=g8xbm}vX{v*zc?*irI)P8?zw>Ka6dIPvKy<;9g9!zb1?|2C8^G(}NQ(L@C9!8IM zPG5ZDUGfOLwhgSQ5B#HG_-twMAaP0P{(HMlwh3uGM$^^I+fcu~x^w09WLT-`9VM&WB1AZ4q~4%KM(t z#~dTy7s1+{JGhrpPCmGo!SedWbKn)Q9)`FzHO-|Oh!Rc%p=H^6+7z1ME6cwfB<_T8aR zJkQ<&8&|Q}`8u zdB6M5E-d=<=GI?N)3?>S^@FFDO__D$6K`)F`(VY3>Az-A;xxB8^Y;JG0J)~RfnOf< Soqx7ZkuErU`Avr~?tcKQkM(Q- literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c2b5d1bfafb48d6a0382d089f91deb50a9ac4397 GIT binary patch literal 8338 zcmeHMc~n!^x<5%yMlv!62yntABGp5{0D_nRLQs^Ts5tZ*Kol#`;8aj*GcX$^pdyNG zgQ(Tk+Mtw*wKfBV$e^iOMWtTQh_=@O(YDyy_U#kU=en=!y|vzbf4sNW+bic}Pv5YA z-?#U-zXXCHh){`3JJ;_b>=!e&BR>A25ky(@4L#sybBZSwY6zU%;G zIj1R{hP$yMJN;v&bZ+I>JAYDooXK3#TiTx!e?zx_Be>w`k`;rl64om7wwX}1xpWfE*n?ZS6@icyNUo;AJ#q7P;?Ta8_Jno1E>Pn~)I~zy993`MYc2 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rnvn{AW*C z>)HXW}3IG8faSug-)2cP8fAiNP zvw^AXF(OkxDfW`jCIL8~CU%{&dtan0WprYCO8OQ545J~qcr*>ta0mooeaoD(R24^! zRZq{qJ5SYtflL`~83fyOE#%{L35q>(2v-uqm`@~4K-5y**jjna4w0Fy16%GIanV3! zuVWFxMd7hl3b4}Gk~V>c=i0=Gam8*Oze3&7+6{K<3aEjYgZFW`kPti0PX3VA$W{I> z5&1YcKX1@k)^rR);8Zfnmb^HWB+UuuvnNhGU$>dmT~dB6hq^}!KJN1^)I#gLh zO#)||E!)KRadI7N&|?Q14zLK^%y*f-mgAb{!k6t5HtkueViB^&|EF9|`hap()}sqF pdVmN%Q8NDO|7UFMum4nsir=38Jm^3C{SE%)-S$@1hf@IEzX63$%Hse4 literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..77ed6f870a18eb2b6af3df5fbc1e3822381271a1 GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe720_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..12938b54606d6ed16483a0a6967fd947dd441876 GIT binary patch literal 12618 zcmbuG2bfjWwZ|_YO%N;;K?PJSh>j@57Ns+wl#v+~5W&lEfsrXVGay4OU5a_@x8?Op3fLfjQRb}JqwQ`-}m14y`8(<|Mg#Muf6u#d!KV> zhU9X&T&v|RPJDcG*CCsScUt{P?>oL;H1p9-Z>~9IaEp6}o^yEDAtMf2@#&4ddY?M& zy4O`l8`&-uU7I z;?l-W82b6N12+ES=~XLB-&r?kPWvz0_aD@>a`lEg`n|BGNB6BWU%7hF$1k0>qQfIQ z7YAhi+jL&tGXws2x7^eje;D}3buTRMc+b|6FRrPcdgs`2`CXa%qt{1v-#YM>=MHOs z>Xrvzy!nQ|Pa1vp*x|!w9JT)S+qSH^d}isj8yYuETHNoX-2a>1WZ0IswkchC2`|QiWT*IW>cr9KG^+|+D|Hmt=+w8z`2VaDqZ5# zcYQT={+VZ;)Z@y@j}5O_^v(Qm}hLKTzhQEoFnUM9nv^r;hZ^z`jVKhd~#`68p<2%7gjdr$fsR0j-k!x zEv>JbP29G*9kGoXRXXnEy6S~Bg;9lu%F?ov;9R9PTU~wC+^Sl+HVJ1<>gyWwja7B9 z#d-9#cCqTo-?A6yvCcJhiwZS`+Qtg%hf2hv&H5)}%NOJ;t7_*KZN>SlcVZh^x3IRc zVcQt%o$wPE)==n%;+P$i9IbWO#?{y7XIEL~io)VTb?VnX@w4XP7n>1Yk(;$oe8x64 zG#2U$4OQmQE*bB-6WfIRVseNO+j8s>_K9`%HTmihRrzo7?-;g|s|sf&7VA;WYp1Y9 z#LD~Y~;Mg+CoD^#kc)BB=LMy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|w0$q-T!Vg5mt(=!MEm3E{KtXK%lWylKJmMUQ_ zU~_kk#&cfpon!nSF%CQ*+>zeB@w=hA&yddK@J@s>s&xF?&e)So@(=vVy@Y>>gKqJ_();+j|==#N8ECSo&%$$X8?d;?C zaf`vma;*E;L~nEdv@Jp894C%D{C%*sI}qRaUU_zgi|;(=z=f~&@I4o7jT|4o=cT@K z+TGun+djTyEd~4C%5@mqyyCgD3~XF&#>?8yM>l6}=A|v(#}|OLhkha0SU!I}Qx}2t zDFer|@nUp7$=}knhwmleUE#F{w;X&ZoH2Y)8*>F%-sk`Flv|nV&L3lc0M=JqyeC(I z9j7h)E(Oag;ddEWKW!a(Z#eJeU_Si4h3^6Y?}k3HuGOi%H=Mq~|1jk{!MnzocMVvZ z|FKKp{Z4qZQ6a6d^o>ENzUIpde{?)ABG z1Dxaa*KYjCZ5>#`LF0q;cbz4tk8z{ey0 zT%gam)Mq07hnyAP1QsK=vV>*09gyQe<~%g6b63_J#r zcaME$`~u7;$=&CLKIT0h{5UxBJ_tSHJ^`;So(WHa`6Pd*)fQ*uDX=!5N5-5$|1^5U zJUESM9?!sQi@bgb=9B!4WRBWhtMB+{!M@{Tt&V>VuE-a^um1|250xm|BJQS?_dTPJ zIYz$EgS9(%a4)2sd~h#<<@Jl_z)N7qYqO5pyaS#a&x&V9pE!@65%Z7p80XEsjd#_{ zV9!E42YwBfJA{~#%PZ*eC2;YadKKOIe8z>}Yv|rpZBdKY!F-av*KVwMU%dhL-JwrB z&)x(ZSFzdoJd5YbTM+s>lbzWEm$90aKB4A>Dc=Z zQS{Xo@7!3|@8MimC94#>9{p`Thvw6Jm+ikInzTv1CTs zfP2pN1o?f;(va!qxEzc}za Q|7@QkoqNWL8~QWupFdLetpET3 literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..5a33ba9798b3727f172ba4597371fb764ab8bde2 GIT binary patch literal 8338 zcmeHMc~n!^x<4m58Og{PAi!Z1k?J8}06|OuAt*{vR2+H@Ac`%}AZkUa&A@DwfQksV z4Wd?CYXed$*4hjdBA`;Wib}npky@_o8?~nJ^dVA%Z?CBf! z@B8-t_Lo2q1Q9FX)UyLl!T~W$JL+}p&&{h(TdveDn+bnD=RJXwFgB?2X_Ked$`uD7 z%UMmq4EV;Xth7&*()ktN?D|>hb~$aFx=&jwCSQK827E!0ESU4_ ziYYCBm^4+1*K}cPX}{5?g%wq4KRq_Jr`FZQy87b&ut$AwR@!xNCJ0`87rpLrwhNoHvP`Zxf38>8-Tu>=a@X_ zV{7Z0)bQWBic(zC_g`IJ6q@B3O}| z*}^jZz$?!mO%v7eim>gQzf9bUi~j8Q(ngIocQ$ExWaE0BcJSA z#eO5MHLanrfC2+>b37r4489}4BLPo3-Uprsc$)=5ixZMCDyT!Y7X&3OP7Il>+PYHy zp)Fm!6e|YP{cxIpQvL*m^jbdx>bR*1ul3Sz%hc#n@<;HR!FptXk0?YVaQbwYn8CHT;EQqI8~_`R^P2c zLK4WSJir_9bk_{wOQwhjN10`#c$J94-;*=P@hYqp@;dPf8zM>owtxnx1UaZ=v1l^2 zj0VF{B?>_@&?oSzprLC@5eMHxCE#_Zq)F>&pRCc?m2@U^EJlU_Bfx#}+uga4>z^DbojxB<%JjXnZke{wZ9So3eRGwnLaOKN);Stb zRj3Bq106id=q~6_E4ib)e`I)U$^&n|_x%s;t$%U5Jr&qY-p55teh6LlN6G9GYq=;i z7@@ZwTvfiA-(A3`0A zZ?4)~Uu8~479C|v zKlvvPWwVY_Aj5~i1bimwluaDUw)F02@*~(h{~<9DvJA7K3&jfq+gn6y7N$L^Roe;yz?j zZMz8XD2w*s*xU|pFp6T(ms=g;jg`QhSMwM}T@Y1)Pr^%CbT;%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!ISQ7Bqbrv93Wg< z&8#k7OVcUoB}+dXumpLg$0k!nz-R82xb_KhQeQg2n?s$m`#W=DG2o6HVPJ(zjv8JV z;4FUTGP8vpoqB+nGK!>(;#2zU)6C4yRXBc20Deq>AE%PMaNL}N-XC?C^Tc6J2ymB^ z$oC?OLPE&)xlAX2e`-hefPz{A^FksZ4nkyyb^7={%MA18B`{b3VS@v+l~;L&w}7hp z4iO&}4GfnVX5i?ys)oywg8PREe#ggXoaFFyql})ekewb5R%O-=xg8Zb&d>ftNk>}l z=|F?AoZSln5LWY9LG>s-cKWMFVdac;Ub%K~}Dk;i!gL$?8{tH%R=cW-H9TupKjftbgkgqtb*TGMh@o*lp`;rO zYlhwM2LHsQRx3(o<66lkoz%s(+MtS!32+>1Y0{?rtSXiqlR$6twyv40${_k+WSyZY z=1``eVkSd&+sCMfxhPS3N8z<7)ZXA$7E)Ow1Ge4+V;l8c9`L7UO5jgg=ShQ*0{jKO zle_Lo#rx07c7k1Jmd9zm)?&T-B4aQdE`|FD<+E;zNSNJ$`?*9XL$Lh#NoE>)((u#8 zrEsO>39ihoLx}{sB9&AnsYwFO5x-=-N!ua$0B=4zgf~MbKy^QGhAMfXp5r%n(puLJ zXe94};}PHb9I{;CJLc^R&N6V=1GAZBX4K1_{JfrH=%xY?kWtqV3^=V?ld{TBkIn_A zvc-rD{gjwXUYi8qe45;KN_soht;&z40lI$!xKPQv literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..77ed6f870a18eb2b6af3df5fbc1e3822381271a1 GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&o%6MU`T!nR#rXgL literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance-numraysperprobe864_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..14f9f51d851deb8ac06c573c8bc7b2694e944add GIT binary patch literal 12618 zcmbuG2bfjWwZ|_YO%N;;K?PJSSVoj$i_#fT%E*igh`?pIz{nJw84$36jS^IX25S^G zHn5?_7GsSDTZ|nwCWi2e?-}EJK4Ua7=Jz}IEIf{U-+SNpcJ6Zj*MF_O_S$Rjea@X3 zlFQ|CEtWSs>50vq2W}qHVfCjy@BC)Lw8u8Rx#rXX&F&p^?h%~_4n1haXE*iedD`Ub zbDN%6b>?Bs-kVZcv3_aUiOZk7?DM7FAInd9`J&B*VehS;d+wjd+;P?Fi-)v&r*!YiUR;?_3XI=kUZNF-JaQ{UsS8uqp&x>oib=^Ac)oc2H^782`+C92+ zaX{w3i_Wimw(tM$mYX#7kNrMg_u}&Q_ii2b(wgc?ca0jI-<7F9dVN^et^Hno{_wV^ zZF%UWTWf0bg?&!W{lD2whHZXZtJ0NMeKh#c z+ZQbVr2f6EQeAkKBygg}AztUI6Z+di>%Fnjk zcg-pCjM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Tp9A}jkF`4fdAK59{J#DxbUsv~Xp6X;Qr`EB zKIRztz5v$l+`+w=a`M5w1eVt?o&zs~9k0zgYV!_wZagcV9ev_FdPdAY&SRW6_cq>D zuYf%Z@f`RySng0_MlP?S%a_2#bLuzf&gU~O{9Z%%u4;=~ybk7*?7enl#rx_Fu37AEu1ZW z#(NLWdCH4)l0(?uhj&~>#uh(&{TALi72lWsO!xtqPf|PMI$po1CmI(gO&kH7WR*aymANdGl^5~r!nnYaIc2FNX{8}Q|U S-}`6#6zRM(R@`_nvX&3Fv; zF|`h7s?OB`8u~(z(P6r-8KWjHvyCh)C@{MLuh}NXMiiKR0I%7m=4RxY{aldIaq`40 zEnGojZe&2d(M*o`!`s4)?6`a`$mEC=;DyYhBEsk?#lV2<=mZ%L4s-3zd$Vj{NqF=B zY-0^*$^)|1)i=lQKElko_CV$HAJ5v$8Mc2=VYC*UoPI$YS8$@HUL5A_(mh%pYVo5H zY912<{!m0swK&ZD7Jurs{(_Afa5Iqt4@)jXO|8V52@WxwxeGOw5@#kOBk_roI1`x& zlmVz|l2|j5LX(K3NUW*g@YJ5XH_Ku2l?#86i#+*Xtm>2h|M-R~c2bLje`4EzImL}< zKuIx85Pvc(p4@xU8PxRrhPYCcY{QX)5@*6B+i+r1D0zlk3oeCCNSfwZL*ZGJh zb6kt#>D#hwK9+<(n;-6bAvk$rme%y|No-Ej+sv5%KoxHX8l$eh9cTm(%w&+zYb}nY zb>|nSeaq6{?)ZV(7OZ(YP_rFO71;jm32!-A)u%hW;rNDZIY{`V7ROB%ZrMXtUlg}b S3}mwwoIc?Mn>H&02mk=|-&5)U diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant index ec72a557113911ff0807d16732437376516ba3b7..c3925d31857fc8a0569df7cbefc7bac250293d8a 100644 GI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!y@VQ_2#&~VDt1nS~yNcw}xXVrA~Se)q=e{#e-6c1`gUj;CN&PRm>nB9h{97 z2uLOUXlh?_#3JM_5N<%(nI6# z-Dhb-2_cIJ8Ag5RQKwW$6JkjSSqxBU%5fZ>Gm@|cM+H;baMV#@2TW?J`1-92ond{x z!SXTpJf)vCe}jL9K{us+6!aQao0HUQYJKQkX!DUJ;!{2YCUI>xeGm-_Nk6zbKst?X zy&MYL>4T1?A2i|UQ>Q67I%Uxq`g{S7wg`4?bKhA}&}fkmJ@h?Dq;wl2AM!R1Kw!U; zV5zWK#71-e7Z2=dO;iz9 zkBvu977`IL^;7v&5F^FyP6HGB{Ju=L6=Pd|`@ZZ6kpICdw{Aof$9EZRHE1VdKpb(Z zaXcKn>HG>5`%P8MjIS7RzazQG+COf(ek4~Z9@|uopP;(?vcscshsIFO4%ltKO;>6k z76>E}(F#3plWbzX1rpvvr+%k>27w(~C-dATi&XdM|rEE3WEx+BE}o0#TH6lHJps#$MeRb=d}}}$L2-&8y&CqQ@$%E&5G!Z z;tH>6tc;{Aetd<|@!RvP?~1!BBf8cjPAk!pSC8y&79m2#stZ?|5q%Lfg6NNVSR~g_ z?~joe{Z7Y#S;Wn_tC;&ajvnFqkeOU7UQmjrM7>p#dqR1sS->AQHm|O} Jf&Uxg-vB^}Tgw0d literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c2c98c19dc4be5541d870eac0dc4c879231d54af GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe1008_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..e870a155090cef47037921890149bf31cbfa7533 GIT binary patch literal 15030 zcmbuG2bh)BwT2HMO%NMJL;<^?A_{_{!q6O4kP!w&Me#TsV04(lnL)u=z>3(28cP&Q zOe|p6*kY_vvBlV1OpKCZVoQv@-S_>^UidruJoi4&-FH^@x4yOZ+Iz3P_C9BZYoSmm zv{~G0-}_$aHsqC&U6y{>=elo?ntsp97tY;(r&c$OIBv&oLq_#K{i7>;_c`dmOA9OS zJM+lxTfH`|rh56Js=XKAfA+_VHoT`e?WvPrDUE(@=@G|$F#g&Lm!2}R-SeNHL|odq z2_rr|aI0IsdFad~l`mg0cxJ~hI&L#~!IGsbuIu;2xjlQVn*PkigWrGZ;L|(Zy-s;R z?td4Y(D3lU|J|){z#(rBdiRPa7I(gB)#xYBtvlfQaeEfmW9oOF8{K2opl2T4q2obs z-SOmAmwz>J?6KoURvfa+^5?F3>)dmuS6;HBdBw!}{iYQD-|R}mw!XSu<&q2Eso3tC zqZYs4_}ZhNmy`JND}`tG>NbJW^}_Jy|e4xLb}tsgy^IsvbNtiyQub&+;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Z_xjshyPt*TKl@B1>pPqIsXzAL7BcSkJ}XbFT6ETx0}iPgc=O?< zW8QnK?YD>M+h+NS5z{IUoO#*3FMcuMw#kpD|8g*k)6(Y5KmH$H78W$@^!e65_)jD$ NhT{)E{WV{V{{dt;;CcW6 literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..f77e677928db09d4d2cdcc6b82ce773a8edb5bf7 GIT binary patch literal 9314 zcmeG?d011|m+vLvWg!VcPyz|^SVf@vSPURalYoed8Wk0*t$~Q51q|p9MX7yR2*C!8 zD2QNd5VW+l7SK|$)h2`=1VqKH#kE1>(w1sOYq8_6o%;efcG_9KnfYVp`{sUcIp^Mc zmV55G_uTUm2!bH87G7|=Z>*qC#Maw=KKi|2CW;Q!$$nJ54teh zJ>~TeZOy9|ME}}RINu{}-#5z&BWIqSZ)tUvJ-OYuZz^rQONTc9N`5P}Vq)~wCx2l~ zG8mDU*}^v6xQ-zh>LTp>X7c;jIqCfq|vbXa#E%w~I@GH?y+eDdPOk$ciA>N+Z zJUM#v@=Imh$iF?G_d5)X8{-E-2=NAYGPu*godxazaLd^cv?ys7MguV9ctFssMKi-k zKu6X5e}zjHEy0RF_W*+CFUs$rIK5I&0WdMuq*v+)kkIMXGKv#A6Za@i&=EJmXS6Iz z6{QxjASeTJf>r`MC8o_vAps&n&MHtZPB7l`WkS#r(B`Z}9rSLXjjHh9C9+UvA)JWV za#+m_bfS5Vr@WVeb7zpm<<8=EPK0|5jXQ@Ck)ci2yQ2w7+Cz|MgxHqM*1P(*OGFD4 zx_;H&?Ue8&WC0iO20VE>D=}oMkkr7^*a?t~!dH-tAp(T;0&Y72xIpA&U|T=~RD#@; zQZbr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v6z%*ZVdfsj0Dn!+)iXH0jNFnQv#j+L*hCD#U?cosH@5eOsQqdp?T-p!n*w?Du>rCzXN?&F>+EBVwdcwEYBCSkk_MyRy)cT@8d_npQovbX#$J`5n{Yr*OV5^vm zX8hZ4g+;`*D!E)oBSY`01mQLp4UFU}6ob&O6Gg)GEWdBQz{PAMQBhrNRgOeVCD+26kb#yUSjg3T4 z4ie!%`Lq1VAVx}C#`KQv^EC@RRu6Cag8j=z!Iu5$9vz4{Uf@31WYUkufay;rnMcAw zJbCgc_`2I<)%1j-0ngjA^PB@CQ`dcOrCK_?sZ2Tsd-`$1V+e=FxHY@ry&pJirS;{2 zKoS|FGDd7wjE?v1MG+6i^o-eW5;~z(3hzCN*f)xLF5H&w80W)7p7&vvP7)lS1OkRH zKC0D*4UwiS5*ISNiqWED%q%^kc^|H9SQj>K6Dd+pI1j3YIpQq z7GeBwN_+Gf1M)Tq)m(yBGt~h8```d8r`C>who>GK1zV=p9UJM}F|~da{ATJQ06L^Q z#jQ(-G>>>f(=ox6$dQJ?xNO8tbSDWxK)t>X4lI-wD07U8If(# ze9;x1oi%fXAfd?Y`t4cHck=e)$o5Uhm^EnL%SU<#hZL#dRE4Xph%px$K#WJcY_cn; z&nL+9o-s$jv`8BiVfFv|tzdl#`S1$hc);6MGH1^j7a+q%+g I#6Keb8Q3gf{{R30 literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c2c98c19dc4be5541d870eac0dc4c879231d54af GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe144_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c12043e8fe681c7e05c7dee8165797600d07cafe GIT binary patch literal 15030 zcmbuG2b|T#wZ|_YO%O$?qJRYzL_|SQR9Kn|3bMjtMe(v+V0GEW-37r|z>35|&{(1< z#>4`4jV;C+6q-Z}Vp<@0&(^Lg|3WPay&&YYP!b7t<{<(bRn zaxIoNJLvvbI}dqvWQXM+^}7Ds1=H_c`{Ig2_GotVh?92jJY-bAvp>G7XRjj;zdX10 z{&SAowb|>_sw!76sW@Qi1Lu9RWXpT=)1E&4)xzl4mmho5hZC;5c=;J4TfOkbX~dgaL!*{&(n}^R?R{qMW!L!>l_iE^UAFy3tRqs5$J0apUuwGxfXAkM6o|(6f*2*7k_E z?|ka&E5DvJ_QY``%Z}P>_4C)hz2f}o<(I8#Tr+85->JF(H@nub&97-yzU<<6%XYbT z!O{=vUw`b2QW9TzHTT^9ohFR9cHM0=4;uRAV~ZwrJ@nF-4_h>-{FzB>@99|e@!Pjt zI;_o%mE9KH@J+KqZd%`=uYJ6MWVT>OTRyV3!$WU&JFE7i%Cd{PEg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u*EOUq@VW1Fz7X)wI*seRC+Vp(T38c(v#l37HMTVvkwhqq}CVtvLo#Fxe2rWW3?FvUSf^_xUuT83b#N?K`Pf|=bu z>=(vufL?U%u}BRhXzBtVU`b*9%+hgMm;Lg`F53xON9ee4iB$%FX6a-u-hE+oVpaq% znx>F`GNHGVln@($4L2#qTh#E`#(AIIKbs{+$M(O}@CTQI9+9SO7@qbBTw!2OtD}pt zYHTcea*#0J>7VCM2QgCGGNE^TpRY-ATQj=l3l1zB2U`xLyLBMqSb^(slSw}w17^-_AG; zK)ZB@nDuet<}pubIxcuUe5}DgCR_Hh;kd6LE^IV9y8Wy>ryo~6W_7rq+4)Kj?FTt! zc6eJPUvyPB#7bNth$}KXe|L`agS@>synQn=VJ({X@{!)bA%$x=RiSDtV$6jG5#v!0 zo9rs;^(peaXTni1Ez$->Nd3QmD_CDaUc3T0Rxn5^N?`KAvXEALT~4prm*@VSyV{zw z1q4pk8v1pJoB_`9WN;M1& literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c2c98c19dc4be5541d870eac0dc4c879231d54af GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe288_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..70bbd8fbb0f4e82f23b0932016cfa56c71c6e7ab GIT binary patch literal 15030 zcmbuG33!#&wT2HMlORqE0t&$yL`0bs6~bgtK_Uq%h~P0CFd7m}f`WAbN3af5twR-u z+NyxF)~VL9Dk|1GE7sN`wzYL?t@Cu>_doxNzmey;_j&HVS>50I*4k_Bz4mZU!Znx6 zb>H-<7eK#`lSmG9n#{~ktgrbW$5UBOFzE0SMS58U71_` z;JL@`)?)4Ss>+p%%MV=g(D|P%?s0#9`kFIdD~wsY?AVh(oN(i%%g!9t=EW~gCoXOL z#F3v(+v)aiA3gV+vRAJeJiGmu?ROcx@SJ6mD2Uzq{q8&Uky!d)GX@q~opY$2@ak&D5L5@1Ng-)bGA9rrY{K&pokw`@`4W z{mgY&e?4j3N#jSA&e&_^3pcF0@Pe6TSFCDWHEBWLDY^eQyV|fVuWwU!&ZX~`?s~)V zOFpPy`@|Q;BEI@s?)d{cPZ)W_`a5PFJnYLS7EbDR*yXQGT{x)h*-5MK+q~-Ib+=tU zyxlu1N-AcLIpEyf^uEJh|9At%Y{iOtJhr;iBX4eXcI`)%rI&2AaNsG&-&1y?sc-&f z>aoY2Fs1vYlOGs$!TP>cdyZ|@a=W&`}xi(2(Hlbp|fQH6d z0|pNns7I$9NobDRG}kuQn%s%TCg&Gc*5|7V*xQpimuqI{ zt2$qchcVg`_Yv3h*>eYEG!KbjrH@Z8eK=b zWE?}A=Ps+So|WX>7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#(4xnpLqKo1?%hE7u;j$`q_f}eacA(_jt+~znpXFyYU2^ zo z3CvHjx7xFN>mJAV=$FBs1J8wH+;`u3KTlr)dtQ&A_w!U;e`8h9drs`*Z!c58m59Id z>QkQj97_KdXT{F~r4otHfLF1_XGKr=_zZXrUR%5=uY={HHfzCheHk;C*nS?ofi7?E zKhZlsd)MkYdK2v5U!2dMk-wxi$G!#j?br6#jIAr&I&|MvZEvTx+o_SiBd$l+?%e!+ z;+@ovDY<{z|AxprA92+8?_lfec-QS2`3G1&&fB}-iHN*s#y9AnV1AO{7kq#8iJ1RN z{C*hoJve!N{QQ0&?B{pnHRcC!^6|UxhhRD5`=)#Zw)v)L`!^!zn#A$@&VRtx(%%E( z-)=ufmv?`R^m1Iycj`#j~OgZm=o zvhU27aE{ksyKxs&GtbUfV9$>}+4;m7(#JEUk8{@Fxq9|IU!Eyzpw0Sdi+kglaxdcE z#M!k5j`y5>4fbVl>cMi>%0Aw=Z^7OdKeyrzeTOdJA1>;`uw)Is z-Qm{)&NoO~oWYi0h9+lFyRqVPxD~peiTcDly%E^jC^kE&roC*9qK{*J8>V1u1CF<0 z0J?X?v)UG3n|f>XcHp-3@%^|xy4-R&Tg+i&IBkk8<`DJ{@Xlj;(cEN@`Eae}8drV$NG& z)82f}?z`{Fme^dkezC`$!Sc4?x}=20o4+fIm_>lDYEw=>xJ48qs9$@%p~cW&C^?DPYBcC$5{nIuak#qmV@x5$s zu=(5*>t`3=zx#A$9b^M?P!%iO}cAz$qL RqyI#b!*I$mOV|2h{0~&j-ZKCI literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..7ed95335cac633ec61abb778c0f182a3e303437c GIT binary patch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VphWQ@`v*eD+z@5(uX2QGasdyFCnv{vr5Lms=Ztnb2Y*_N^1Jmlp7X6`1z@kte_J%Emc{H%{%h2W>vk%opX z1DC}ZKZ4R3eMXP01fiNs(5fftFI5eLHIo`f!Gn|bje>2H8jp_j?V7ZI6#RD50RY;i zJH)L>h%}9OLd#L%TahCT0de`V*9}Kqg$aV;=;;2F=B#d1^*C9izsdP>AMN`h%GAh? zXukLxt&KG;OPEk*a{lft=li10^2pA0h|4mx`1K>Zi$jW3b7~`07Q|2p4I+lao>tj6 zsQ0JH%RZOGU|OV2^058?{w-&H33>BM;CSI6sVs@f2g^cQ=Y1)=epj)_cOEKB!Fmul zSxf0xA#x5l$CJUmNPUrZS$YN!k$VDcq-6fpe@Te8zy5;^RJ!V|mqCB}D+~C;#-aHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe432_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a545c832254f62e7e6d91e40b0b6790be9bee3a6 GIT binary patch literal 15030 zcmbuG2bh)BwT2HMO%O$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r0u4;QPwcSaM{2g&Ux^~y* z?-PGb?U<7Lr~Pk;yz3E1e*X?Ozm9j`*2q7=@=qkin@fKW zh=05N6kXo)G1h~hV-$f^l{DlyH;z@`m(0Xfj0A_E$)pqjo=b7;?`4Ju=&zw3v~DD?=PNBta)2( z+8eIfbN4;j4x9VdFV46fSl$*~`;>Dn!F5PEUE|z4qUht_DjcIv*g9ow&Y^GQt}{4t z*O#%8yY1n%J;-{k^DbcH$Xnk#(A%tUZ95`z*0(t7yDQkb*azQOPdD^ftM8aT-rX2) z@BOl-x`Q3>opD^mHitdX&7XOU?`S)LjXgZI$3Az4kA3#T7W>=Qmy};IvwuZH14kEUFd_L|8w&u)>2a(9~6D8Eyw5+wtg9#bLbnf`h(+6 z2R9()vUBd6a&(*G4n&DL9ivaoIVfXu4t?YEaX+wY(#P}LpWf#AX&a2ld4A&fUUmT3 z`8*Tz=UkrQfhq6a2O;{!n1eE7%y*0#lJedg$LkkkhNd>(3+M6gswLnOur|L}IqxvA zoNvAQaIkUZt&`Y;y>+6`2(U4&9sS*3)Z$36wWv>=#VD}6Ex3bIE_*(uDW_|E_aBYo zc>T3ogYoWK(3mJD$w>9UMExzFTK2yv3 z-f?{4c(+*PkJW(F9(x24QW&i*H literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..4ed0fcb4f368749f630aa3a882c0ec624e2f7766 GIT binary patch literal 9314 zcmeHtX;@QNxA4ip$v_gqAOsTNFp5C+Fc?5AO#%Wc3MwjAd<_H?EMP!i6s0y3A=sc1 z1rclwf)=f{fR>6?n-B^CQNf|2q752{_N6wWwc6`#?>+&1?QQSy-246bzUTS&bN1P5 z4{O+Kuf5k^CxIXc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%6sZHDbBr|E2 z%Rx9BUBI!_CL>mT<}e+rPG34+eX$s;w(zQUy6!H`YcPulZn_>gT(Xm%19=(-AaGuZ z&=j0Wz(O+r<5FtmvrIA;i#=>hi>EOlqF#4z@2U>Rt*#5m$`Pd(Prd?15xKBNO9Lyr zZOk{6)eODr-E96D3M;!)w@bNMJ=vb?CvPZ!`e{%lO(epV1Wa9kG3LCu~Xu(fikDp-yPbfIk8Yu#_ z4xR9xOgJoT#^*&dfR7ZmI}A*o^ZQr0tQkM@+xKTog4~aCUAkdG4A*I_Rj--!0WpLb zh6#7@j^k@k=rcq9c5LaW>s`?$=7EW&>xZ)x!tq1p_z8-uH!CC(GiVfHSK(X^SaqfH zVgg4J7Ae<-Zk0~XH%}D$$f4h1zn*7<)Jom=NTc2@?H{}=+TrZUhF=b$#vVK_CLTBp zFUh1-8#jdMbMP$4U@t&QPtbBSu=K5e@%CK#Vopr^vky!2c!U>264=s;qnpCO$w-(Y zk;2==e=48PSXvs~Y!(UpJlTQZ6u>T6`s`Ukk<<7MK>X3dA!Nekr#Jg>!OyD`9fvLs zUFD;k5Mo!vc`f`NaMdgfw`NwumCAAO@T`NAVEe4bNw9lX(}{_(-_ANT2|k#07=Tvp zQ=;FC4KqwwLYsj*Gi;(`W^}&jb;rptZfxkdcU=CX=7MHY^yus`UxWSCe)4x>;+(L~ z2oC?6+CooA=f;*A?5|&7ekblK3+vhhJFGitQcC{{@?;m|Vz{ID(s&vNYzyJR16MNY_ZIHE?y4~5Zvl>z zzJ_uWB4mR5F#+V2%FE=d!t;_qsT-(Gq_n^KKMB_N*ME|MO4iSO8StmSvw%NsY+F}x J6Z=QRzX89FVa5Oe literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_null_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..c2c98c19dc4be5541d870eac0dc4c879231d54af GIT binary patch literal 486 zcmZQzU|?YGU<}-ML)7esBj1D%@+<$B#qTaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe576_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..9c65b7c6825a9fe37d94e6d08e93535d00ca01eb GIT binary patch literal 15030 zcmbuG2b|T#wZ|_YO%NL$1?+%`2ndP_OLI{{7Fet(UY853EW5b7C>RS^(O8HYOB72? zEMV8zVyscI#n@3}VvrOQTVgC&;`@H@or8Z@KA-nKpEqw$=68PQ%$b=pXXf5rp1E8u z*J5e2$q%jWG<5Z-4$D67b}-!k9Og%{}R(2{&H4?2J*ZUS4+^acScx zj{N+vo$mPWW9Obz{`xgTX0`pY?ao6MowID^O?{uauv?e4GhVoS$cN7zadx}=H!BUu z{O_Vu>K-5Xzq{oQJ@Vbb?_cxG()PEl9rNskHHY3je!u({O#R+VW4f#z{KAvFwLN^z zJ`NJ1zJBW>*=u`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^UM9x@Z&oA;NukKlCch0zDpMl+*`H1)9bFjQExGxeX9o)LaW#5@E;T*5O zcH=G~XV%VFVCzSp?0TYx^s%P&an1U>R%_4tvZl;|HuIw`?u|9&S;W1G+BFA`x6Zx> z`?;-c2)%hSm*3Fa%%wi{U^#PTAMe|L!QK}?x8e?ci!R?EF7m>#;vRgv!><{fZ;-aA z!RBCw7Hd$uvEp;M1-hS!`oufE5!l=)Han>GXW0@(AIJJOOvBa+9B;z_bnl3@+8SP) zdQ0>+;MVl<{kSc<+;TWutYKp~ZHg_{5cYQPu48)1yxtz`X^$<|vnxKao=xDj#r`{h z-M@T%PHzg94~h4GGdS1b-}s$hze#)-x1Kf!n=gGfLU*tJ{^Hrhnzz8Fz3G}gci)pO zvAJ*k;*2|jzc7ShrW@!Zs5q>K*mPyy2ERG zfc0AEJ;271x4yTcw^`rXwnpTvZ*kOjPq1~d8@{ogUg)t_-!Xl>yD{G0`(;h_20Pw6 z{>)Yh|`l7owZBaY@z}AkornO@ZBDQ^eKJE;*=FE%Zoj3B^A8bvVr&!A_ zVArB8YGwe~IJV$+O`Q1(ZeZecjq}aW6X%edv6@CUyK=>cLmPoOsvNr_+BqSd7!u=FA)Z4=;0z>ULk(=Li3ZB*k#@F=xN& Gi}61+>)qG@ literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..bec463559262dd32eff6bca8a10125439cf6e84a GIT binary patch literal 9310 zcmeHtYgkiPm+(1B$c-d~ixNnX!&PqL;bH($ngm1?tWi->X$?da6)>nTit^f%3nAE` z5fu?^4WgE|)&g1-t2QCL5D*n_EnXWmDz#K2TB{x3cJ>M2*lE9+dA|96eDgfBpL1Dj z@4YU2?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d+<)syvCDu%(T$#tXP;mHR^!IsJO$42^gOg=aYemnUP0PWHp z;#Va`nMORJ=@@@f)JQ`>e4g}8!!cKWV&rgibpJ_nUN@?Gyfn(+aHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe720_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..0e33c58e47e955762994355197edfd6e0ed0d2f6 GIT binary patch literal 15030 zcmbuG2b|T#wZ|_YO%NMJL;=MHBBCHDDlE+f1zBOSB6wLYu)6Hx?xJ8UU`1mgYAjI{ zW1<2!)YxLIQL*BbA_x;{G2mh{oKJR@#Z{D8F@BGf0Gc#w-%)PrjbGclu z#o}fM-1};$L9Y()u;k+&%fCNn+TE*PJpZ8Gn%y+)gk3ug8qw#>Pp<0T!N1gD|xa%%na@z1#FMN3lacN`5 z5BvPk?N@#G;Mr%Dzp`xL%(h>(-ErW8vzDw}-uvN{FvcoQ}>*9CIcDnYM z#UIwc{>Yc5B);-$?zw$CjvIFEnpLOB*FITCGFz~t%^zCb;ej_dJEQjF%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obegridblendirradiance-numraysperprobe864_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe864_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..0801a8caa896c3cf6345443a5e26cfb993d4eebd GIT binary patch literal 9310 zcmeHtX;@QNx9~YhI2lMn7?eN)97dVML!bdfX%Y}nv4Wza(i(^;Dj=vYit^f%fe>ua zI3a?qLDbULT0o0pt4#?=AR?xBo5}Bb0eX4=H#H+d$e}A0Tv`beZMlQZo0=}T6 z&UpKm1>;(N>(FjW`A#3bg#If%EV^uy?z2xqdbfGFTNj<%9sQ{9-73d+&M?6n&$9Pd zny~-88#MpDJ5huBUJdgLYvSo`1@jN3PR(%vqJOxM=x&WV*A+=$c)RU%xZ3+_~KXMsB(+=JjQU_;RCxg`K~ra^ zM2>*=s+s=|PoF&(D+k>J2%5hrzk}lNMm+_<#8i{ss3Sl^r#H(ePUuYBqc}lF+ytM| zGCNb8xsC-vxsU_&9i-AR^>QLA@l=aMPCwL32QxqXMzdT>QpXe58BwbL{0?|vc^J{TByOa z)YM|Klq2V=oe}9~h^cl~`%^cY_J{0K^*o-KUjAW4u4c22g8eOH3B{O$c9#H+>}3_d zduui~b#@Yc`(Dzv&g8Chhtd1d7bwx&JKu2*Obbqrm<~_P^}n-po^G}0GE&{L#!U)M zdNXIc-pzn2qO{NsXkQbvyQDu;bw~g3;H{x?gT4Xp2kzfl`|5UE2AH$rK4(;QBP#nh z)nt{mQWO3{ z-rHQMD=%u?w6nI{+U8us@6OOX?Pp82ct*V6;Vl_zuMVA?JM_V|WZ*+0-%E+{`5*ez zHZ^z+lpM9PDSgg3;a{$9s|=NEq?N+_%CdYifLVvr*@gY=_23CPt;eXV^wiZTwNS?{ z83oqqsq6ZYA2`%fJ+(wiG=UC8Pf#hPuF+FVMbttm8#Jv4efp7mubD{MplLnm(~msD z?X7m6M2-Hbh~^=fl|<1qp;`eX?S=5E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UT;NC0m$SZgT$a4Cnje&WfncwTR17wB+?8r;9_1Qgdn}RTjih1PvmFL!MUI zWz^?0c1pJ+h6}d1}aaHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha R`cngok&Ja&owvAw`T!pO#uNYm literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe864_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance-numraysperprobe864_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a573e2511d6729f514dbdbb06c3d05b2c0ae52a8 GIT binary patch literal 15030 zcmbuG37pnd)yE$|HbLB2L=o85P^r`0Y+!RnL)u^z$MX4i7d0i zB})Y~rCl>MEkngDD;LZ%rNwe9Q_~jT@Av=QgMUXqpZEQI-uuq!{?6~5d+xpGo_n8X zhSx%&P-wTN&B^yY(_`c_s6eh&J2i)>Lm?UG<4I_h0qa>b>tN&fR*+Go=aJ)}DF(>r-yKcI~C(I{fn8 zi-}8{Jaz0la}L@3-v_U}qVnk*hcE8@UgyJxue@UIrVRrgUDvzU_W4g-H~h7&r(fRX z?%m1*a{s&X!p4V&{O@js+4Ei+_R5WquIYN`_6d)ztDAlMK-f>rNA5e4D#CB~D=vXMUA)Va{C$=qTb@xKsjOk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VuxdVBOv;Ewe1{kSu_+547Z za|AxIo?YOz#s0g2-M@T%PVWkq4~h4GH#pbf-}s$hziE6Ix1M$fn=gHKLU*tJ{^Hrh zn)kq_z4e+sci)pevAJ*k;*7h4J6-um8$-e!Gk+ZU0uzQs}BeZkhnk@&`X`k}{KeaH0i z?#6g~@0T^zAMAMVjN>A~ko#*yn-p+G3vvfsG;W zJ`bk1xle6}Aad?g9Ba>a6=NOYn<1SDEe4ij?pJ($4DjVo`R#2)Oe6MZItjcM)Z@BX3|CxWd-ec~)8f#q$%9iO=T`BWxO*ZA%~ z8O8DXYqtjD-9G`{cfW?Ui+%6)x4Cvd3(bG_nMl@;GV`-O?!PT$+_(E}xvXmSXKori zuWHC$XOzx;^~Lt@&(pWv#!X}AR?b;`{k^|_Z|b*ZJd*y)!7NT|n=^m>e|T9~**N0e TLqGDLNKy$gqdWk@PsSFe5!NJQrkgBp68|!syA)z<~7R z0I~`kP1>8!X4$}V1b+@9z4GTka|EYT(*p1K`waRF+htT4tpz8yUeG2b(6QtT?Dhmq zj1oHA9K;5-hlzpoV8@a*u-nDbr+ln0OzQ;PE`kA%k>9c84kGOWhdfDH9!mxx$}UDm zDr6C&Y+@p#Aj6VLh_s7fY!Q`Bh_nnGUD}h+W;sm$bm0%IY?uF~uRdA%=QjlZs}_f- zzDi{3zutIIPDv9aJ(p}ln1;pls;`V(#tMI?gG{#}zvdvx5`rO(BVUkY3Aq`9cuTAW i85_yV3Z&S<)aXER-3Q48q}f6+Qg9`I(yReTiyi<~W^Q!= delta 196 zcmaF4K&|~P%LXMD*4jDU$8T&_X9;3tbIBA=@>IduKZ`= zGc(JXwqN|n_*`)Ef-LRnH@~ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant index 816469ec2d30517153e6ed2b9838254c959f637d..74ce89a020c11e99ed1d19badbd86a070febb2b2 100644 GIT binary patch delta 16 XcmaFl@yKIClnO^(R_85l1_lNIKC}hl delta 16 XcmaFl@yKIClnO`fobKZ{7#J7;LhA<3 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant index f352a375d0032b1648ccbac3e12313e2527f8a71..c2c98c19dc4be5541d870eac0dc4c879231d54af 100644 GIT binary patch delta 16 XcmaFH{ET_SJw}eYtj=593=9kaJMIO* delta 16 YcmaFH{ET_SJw}e&Io-!^FfcFx06--MtpET3 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant index 8e4364d56b6791a5d27fb4429e0c97112a8a6a9c..70bbd8fbb0f4e82f23b0932016cfa56c71c6e7ab 100644 GIT binary patch delta 16 Xcmdm1x~+7>IxCL4tj=593=9kaLhuGn delta 16 Ycmdm1x~+7>IxCLaIo-!^FfcFx07oYWIsgCw diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader index f733a5613775353a67c84b00a4d43d806d9ab42e..c191496dd250e01dc5ba833b78e9bdeead9ba2b0 100644 GIT binary patch delta 176 zcmdmgopJwl#to`0taVwP8+tcuu>>))WjUvoyXH(T)K}g-m*+6+|>$00kCua7d`cdwpvzJG=RusEy#}Fwabw pG}x9ifk#;M8sVjDUXWZsd@) delta 16 YcmZ3byh?e)B0-MYIo)6GFfcFx06UrndH?_b diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant index a8cf6ac19e10dac397979abeec1a6d8306747ff4..e1a4be7db5aae2b3e71ba3f156454d6ef37615a2 100644 GIT binary patch delta 16 XcmaFH{ET_SJw}eYtj-O+3=9kaJtPJg delta 16 YcmaFH{ET_SJw}e&Io)6GFfcFx06`W8-T(jq diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant index 6e7324191f5b2c28d9c13d4f7ea093aab6ad8607..fcd71ca437ea652b560f1810ae069ecdd2c9e4d5 100644 GIT binary patch delta 16 XcmeAb?G@e7%EeKa)w!XUfq?-4F*OA` delta 16 XcmeAb?G@e7%EeJTr~Att1_lNIH75oD diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader index 9e2e426ff43495e9c54687bbd4408d30484c7900..492150e17cfce8c8cbf42849378154219ecf4c1c 100644 GIT binary patch delta 170 zcmdmUopH}~#tlj=taVwPTdr?bX9;3t^9qmja`N3=&-#fC!G6ZNIaX*l6Gzi_xycta zo%U{45DgH9N>8q5Ro*;P<2+0`lz$kah116OO8;>eW)p_Zfl=0in}a&-PKEVJ0 delta 170 zcmdmUopH}~#tlj=thIBxU&n1$X9;3tE6EQGc5>NV&-#fC!G6ZNIaX*l6UV%zkINn0 z*1z4XAQ~VHm7ZMBs=Rro#(9`>DE}}-3upG`H^$pl6gM$!4vexE+#Kwg39|#N@MPdo d*2${^z9AcSGO&SzL&_@8c$HEd6Hr^WAOL*zKI;Gg diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant index 3c65d8d4c95fbc4067198366c4bbd2702157e4bb..cb64cf494543f75daffcaab7293231b4fb66443e 100644 GIT binary patch delta 16 XcmeyQ_(^fYD*=wWtj;ah85kGl0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX`lbZ*iP`$m=^y`f)7lHxn>FvuC;WNw2Yyom!o16$HcXqo zX7zr^`bA~lT*B?7l!Rj{X^ig69Y3pFE+~?^w0-L&xAhx8coN&RM_(d_Z@ka|z92=# zE&gS-=gHq%Dl3+JYxGZ}zogIhFRIXg^6{*W8ou+;+UtA$A9uZ5&NOi+2wuyJw&%2B z|NSs1@xA-=9vM4ytUnJ)I%_f$k4Hr-?1AX-dnL|8^RBo1(%0NO+u3;V*X0q#QDV`1 z3y$^v>0ZswwM*(hDg0#l=2>q;|LayO&Xyqf^g%#f$I`!CDERu@IrrB@On~@pAJntd zF?R8vhEAo%2fl1CTJ9{{`%Pleyd_tcTTQ%_r}vuoE~K%t&cFQk$MfQ$q*;Ntp1uK0 z641z{)ylSfhm>WHCWz{gB5d2Hb4#}1qEGy1;>Nu9-{$XGaZ$W;XjTf}D_j;P$)&Fy zKd|RSeF0%~yXT#aT?7EG7axLP@D2h`6nJFdNe53qct%(dv@$Xpqk%GH%OEIv;}i;g9NK{($>Ob7~-nC}Wf|2PoBRHHUo4xo>!a;p|w$t0wO`>0InicL~ODv9mR_zl<+m2JdPI$dMFx%+aehWQ z4^Zl1GxfQYeP6_Rf^v%G>_?;QK@letf(r+z@&T$BEeeT5lnaO$cvZN1v3DKS*?WBX z7tv4u=2RhE7-nz28Nug~DGJ939A7*|#yftMr$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LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe1008_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe1008_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c11 GIT binary patch literal 10274 zcmbuF33Qaz6~`xpeF-2-*bD=RvM92JO(6*hBp^#j0|@ zNL`gO;mHH71{}yqTmMDJZQn1RxqIIm8!pXEc_3?f-&O;L_gH=O&Ww)Jrrs9V_vG4z z7p5GXURtt!Md2l@p1Seaigvq0(_gywKsfi{`uWR0A9K&f_1ERpef{_~imOpDHtVaY z=k5CUvuoGnzrDGCd4m%TdiJkgvwp|6?k{d=n|@^GE1UX%_R?jm8$I4E>EQdj`pWoo zz5lyeV9JaS`+c(c#Z`?TIFh@6Lv+f$1*1Y|DfP#%<)$C$_sZTr4W=D_WdD{sz8ybe zSwT+rjKSMq+j@Azx|#X6?x@-^eo6OoW{*>#F`n*t8NV+t6yO_E0SY=fxRyBN4d3iX| z%iHjpkaFMrgecyv)kI4@jTnqN3k7^^_X zh$kX*A~CSK9>$sz@v2Z&BrY_W2U~h$t19||zMkhtA1mUE!xiCJRf+nesUjwI^w;w( zUJxpc#O5S*$$a$F)8)n&#i}Z6eCVf#k6TosMph<$8hW|trRhc`5}~q4C{`LS2`>pp zom~UZj=q{*UWCq`w6fY*n`cu{U0D@QgexP|P~Y=!Xu7eXC91(f)YRC>^yA`*icoZT zBy_U=#-^JT319AM=tr`yCZ@B9BbF?P$J99Cbpy#YrkRazfpb;f+<3H1sv5hdW;a|L zIkzenuBm6&0am%w&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XHSYGcMvBogZIMh;Pze=OU8yb1RrA9-7S%fUOzSUOwY0R6gL=?iDgvV(WUFVg zWa_ba)MIvVt7nR2Y^V_*Vpu&>C8OtFTYsi$4sP{Km&~9ZbeD<1s0Z2VnIV~aEFSfk z9o*`fDH$7T#D^GG&n(I48HR-%25i`Dhb7;m)?eA8hRGl=*bzz}DW9u;fGX z+2hVfx#nQ_a6aaUGgv>mxgs#uk4&68(nloM6Sv=Y=4lRgHO?CJiO=f!!ssn}KL5=> zsyY6piiV6IwhVgtfjBwI&HOz#huiOT{O)p4#Jh%#{jP&A{pb8w$e-_C=mv^d1M7^r zT&xqD0_niW3AZ}qlKtykpgGv7>s%;|?`P=!>r7~F>qN#6TLv|gmz?nLw4;OA)yZf2 ze_X2Z;g0)O7OuGA&R#PLd+(eVUi#_bI^WO0Hg)@stm*kv%WvQF=83Tn6~EyAmzEdj fR2`Ym{GZ$c)$z>Z-A?=OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..cfd9468e32abe403d1de23d24eda737e4e772e0f GIT binary patch literal 6994 zcmeHMdstJ~mOpu&JjnwPP6+CW$U~%hKm-)TgaCqo2BkJAtqCB4@`kaZRPzD?1q~<| z#cB}sQmeiAs2Zzn0u&>l0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX`lbZ*iP`$m=^y`f)7lHxn>FvuC;WNw2Yyom!o16$HcXqo zX7zr^`bA~lT*B?7l!Rj{X^ig69Y3pFE+~?^w0-L&xAhx8coN&RM_(d_Z@ka|z92=# zE&gS-=gHq%Dl3+JYxGZ}zogIhFRIXg^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y*(h`Dq#Sg9Sez*vO0h!ICGa@nXTBU764U|~&3wea- z;N|t|nvIlWnvzzf1_#1>ymnV!qBvavFSuC^fUf(u=W9avpmA*|@-lIjE z(dz5zEvQUsUGLw3_yqlqMUpl`Vec_$&_-7xJ^*A(xO1{NuD8J6(|2M=Tz^*^VYCk* zKjZt#fQ4wjpVJZM&aRb~FL9sLtc7{nJZGc3v3A0SH0$Sf%*dq+h%YBOo^j3?w4YOb zUK=BFgPA}%?5C2|x%JQO=kg{N*7DRjgJ;#+5k4q&v)@bm;``G5QuUxtk%c<5FV{aHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe144_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c11 GIT binary patch literal 10274 zcmbuF33Qaz6~`xpeF-2-*bD=RvM92JO(6*hBp^#j0|@ zNL`gO;mHH71{}yqTmMDJZQn1RxqIIm8!pXEc_3?f-&O;L_gH=O&Ww)Jrrs9V_vG4z z7p5GXURtt!Md2l@p1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OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..cfd9468e32abe403d1de23d24eda737e4e772e0f GIT binary patch literal 6994 zcmeHMdstJ~mOpu&JjnwPP6+CW$U~%hKm-)TgaCqo2BkJAtqCB4@`kaZRPzD?1q~<| z#cB}sQmeiAs2Zzn0u&>l0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX`lbZ*iP`$m=^y`f)7lHxn>FvuC;WNw2Yyom!o16$HcXqo zX7zr^`bA~lT*B?7l!Rj{X^ig69Y3pFE+~?^w0-L&xAhx8coN&RM_(d_Z@ka|z92=# zE&gS-=gHq%Dl3+JYxGZ}zogIhFRIXg^6{*W8ou+;+UtA$A9uZ5&NOi+2wuyJw&%2B z|NSs1@xA-=9vM4ytUnJ)I%_f$k4Hr-?1AX-dnL|8^RBo1(%0NO+u3;V*X0q#QDV`1 z3y$^v>0ZswwM*(hDg0#l=2>q;|LayO&Xyqf^g%#f$I`!CDERu@IrrB@On~@pAJntd zF?R8vhEAo%2fl1CTJ9{{`%Pleyd_tcTTQ%_r}vuoE~K%t&cFQk$MfQ$q*;Ntp1uK0 z641z{)ylSfhm>WHCWz{gB5d2Hb4#}1qEGy1;>Nu9-{$XGaZ$W;XjTf}D_j;P$)&Fy zKd|RSeF0%~yXT#aT?7EG7axLP@D2h`6nJFdNe53qct%(dv@$Xpqk%GH%OEIv;}i;g9NK{($>Ob7~-nC}Wf|2PoBRHHUo4xo>!a;p|w$t0wO`>0InicL~ODv9mR_zl<+m2JdPI$dMFx%+aehWQ z4^Zl1GxfQYeP6_Rf^v%G>_?;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2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe288_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c11 GIT binary patch literal 10274 zcmbuF33Qaz6~`xpeF-2-*bD=RvM92JO(6*hBp^#j0|@ zNL`gO;mHH71{}yqTmMDJZQn1RxqIIm8!pXEc_3?f-&O;L_gH=O&Ww)Jrrs9V_vG4z z7p5GXURtt!Md2l@p1Seaigvq0(_gywKsfi{`uWR0A9K&f_1ERpef{_~imOpDHtVaY z=k5CUvuoGnzrDGCd4m%TdiJkgvwp|6?k{d=n|@^GE1UX%_R?jm8$I4E>EQdj`pWoo zz5lyeV9JaS`+c(c#Z`?TIFh@6Lv+f$1*1Y|DfP#%<)$C$_sZTr4W=D_WdD{sz8ybe zSwT+rjKSMq+j@Azx|#X6?x@-^eo6OoW{*>#F`n*t8NV+t6yO_E0SY=fxRyBN4d3iX| z%iHjpkaFMrgecyv)kI4@jTnqN3k7^^_X zh$kX*A~CSK9>$sz@v2Z&BrY_W2U~h$t19||zMkhtA1mUE!xiCJRf+nesUjwI^w;w( zUJxpc#O5S*$$a$F)8)n&#i}Z6eCVf#k6TosMph<$8hW|trRhc`5}~q4C{`LS2`>pp zom~UZj=q{*UWCq`w6fY*n`cu{U0D@QgexP|P~Y=!Xu7eXC91(f)YRC>^yA`*icoZT zBy_U=#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M9 z3(Rtjk*pst7kYoLv6>SH8#`CyB(q-XK>x6M%V+d>hjZrmEGX2R!Dj)w2_i7wcw~M@ zXHSYGcMvBogZIMh;Pze=OU8yb1RrA9-7S%fUOzSUOwY0R6gL=?iDgvV(WUFVg zWa_ba)MIvVt7nR2Y^V_*Vpu&>C8OtFTYsi$4sP{Km&~9ZbeD<1s0Z2VnIV~aEFSfk z9o*`fDH$7T#D^GG&n(I48HR-%25i`Dhb7;m)?eA8hRGl=*bzz}DW9u;fGX z+2hVfx#nQ_a6aaUGgv>mxgs#uk4&68(nloM6Sv=Y=4lRgHO?CJiO=f!!ssn}KL5=> zsyY6piiV6IwhVgtfjBwI&HOz#huiOT{O)p4#Jh%#{jP&A{pb8w$e-_C=mv^d1M7^r zT&xqD0_niW3AZ}qlKtykpgGv7>s%;|?`P=!>r7~F>qN#6TLv|gmz?nLw4;OA)yZf2 ze_X2Z;g0)O7OuGA&R#PLd+(eVUi#_bI^WO0Hg)@stm*kv%WvQF=83Tn6~EyAmzEdj fR2`Ym{GZ$c)$z>Z-A?=OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..cfd9468e32abe403d1de23d24eda737e4e772e0f GIT binary patch literal 6994 zcmeHMdstJ~mOpu&JjnwPP6+CW$U~%hKm-)TgaCqo2BkJAtqCB4@`kaZRPzD?1q~<| z#cB}sQmeiAs2Zzn0u&>l0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX`lbZ*iP`$m=^y`f)7lHxn>FvuC;WNw2Yyom!o16$HcXqo zX7zr^`bA~lT*B?7l!Rj{X^ig69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dYk-=sO|Cwm2T%PA`bvY0ZJQQDyG6hL~E`H3w5IXbkbbClU`Mv**r8axfx%{ z8&PeNXG!#Y*(h`Dq#Sg9Sez*vO0h!ICGa@nXTBU764U|~&3wea- z;N|t|nvIlWnvzzf1_#1>ymnV!qBvavFSuC^fUf(u=W9avpmA*|@-lIjE z(dz5zEvQUsUGLw3_yqlqMUpl`Vec_$&_-7xJ^*A(xO1{NuD8J6(|2M=Tz^*^VYCk* zKjZt#fQ4wjpVJZM&aRb~FL9sLtc7{nJZGc3v3A0SH0$Sf%*dq+h%YBOo^j3?w4YOb zUK=BFgPA}%?5C2|x%JQO=kg{N*7DRjgJ;#+5k4q&v)@bm;``G5QuUxtk%c<5FV{aHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe432_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c11 GIT binary patch literal 10274 zcmbuF33Qaz6~`xpeF-2-*bD=RvM92JO(6*hBp^#j0|@ zNL`gO;mHH71{}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R#PLd+(eVUi#_bI^WO0Hg)@stm*kv%WvQF=83Tn6~EyAmzEdj fR2`Ym{GZ$c)$z>Z-A?=OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..cfd9468e32abe403d1de23d24eda737e4e772e0f GIT binary patch literal 6994 zcmeHMdstJ~mOpu&JjnwPP6+CW$U~%hKm-)TgaCqo2BkJAtqCB4@`kaZRPzD?1q~<| z#cB}sQmeiAs2Zzn0u&>l0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX`lbZ*iP`$m=^y`f)7lHxn>FvuC;WNw2Yyom!o16$HcXqo zX7zr^`bA~lT*B?7l!Rj{X^ig69Y3pFE+~?^w0-L&xAhx8coN&RM_(d_Z@ka|z92=# zE&gS-=gHq%Dl3+JYxGZ}zogIhFRIXg^6{*W8ou+;+UtA$A9uZ5&NOi+2wuyJw&%2B z|NSs1@xA-=9vM4ytUnJ)I%_f$k4Hr-?1AX-dnL|8^RBo1(%0NO+u3;V*X0q#QDV`1 z3y$^v>0ZswwM*(hDg0#l=2>q;|LayO&Xyqf^g%#f$I`!CDERu@IrrB@On~@pAJntd zF?R8vhEAo%2fl1CTJ9{{`%Pleyd_tcTTQ%_r}vuoE~K%t&cFQk$MfQ$q*;Ntp1uK0 z641z{)ylSfhm>WHCWz{gB5d2Hb4#}1qEGy1;>Nu9-{$XGaZ$W;XjTf}D_j;P$)&Fy zKd|RSeF0%~yXT#aT?7EG7axLP@D2h`6nJFdNe53qct%(dv@$Xpqk%GH%OEIv;}i;g9NK{($>Ob7~-nC}Wf|2PoBRHHUo4xo>!a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Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe576_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c11 GIT binary patch literal 10274 zcmbuF33Qaz6~`xpeF-2-*bD=RvM92JO(6*hBp^#j0|@ zNL`gO;mHH71{}yqTmMDJZQn1RxqIIm8!pXEc_3?f-&O;L_gH=O&Ww)Jrrs9V_vG4z z7p5GXURtt!Md2l@p1Seaigvq0(_gywKsfi{`uWR0A9K&f_1ERpef{_~imOpDHtVaY z=k5CUvuoGnzrDGCd4m%TdiJkgvwp|6?k{d=n|@^GE1UX%_R?jm8$I4E>EQdj`pWoo zz5lyeV9JaS`+c(c#Z`?TIFh@6Lv+f$1*1Y|DfP#%<)$C$_sZTr4W=D_WdD{sz8ybe zSwT+rjKSMq+j@Azx|#X6?x@-^eo6OoW{*>#F`n*t8NV+t6yO_E0SY=fxRyBN4d3iX| z%iHjpkaFMrgecyv)kI4@jTnqN3k7^^_X zh$kX*A~CSK9>$sz@v2Z&BrY_W2U~h$t19||zMkhtA1mUE!xiCJRf+nesUjwI^w;w( zUJxpc#O5S*$$a$F)8)n&#i}Z6eCVf#k6TosMph<$8hW|trRhc`5}~q4C{`LS2`>p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L!`=6^h zaj>ymd6I2i7I%a&aMo|wNXg^^vt0R-_2cD2@6T1BIdQPDT%#o0dM)l~Vc_(|uuCM9 z3(Rtjk*pst7kYoLv6>SH8#`CyB(q-XK>x6M%V+d>hjZrmEGX2R!Dj)w2_i7wcw~M@ zXHSYGcMvBogZIMh;Pze=OU8yb1RrA9-7S%fUOzSUOwY0R6gL=?iDgvV(WUFVg zWa_ba)MIvVt7nR2Y^V_*Vpu&>C8OtFTYsi$4sP{Km&~9ZbeD<1s0Z2VnIV~aEFSfk z9o*`fDH$7T#D^GG&n(I48HR-%25i`Dhb7;m)?eA8hRGl=*bzz}DW9u;fGX z+2hVfx#nQ_a6aaUGgv>mxgs#uk4&68(nloM6Sv=Y=4lRgHO?CJiO=f!!ssn}KL5=> zsyY6piiV6IwhVgtfjBwI&HOz#huiOT{O)p4#Jh%#{jP&A{pb8w$e-_C=mv^d1M7^r zT&xqD0_niW3AZ}qlKtykpgGv7>s%;|?`P=!>r7~F>qN#6TLv|gmz?nLw4;OA)yZf2 ze_X2Z;g0)O7OuGA&R#PLd+(eVUi#_bI^WO0Hg)@stm*kv%WvQF=83Tn6~EyAmzEdj fR2`Ym{GZ$c)$z>Z-A?=OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..cfd9468e32abe403d1de23d24eda737e4e772e0f GIT binary patch literal 6994 zcmeHMdstJ~mOpu&JjnwPP6+CW$U~%hKm-)TgaCqo2BkJAtqCB4@`kaZRPzD?1q~<| z#cB}sQmeiAs2Zzn0u&>l0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX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p=h z%sI!MEIM*dzbek;oNkt(*7a>>2xvBAi?O7g7#4b(6)UMiT)`rX1334jj8T9+)JPA* z_F=R}dYk-=sO|Cwm2T%PA`bvY0ZJQQDyG6hL~E`H3w5IXbkbbClU`Mv**r8axfx%{ z8&PeNXG!#Y*(h`Dq#Sg9Sez*vO0h!ICGa@nXTBU764U|~&3wea- z;N|t|nvIlWnvzzf1_#1>ymnV!qBvavFSuC^fUf(u=W9avpmA*|@-lIjE z(dz5zEvQUsUGLw3_yqlqMUpl`Vec_$&_-7xJ^*A(xO1{NuD8J6(|2M=Tz^*^VYCk* zKjZt#fQ4wjpVJZM&aRb~FL9sLtc7{nJZGc3v3A0SH0$Sf%*dq+h%YBOo^j3?w4YOb zUK=BFgPA}%?5C2|x%JQO=kg{N*7DRjgJ;#+5k4q&v)@bm;``G5QuUxtk%c<5FV{aHI<}jSt z*Hfs^cq=A3WL0B;cgOy|uZ>c>5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe720_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c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Z}qlKtykpgGv7>s%;|?`P=!>r7~F>qN#6TLv|gmz?nLw4;OA)yZf2 ze_X2Z;g0)O7OuGA&R#PLd+(eVUi#_bI^WO0Hg)@stm*kv%WvQF=83Tn6~EyAmzEdj fR2`Ym{GZ$c)$z>Z-A?=OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_dx12_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..cfd9468e32abe403d1de23d24eda737e4e772e0f GIT binary patch literal 6994 zcmeHMdstJ~mOpu&JjnwPP6+CW$U~%hKm-)TgaCqo2BkJAtqCB4@`kaZRPzD?1q~<| z#cB}sQmeiAs2Zzn0u&>l0@@apI-rQO*D6J8(dqQgJ^_2Zy?%GTZ)X0uf6V@J_Svts z)?UB8_TFpdKoA6xbcFaX`lbZ*iP`$m=^y`f)7lHxn>FvuC;WNw2Yyom!o16$HcXqo zX7zr^`bA~lT*B?7l!Rj{X^ig69Y3pFE+~?^w0-L&xAhx8coN&RM_(d_Z@ka|z92=# zE&gS-=gHq%Dl3+JYxGZ}zogIhFRIXg^6{*W8ou+;+UtA$A9uZ5&NOi+2wuyJw&%2B z|NSs1@xA-=9vM4ytUnJ)I%_f$k4Hr-?1AX-dnL|8^RBo1(%0NO+u3;V*X0q#QDV`1 z3y$^v>0ZswwM*(hDg0#l=2>q;|LayO&Xyqf^g%#f$I`!CDERu@IrrB@On~@pAJntd zF?R8vhEAo%2fl1CTJ9{{`%Pleyd_tcTTQ%_r}vuoE~K%t&cFQk$MfQ$q*;Ntp1uK0 z641z{)ylSfhm>WHCWz{gB5d2Hb4#}1qEGy1;>Nu9-{$XGaZ$W;XjTf}D_j;P$)&Fy zKd|RSeF0%~yXT#aT?7EG7axLP@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5@XJ^+(>o4H6gq9z0Zp26IvbFF8^!>nhOLTzV_dv z)HnV+)YIjDeSt|D=Pyoelgh3Mt5<5Cnj|UyB>wzNlXqugJGplXKr|qcmG$|D4G1e^ zh>Uw|{AR(a4xaT-oKH{6iCp91nJ5Ib`sF2O@h8UTj~Q}CKiYPB@%%sjt~DNx4sn*N zE-imFsXyL*_Ue+={uP>`3>1r=02#};E4Flc&VN_MEf)LMCilhvfCS?88w?k{M11U* zKiQNLX#VS1rN4N@%xjUA#_nhRPwW&-{`_deOe+qkzZn@~G|g{*#uAv!AQjjh%21ha S`cngok&Ja&oe$;%^#K4OY{sqt literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification-numraysperprobe864_vulkan_0.azshadervariant new file mode 100644 index 0000000000000000000000000000000000000000..a2d1bcd5e37b653bfe2dfda4c7f0f0f719d33c11 GIT binary patch literal 10274 zcmbuF33Qaz6~`xpeF-2-*bD=RvM92JO(6*hBp^#j0|@ zNL`gO;mHH71{}yqTmMDJZQn1RxqIIm8!pXEc_3?f-&O;L_gH=O&Ww)Jrrs9V_vG4z z7p5GXURtt!Md2l@p1Seaigvq0(_gywKsfi{`uWR0A9K&f_1ERpef{_~imOpDHtVaY z=k5CUvuoGnzrDGCd4m%TdiJkgvwp|6?k{d=n|@^GE1UX%_R?jm8$I4E>EQdj`pWoo zz5lyeV9JaS`+c(c#Z`?TIFh@6Lv+f$1*1Y|DfP#%<)$C$_sZTr4W=D_WdD{sz8ybe zSwT+rjKSMq+j@Azx|#X6?x@-^eo6OoW{*>#F`n*t8NV+t6yO_E0SY=fxRyBN4d3iX| z%iHjpkaFMrgecyv)kI4@jTnqN3k7^^_X zh$kX*A~CSK9>$sz@v2Z&BrY_W2U~h$t19||zMkhtA1mUE!xiCJRf+nes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T0d2C|-~OC|-y!^w$_Kj-D0LcgBgU(_OlVUmf7j=RQtktNycw|kW>44icumLr*c0ki%Om#iP}-#gL!`=6^h zaj>ymd6I2i7I%a&aMo|wNXg^^vt0R-_2cD2@6T1BIdQPDT%#o0dM)l~Vc_(|uuCM9 z3(Rtjk*pst7kYoLv6>SH8#`CyB(q-XK>x6M%V+d>hjZrmEGX2R!Dj)w2_i7wcw~M@ zXHSYGcMvBogZIMh;Pze=OU8yb1RrA9-7S%fUOzSUOwY0R6gL=?iDgvV(WUFVg zWa_ba)MIvVt7nR2Y^V_*Vpu&>C8OtFTYsi$4sP{Km&~9ZbeD<1s0Z2VnIV~aEFSfk z9o*`fDH$7T#D^GG&n(I48HR-%25i`Dhb7;m)?eA8hRGl=*bzz}DW9u;fGX z+2hVfx#nQ_a6aaUGgv>mxgs#uk4&68(nloM6Sv=Y=4lRgHO?CJiO=f!!ssn}KL5=> zsyY6piiV6IwhVgtfjBwI&HOz#huiOT{O)p4#Jh%#{jP&A{pb8w$e-_C=mv^d1M7^r zT&xqD0_niW3AZ}qlKtykpgGv7>s%;|?`P=!>r7~F>qN#6TLv|gmz?nLw4;OA)yZf2 ze_X2Z;g0)O7OuGA&R#PLd+(eVUi#_bI^WO0Hg)@stm*kv%WvQF=83Tn6~EyAmzEdj fR2`Ym{GZ$c)$z>Z-A?=OXgX+D%v*iv4*C5DY#YYx literal 0 HcmV?d00001 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader index cd78a9526010f77721f32d19761b691e67687164..c12fd72c89af982806675d2b3fe47b4c22e454e4 100644 GIT binary patch delta 2125 zcmbPplVwJe>IOv?*1D|D2lF?pu>>))RRxD7W#>*lkfFM{UT3N5YnwU(UeX4kJd4@Bp z0mK>nLXgp6dY%rWCNA@hEG#HAzX7lLCdNh-ntuSV`KIP(l$ifqkkN5^t`4IXuJAE8 zGN8Yj2W9DRCHZyVVwa;@Hwi`+_S_@8oaZ(#s&|)TS9A=(1Rny#hPtgQwCKChx z5XDT=#F~o~kXW)JW>O~BTyW^&%z~Inm^gD88A(jJ#2L#(pv1sTu*8~+6ud;HQ({d9 z2e9_!x^#!hp{M>J7nC)p=fYCyWKfA*b9%Yz_SfQ!cFY{BHh-4dQmz>WN~vjr_*3aN zBF%g`*In}Uj)pfNGi`_~d&x8!DKK%SRWgkxCb^Phw6!2(BN0iKJfoQ!9q?8ZkYr1) Q*+`*{C+U)FIyk`f0BFiqs{jB1 delta 208 zcmbQyq&nv&%LYXj*4jDU_i8q)u>>))`Iq_!Ic838{KBfbxn5_f>Sl*N9(2*i8XV{R zDqr$Tzs%p96)Ge&{f8c#)AV*3=08yF+kx6oscv7elo_rUB*dY~!PMAbd_Cx>_4bLf zY&L?^H`Xz0ZwKnOL$PA}0XEL%s?$H*WB-Qi9+2=;4UX6iYwc#m%oW-$V8miAI6ZJ8 Kn>H&02mkeB diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant index 7ff0c32b5960274a3c2f9e080ddcb033ee856a23..cfd9468e32abe403d1de23d24eda737e4e772e0f 100644 GIT binary patch delta 16 Xcmca)cFAmmmo!IRR_BBH3=9kaJU|8> delta 16 Xcmca)cFAmmmo!K1obG!y3=9kaJq!jc diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant index 109a56fce3321885a4189e112adede955efc7857..6684ed1cf9359a2a2b8363db5c6d22dc41e80f79 100644 GIT binary patch delta 16 XcmaFH{ET_SJw}eYtj-7X85kGf*B|1U#k)5;6wSWfQ+jvudi1w+Nct=trQC)vvez aVF8@B2o$yI7f&5KB(`D!UJ#c7DFQGQf diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant index 8b926d86c8cf3e85ac3e0d8622e83ec71be4cd05..ed96d10db3f182421b5f8f395c62292140eee1b9 100644 GIT binary patch delta 18 ZcmeDC$=LUkaYI`TM_pFut49nB3;CHyvQIe delta 73 zcmV-P0Ji_T(g?fK2(T*z1$~^0=W4Ss1U#k)!eA<{#WCgAvvjJBw+OQgqhS&7e@wGa ft6vbeXmSBPrU-4t;N?vf;99d#t6mV73n>CH;{_mc diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant index 5e8c9a32c15bf1e5414d8d4112842d1167ed4954..1b8c4ec22bea501f9f8480887e017573682aac2d 100644 GIT binary patch delta 16 XcmeyC_APBgo-s#VR_9qK1_lNIMqvh$ delta 16 XcmeyC_APBgo-s%5obKmY3=9kaNaY6y diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant index 32d658041832894d9e6cbad1eab0e3ccb5c25a5b..68527221c71d16ffba95b1cf55dc3bba4c976f29 100644 GIT binary patch delta 16 XcmaFH{ET_SJw}eYtj@De3=9kaJc$MB delta 16 XcmaFH{ET_SJw}e&Io;2*7#J7;KMe+7 diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant index 87de50f6207a230e57020fdc12f352cd2a3cb420..c2fd622048cdd9aad836a2e4e30d6bba5c629c03 100644 GIT binary patch delta 16 XcmeyO`9*WX8xfAWtj@De3=9kaL#+mL delta 16 XcmeyO`9*WX8xfA$Io;2*7#J7;MllBH diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader index 85c5e34a7dce0789452bb0b43f1cc29beae1712a..5739d6828cb5fa3a10f61296cc50921501d59428 100644 GIT binary patch delta 73 zcmV-P0Ji_N(g?NE2(Tpt1%7IY&PlT>1U#k)XyhigwczGGvu>)5w+JpmyzEJ<|FyG8 ft6vbeVsZgJrU;!k$L>6pft9mLt6mV71t|hB?bRU> delta 73 zcmV-P0Ji_N(g?NE2(Tpt1$~^0$-1*D1U#k)OCpd4)`N+Hvu>)5w+K5LlnY|{3&XQX ft6vbeVsZgJrU@RU zU2#mbZO6;ac98+XP$ipVrfyT8Y@jPWId#fMgxD7?4%Nx#8!pc~R=D|Pq>bR_DHk(Q pY`O7!y87hZzrG>cbmR9`Esp+hwn9!`hLp{(BCQ3de=uh>004!pN|XQq delta 177 zcmZ4Rfn~u5mJPBjthIBx&%N5L#1h2F<`EU?mRvPCW~$=m*{lmSQ2A5UH~$E=W9E?C zsC8IC@b0J0c98+XP$ipVrfyT8Y@jPWId#fMgxD7?j`JbkCMVvxle_t4q>bR_DHk(Q pY`O7!y87hZzrG>cbmR9`Ee=zT!_sYLt}i#ginJD-{=uBl003@VOU?iQ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant index c1f11491d4945899420937490d984dd9035d9f4a..7cfce8e245c4b59a679c543b62c7c7a645698d98 100644 GIT binary patch delta 16 XcmdmGx65vWkvvCTR_B|$3=9kaI-~|P delta 16 XcmdmGx65vWkvvE3obGe47#J7;JER6y diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant index 01a6693151c388924df5ab7d43b77e055b724bd6..3fa87b4e79cf833cd9d576cd4f6ae62b1a69d6c8 100644 GIT binary patch delta 16 XcmaFH{ET_SJw}eYtj;%g85kGri#sB~S diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant index 1e56c4df52d4c196318c38b826b4034e33371636..9b831386eb42d39438926b3da6fc67f6460a1d3e 100644 GIT binary patch delta 16 XcmaD9@hD&N diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader index 1f045706254b0b0c859f4bc976030ea3b50a5844..4676c42e8da1743b54f491e17ccc3347aa0fb277 100644 GIT binary patch delta 342 zcmX@Sp7-#2-VItTELok8Pi@v?sdQsYDU66JtK7WSYZV8K9UCm)0AsK9;^5fab^8Pp zOdvK`QfK=gHKt?C9B=YvC$Guq{{g;C3Y&rU@`_OnW(*8W)9=)U?klaxQNkMrVVigCqvg%t>piHfehPi z+?c}!w=3B&O@Mi8@>(z1=>=lUD%f*^md^1Kke{*?UPcbks0033Z2lD^` delta 17 YcmaF=j`96F#tj+e?7CT9Ul1_l5tvIMsP diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant index 4cbb76954dbaef688dfb2961b893a2156f11785a..5caf3084766a8bd2be7d63394f0257af6e304dd6 100644 GIT binary patch delta 17 ZcmbQZhjHQ_#tmF?>{*?UPcbks002NV23!CD delta 17 YcmbQZhjHQ_#tmF??7CT9Ul(DiffuseProbeGridNumRaysPerProbe::NumRaysPerProbe_##numRaysPerProbe) } + + static const DiffuseProbeGridNumRaysPerProbeEntry DiffuseProbeGridNumRaysPerProbeArray[aznumeric_cast(DiffuseProbeGridNumRaysPerProbe::Count)] = + { + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(144), + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(288), + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(432), + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(576), + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(720), + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(864), + DECLARE_DiffuseProbeGridNumRaysPerProbeEntry(1008) + }; + static const uint32_t DiffuseProbeGridNumRaysPerProbeArraySize = RHI::ArraySize(DiffuseProbeGridNumRaysPerProbeArray); + static const char* DiffuseProbeGridIrradianceFileName = "Irradiance_lutrgba16f.dds"; static const char* DiffuseProbeGridDistanceFileName = "Distance_lutrg32f.dds"; static const char* DiffuseProbeGridProbeDataFileName = "ProbeData_lutrgba16f.dds"; @@ -82,6 +118,7 @@ namespace AZ virtual void SetProbeSpacing(const DiffuseProbeGridHandle& probeGrid, const AZ::Vector3& probeSpacing) = 0; virtual void SetViewBias(const DiffuseProbeGridHandle& probeGrid, float viewBias) = 0; virtual void SetNormalBias(const DiffuseProbeGridHandle& probeGrid, float normalBias) = 0; + virtual void SetNumRaysPerProbe(const DiffuseProbeGridHandle& probeGrid, const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe) = 0; virtual void SetAmbientMultiplier(const DiffuseProbeGridHandle& probeGrid, float ambientMultiplier) = 0; virtual void Enable(const DiffuseProbeGridHandle& probeGrid, bool enable) = 0; virtual void SetGIShadows(const DiffuseProbeGridHandle& probeGrid, bool giShadows) = 0; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp index a72d90fc94..798ebc502b 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp @@ -134,6 +134,12 @@ namespace AZ m_updateRenderObjectSrg = true; } + void DiffuseProbeGrid::SetNumRaysPerProbe(const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe) + { + m_numRaysPerProbe = numRaysPerProbe; + m_updateTextures = true; + } + void DiffuseProbeGrid::SetTransform(const AZ::Transform& transform) { m_transform = transform; @@ -280,7 +286,7 @@ namespace AZ // probe raytrace { - uint32_t width = m_numRaysPerProbe; + uint32_t width = GetNumRaysPerProbe().m_rayCount; uint32_t height = GetTotalProbeCount(); m_rayTraceImage[m_currentImageIndex] = RHI::Factory::Get().CreateImage(); @@ -422,7 +428,7 @@ namespace AZ srg->SetConstantRaw(constantIndex, &probeGridCounts[0], sizeof(probeGridCounts)); constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeNumRays")); - srg->SetConstant(constantIndex, m_numRaysPerProbe); + srg->SetConstant(constantIndex, GetNumRaysPerProbe().m_rayCount); constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeNumIrradianceTexels")); srg->SetConstant(constantIndex, DefaultNumIrradianceTexels); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h index a828fe4b96..8c8470cdad 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h @@ -81,6 +81,9 @@ namespace AZ float GetViewBias() const { return m_viewBias; } void SetViewBias(float viewBias); + const DiffuseProbeGridNumRaysPerProbeEntry& GetNumRaysPerProbe() const { return DiffuseProbeGridNumRaysPerProbeArray[aznumeric_cast(m_numRaysPerProbe)]; } + void SetNumRaysPerProbe(const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe); + float GetAmbientMultiplier() const { return m_ambientMultiplier; } void SetAmbientMultiplier(float ambientMultiplier); @@ -95,8 +98,6 @@ namespace AZ DiffuseProbeGridMode GetMode() const { return m_mode; } void SetMode(DiffuseProbeGridMode mode); - uint32_t GetNumRaysPerProbe() const { return m_numRaysPerProbe; } - uint32_t GetRemainingRelocationIterations() const { return aznumeric_cast(m_remainingRelocationIterations); } void DecrementRemainingRelocationIterations() { m_remainingRelocationIterations = AZStd::max(0, m_remainingRelocationIterations - 1); } void ResetRemainingRelocationIterations() { m_remainingRelocationIterations = DefaultNumRelocationIterations; } @@ -201,7 +202,6 @@ namespace AZ bool m_enabled = true; float m_normalBias = 0.6f; float m_viewBias = 0.01f; - uint32_t m_numRaysPerProbe = 288; float m_probeMaxRayDistance = 30.0f; float m_probeDistanceExponent = 50.0f; float m_probeHysteresis = 0.95f; @@ -214,6 +214,8 @@ namespace AZ bool m_giShadows = true; bool m_useDiffuseIbl = true; + DiffuseProbeGridNumRaysPerProbe m_numRaysPerProbe = DiffuseProbeGridNumRaysPerProbe::NumRaysPerProbe_288; + // rotation transform applied to probe rays AZ::Quaternion m_probeRayRotation; AZ::SimpleLcgRandom m_random; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp index 702e784c86..a5da79a482 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -44,29 +43,35 @@ namespace AZ void DiffuseProbeGridBlendDistancePass::LoadShader() { - // load shader - // Note: the shader may not be available on all platforms - AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistance.azshader"; - m_shader = RPI::LoadCriticalShader(shaderFilePath); - if (m_shader == nullptr) + // load shaders, each supervariant handles a different number of rays per probe + // Note: the raytracing shaders may not be available on all platforms + m_shaders.reserve(DiffuseProbeGridNumRaysPerProbeArraySize); + for (uint32_t index = 0; index < DiffuseProbeGridNumRaysPerProbeArraySize; ++index) { - return; - } + AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistance.azshader"; + Data::Instance shader = RPI::LoadCriticalShader(shaderFilePath, DiffuseProbeGridNumRaysPerProbeArray[index].m_supervariant); + if (shader == nullptr) + { + return; + } - // load pipeline state - RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; - const auto& shaderVariant = m_shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); - shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); - m_pipelineState = m_shader->AcquirePipelineState(pipelineStateDescriptor); + RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; + const auto& shaderVariant = shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); + shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); + const RHI::PipelineState* pipelineState = shader->AcquirePipelineState(pipelineStateDescriptor); + AZ_Assert(pipelineState, "Failed to acquire pipeline state"); - // load Pass Srg asset - m_srgLayout = m_shader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Pass); + RHI::Ptr srgLayout = shader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Pass); + AZ_Assert(srgLayout.get(), "Failed to find Srg layout"); - // retrieve the number of threads per thread group from the shader - const auto outcome = RPI::GetComputeShaderNumThreads(m_shader->GetAsset(), m_dispatchArgs); - if (!outcome.IsSuccess()) - { - AZ_Error("PassSystem", false, "[DiffuseProbeGridBlendDistancePass '%s']: Shader '%s' contains invalid numthreads arguments:\n%s", GetPathName().GetCStr(), shaderFilePath.c_str(), outcome.GetError().c_str()); + RHI::DispatchDirect dispatchArgs; + const auto outcome = RPI::GetComputeShaderNumThreads(shader->GetAsset(), dispatchArgs); + if (!outcome.IsSuccess()) + { + AZ_Error("PassSystem", false, "[DiffuseProbeBlendIrradiancePass '%s']: Shader '%s' contains invalid numthreads arguments:\n%s", GetPathName().GetCStr(), shaderFilePath.c_str(), outcome.GetError().c_str()); + } + + m_shaders.push_back({ shader, pipelineState, srgLayout, dispatchArgs }); } } @@ -142,7 +147,8 @@ namespace AZ { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) - diffuseProbeGrid->UpdateBlendDistanceSrg(m_shader, m_srgLayout); + DiffuseProbeGridShader& shader = m_shaders[diffuseProbeGrid->GetNumRaysPerProbe().m_index]; + diffuseProbeGrid->UpdateBlendDistanceSrg(shader.m_shader, shader.m_srgLayout); diffuseProbeGrid->GetBlendDistanceSrg()->Compile(); } @@ -157,6 +163,8 @@ namespace AZ // submit the DispatchItem for each DiffuseProbeGrid for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { + DiffuseProbeGridShader& shader = m_shaders[diffuseProbeGrid->GetNumRaysPerProbe().m_index]; + const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetBlendDistanceSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); @@ -165,8 +173,8 @@ namespace AZ diffuseProbeGrid->GetTexture2DProbeCount(probeCountX, probeCountY); RHI::DispatchItem dispatchItem; - dispatchItem.m_arguments = m_dispatchArgs; - dispatchItem.m_pipelineState = m_pipelineState; + dispatchItem.m_arguments = shader.m_dispatchArgs; + dispatchItem.m_pipelineState = shader.m_pipelineState; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsX = probeCountX * dispatchItem.m_arguments.m_direct.m_threadsPerGroupX; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsY = probeCountY * dispatchItem.m_arguments.m_direct.m_threadsPerGroupY; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsZ = 1; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.h index b85e54d25f..942f90eb10 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace AZ { @@ -47,11 +48,16 @@ namespace AZ void CompileResources(const RHI::FrameGraphCompileContext& context) override; void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; - // shader - Data::Instance m_shader; - const RHI::PipelineState* m_pipelineState = nullptr; - RHI::Ptr m_srgLayout; - RHI::DispatchDirect m_dispatchArgs; + // shaders + struct DiffuseProbeGridShader + { + Data::Instance m_shader; + const RHI::PipelineState* m_pipelineState = nullptr; + RHI::Ptr m_srgLayout; + RHI::DispatchDirect m_dispatchArgs; + }; + + AZStd::vector m_shaders; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp index 7609e27b66..7a12fc5415 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -44,29 +43,35 @@ namespace AZ void DiffuseProbeGridBlendIrradiancePass::LoadShader() { - // load shader - // Note: the shader may not be available on all platforms - AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiance.azshader"; - m_shader = RPI::LoadCriticalShader(shaderFilePath); - if (m_shader == nullptr) + // load shaders, each supervariant handles a different number of rays per probe + // Note: the raytracing shaders may not be available on all platforms + m_shaders.reserve(DiffuseProbeGridNumRaysPerProbeArraySize); + for (uint32_t index = 0; index < DiffuseProbeGridNumRaysPerProbeArraySize; ++index) { - return; - } + AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiance.azshader"; + Data::Instance shader = RPI::LoadCriticalShader(shaderFilePath, DiffuseProbeGridNumRaysPerProbeArray[index].m_supervariant); + if (shader == nullptr) + { + return; + } - // load pipeline state - RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; - const auto& shaderVariant = m_shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); - shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); - m_pipelineState = m_shader->AcquirePipelineState(pipelineStateDescriptor); + RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; + const auto& shaderVariant = shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); + shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); + const RHI::PipelineState* pipelineState = shader->AcquirePipelineState(pipelineStateDescriptor); + AZ_Assert(pipelineState, "Failed to acquire pipeline state"); - // load Pass Srg asset - m_srgLayout = m_shader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Pass); + RHI::Ptr srgLayout = shader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Pass); + AZ_Assert(srgLayout.get(), "Failed to find Srg layout"); - // retrieve the number of threads per thread group from the shader - const auto outcome = RPI::GetComputeShaderNumThreads(m_shader->GetAsset(), m_dispatchArgs); - if (!outcome.IsSuccess()) - { - AZ_Error("PassSystem", false, "[DiffuseProbeBlendIrradiancePass '%s']: Shader '%s' contains invalid numthreads arguments:\n%s", GetPathName().GetCStr(), shaderFilePath.c_str(), outcome.GetError().c_str()); + RHI::DispatchDirect dispatchArgs; + const auto outcome = RPI::GetComputeShaderNumThreads(shader->GetAsset(), dispatchArgs); + if (!outcome.IsSuccess()) + { + AZ_Error("PassSystem", false, "[DiffuseProbeBlendIrradiancePass '%s']: Shader '%s' contains invalid numthreads arguments:\n%s", GetPathName().GetCStr(), shaderFilePath.c_str(), outcome.GetError().c_str()); + } + + m_shaders.push_back({ shader, pipelineState, srgLayout, dispatchArgs }); } } @@ -132,7 +137,8 @@ namespace AZ { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) - diffuseProbeGrid->UpdateBlendIrradianceSrg(m_shader, m_srgLayout); + DiffuseProbeGridShader& shader = m_shaders[diffuseProbeGrid->GetNumRaysPerProbe().m_index]; + diffuseProbeGrid->UpdateBlendIrradianceSrg(shader.m_shader, shader.m_srgLayout); diffuseProbeGrid->GetBlendIrradianceSrg()->Compile(); } @@ -147,6 +153,8 @@ namespace AZ // submit the DispatchItem for each DiffuseProbeGrid for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { + DiffuseProbeGridShader& shader = m_shaders[diffuseProbeGrid->GetNumRaysPerProbe().m_index]; + const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetBlendIrradianceSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); @@ -155,8 +163,8 @@ namespace AZ diffuseProbeGrid->GetTexture2DProbeCount(probeCountX, probeCountY); RHI::DispatchItem dispatchItem; - dispatchItem.m_arguments = m_dispatchArgs; - dispatchItem.m_pipelineState = m_pipelineState; + dispatchItem.m_arguments = shader.m_dispatchArgs; + dispatchItem.m_pipelineState = shader.m_pipelineState; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsX = probeCountX * dispatchItem.m_arguments.m_direct.m_threadsPerGroupX; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsY = probeCountY * dispatchItem.m_arguments.m_direct.m_threadsPerGroupY; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsZ = 1; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.h index 3c5691a4b4..77dba9745c 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace AZ { @@ -47,11 +48,16 @@ namespace AZ void CompileResources(const RHI::FrameGraphCompileContext& context) override; void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; - // shader - Data::Instance m_shader; - const RHI::PipelineState* m_pipelineState = nullptr; - RHI::Ptr m_srgLayout; - RHI::DispatchDirect m_dispatchArgs; + // shaders + struct DiffuseProbeGridShader + { + Data::Instance m_shader; + const RHI::PipelineState* m_pipelineState = nullptr; + RHI::Ptr m_srgLayout; + RHI::DispatchDirect m_dispatchArgs; + }; + + AZStd::vector m_shaders; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp index 7394b1ccfb..1d1e6f745f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -48,29 +47,35 @@ namespace AZ void DiffuseProbeGridClassificationPass::LoadShader() { - // load shader - // Note: the shader may not be available on all platforms - AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.azshader"; - m_shader = RPI::LoadCriticalShader(shaderFilePath); - if (m_shader == nullptr) + // load shaders, each supervariant handles a different number of rays per probe + // Note: the raytracing shaders may not be available on all platforms + m_shaders.reserve(DiffuseProbeGridNumRaysPerProbeArraySize); + for (uint32_t index = 0; index < DiffuseProbeGridNumRaysPerProbeArraySize; ++index) { - return; - } + AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridClassification.azshader"; + Data::Instance shader = RPI::LoadCriticalShader(shaderFilePath, DiffuseProbeGridNumRaysPerProbeArray[index].m_supervariant); + if (shader == nullptr) + { + return; + } - // load pipeline state - RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; - const auto& shaderVariant = m_shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); - shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); - m_pipelineState = m_shader->AcquirePipelineState(pipelineStateDescriptor); + RHI::PipelineStateDescriptorForDispatch pipelineStateDescriptor; + const auto& shaderVariant = shader->GetVariant(RPI::ShaderAsset::RootShaderVariantStableId); + shaderVariant.ConfigurePipelineState(pipelineStateDescriptor); + const RHI::PipelineState* pipelineState = shader->AcquirePipelineState(pipelineStateDescriptor); + AZ_Assert(pipelineState, "Failed to acquire pipeline state"); - // load Pass Srg asset - m_srgLayout = m_shader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Pass); + RHI::Ptr srgLayout = shader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Pass); + AZ_Assert(srgLayout.get(), "Failed to find Srg layout"); - // retrieve the number of threads per thread group from the shader - const auto outcome = RPI::GetComputeShaderNumThreads(m_shader->GetAsset(), m_dispatchArgs); - if (!outcome.IsSuccess()) - { - AZ_Error("PassSystem", false, "[DiffuseProbeClassificationPass '%s']: Shader '%s' contains invalid numthreads arguments:\n%s", GetPathName().GetCStr(), shaderFilePath.c_str(), outcome.GetError().c_str()); + RHI::DispatchDirect dispatchArgs; + const auto outcome = RPI::GetComputeShaderNumThreads(shader->GetAsset(), dispatchArgs); + if (!outcome.IsSuccess()) + { + AZ_Error("PassSystem", false, "[DiffuseProbeBlendIrradiancePass '%s']: Shader '%s' contains invalid numthreads arguments:\n%s", GetPathName().GetCStr(), shaderFilePath.c_str(), outcome.GetError().c_str()); + } + + m_shaders.push_back({ shader, pipelineState, srgLayout, dispatchArgs }); } } @@ -135,7 +140,8 @@ namespace AZ { // the diffuse probe grid Srg must be updated in the Compile phase in order to successfully bind the ReadWrite shader inputs // (see ValidateSetImageView() in ShaderResourceGroupData.cpp) - diffuseProbeGrid->UpdateClassificationSrg(m_shader, m_srgLayout); + DiffuseProbeGridShader& shader = m_shaders[diffuseProbeGrid->GetNumRaysPerProbe().m_index]; + diffuseProbeGrid->UpdateClassificationSrg(shader.m_shader, shader.m_srgLayout); diffuseProbeGrid->GetClassificationSrg()->Compile(); } } @@ -149,6 +155,8 @@ namespace AZ // submit the DispatchItems for each DiffuseProbeGrid for (auto& diffuseProbeGrid : diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids()) { + DiffuseProbeGridShader& shader = m_shaders[diffuseProbeGrid->GetNumRaysPerProbe().m_index]; + const RHI::ShaderResourceGroup* shaderResourceGroup = diffuseProbeGrid->GetClassificationSrg()->GetRHIShaderResourceGroup(); commandList->SetShaderResourceGroupForDispatch(*shaderResourceGroup); @@ -157,8 +165,8 @@ namespace AZ diffuseProbeGrid->GetTexture2DProbeCount(probeCountX, probeCountY); RHI::DispatchItem dispatchItem; - dispatchItem.m_arguments = m_dispatchArgs; - dispatchItem.m_pipelineState = m_pipelineState; + dispatchItem.m_arguments = shader.m_dispatchArgs; + dispatchItem.m_pipelineState = shader.m_pipelineState; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsX = probeCountX; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsY = probeCountY; dispatchItem.m_arguments.m_direct.m_totalNumberOfThreadsZ = 1; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.h index 271cb3d146..3ec76fd0f0 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.h @@ -18,6 +18,7 @@ #include #include #include +#include namespace AZ { @@ -49,10 +50,15 @@ namespace AZ void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; // shader - Data::Instance m_shader; - const RHI::PipelineState* m_pipelineState = nullptr; - RHI::Ptr m_srgLayout; - RHI::DispatchDirect m_dispatchArgs; + struct DiffuseProbeGridShader + { + Data::Instance m_shader; + const RHI::PipelineState* m_pipelineState = nullptr; + RHI::Ptr m_srgLayout; + RHI::DispatchDirect m_dispatchArgs; + }; + + AZStd::vector m_shaders; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp index 281255f1b4..ea02a8e0a2 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp @@ -295,6 +295,12 @@ namespace AZ probeGrid->SetNormalBias(normalBias); } + void DiffuseProbeGridFeatureProcessor::SetNumRaysPerProbe(const DiffuseProbeGridHandle& probeGrid, const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe) + { + AZ_Assert(probeGrid.get(), "SetNumRaysPerProbe called with an invalid handle"); + probeGrid->SetNumRaysPerProbe(numRaysPerProbe); + } + void DiffuseProbeGridFeatureProcessor::SetAmbientMultiplier(const DiffuseProbeGridHandle& probeGrid, float ambientMultiplier) { AZ_Assert(probeGrid.get(), "SetAmbientMultiplier called with an invalid handle"); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h index 16dfbd517a..d0df7dfbfe 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h @@ -39,6 +39,7 @@ namespace AZ void SetProbeSpacing(const DiffuseProbeGridHandle& probeGrid, const AZ::Vector3& probeSpacing) override; void SetViewBias(const DiffuseProbeGridHandle& probeGrid, float viewBias) override; void SetNormalBias(const DiffuseProbeGridHandle& probeGrid, float normalBias) override; + void SetNumRaysPerProbe(const DiffuseProbeGridHandle& probeGrid, const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe) override; void SetAmbientMultiplier(const DiffuseProbeGridHandle& probeGrid, float ambientMultiplier) override; void Enable(const DiffuseProbeGridHandle& probeGrid, bool enable) override; void SetGIShadows(const DiffuseProbeGridHandle& probeGrid, bool giShadows) override; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp index df551e7f42..7af6f4c8ec 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp @@ -299,7 +299,7 @@ namespace AZ }; RHI::DispatchRaysItem dispatchRaysItem; - dispatchRaysItem.m_width = diffuseProbeGrid->GetNumRaysPerProbe(); + dispatchRaysItem.m_width = diffuseProbeGrid->GetNumRaysPerProbe().m_rayCount; dispatchRaysItem.m_height = diffuseProbeGrid->GetTotalProbeCount(); dispatchRaysItem.m_depth = 1; dispatchRaysItem.m_rayTracingPipelineState = m_rayTracingPipelineState.get(); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPIUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPIUtils.h index 3e92542429..70754777c7 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPIUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPIUtils.h @@ -33,11 +33,11 @@ namespace AZ Data::Asset FindCriticalShaderAsset(const AZStd::string& shaderFilePath); //! Loads a shader for the given shader asset ID. Optional shaderFilePath param for debugging. - Data::Instance LoadShader(Data::AssetId shaderAssetId, const AZStd::string& shaderFilePath = ""); + Data::Instance LoadShader(Data::AssetId shaderAssetId, const AZStd::string& shaderFilePath = "", const AZStd::string& supervariantName = ""); //! Loads a shader for the given shader file path - Data::Instance LoadShader(const AZStd::string& shaderFilePath); - Data::Instance LoadCriticalShader(const AZStd::string& shaderFilePath); + Data::Instance LoadShader(const AZStd::string& shaderFilePath, const AZStd::string& supervariantName = ""); + Data::Instance LoadCriticalShader(const AZStd::string& shaderFilePath, const AZStd::string& supervariantName = ""); //! Loads a streaming image asset for the given file path Data::Instance LoadStreamingTexture(AZStd::string_view path); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RPIUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RPIUtils.cpp index fda8f967da..7285273c3e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RPIUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RPIUtils.cpp @@ -74,7 +74,7 @@ namespace AZ return shaderAsset; } - Data::Instance LoadShader(Data::AssetId shaderAssetId, const AZStd::string& shaderFilePath) + Data::Instance LoadShader(Data::AssetId shaderAssetId, const AZStd::string& shaderFilePath, const AZStd::string& supervariantName) { auto shaderAsset = FindShaderAsset(shaderAssetId, shaderFilePath); if (!shaderAsset) @@ -82,7 +82,7 @@ namespace AZ return nullptr; } - Data::Instance shader = Shader::FindOrCreate(shaderAsset); + Data::Instance shader = Shader::FindOrCreate(shaderAsset, AZ::Name(supervariantName)); if (!shader) { AZ_Error("RPI Utils", false, "Failed to find or create a shader instance from shader asset [%s] with asset ID [%s]", shaderFilePath.c_str(), shaderAssetId.ToString().c_str()); @@ -103,15 +103,15 @@ namespace AZ return FindShaderAsset(GetShaderAssetId(shaderFilePath, isCritical), shaderFilePath); } - Data::Instance LoadShader(const AZStd::string& shaderFilePath) + Data::Instance LoadShader(const AZStd::string& shaderFilePath, const AZStd::string& supervariantName) { - return LoadShader(GetShaderAssetId(shaderFilePath), shaderFilePath); + return LoadShader(GetShaderAssetId(shaderFilePath), shaderFilePath, supervariantName); } - Data::Instance LoadCriticalShader(const AZStd::string& shaderFilePath) + Data::Instance LoadCriticalShader(const AZStd::string& shaderFilePath, const AZStd::string& supervariantName) { const bool isCritical = true; - return LoadShader(GetShaderAssetId(shaderFilePath, isCritical), shaderFilePath); + return LoadShader(GetShaderAssetId(shaderFilePath, isCritical), shaderFilePath, supervariantName); } AZ::Data::Instance LoadStreamingTexture(AZStd::string_view path) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentConstants.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentConstants.h index 64669eceab..91c4e2bcf4 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentConstants.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentConstants.h @@ -19,5 +19,6 @@ namespace AZ static constexpr float DefaultDiffuseProbeGridAmbientMultiplier = 1.0f; static constexpr float DefaultDiffuseProbeGridViewBias = 0.2f; static constexpr float DefaultDiffuseProbeGridNormalBias = 0.1f; + static constexpr DiffuseProbeGridNumRaysPerProbe DefaultDiffuseProbeGridNumRaysPerProbe = DiffuseProbeGridNumRaysPerProbe::NumRaysPerProbe_288; } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp index 397f22c4ff..b7dbbdbcf5 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp @@ -34,12 +34,13 @@ namespace AZ if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(1) + ->Version(2) // ATOM-17127 ->Field("ProbeSpacing", &DiffuseProbeGridComponentConfig::m_probeSpacing) ->Field("Extents", &DiffuseProbeGridComponentConfig::m_extents) ->Field("AmbientMultiplier", &DiffuseProbeGridComponentConfig::m_ambientMultiplier) ->Field("ViewBias", &DiffuseProbeGridComponentConfig::m_viewBias) ->Field("NormalBias", &DiffuseProbeGridComponentConfig::m_normalBias) + ->Field("NumRaysPerProbe", &DiffuseProbeGridComponentConfig::m_numRaysPerProbe) ->Field("EditorMode", &DiffuseProbeGridComponentConfig::m_editorMode) ->Field("RuntimeMode", &DiffuseProbeGridComponentConfig::m_runtimeMode) ->Field("BakedIrradianceTextureRelativePath", &DiffuseProbeGridComponentConfig::m_bakedIrradianceTextureRelativePath) @@ -138,6 +139,7 @@ namespace AZ m_featureProcessor->SetAmbientMultiplier(m_handle, m_configuration.m_ambientMultiplier); m_featureProcessor->SetViewBias(m_handle, m_configuration.m_viewBias); m_featureProcessor->SetNormalBias(m_handle, m_configuration.m_normalBias); + m_featureProcessor->SetNumRaysPerProbe(m_handle, m_configuration.m_numRaysPerProbe); // load the baked texture assets, but only if they are all valid if (m_configuration.m_bakedIrradianceTextureAsset.GetId().IsValid() && @@ -320,6 +322,17 @@ namespace AZ m_featureProcessor->SetNormalBias(m_handle, m_configuration.m_normalBias); } + void DiffuseProbeGridComponentController::SetNumRaysPerProbe(const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe) + { + if (!m_featureProcessor) + { + return; + } + + m_configuration.m_numRaysPerProbe = numRaysPerProbe; + m_featureProcessor->SetNumRaysPerProbe(m_handle, m_configuration.m_numRaysPerProbe); + } + void DiffuseProbeGridComponentController::SetEditorMode(DiffuseProbeGridMode editorMode) { if (!m_featureProcessor) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h index d3dd0efc0c..8f84954b2c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h @@ -35,6 +35,7 @@ namespace AZ float m_ambientMultiplier = DefaultDiffuseProbeGridAmbientMultiplier; float m_viewBias = DefaultDiffuseProbeGridViewBias; float m_normalBias = DefaultDiffuseProbeGridNormalBias; + DiffuseProbeGridNumRaysPerProbe m_numRaysPerProbe = DefaultDiffuseProbeGridNumRaysPerProbe; DiffuseProbeGridMode m_editorMode = DiffuseProbeGridMode::RealTime; DiffuseProbeGridMode m_runtimeMode = DiffuseProbeGridMode::RealTime; @@ -98,6 +99,7 @@ namespace AZ void SetAmbientMultiplier(float ambientMultiplier); void SetViewBias(float viewBias); void SetNormalBias(float normalBias); + void SetNumRaysPerProbe(const DiffuseProbeGridNumRaysPerProbe& numRaysPerProbe); void SetEditorMode(DiffuseProbeGridMode editorMode); void SetRuntimeMode(DiffuseProbeGridMode runtimeMode); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp index 19b3f4459c..6588b18636 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp @@ -40,6 +40,7 @@ namespace AZ ->Field("ambientMultiplier", &EditorDiffuseProbeGridComponent::m_ambientMultiplier) ->Field("viewBias", &EditorDiffuseProbeGridComponent::m_viewBias) ->Field("normalBias", &EditorDiffuseProbeGridComponent::m_normalBias) + ->Field("numRaysPerProbe", &EditorDiffuseProbeGridComponent::m_numRaysPerProbe) ->Field("editorMode", &EditorDiffuseProbeGridComponent::m_editorMode) ->Field("runtimeMode", &EditorDiffuseProbeGridComponent::m_runtimeMode) ; @@ -93,6 +94,9 @@ namespace AZ ->Attribute(Edit::Attributes::Step, 0.1f) ->Attribute(Edit::Attributes::Min, 0.0f) ->Attribute(Edit::Attributes::Max, 1.0f) + ->DataElement(AZ::Edit::UIHandlers::ComboBox, &EditorDiffuseProbeGridComponent::m_numRaysPerProbe, "Number of Rays Per Probe", "Number of rays cast by each probe to detect lighting in its surroundings") + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorDiffuseProbeGridComponent::OnNumRaysPerProbeChanged) + ->Attribute(AZ::Edit::Attributes::EnumValues, &EditorDiffuseProbeGridComponent::GetNumRaysPerProbeEnumList) ->ClassElement(AZ::Edit::ClassElements::EditorData, "Grid mode") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(Edit::UIHandlers::ComboBox, &EditorDiffuseProbeGridComponent::m_editorMode, "Editor Mode", "Controls whether the editor uses RealTime or Baked diffuse GI. RealTime requires a ray-tracing capable GPU. Auto-Select will fallback to Baked if ray-tracing is not available") @@ -216,6 +220,19 @@ namespace AZ } } + AZStd::vector> EditorDiffuseProbeGridComponent::GetNumRaysPerProbeEnumList() const + { + AZStd::vector> enumList; + + for (uint32_t index = 0; index < DiffuseProbeGridNumRaysPerProbeArraySize; ++index) + { + const DiffuseProbeGridNumRaysPerProbeEntry& entry = DiffuseProbeGridNumRaysPerProbeArray[index]; + enumList.push_back(Edit::EnumConstant(entry.m_enum, AZStd::to_string(entry.m_rayCount).c_str())); + } + + return enumList; + } + AZ::Aabb EditorDiffuseProbeGridComponent::GetEditorSelectionBoundsViewport([[maybe_unused]] const AzFramework::ViewportInfo& viewportInfo) { return m_controller.GetAabb(); @@ -313,6 +330,12 @@ namespace AZ return AZ::Edit::PropertyRefreshLevels::None; } + AZ::u32 EditorDiffuseProbeGridComponent::OnNumRaysPerProbeChanged() + { + m_controller.SetNumRaysPerProbe(m_numRaysPerProbe); + return AZ::Edit::PropertyRefreshLevels::None; + } + AZ::u32 EditorDiffuseProbeGridComponent::OnEditorModeChanged() { // this will update the configuration and also change the DiffuseProbeGrid mode diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.h index ba5693b022..c7832902a8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.h @@ -56,6 +56,7 @@ namespace AZ AZStd::string ValidateOrCreateNewTexturePath(const AZStd::string& relativePath, const char* fileSuffix); void CheckoutSourceTextureFile(const AZStd::string& fullPath); void CheckTextureAssetNotification(const AZStd::string& relativePath, Data::Asset& configurationAsset); + AZStd::vector> GetNumRaysPerProbeEnumList() const; // property change notifications AZ::Outcome OnProbeSpacingValidateX(void* newValue, const AZ::Uuid& valueType); @@ -65,6 +66,7 @@ namespace AZ AZ::u32 OnAmbientMultiplierChanged(); AZ::u32 OnViewBiasChanged(); AZ::u32 OnNormalBiasChanged(); + AZ::u32 OnNumRaysPerProbeChanged(); AZ::u32 OnEditorModeChanged(); AZ::u32 OnRuntimeModeChanged(); AZ::Outcome OnModeChangeValidate(void* newValue, const AZ::Uuid& valueType); @@ -80,6 +82,7 @@ namespace AZ float m_ambientMultiplier = DefaultDiffuseProbeGridAmbientMultiplier; float m_viewBias = DefaultDiffuseProbeGridViewBias; float m_normalBias = DefaultDiffuseProbeGridNormalBias; + DiffuseProbeGridNumRaysPerProbe m_numRaysPerProbe = DefaultDiffuseProbeGridNumRaysPerProbe; DiffuseProbeGridMode m_editorMode = DiffuseProbeGridMode::RealTime; DiffuseProbeGridMode m_runtimeMode = DiffuseProbeGridMode::RealTime; From c95845d45b3523092ac61fc4eab5c9199749af0d Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Wed, 19 Jan 2022 20:02:50 -0800 Subject: [PATCH 075/413] chore: replace isspace Signed-off-by: Michael Pollind --- .../Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp index e1f1a0f801..e89c46bce7 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp @@ -45,7 +45,7 @@ namespace AZ::Debug } for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) { - if (!::isspace(processStatusView[i])) + if (processStatusView[i] != ' ') { return processStatusView[i] != '0'; } From c98d14ad924d2e0efe9eeff650b899cdeb204cda Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Thu, 20 Jan 2022 00:10:07 -0600 Subject: [PATCH 076/413] =?UTF-8?q?Atom=20Tools:=20Removing=20unnecessary?= =?UTF-8?q?=20modules,=20components,=20and=20dead=20code=20from=20ME=20?= =?UTF-8?q?=E2=80=A2=20Working=20toward=20creating=20a=20standalone=20appl?= =?UTF-8?q?ication=20template=20Removing=20application=20level=20modules?= =?UTF-8?q?=20and=20system=20components=20that=20make=20it=20difficult=20t?= =?UTF-8?q?o=20navigate=20the=20project=20and=20add=20a=20lot=20of=20boile?= =?UTF-8?q?rplate=20code=20=E2=80=A2=20Temporarily=20keeping=20viewport=20?= =?UTF-8?q?module=20and=20components=20because=20shutting=20down=20the=20a?= =?UTF-8?q?pplication=20deactivates=20module=20entities=20before=20system?= =?UTF-8?q?=20entities=20without=20respecting=20component=20service=20depe?= =?UTF-8?q?ndency=20order.=20This=20caused=20several=20RPI=20assets=20and?= =?UTF-8?q?=20names=20to=20leak=20because=20they=20were=20not=20being=20de?= =?UTF-8?q?stroyed=20in=20the=20correct=20order.=20=E2=80=A2=20Fixing=20in?= =?UTF-8?q?clude=20paths=20not=20referenced=20source=20folders=20=E2=80=A2?= =?UTF-8?q?=20Mostly=20cleanup=20and=20reorganization,=20no=20behavioral?= =?UTF-8?q?=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guthrie Adams --- .../Application/AtomToolsApplication.cpp | 4 + .../AtomToolsFrameworkSystemComponent.cpp | 6 +- .../DynamicProperty/DynamicProperty.cpp | 2 +- .../Code/Source/Inspector/InspectorWidget.cpp | 2 +- .../Tools/MaterialEditor/Code/CMakeLists.txt | 80 ++----------- .../Atom/Document/MaterialDocumentModule.h | 29 ----- .../Atom/Window/MaterialEditorWindowModule.h | 28 ----- .../Code/Source/Document/MaterialDocument.h | 7 +- .../Document/MaterialDocumentModule.cpp | 30 ----- .../Document/MaterialDocumentRequestBus.h | 0 .../Document/MaterialDocumentSettings.cpp | 2 +- .../Document/MaterialDocumentSettings.h | 0 .../MaterialDocumentSystemComponent.cpp | 85 -------------- .../MaterialDocumentSystemComponent.h | 41 ------- .../Code/Source/MaterialEditorApplication.cpp | 107 ++++++++++++++---- .../Code/Source/MaterialEditorApplication.h | 19 ++++ .../Viewport/InputController/Behavior.cpp | 5 +- .../InputController/DollyCameraBehavior.cpp | 4 +- .../InputController/DollyCameraBehavior.h | 2 +- .../Viewport/InputController/IdleBehavior.cpp | 2 +- .../Viewport/InputController/IdleBehavior.h | 2 +- .../MaterialEditorViewportInputController.cpp | 24 ++-- .../MaterialEditorViewportInputController.h | 4 +- ...MaterialEditorViewportInputControllerBus.h | 0 .../InputController/MoveCameraBehavior.cpp | 6 +- .../InputController/MoveCameraBehavior.h | 2 +- .../InputController/OrbitCameraBehavior.cpp | 2 +- .../InputController/OrbitCameraBehavior.h | 2 +- .../InputController/PanCameraBehavior.cpp | 8 +- .../InputController/PanCameraBehavior.h | 2 +- .../RotateEnvironmentBehavior.cpp | 2 +- .../RotateEnvironmentBehavior.h | 2 +- .../InputController/RotateModelBehavior.cpp | 2 +- .../InputController/RotateModelBehavior.h | 2 +- .../Viewport/MaterialViewportComponent.cpp | 17 +-- .../Viewport/MaterialViewportComponent.h | 4 +- .../Viewport/MaterialViewportModule.cpp | 2 +- .../Viewport/MaterialViewportModule.h | 0 .../MaterialViewportNotificationBus.h | 0 .../Viewport/MaterialViewportRenderer.cpp | 36 +++--- .../Viewport/MaterialViewportRenderer.h | 2 +- .../Viewport/MaterialViewportRequestBus.h | 0 .../Viewport/MaterialViewportSettings.cpp | 2 +- .../Viewport/MaterialViewportSettings.h | 0 .../Viewport/PerformanceMetrics.h | 0 .../Viewport/PerformanceMonitorComponent.cpp | 2 +- .../Viewport/PerformanceMonitorComponent.h | 5 +- .../Viewport/PerformanceMonitorRequestBus.h | 3 +- .../CreateMaterialDialog.cpp | 2 +- .../CreateMaterialDialog.h | 2 +- .../Source/Window/HelpDialog/HelpDialog.cpp | 4 +- .../Source/Window/HelpDialog/HelpDialog.h | 2 +- .../Source/Window/MaterialEditorWindow.cpp | 4 +- .../Window/MaterialEditorWindowComponent.cpp | 89 --------------- .../Window/MaterialEditorWindowComponent.h | 58 ---------- .../Window/MaterialEditorWindowModule.cpp | 38 ------- .../Window/MaterialEditorWindowSettings.cpp | 2 +- .../Window/MaterialEditorWindowSettings.h | 0 .../MaterialInspector/MaterialInspector.cpp | 2 +- .../MaterialInspector/MaterialInspector.h | 2 +- .../PerformanceMonitorWidget.cpp | 9 +- .../LightingPresetBrowserDialog.cpp | 2 +- .../LightingPresetBrowserDialog.h | 2 +- .../ModelPresetBrowserDialog.cpp | 2 +- .../ModelPresetBrowserDialog.h | 2 +- .../Window/SettingsDialog/SettingsWidget.h | 2 +- .../Window/ToolBar/LightingPresetComboBox.cpp | 6 +- .../Window/ToolBar/LightingPresetComboBox.h | 2 +- .../Window/ToolBar/MaterialEditorToolBar.cpp | 8 +- .../Window/ToolBar/MaterialEditorToolBar.h | 2 +- .../Window/ToolBar/ModelPresetComboBox.cpp | 6 +- .../Window/ToolBar/ModelPresetComboBox.h | 2 +- .../ViewportSettingsInspector.cpp | 4 +- .../ViewportSettingsInspector.h | 6 +- .../Code/materialeditor_files.cmake | 82 ++++++++++++++ .../Code/materialeditordocument_files.cmake | 19 ---- .../Code/materialeditorviewport_files.cmake | 46 -------- .../Code/materialeditorwindow_files.cmake | 52 --------- .../ShaderManagementConsoleWindowComponent.h | 12 +- .../ShaderManagementConsoleToolBar.cpp | 4 +- 80 files changed, 327 insertions(+), 736 deletions(-) delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentModule.h delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Window/MaterialEditorWindowModule.h delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentModule.cpp rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Document/MaterialDocumentRequestBus.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Document/MaterialDocumentSettings.h (100%) delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.cpp delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.h rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/InputController/MaterialEditorViewportInputControllerBus.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/MaterialViewportModule.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/MaterialViewportNotificationBus.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/MaterialViewportRequestBus.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/MaterialViewportSettings.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/PerformanceMetrics.h (100%) rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Viewport/PerformanceMonitorRequestBus.h (95%) delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.cpp delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.h delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowModule.cpp rename Gems/Atom/Tools/MaterialEditor/Code/{Include/Atom => Source}/Window/MaterialEditorWindowSettings.h (100%) delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/materialeditordocument_files.cmake delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/materialeditorviewport_files.cmake delete mode 100644 Gems/Atom/Tools/MaterialEditor/Code/materialeditorwindow_files.cmake diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index 51e8bc4dda..7b6be61050 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -158,6 +158,7 @@ namespace AtomToolsFramework components.end(), { azrtti_typeid(), + azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), @@ -187,6 +188,9 @@ namespace AtomToolsFramework AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotificationBus::Broadcast( &AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotifications::OnDatabaseInitialized); + AzToolsFramework::SourceControlConnectionRequestBus::Broadcast( + &AzToolsFramework::SourceControlConnectionRequests::EnableSourceControl, true); + if (!AZ::RPI::RPISystemInterface::Get()->IsInitialized()) { AZ::RPI::RPISystemInterface::Get()->InitializeSystemAssets(); diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkSystemComponent.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkSystemComponent.cpp index a8481ef5bd..adba947092 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkSystemComponent.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkSystemComponent.cpp @@ -30,7 +30,7 @@ namespace AtomToolsFramework { ec->Class("AtomToolsFrameworkSystemComponent", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b)) + ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System")) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ; } @@ -39,12 +39,12 @@ namespace AtomToolsFramework void AtomToolsFrameworkSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("AtomToolsFrameworkSystemService")); + provided.push_back(AZ_CRC_CE("AtomToolsFrameworkSystemService")); } void AtomToolsFrameworkSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.push_back(AZ_CRC("AtomToolsFrameworkSystemService")); + incompatible.push_back(AZ_CRC_CE("AtomToolsFrameworkSystemService")); } void AtomToolsFrameworkSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp index d4599b68b7..830f71933c 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp @@ -160,7 +160,7 @@ namespace AtomToolsFramework ApplyRangeEditDataAttributes(); break; case DynamicPropertyType::Color: - AddEditDataAttribute(AZ_CRC("ColorEditorConfiguration", 0xc8b9510e), AZ::RPI::ColorUtils::GetRgbEditorConfig()); + AddEditDataAttribute(AZ_CRC_CE("ColorEditorConfiguration"), AZ::RPI::ColorUtils::GetRgbEditorConfig()); break; case DynamicPropertyType::Enum: m_editData.m_elementId = AZ::Edit::UIHandlers::ComboBox; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorWidget.cpp index fbe188364a..89f7e9d3bf 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorWidget.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include namespace AtomToolsFramework { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt index 1d9295f9b3..5a0d153578 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt @@ -18,78 +18,12 @@ if(NOT PAL_TRAIT_ATOM_MATERIAL_EDITOR_APPLICATION_SUPPORTED) return() endif() - -ly_add_target( - NAME MaterialEditor.Document STATIC - NAMESPACE Gem - AUTOMOC - FILES_CMAKE - materialeditordocument_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - . - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - Gem::AtomToolsFramework.Static - Gem::AtomToolsFramework.Editor - Gem::Atom_RPI.Edit - Gem::Atom_RPI.Public - Gem::Atom_RHI.Reflect -) - -ly_add_target( - NAME MaterialEditor.Window STATIC - NAMESPACE Gem - AUTOMOC - AUTOUIC - AUTORCC - FILES_CMAKE - materialeditorwindow_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - . - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - Gem::AtomToolsFramework.Static - Gem::AtomToolsFramework.Editor - Gem::Atom_RPI.Public - Gem::Atom_Feature_Common.Public -) - -ly_add_target( - NAME MaterialEditor.Viewport STATIC - NAMESPACE Gem - AUTOMOC - AUTOUIC - FILES_CMAKE - materialeditorviewport_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - . - Source - Public - Include - BUILD_DEPENDENCIES - PUBLIC - Gem::AtomToolsFramework.Static - Gem::AtomToolsFramework.Editor - Gem::Atom_RHI.Public - Gem::Atom_RPI.Public - Gem::Atom_Feature_Common.Static - Gem::Atom_Component_DebugCamera.Static - Gem::AtomLyIntegration_CommonFeatures.Static -) - ly_add_target( NAME MaterialEditor EXECUTABLE NAMESPACE Gem AUTOMOC + AUTOUIC + AUTORCC FILES_CMAKE materialeditor_files.cmake ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake @@ -106,9 +40,13 @@ ly_add_target( PRIVATE Gem::AtomToolsFramework.Static Gem::AtomToolsFramework.Editor - Gem::MaterialEditor.Window - Gem::MaterialEditor.Viewport - Gem::MaterialEditor.Document + Gem::Atom_RHI.Public + Gem::Atom_RHI.Reflect + Gem::Atom_RPI.Edit + Gem::Atom_RPI.Public + Gem::Atom_Feature_Common.Public + Gem::Atom_Component_DebugCamera.Static + Gem::AtomLyIntegration_CommonFeatures.Static RUNTIME_DEPENDENCIES Gem::AtomToolsFramework.Editor Gem::EditorPythonBindings.Editor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentModule.h b/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentModule.h deleted file mode 100644 index 0813f8cab8..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentModule.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace MaterialEditor -{ - //! Entry point for Material Editor Document library. This module is responsible for registering dependencies and logic needed - //! for the Material Document API - class MaterialDocumentModule - : public AZ::Module - { - public: - AZ_RTTI(MaterialDocumentModule, "{81D7A170-9284-4DE9-8D92-B6B94E8A2BDF}", AZ::Module); - AZ_CLASS_ALLOCATOR(MaterialDocumentModule, AZ::SystemAllocator, 0); - - MaterialDocumentModule(); - - //! Add required SystemComponents to the SystemEntity. - AZ::ComponentTypeList GetRequiredSystemComponents() const override; - }; -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Window/MaterialEditorWindowModule.h b/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Window/MaterialEditorWindowModule.h deleted file mode 100644 index 611a993084..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Window/MaterialEditorWindowModule.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace MaterialEditor -{ - //! Entry point for Material Editor Window library. - class MaterialEditorWindowModule - : public AZ::Module - { - public: - AZ_RTTI(MaterialEditorWindowModule, "{57D6239C-AE03-4ED8-9125-35C5B1625503}", AZ::Module); - AZ_CLASS_ALLOCATOR(MaterialEditorWindowModule, AZ::SystemAllocator, 0); - - MaterialEditorWindowModule(); - - //! Add required SystemComponents to the SystemEntity. - AZ::ComponentTypeList GetRequiredSystemComponents() const override; - }; -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h index ceb3190f26..c975824e22 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h @@ -7,18 +7,17 @@ */ #pragma once -#include #include #include -#include +#include #include -#include #include #include #include -#include +#include #include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentModule.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentModule.cpp deleted file mode 100644 index c721798cfd..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentModule.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include - -namespace MaterialEditor -{ - MaterialDocumentModule::MaterialDocumentModule() - { - // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. - m_descriptors.insert(m_descriptors.end(), { - MaterialDocumentSystemComponent::CreateDescriptor(), - }); - } - - AZ::ComponentTypeList MaterialDocumentModule::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - azrtti_typeid(), - }; - } -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentRequestBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentRequestBus.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentRequestBus.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentRequestBus.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSettings.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSettings.cpp index 4823b8c67c..256497de54 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSettings.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSettings.cpp @@ -6,9 +6,9 @@ * */ -#include #include #include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentSettings.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSettings.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Document/MaterialDocumentSettings.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSettings.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.cpp deleted file mode 100644 index 9302b5ac5c..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace MaterialEditor -{ - void MaterialDocumentSystemComponent::Reflect(AZ::ReflectContext* context) - { - MaterialDocumentSettings::Reflect(context); - - if (AZ::SerializeContext* serialize = azrtti_cast(context)) - { - serialize->Class() - ->Version(0); - - if (AZ::EditContext* ec = serialize->GetEditContext()) - { - ec->Class("MaterialDocumentSystemComponent", "Tool for editing Atom material files") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System")) - ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ; - } - } - - if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->EBus("MaterialDocumentRequestBus") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Editor") - ->Attribute(AZ::Script::Attributes::Module, "materialeditor") - ; - } - } - - void MaterialDocumentSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - required.push_back(AZ_CRC_CE("AtomToolsDocumentSystemService")); - required.push_back(AZ_CRC_CE("AssetProcessorToolsConnection")); - required.push_back(AZ_CRC_CE("AssetDatabaseService")); - required.push_back(AZ_CRC_CE("PropertyManagerService")); - required.push_back(AZ_CRC_CE("RPISystem")); - } - - void MaterialDocumentSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("MaterialDocumentSystemService")); - } - - void MaterialDocumentSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("MaterialDocumentSystemService")); - } - - void MaterialDocumentSystemComponent::Init() - { - } - - void MaterialDocumentSystemComponent::Activate() - { - AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast( - &AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Handler::RegisterDocumentType, - []() - { - return aznew MaterialDocument(); - }); - } - - void MaterialDocumentSystemComponent::Deactivate() - { - } -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.h deleted file mode 100644 index af19956088..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocumentSystemComponent.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace MaterialEditor -{ - //! MaterialDocumentSystemComponent - class MaterialDocumentSystemComponent - : public AZ::Component - { - public: - AZ_COMPONENT(MaterialDocumentSystemComponent, "{E011DA51-855D-45FA-87A3-1C1CD6379091}"); - - MaterialDocumentSystemComponent() = default; - ~MaterialDocumentSystemComponent() = default; - MaterialDocumentSystemComponent(const MaterialDocumentSystemComponent&) = delete; - MaterialDocumentSystemComponent& operator=(const MaterialDocumentSystemComponent&) = delete; - - static void Reflect(AZ::ReflectContext* context); - - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); - - private: - //////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation - void Init() override; - void Activate() override; - void Deactivate() override; - //////////////////////////////////////////////////////////////////////// - }; -} // namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp index 15a5ff1715..2e64740057 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp @@ -6,22 +6,73 @@ * */ -#include -#include -#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include #include +#include +#include +#include + +void InitMaterialEditorResources() +{ + // Must register qt resources from other modules + Q_INIT_RESOURCE(MaterialEditor); + Q_INIT_RESOURCE(InspectorWidget); + Q_INIT_RESOURCE(AtomToolsAssetBrowser); +} namespace MaterialEditor { - //! This function returns the build system target name of "MaterialEditor" - AZStd::string MaterialEditorApplication::GetBuildTargetName() const + MaterialEditorApplication::MaterialEditorApplication(int* argc, char*** argv) + : Base(argc, argv) { -#if !defined(LY_CMAKE_TARGET) -#error "LY_CMAKE_TARGET must be defined in order to add this source file to a CMake executable target" -#endif - return AZStd::string{ LY_CMAKE_TARGET }; + InitMaterialEditorResources(); + + QApplication::setApplicationName("O3DE Material Editor"); + + // The settings registry has been created at this point, so add the CMake target + AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization( + *AZ::SettingsRegistry::Get(), GetBuildTargetName()); + + AzToolsFramework::EditorWindowRequestBus::Handler::BusConnect(); + AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusConnect(); + } + + MaterialEditorApplication::~MaterialEditorApplication() + { + AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusDisconnect(); + AzToolsFramework::EditorWindowRequestBus::Handler::BusDisconnect(); + m_window.reset(); + } + + void MaterialEditorApplication::Reflect(AZ::ReflectContext* context) + { + Base::Reflect(context); + MaterialDocumentSettings::Reflect(context); + MaterialEditorWindowSettings::Reflect(context); + + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("MaterialDocumentRequestBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Editor") + ->Attribute(AZ::Script::Attributes::Module, "materialeditor") + ; + } + } + + void MaterialEditorApplication::CreateStaticModules(AZStd::vector& outModules) + { + Base::CreateStaticModules(outModules); + outModules.push_back(aznew MaterialViewportModule); } const char* MaterialEditorApplication::GetCurrentConfigurationName() const @@ -35,26 +86,42 @@ namespace MaterialEditor #endif } - MaterialEditorApplication::MaterialEditorApplication(int* argc, char*** argv) - : Base(argc, argv) + void MaterialEditorApplication::StartCommon(AZ::Entity* systemEntity) { - QApplication::setApplicationName("O3DE Material Editor"); + Base::StartCommon(systemEntity); - // The settings registry has been created at this point, so add the CMake target - AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization( - *AZ::SettingsRegistry::Get(), GetBuildTargetName()); + AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast( + &AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Handler::RegisterDocumentType, + []() { return aznew MaterialDocument(); }); } - void MaterialEditorApplication::CreateStaticModules(AZStd::vector& outModules) + AZStd::string MaterialEditorApplication::GetBuildTargetName() const { - Base::CreateStaticModules(outModules); - outModules.push_back(aznew MaterialDocumentModule); - outModules.push_back(aznew MaterialViewportModule); - outModules.push_back(aznew MaterialEditorWindowModule); +#if !defined(LY_CMAKE_TARGET) +#error "LY_CMAKE_TARGET must be defined in order to add this source file to a CMake executable target" +#endif + //! Returns the build system target name of "MaterialEditor" + return AZStd::string{ LY_CMAKE_TARGET }; } AZStd::vector MaterialEditorApplication::GetCriticalAssetFilters() const { return AZStd::vector({ "passes/", "config/", "MaterialEditor/" }); } + + void MaterialEditorApplication::CreateMainWindow() + { + m_materialEditorBrowserInteractions.reset(aznew MaterialEditorBrowserInteractions); + m_window.reset(aznew MaterialEditorWindow); + } + + void MaterialEditorApplication::DestroyMainWindow() + { + m_window.reset(); + } + + QWidget* MaterialEditorApplication::GetAppMainWindow() + { + return m_window.get(); + } } // namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h index bf2e6f6ca1..060353e396 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h @@ -9,6 +9,10 @@ #pragma once #include +#include +#include +#include +#include namespace MaterialEditor { @@ -16,6 +20,8 @@ namespace MaterialEditor class MaterialEditorApplication : public AtomToolsFramework::AtomToolsDocumentApplication + , private AzToolsFramework::EditorWindowRequestBus::Handler + , private AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler { public: AZ_TYPE_INFO(MaterialEditor::MaterialEditorApplication, "{30F90CA5-1253-49B5-8143-19CEE37E22BB}"); @@ -23,13 +29,26 @@ namespace MaterialEditor using Base = AtomToolsFramework::AtomToolsDocumentApplication; MaterialEditorApplication(int* argc, char*** argv); + ~MaterialEditorApplication(); // AzFramework::Application overrides... + void Reflect(AZ::ReflectContext* context) override; void CreateStaticModules(AZStd::vector& outModules) override; const char* GetCurrentConfigurationName() const override; + void StartCommon(AZ::Entity* systemEntity) override; // AtomToolsFramework::AtomToolsApplication overrides... AZStd::string GetBuildTargetName() const override; AZStd::vector GetCriticalAssetFilters() const override; + + // AtomToolsMainWindowFactoryRequestBus::Handler overrides... + void CreateMainWindow() override; + void DestroyMainWindow() override; + + // AzToolsFramework::EditorWindowRequests::Bus::Handler + QWidget* GetAppMainWindow() override; + + AZStd::unique_ptr m_window; + AZStd::unique_ptr m_materialEditorBrowserInteractions; }; } // namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/Behavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/Behavior.cpp index 321b79ba87..a843c4965c 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/Behavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/Behavior.cpp @@ -6,10 +6,9 @@ * */ -#include #include - -#include +#include +#include #include namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.cpp index c0326bce2a..c69884c5c0 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.cpp @@ -6,11 +6,11 @@ * */ +#include #include #include -#include +#include #include -#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.h index be226e5fde..5debfc4dd1 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/DollyCameraBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.cpp index 64e2fe1fdc..0cd062d86d 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.cpp @@ -6,7 +6,7 @@ * */ -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.h index 3eec594da2..16543a890d 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/IdleBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp index 1784405ffa..ced59f1bf5 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp @@ -9,30 +9,30 @@ #include #include -#include #include #include +#include +#include #include #include -#include #include #include -#include +#include #include #include #include -#include +#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.h index b488c3bf29..a68666f06d 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.h @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputControllerBus.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputControllerBus.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.cpp index a449d6f7ff..80b3409f57 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.cpp @@ -6,10 +6,10 @@ * */ -#include #include -#include -#include +#include +#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.h index b37350423f..ea0850ba16 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MoveCameraBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.cpp index 4d8a5b9343..1d93e4eafe 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.cpp @@ -7,8 +7,8 @@ */ #include -#include #include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.h index 98240aef96..a312d22e73 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/OrbitCameraBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.cpp index 62839be13c..2b036a1319 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.cpp @@ -6,11 +6,11 @@ * */ -#include -#include #include -#include -#include +#include +#include +#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.h index de8e2c3c43..93233511f0 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/PanCameraBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.cpp index 17fb3f3e52..894841becd 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.h index 80989df520..56c7a5190a 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateEnvironmentBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace AZ { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.cpp index 032b412d6e..ed09ae8fa3 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.h index 7653e10014..e2c20ab5fd 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/RotateModelBehavior.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp index 9cf714b40e..b2f1cdc9c1 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp @@ -9,19 +9,19 @@ #include #include #include -#include -#include #include #include #include #include #include +#include #include #include -#include #include #include #include +#include +#include namespace MaterialEditor { @@ -42,7 +42,7 @@ namespace MaterialEditor { editContext->Class("MaterialViewport", "Manages configurations for lighting and models displayed in the viewport") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b)) + ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System")) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ; } @@ -103,18 +103,19 @@ namespace MaterialEditor void MaterialViewportComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) { - required.push_back(AZ_CRC("PerformanceMonitorService", 0x6a44241a)); - required.push_back(AZ_CRC("AtomImageBuilderService", 0x76ded592)); + required.push_back(AZ_CRC_CE("RPISystem")); + required.push_back(AZ_CRC_CE("AssetDatabaseService")); + required.push_back(AZ_CRC_CE("PerformanceMonitorService")); } void MaterialViewportComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("MaterialViewportService", 0xed9b44d7)); + provided.push_back(AZ_CRC_CE("MaterialViewportService")); } void MaterialViewportComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.push_back(AZ_CRC("MaterialViewportService", 0xed9b44d7)); + incompatible.push_back(AZ_CRC_CE("MaterialViewportService")); } void MaterialViewportComponent::Init() diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h index 68668bd804..7209dfa489 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h @@ -12,11 +12,11 @@ #include #include #include -#include -#include #include #include #include +#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportModule.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportModule.cpp index 7c3bc208ff..01a13519fb 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportModule.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportModule.cpp @@ -6,8 +6,8 @@ * */ -#include #include +#include #include namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportModule.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportModule.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportModule.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportModule.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportNotificationBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportNotificationBus.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportNotificationBus.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportNotificationBus.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp index 409674f0bc..478fb92c55 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp @@ -8,51 +8,51 @@ #undef RC_INVOKED -#include #include +#include -#include #include +#include #include #include -#include +#include +#include #include #include #include #include -#include -#include +#include #include #include -#include -#include -#include -#include #include +#include +#include +#include +#include -#include #include #include -#include -#include -#include -#include #include +#include #include #include -#include #include -#include +#include #include -#include +#include #include #include +#include -#include +#include +#include +#include +#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.h index c6380ddc00..35b7965a2e 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.h @@ -11,12 +11,12 @@ #include #include #include -#include #include #include #include #include #include +#include namespace AZ { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRequestBus.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRequestBus.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportSettings.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportSettings.cpp index c2c35119c2..0f08716407 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportSettings.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportSettings.cpp @@ -6,9 +6,9 @@ * */ -#include #include #include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportSettings.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportSettings.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportSettings.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportSettings.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/PerformanceMetrics.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMetrics.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/PerformanceMetrics.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMetrics.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.cpp index 563b2754df..c8f12480b5 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.cpp @@ -31,7 +31,7 @@ namespace MaterialEditor void PerformanceMonitorComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("PerformanceMonitorService", 0x6a44241a)); + provided.push_back(AZ_CRC_CE("PerformanceMonitorService")); } void PerformanceMonitorComponent::Init() diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.h index 88a6827bd1..3045bf9533 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorComponent.h @@ -8,11 +8,10 @@ #pragma once +#include #include #include - -#include -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/PerformanceMonitorRequestBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorRequestBus.h similarity index 95% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/PerformanceMonitorRequestBus.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorRequestBus.h index ae09064766..6001787d99 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/PerformanceMonitorRequestBus.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/PerformanceMonitorRequestBus.h @@ -8,8 +8,7 @@ #pragma once #include - -#include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp index 31ca873c48..0e6cf565e3 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include @@ -15,6 +14,7 @@ #include #include #include +#include #include namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.h index 3453d8347c..ed3cb2773b 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.h @@ -10,7 +10,7 @@ #include -#include +#include #include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.cpp index 3ad41e4803..3e8cf19539 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.cpp @@ -6,7 +6,7 @@ * */ -#include +#include namespace MaterialEditor { @@ -20,4 +20,4 @@ namespace MaterialEditor HelpDialog::~HelpDialog() = default; } // namespace MaterialEditor -#include +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.h index 5cca57ad2d..ec5b756df4 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/HelpDialog/HelpDialog.h @@ -13,7 +13,7 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT #include -#include +#include AZ_POP_DISABLE_WARNING #endif diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp index 44adda432d..e1f8e713d4 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp @@ -6,19 +6,19 @@ * */ -#include #include #include #include -#include #include #include #include #include +#include #include #include #include #include +#include #include #include #include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.cpp deleted file mode 100644 index 5359ba8e53..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace MaterialEditor -{ - void MaterialEditorWindowComponent::Reflect(AZ::ReflectContext* context) - { - MaterialEditorWindowSettings::Reflect(context); - - if (AZ::SerializeContext* serialize = azrtti_cast(context)) - { - serialize->Class() - ->Version(0); - } - } - - void MaterialEditorWindowComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - required.push_back(AZ_CRC_CE("AssetBrowserService")); - required.push_back(AZ_CRC_CE("PropertyManagerService")); - required.push_back(AZ_CRC_CE("SourceControlService")); - required.push_back(AZ_CRC_CE("AtomToolsMainWindowSystemService")); - } - - void MaterialEditorWindowComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("MaterialEditorWindowService")); - } - - void MaterialEditorWindowComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("MaterialEditorWindowService")); - } - - void MaterialEditorWindowComponent::Init() - { - } - - void MaterialEditorWindowComponent::Activate() - { - AzToolsFramework::EditorWindowRequestBus::Handler::BusConnect(); - AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusConnect(); - AzToolsFramework::SourceControlConnectionRequestBus::Broadcast(&AzToolsFramework::SourceControlConnectionRequests::EnableSourceControl, true); - } - - void MaterialEditorWindowComponent::Deactivate() - { - AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusDisconnect(); - AzToolsFramework::EditorWindowRequestBus::Handler::BusDisconnect(); - - m_window.reset(); - } - - void MaterialEditorWindowComponent::CreateMainWindow() - { - m_materialEditorBrowserInteractions.reset(aznew MaterialEditorBrowserInteractions); - - m_window.reset(aznew MaterialEditorWindow); - } - - void MaterialEditorWindowComponent::DestroyMainWindow() - { - m_window.reset(); - } - - QWidget* MaterialEditorWindowComponent::GetAppMainWindow() - { - return m_window.get(); - } - -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.h deleted file mode 100644 index 87f6160089..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowComponent.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -#include -#include -#include - -namespace MaterialEditor -{ - //! MaterialEditorWindowComponent is the entry point for the Material Editor gem user interface, and is mainly - //! used for initialization and registration of other classes, including MaterialEditorWindow. - class MaterialEditorWindowComponent - : public AZ::Component - , private AzToolsFramework::EditorWindowRequestBus::Handler - , private AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler - { - public: - AZ_COMPONENT(MaterialEditorWindowComponent, "{03976F19-3C74-49FE-A15F-7D3CADBA616C}"); - - static void Reflect(AZ::ReflectContext* context); - - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); - - private: - //////////////////////////////////////////////////////////////////////// - // AtomToolsMainWindowFactoryRequestBus::Handler overrides... - void CreateMainWindow() override; - void DestroyMainWindow() override; - //////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // AzToolsFramework::EditorWindowRequests::Bus::Handler - QWidget* GetAppMainWindow() override; - ////////////////////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation - void Init() override; - void Activate() override; - void Deactivate() override; - //////////////////////////////////////////////////////////////////////// - - AZStd::unique_ptr m_window; - AZStd::unique_ptr m_materialEditorBrowserInteractions; - }; -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowModule.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowModule.cpp deleted file mode 100644 index 1562d11647..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowModule.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -void InitMaterialEditorResources() -{ - //Must register qt resources from other modules - Q_INIT_RESOURCE(MaterialEditor); - Q_INIT_RESOURCE(InspectorWidget); - Q_INIT_RESOURCE(AtomToolsAssetBrowser); -} - -namespace MaterialEditor -{ - MaterialEditorWindowModule::MaterialEditorWindowModule() - { - InitMaterialEditorResources(); - - // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. - m_descriptors.insert(m_descriptors.end(), { - MaterialEditorWindowComponent::CreateDescriptor(), - }); - } - - AZ::ComponentTypeList MaterialEditorWindowModule::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } -} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowSettings.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowSettings.cpp index 71c71e8b75..5ab17d7b26 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowSettings.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowSettings.cpp @@ -6,9 +6,9 @@ * */ -#include #include #include +#include namespace MaterialEditor { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Window/MaterialEditorWindowSettings.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowSettings.h similarity index 100% rename from Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Window/MaterialEditorWindowSettings.h rename to Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindowSettings.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp index e99f456653..7790b9bef5 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include @@ -15,6 +14,7 @@ #include #include #include +#include #include namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.h index a3b98e13d2..a4cd2b7616 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.h @@ -9,12 +9,12 @@ #pragma once #if !defined(Q_MOC_RUN) -#include #include #include #include #include #include +#include #endif namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp index 940790eb0a..8492ce5f1f 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp @@ -6,10 +6,9 @@ * */ -#include - -#include -#include +#include +#include +#include #include @@ -55,4 +54,4 @@ namespace MaterialEditor } } // namespace MaterialEditor -#include +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp index f8ad038a85..cc7a851429 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp @@ -8,9 +8,9 @@ #include #include -#include #include #include +#include #include namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h index f9d455d915..68b52b3a98 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h @@ -10,8 +10,8 @@ #if !defined(Q_MOC_RUN) #include -#include #include +#include #endif #include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp index f5a1677462..e16b61d214 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp @@ -7,9 +7,9 @@ */ #include -#include #include #include +#include #include namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h index 67da7db262..a169d3053b 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h @@ -10,8 +10,8 @@ #if !defined(Q_MOC_RUN) #include -#include #include +#include #endif #include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/SettingsDialog/SettingsWidget.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/SettingsDialog/SettingsWidget.h index fea98eeda1..e7c655ee21 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/SettingsDialog/SettingsWidget.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/SettingsDialog/SettingsWidget.h @@ -9,10 +9,10 @@ #pragma once #if !defined(Q_MOC_RUN) -#include #include #include #include +#include #endif namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.cpp index e0bb59cb82..20229cad37 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.cpp @@ -6,9 +6,9 @@ * */ -#include -#include #include +#include +#include namespace MaterialEditor { @@ -102,4 +102,4 @@ namespace MaterialEditor } // namespace MaterialEditor -#include +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.h index 4c452dfb5b..f39b856085 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/LightingPresetComboBox.h @@ -10,7 +10,7 @@ #if !defined(Q_MOC_RUN) #include -#include +#include #endif namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.cpp index 10442e0c27..25877f910d 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.cpp @@ -6,21 +6,21 @@ * */ -#include -#include -#include #include +#include +#include +#include #include #include #include AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT #include +#include #include #include #include #include -#include AZ_POP_DISABLE_WARNING namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.h index c25b90eb80..056fb3ba80 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/MaterialEditorToolBar.h @@ -11,7 +11,7 @@ #if !defined(Q_MOC_RUN) #include #include -#include +#include #endif namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.cpp index 1e8bfec485..1c9bd36be4 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.cpp @@ -6,9 +6,9 @@ * */ -#include -#include #include +#include +#include namespace MaterialEditor { @@ -102,4 +102,4 @@ namespace MaterialEditor } // namespace MaterialEditor -#include +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.h index e315854d75..bb71cec25b 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ToolBar/ModelPresetComboBox.h @@ -10,7 +10,7 @@ #if !defined(Q_MOC_RUN) #include -#include +#include #endif namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp index 613762c10a..512059f1f6 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp @@ -7,10 +7,10 @@ */ #include -#include #include #include #include +#include #include #include #include @@ -376,4 +376,4 @@ namespace MaterialEditor } // namespace MaterialEditor -#include +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h index 6299ddb1f2..464a55aa7f 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h @@ -12,11 +12,11 @@ #include #include #include -#include -#include -#include #include #include +#include +#include +#include #endif namespace MaterialEditor diff --git a/Gems/Atom/Tools/MaterialEditor/Code/materialeditor_files.cmake b/Gems/Atom/Tools/MaterialEditor/Code/materialeditor_files.cmake index d4c4364ba7..9d1e2b22f8 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/materialeditor_files.cmake +++ b/Gems/Atom/Tools/MaterialEditor/Code/materialeditor_files.cmake @@ -10,4 +10,86 @@ set(FILES Source/main.cpp Source/MaterialEditorApplication.cpp Source/MaterialEditorApplication.h + + Source/Document/MaterialDocumentRequestBus.h + Source/Document/MaterialDocumentSettings.h + Source/Document/MaterialDocument.cpp + Source/Document/MaterialDocument.h + Source/Document/MaterialDocumentSettings.cpp + + Source/Viewport/MaterialViewportModule.h + Source/Viewport/MaterialViewportModule.cpp + Source/Viewport/InputController/MaterialEditorViewportInputControllerBus.h + Source/Viewport/MaterialViewportSettings.h + Source/Viewport/MaterialViewportRequestBus.h + Source/Viewport/MaterialViewportNotificationBus.h + Source/Viewport/PerformanceMetrics.h + Source/Viewport/PerformanceMonitorRequestBus.h + Source/Viewport/InputController/MaterialEditorViewportInputController.cpp + Source/Viewport/InputController/MaterialEditorViewportInputController.h + Source/Viewport/InputController/Behavior.cpp + Source/Viewport/InputController/Behavior.h + Source/Viewport/InputController/DollyCameraBehavior.cpp + Source/Viewport/InputController/DollyCameraBehavior.h + Source/Viewport/InputController/IdleBehavior.cpp + Source/Viewport/InputController/IdleBehavior.h + Source/Viewport/InputController/MoveCameraBehavior.cpp + Source/Viewport/InputController/MoveCameraBehavior.h + Source/Viewport/InputController/PanCameraBehavior.cpp + Source/Viewport/InputController/PanCameraBehavior.h + Source/Viewport/InputController/OrbitCameraBehavior.cpp + Source/Viewport/InputController/OrbitCameraBehavior.h + Source/Viewport/InputController/RotateEnvironmentBehavior.cpp + Source/Viewport/InputController/RotateEnvironmentBehavior.h + Source/Viewport/InputController/RotateModelBehavior.cpp + Source/Viewport/InputController/RotateModelBehavior.h + Source/Viewport/MaterialViewportSettings.cpp + Source/Viewport/MaterialViewportComponent.cpp + Source/Viewport/MaterialViewportComponent.h + Source/Viewport/MaterialViewportWidget.cpp + Source/Viewport/MaterialViewportWidget.h + Source/Viewport/MaterialViewportWidget.ui + Source/Viewport/MaterialViewportRenderer.cpp + Source/Viewport/MaterialViewportRenderer.h + Source/Viewport/PerformanceMonitorComponent.cpp + Source/Viewport/PerformanceMonitorComponent.h + + Source/Window/MaterialEditorWindowSettings.h + Source/Window/MaterialEditorBrowserInteractions.h + Source/Window/MaterialEditorBrowserInteractions.cpp + Source/Window/MaterialEditorWindow.h + Source/Window/MaterialEditorWindow.cpp + Source/Window/MaterialEditorWindowSettings.cpp + Source/Window/MaterialEditor.qrc + Source/Window/MaterialEditor.qss + Source/Window/SettingsDialog/SettingsDialog.cpp + Source/Window/SettingsDialog/SettingsDialog.h + Source/Window/SettingsDialog/SettingsWidget.cpp + Source/Window/SettingsDialog/SettingsWidget.h + Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp + Source/Window/CreateMaterialDialog/CreateMaterialDialog.h + Source/Window/CreateMaterialDialog/CreateMaterialDialog.ui + Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp + Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h + Source/Window/PresetBrowserDialogs/PresetBrowserDialog.ui + Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp + Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h + Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp + Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h + Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp + Source/Window/PerformanceMonitor/PerformanceMonitorWidget.h + Source/Window/PerformanceMonitor/PerformanceMonitorWidget.ui + Source/Window/ToolBar/MaterialEditorToolBar.h + Source/Window/ToolBar/MaterialEditorToolBar.cpp + Source/Window/ToolBar/ModelPresetComboBox.h + Source/Window/ToolBar/ModelPresetComboBox.cpp + Source/Window/ToolBar/LightingPresetComboBox.h + Source/Window/ToolBar/LightingPresetComboBox.cpp + Source/Window/MaterialInspector/MaterialInspector.h + Source/Window/MaterialInspector/MaterialInspector.cpp + Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h + Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp + Source/Window/HelpDialog/HelpDialog.h + Source/Window/HelpDialog/HelpDialog.cpp + Source/Window/HelpDialog/HelpDialog.ui ) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/materialeditordocument_files.cmake b/Gems/Atom/Tools/MaterialEditor/Code/materialeditordocument_files.cmake deleted file mode 100644 index d86dd03749..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/materialeditordocument_files.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Include/Atom/Document/MaterialDocumentModule.h - Include/Atom/Document/MaterialDocumentRequestBus.h - Include/Atom/Document/MaterialDocumentSettings.h - Source/Document/MaterialDocumentModule.cpp - Source/Document/MaterialDocumentSystemComponent.cpp - Source/Document/MaterialDocumentSystemComponent.h - Source/Document/MaterialDocument.cpp - Source/Document/MaterialDocument.h - Source/Document/MaterialDocumentSettings.cpp -) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/materialeditorviewport_files.cmake b/Gems/Atom/Tools/MaterialEditor/Code/materialeditorviewport_files.cmake deleted file mode 100644 index ba34cabd90..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/materialeditorviewport_files.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Include/Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h - Include/Atom/Viewport/MaterialViewportModule.h - Include/Atom/Viewport/MaterialViewportSettings.h - Include/Atom/Viewport/MaterialViewportRequestBus.h - Include/Atom/Viewport/MaterialViewportNotificationBus.h - Include/Atom/Viewport/PerformanceMetrics.h - Include/Atom/Viewport/PerformanceMonitorRequestBus.h - Source/Viewport/InputController/MaterialEditorViewportInputController.cpp - Source/Viewport/InputController/MaterialEditorViewportInputController.h - Source/Viewport/InputController/Behavior.cpp - Source/Viewport/InputController/Behavior.h - Source/Viewport/InputController/DollyCameraBehavior.cpp - Source/Viewport/InputController/DollyCameraBehavior.h - Source/Viewport/InputController/IdleBehavior.cpp - Source/Viewport/InputController/IdleBehavior.h - Source/Viewport/InputController/MoveCameraBehavior.cpp - Source/Viewport/InputController/MoveCameraBehavior.h - Source/Viewport/InputController/PanCameraBehavior.cpp - Source/Viewport/InputController/PanCameraBehavior.h - Source/Viewport/InputController/OrbitCameraBehavior.cpp - Source/Viewport/InputController/OrbitCameraBehavior.h - Source/Viewport/InputController/RotateEnvironmentBehavior.cpp - Source/Viewport/InputController/RotateEnvironmentBehavior.h - Source/Viewport/InputController/RotateModelBehavior.cpp - Source/Viewport/InputController/RotateModelBehavior.h - Source/Viewport/MaterialViewportModule.cpp - Source/Viewport/MaterialViewportSettings.cpp - Source/Viewport/MaterialViewportComponent.cpp - Source/Viewport/MaterialViewportComponent.h - Source/Viewport/MaterialViewportWidget.cpp - Source/Viewport/MaterialViewportWidget.h - Source/Viewport/MaterialViewportWidget.ui - Source/Viewport/MaterialViewportRenderer.cpp - Source/Viewport/MaterialViewportRenderer.h - Source/Viewport/PerformanceMonitorComponent.cpp - Source/Viewport/PerformanceMonitorComponent.h -) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/materialeditorwindow_files.cmake b/Gems/Atom/Tools/MaterialEditor/Code/materialeditorwindow_files.cmake deleted file mode 100644 index 3d21e71294..0000000000 --- a/Gems/Atom/Tools/MaterialEditor/Code/materialeditorwindow_files.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Include/Atom/Window/MaterialEditorWindowModule.h - Include/Atom/Window/MaterialEditorWindowSettings.h - Source/Window/MaterialEditorBrowserInteractions.h - Source/Window/MaterialEditorBrowserInteractions.cpp - Source/Window/MaterialEditorWindow.h - Source/Window/MaterialEditorWindow.cpp - Source/Window/MaterialEditorWindowModule.cpp - Source/Window/MaterialEditorWindowSettings.cpp - Source/Window/MaterialEditor.qrc - Source/Window/MaterialEditor.qss - Source/Window/MaterialEditorWindowComponent.h - Source/Window/MaterialEditorWindowComponent.cpp - Source/Window/SettingsDialog/SettingsDialog.cpp - Source/Window/SettingsDialog/SettingsDialog.h - Source/Window/SettingsDialog/SettingsWidget.cpp - Source/Window/SettingsDialog/SettingsWidget.h - Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp - Source/Window/CreateMaterialDialog/CreateMaterialDialog.h - Source/Window/CreateMaterialDialog/CreateMaterialDialog.ui - Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp - Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h - Source/Window/PresetBrowserDialogs/PresetBrowserDialog.ui - Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp - Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h - Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp - Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h - Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp - Source/Window/PerformanceMonitor/PerformanceMonitorWidget.h - Source/Window/PerformanceMonitor/PerformanceMonitorWidget.ui - Source/Window/ToolBar/MaterialEditorToolBar.h - Source/Window/ToolBar/MaterialEditorToolBar.cpp - Source/Window/ToolBar/ModelPresetComboBox.h - Source/Window/ToolBar/ModelPresetComboBox.cpp - Source/Window/ToolBar/LightingPresetComboBox.h - Source/Window/ToolBar/LightingPresetComboBox.cpp - Source/Window/MaterialInspector/MaterialInspector.h - Source/Window/MaterialInspector/MaterialInspector.cpp - Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h - Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp - Source/Window/HelpDialog/HelpDialog.h - Source/Window/HelpDialog/HelpDialog.cpp - Source/Window/HelpDialog/HelpDialog.ui -) diff --git a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindowComponent.h b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindowComponent.h index 9b43babd9a..aab0f7ce37 100644 --- a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindowComponent.h +++ b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindowComponent.h @@ -8,15 +8,15 @@ #pragma once +#include +#include +#include + #include #include -#include - -#include -#include -#include -#include +#include +#include namespace ShaderManagementConsole { diff --git a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ToolBar/ShaderManagementConsoleToolBar.cpp b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ToolBar/ShaderManagementConsoleToolBar.cpp index d65ac7048d..5699713240 100644 --- a/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ToolBar/ShaderManagementConsoleToolBar.cpp +++ b/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ToolBar/ShaderManagementConsoleToolBar.cpp @@ -7,7 +7,7 @@ */ #include -#include +#include AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT #include @@ -29,4 +29,4 @@ namespace ShaderManagementConsole } } // namespace ShaderManagementConsole -#include +#include From b3d996ea230ce78293eef87959cebd349d84e6d2 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 20 Jan 2022 08:32:02 -0800 Subject: [PATCH 077/413] Adding automated test to ensure scripts attached to net-level-entities are started on the server Signed-off-by: Gene Walters --- ...TestLevelEntityComponent.AutoComponent.xml | 15 + ...tworkTestPlayerComponent.AutoComponent.xml | 2 - .../Gem/Code/automatedtesting_files.cmake | 1 + .../Multiplayer/TestSuite_Sandbox.py | 4 + .../Multiplayer_SimpleNetworkLevelEntity.py | 79 +++ .../SimpleNetworkLevelEntity/Player.prefab | 151 +++++ .../SimpleNetworkLevelEntity.prefab | 580 ++++++++++++++++++ .../SimpleNetworkLevelEntity.scriptcanvas | 228 +++++++ .../SimpleNetworkLevelEntity/tags.txt | 12 + 9 files changed, 1070 insertions(+), 2 deletions(-) create mode 100644 AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml create mode 100644 AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py create mode 100644 AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/Player.prefab create mode 100644 AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.prefab create mode 100644 AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.scriptcanvas create mode 100644 AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/tags.txt diff --git a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml new file mode 100644 index 0000000000..2fd196a2f6 --- /dev/null +++ b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml index 251d2b25af..b4dd35d741 100644 --- a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml +++ b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml @@ -29,8 +29,6 @@
- - diff --git a/AutomatedTesting/Gem/Code/automatedtesting_files.cmake b/AutomatedTesting/Gem/Code/automatedtesting_files.cmake index eb619104a4..1f6dbbd772 100644 --- a/AutomatedTesting/Gem/Code/automatedtesting_files.cmake +++ b/AutomatedTesting/Gem/Code/automatedtesting_files.cmake @@ -12,4 +12,5 @@ set(FILES Source/AutomatedTestingSystemComponent.cpp Source/AutomatedTestingSystemComponent.h Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml + Source/AutoGen/NetworkTestLevelEntityComponent.AutoComponent.xml ) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py index 8c5f33993d..56c2608762 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py @@ -35,3 +35,7 @@ class TestAutomation(TestAutomationBase): def test_Multiplayer_AutoComponent_RPC(self, request, workspace, editor, launcher_platform): from .tests import Multiplayer_AutoComponent_RPC as test_module self._run_prefab_test(request, workspace, editor, test_module) + + def test_Multiplayer_SimpleNetworkLevelEntity(self, request, workspace, editor, launcher_platform): + from .tests import Multiplayer_SimpleNetworkLevelEntity as test_module + self._run_prefab_test(request, workspace, editor, test_module) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py new file mode 100644 index 0000000000..da332f9085 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py @@ -0,0 +1,79 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +# Test Case Title : Check that level entities with network bindings are properly replicated. +# Note: This test should be ran on a fresh editor run; some bugs with spawnables occur only on the first editor play-mode. + + +# fmt: off +class TestSuccessFailTuples(): + enter_game_mode = ("Entered game mode", "Failed to enter game mode") + exit_game_mode = ("Exited game mode", "Couldn't exit game mode") + find_network_player = ("Found network player", "Couldn't find network player") +# fmt: on + + +def Multiplayer_SimpleNetworkLevelEntity(): + r""" + Summary: + Runs a test to make sure that network entities in a level function and are replicated to clients as expecte + + Level Description: + - Static + 1. NetLevelEntity. This is a networked entity which has a script attached to ensure it's replicated. + + + Expected Outcome: + We should see logs stating that the net-sync'd level entity exists on both server and client. + + :return: + """ + import azlmbr.legacy.general as general + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import Tracer + + from editor_python_test_tools.utils import TestHelper as helper + from ly_remote_console.remote_console_commands import RemoteConsole as RemoteConsole + + level_name = "SimpleNetworkLevelEntity" + player_prefab_name = "Player" + player_prefab_path = f"levels/multiplayer/{level_name}/{player_prefab_name}.network.spawnable" + + helper.init_idle() + + # 1) Open Level + helper.open_level("Multiplayer", level_name) + + with Tracer() as section_tracer: + # 2) Enter game mode + helper.multiplayer_enter_game_mode(TestSuccessFailTuples.enter_game_mode, player_prefab_path.lower()) + + # 3) Make sure the network player was spawned + player_id = general.find_game_entity(player_prefab_name) + Report.critical_result(TestSuccessFailTuples.find_network_player, player_id.IsValid()) + + # 4) Check the editor logs for network spawnable errors + ATTEMPTING_INVALID_NETSPAWN_WAIT_TIME_SECONDS = 1.0 # The editor will try to net-spawn its networked level entity before it's even a client. Make sure this doesn't happen. + helper.fail_if_log_line_found('NetworkEntityManager', "RequestNetSpawnableInstantiation: Requested spawnable Root.network.spawnable doesn't exist in the NetworkSpawnableLibrary. Please make sure it is a network spawnable", section_tracer.errors, ATTEMPTING_INVALID_NETSPAWN_WAIT_TIME_SECONDS) + + # 5) Ensure the script graph attached to the level entity is running on both client and server + SCRIPTGRAPH_ENABLED_WAIT_TIME_SECONDS = 0.25 + # Check Server + helper.succeed_if_log_line_found('EditorServer', "Script: SimpleNetworkLevelEntity: On Graph Start", section_tracer.prints, SCRIPTGRAPH_ENABLED_WAIT_TIME_SECONDS) + # Check Editor/Client (Uncomment once script asset preload is working properly LYN-9136) + # helper.succeed_if_log_line_found('Script', "SimpleNetworkLevelEntity: On Graph Start", section_tracer.prints, SCRIPTGRAPH_ENABLED_WAIT_TIME_SECONDS) # Client + + + # Exit game mode + helper.exit_game_mode(TestSuccessFailTuples.exit_game_mode) + + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(Multiplayer_SimpleNetworkLevelEntity) diff --git a/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/Player.prefab b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/Player.prefab new file mode 100644 index 0000000000..975319a516 --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/Player.prefab @@ -0,0 +1,151 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "Player", + "Components": { + "Component_[10626669441604518614]": { + "$type": "EditorPrefabComponent", + "Id": 10626669441604518614 + }, + "Component_[15284109105474306026]": { + "$type": "EditorVisibilityComponent", + "Id": 15284109105474306026 + }, + "Component_[1884250773831675865]": { + "$type": "SelectionComponent", + "Id": 1884250773831675865 + }, + "Component_[3027124663594865592]": { + "$type": "EditorInspectorComponent", + "Id": 3027124663594865592 + }, + "Component_[3314300526416851038]": { + "$type": "EditorEntitySortComponent", + "Id": 3314300526416851038, + "Child Entity Order": [ + "Entity_[1340484004600]" + ] + }, + "Component_[5583377204116393478]": { + "$type": "EditorEntityIconComponent", + "Id": 5583377204116393478 + }, + "Component_[5897955848881060165]": { + "$type": "EditorLockComponent", + "Id": 5897955848881060165 + }, + "Component_[6405389103180201977]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6405389103180201977, + "Parent Entity": "" + }, + "Component_[7695912346724202125]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7695912346724202125 + }, + "Component_[775363990560391238]": { + "$type": "EditorOnlyEntityComponent", + "Id": 775363990560391238 + }, + "Component_[904355854135646057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 904355854135646057 + } + } + }, + "Entities": { + "Entity_[1340484004600]": { + "Id": "Entity_[1340484004600]", + "Name": "Player", + "Components": { + "Component_[12294726333564087591]": { + "$type": "SelectionComponent", + "Id": 12294726333564087591 + }, + "Component_[13587084088242540786]": { + "$type": "EditorInspectorComponent", + "Id": 13587084088242540786, + "ComponentOrderEntryArray": [ + { + "ComponentId": 6819443882832501114 + }, + { + "ComponentId": 4337571454344109612, + "SortIndex": 1 + }, + { + "ComponentId": 16457408099527309065, + "SortIndex": 2 + }, + { + "ComponentId": 5577505593558922067, + "SortIndex": 3 + } + ] + }, + "Component_[14335168881008289852]": { + "$type": "EditorEntitySortComponent", + "Id": 14335168881008289852 + }, + "Component_[16308902899170829847]": { + "$type": "EditorVisibilityComponent", + "Id": 16308902899170829847 + }, + "Component_[16457408099527309065]": { + "$type": "GenericComponentWrapper", + "Id": 16457408099527309065, + "m_template": { + "$type": "Multiplayer::NetworkTransformComponent" + } + }, + "Component_[16541569566865026527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 16541569566865026527 + }, + "Component_[2002761223483048905]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2002761223483048905 + }, + "Component_[4337571454344109612]": { + "$type": "GenericComponentWrapper", + "Id": 4337571454344109612, + "m_template": { + "$type": "NetBindComponent" + } + }, + "Component_[477591477979440744]": { + "$type": "EditorLockComponent", + "Id": 477591477979440744 + }, + "Component_[5577505593558922067]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5577505593558922067, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{6DE0E9A8-A1C7-5D0F-9407-4E627C1F223C}", + "subId": 284780167 + }, + "assetHint": "models/sphere.azmodel" + } + } + } + }, + "Component_[5828214869455694702]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5828214869455694702 + }, + "Component_[6819443882832501114]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6819443882832501114, + "Parent Entity": "ContainerEntity" + }, + "Component_[8838623765985560328]": { + "$type": "EditorEntityIconComponent", + "Id": 8838623765985560328 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.prefab b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.prefab new file mode 100644 index 0000000000..abe458246a --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.prefab @@ -0,0 +1,580 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[806656324666]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 9021008456353177945 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[806656324666]": { + "Id": "Entity_[806656324666]", + "Name": "NetEntity", + "Components": { + "Component_[10272449525230713408]": { + "$type": "EditorScriptCanvasComponent", + "Id": 10272449525230713408, + "m_name": "SimpleNetworkLevelEntity.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{C8F17F94-1225-5FFB-A89F-7C5546FF9DD2}", + "path": "C:/prj/o3de/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.scriptcanvas" + } + }, + "sourceHandle": { + "id": "{C8F17F94-1225-5FFB-A89F-7C5546FF9DD2}", + "path": "C:/prj/o3de/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.scriptcanvas" + } + }, + "Component_[12604265186664827718]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 12604265186664827718 + }, + "Component_[12971088454284742740]": { + "$type": "EditorInspectorComponent", + "Id": 12971088454284742740 + }, + "Component_[13637345797899267673]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13637345797899267673 + }, + "Component_[14691827217729577086]": { + "$type": "EditorVisibilityComponent", + "Id": 14691827217729577086 + }, + "Component_[17587769654029626028]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 17587769654029626028, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{6DE0E9A8-A1C7-5D0F-9407-4E627C1F223C}", + "subId": 284780167 + }, + "assetHint": "models/sphere.azmodel" + } + } + } + }, + "Component_[3583806849894952953]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3583806849894952953 + }, + "Component_[3992057042487734240]": { + "$type": "EditorLockComponent", + "Id": 3992057042487734240 + }, + "Component_[4205899043279271481]": { + "$type": "GenericComponentWrapper", + "Id": 4205899043279271481, + "m_template": { + "$type": "Multiplayer::NetworkTransformComponent" + } + }, + "Component_[4416976521140638764]": { + "$type": "EditorEntityIconComponent", + "Id": 4416976521140638764 + }, + "Component_[4951162661196722987]": { + "$type": "EditorEntitySortComponent", + "Id": 4951162661196722987 + }, + "Component_[57491843687005111]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 57491843687005111, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + -0.010266244411468506, + 0.09999752044677734, + 0.4922151565551758 + ] + } + }, + "Component_[7427201282284088219]": { + "$type": "SelectionComponent", + "Id": 7427201282284088219 + }, + "Component_[9767802049284917261]": { + "$type": "GenericComponentWrapper", + "Id": 9767802049284917261, + "m_template": { + "$type": "NetBindComponent" + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.scriptcanvas b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.scriptcanvas new file mode 100644 index 0000000000..7f41ed9af2 --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/SimpleNetworkLevelEntity.scriptcanvas @@ -0,0 +1,228 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "ScriptCanvasData", + "ClassData": { + "m_scriptCanvas": { + "Id": { + "id": 5227099818161821361 + }, + "Name": "Script Canvas Graph", + "Components": { + "Component_[14745706451564425001]": { + "$type": "EditorGraphVariableManagerComponent", + "Id": 14745706451564425001 + }, + "Component_[6188351434280490877]": { + "$type": "EditorGraph", + "Id": 6188351434280490877, + "m_graphData": { + "m_nodes": [ + { + "Id": { + "id": 1181151842701 + }, + "Name": "SC-Node(Print)", + "Components": { + "Component_[11204048151736284490]": { + "$type": "Print", + "Id": 11204048151736284490, + "Slots": [ + { + "id": { + "m_id": "{A417FF98-493E-4DE6-AD3A-E7A1848661E4}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{38BC2AB1-7654-407E-9903-4B5D77EDB6F3}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "m_format": "SimpleNetworkLevelEntity: On Graph Start\n", + "m_unresolvedString": [ + "SimpleNetworkLevelEntity: On Graph Start\n" + ] + } + } + }, + { + "Id": { + "id": 811784655245 + }, + "Name": "SC-Node(Start)", + "Components": { + "Component_[2986280341871382503]": { + "$type": "Start", + "Id": 2986280341871382503, + "Slots": [ + { + "id": { + "m_id": "{61FBEFC6-23BA-4A53-89BF-D0D0E834608C}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled when the entity that owns this graph is fully activated.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ] + } + } + } + ], + "m_connections": [ + { + "Id": { + "id": 2521181639053 + }, + "Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(Print: In)", + "Components": { + "Component_[16295428600276205051]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 16295428600276205051, + "sourceEndpoint": { + "nodeId": { + "id": 811784655245 + }, + "slotId": { + "m_id": "{61FBEFC6-23BA-4A53-89BF-D0D0E834608C}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 1181151842701 + }, + "slotId": { + "m_id": "{A417FF98-493E-4DE6-AD3A-E7A1848661E4}" + } + } + } + } + } + ] + }, + "m_assetType": "{00000000-0000-0000-D033-B2489A010000}", + "versionData": { + "_grammarVersion": 1, + "_runtimeVersion": 1, + "_fileVersion": 1 + }, + "GraphCanvasData": [ + { + "Key": { + "id": 811784655245 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 340.0, + 180.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6045F7F7-02B0-442A-96C7-A0CBCEFF7275}" + } + } + } + }, + { + "Key": { + "id": 1181151842701 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 580.0, + 180.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{589F773E-D82A-4EDD-AEBD-3ADC07FC67CE}" + } + } + } + }, + { + "Key": { + "id": 5227099818161821361 + }, + "Value": { + "ComponentData": { + "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { + "$type": "SceneComponentSaveData" + } + } + } + } + ], + "StatisticsHelper": { + "InstanceCounter": [ + { + "Key": 4199610336680704683, + "Value": 1 + }, + { + "Key": 10684225535275896474, + "Value": 1 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/tags.txt b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/SimpleNetworkLevelEntity/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 From 3c879d59676d513da30b40df9fb8c3abeab0f2e6 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 20 Jan 2022 08:45:35 -0800 Subject: [PATCH 078/413] fix pytest typos Signed-off-by: Gene Walters --- .../Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py index da332f9085..aadf12d7e3 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_SimpleNetworkLevelEntity.py @@ -21,11 +21,11 @@ class TestSuccessFailTuples(): def Multiplayer_SimpleNetworkLevelEntity(): r""" Summary: - Runs a test to make sure that network entities in a level function and are replicated to clients as expecte + Test to make sure that network entities in a level function and are replicated to clients as expected Level Description: - Static - 1. NetLevelEntity. This is a networked entity which has a script attached to ensure it's replicated. + 1. NetLevelEntity. This is a networked entity which has a script attached which prints logs to ensure it's replicated. Expected Outcome: From 3df7e239ac5e345b4b6815dee0eb56149b96d281 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Thu, 20 Jan 2022 09:32:42 -0800 Subject: [PATCH 079/413] Fix build error on PC Signed-off-by: amzn-sj --- .../Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp index 4232a37264..d9bdcb97bc 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp @@ -221,8 +221,8 @@ namespace Terrain numSamples, &AzFramework::Terrain::TerrainDataRequests::GetNumSamplesFromRegion, region, stepSize); - uint32_t updateWidth = numSamples.first; - uint32_t updateHeight = numSamples.second; + uint32_t updateWidth = static_cast(numSamples.first); + uint32_t updateHeight = static_cast(numSamples.second); AZStd::vector pixels; pixels.reserve(updateWidth * updateHeight); { From 730daae1e65426d26cba0d01e0070dac03e6e8c0 Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Thu, 20 Jan 2022 09:33:21 -0800 Subject: [PATCH 080/413] Added code comments. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../Code/Source/RPI.Reflect/Material/MaterialAsset.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp index f2a9efd896..92fded1d5d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp @@ -109,6 +109,9 @@ namespace AZ return m_wasPreFinalized; } + //! Attempts to convert a numeric MaterialPropertyValue to another numeric type @T, + //! since MaterialPropertyValue itself does not support any kind of casting. + //! If the original MaterialPropertyValue is not a numeric type, the original value is returned. template MaterialPropertyValue CastNumericMaterialPropertyValue(const MaterialPropertyValue& value) { @@ -135,7 +138,10 @@ namespace AZ return value; } } - + + //! Attempts to convert an AZ::Vector[2-4] MaterialPropertyValue to another AZ::Vector[2-4] type @T. + //! Any extra elements will be dropped or set to 0.0 as needed. + //! If the original MaterialPropertyValue is not a Vector type, the original value is returned. template MaterialPropertyValue CastVectorMaterialPropertyValue(const MaterialPropertyValue& value) { From 0a722b5a0616f6bf919f8644880333e522dd3f36 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Thu, 20 Jan 2022 09:48:15 -0800 Subject: [PATCH 081/413] Update comment for clarity Signed-off-by: amzn-sj --- Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h index 2296d48843..3e489730d0 100644 --- a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h +++ b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h @@ -163,7 +163,8 @@ namespace Terrain AzFramework::Terrain::SurfacePointListFillCallback perPositionCallback, Sampler sampleFilter = Sampler::DEFAULT) const override; - //! Returns the number of samples for a given region and step size. + //! Returns the number of samples for a given region and step size. The first and second + //! elements of the pair correspond to the X and Y sample counts respectively. virtual AZStd::pair GetNumSamplesFromRegion(const AZ::Aabb& inRegion, const AZ::Vector2& stepSize) const override; From d6cdd1d053bc5abbea00dec0e4396b2fb0efb0b1 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Thu, 20 Jan 2022 09:51:38 -0800 Subject: [PATCH 082/413] Update another comment Signed-off-by: amzn-sj --- .../AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h index 9379485646..8b29f2a554 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h @@ -161,7 +161,8 @@ namespace AzFramework SurfacePointListFillCallback perPositionCallback, Sampler sampleFilter = Sampler::DEFAULT) const = 0; - //! Returns the number of samples for a given region and step size. + //! Returns the number of samples for a given region and step size. The first and second + //! elements of the pair correspond to the X and Y sample counts respectively. virtual AZStd::pair GetNumSamplesFromRegion(const AZ::Aabb& inRegion, const AZ::Vector2& stepSize) const = 0; From 8e08e42c86bf9ae30263065c1b5bff93ee832ae6 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Thu, 20 Jan 2022 11:01:00 -0800 Subject: [PATCH 083/413] Fix some warnings about unused parameters Signed-off-by: amzn-sj --- .../Code/Tests/TerrainPhysicsColliderTests.cpp | 13 ++++++------- Gems/Terrain/Code/Tests/TerrainSystemTest.cpp | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp index 2d0933c367..dc43544f05 100644 --- a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp @@ -72,7 +72,6 @@ protected: void ProcessRegionLoop(const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, - AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter, AzFramework::SurfaceData::SurfaceTagWeightList* surfaceTags, float mockHeight) { @@ -281,9 +280,9 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsRetu ON_CALL(terrainListener, ProcessHeightsFromRegion).WillByDefault( [this](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, - AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) + [[maybe_unused]] AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) { - ProcessRegionLoop(inRegion, stepSize, perPositionCallback, sampleFilter, nullptr, 0.0f); + ProcessRegionLoop(inRegion, stepSize, perPositionCallback, nullptr, 0.0f); } ); @@ -323,9 +322,9 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsRelativ ON_CALL(terrainListener, ProcessHeightsFromRegion).WillByDefault( [this, mockHeight](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, - AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) + [[maybe_unused]] AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) { - ProcessRegionLoop(inRegion, stepSize, perPositionCallback, sampleFilter, nullptr, mockHeight); + ProcessRegionLoop(inRegion, stepSize, perPositionCallback, nullptr, mockHeight); } ); @@ -476,9 +475,9 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsAndM ON_CALL(terrainListener, ProcessSurfacePointsFromRegion).WillByDefault( [this, mockHeight, &surfaceTags](const AZ::Aabb& inRegion, const AZ::Vector2& stepSize, AzFramework::Terrain::SurfacePointRegionFillCallback perPositionCallback, - AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) + [[maybe_unused]] AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter) { - ProcessRegionLoop(inRegion, stepSize, perPositionCallback, sampleFilter, &surfaceTags, mockHeight); + ProcessRegionLoop(inRegion, stepSize, perPositionCallback, &surfaceTags, mockHeight); } ); diff --git a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp index ab0847e634..ddccdbc49c 100644 --- a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp @@ -969,7 +969,7 @@ namespace UnitTest AzFramework::SurfaceData::SurfaceTagWeightList expectedTags; SetupSurfaceWeightMocks(entity.get(), expectedTags); - auto perPositionCallback = [&expectedTags](size_t xIndex, size_t yIndex, + auto perPositionCallback = [&expectedTags]([[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { constexpr float epsilon = 0.0001f; @@ -1015,7 +1015,7 @@ namespace UnitTest AzFramework::SurfaceData::SurfaceTagWeightList expectedTags; SetupSurfaceWeightMocks(entity.get(), expectedTags); - auto perPositionCallback = [&expectedTags](size_t xIndex, size_t yIndex, + auto perPositionCallback = [&expectedTags]([[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { constexpr float epsilon = 0.0001f; From c31e3c020898816b1a2eee355af202e7c952c56c Mon Sep 17 00:00:00 2001 From: Sergey Pereslavtsev Date: Thu, 20 Jan 2022 19:36:33 +0000 Subject: [PATCH 084/413] LYN-7640 Terrain Physics Materials hooked up all the way down to PhysX Signed-off-by: Sergey Pereslavtsev --- .../EditorHeightfieldColliderComponent.cpp | 3 + .../Source/HeightfieldColliderComponent.cpp | 4 + Gems/PhysX/Code/Source/Utils.cpp | 132 ++++++----- Gems/PhysX/Code/Source/Utils.h | 7 + ...ditorHeightfieldColliderComponentTests.cpp | 208 ++++++++++++++++-- Gems/PhysX/Code/Tests/EditorTestUtilities.cpp | 18 ++ Gems/PhysX/Code/Tests/EditorTestUtilities.h | 3 + 7 files changed, 302 insertions(+), 73 deletions(-) diff --git a/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp index fb0a38fa18..c6def5f0ab 100644 --- a/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp @@ -189,6 +189,9 @@ namespace PhysX configuration.m_entityId = GetEntityId(); configuration.m_debugName = GetEntity()->GetName(); + // Update material selection from the mapping + Utils::SetMaterialsFromHeightfieldProvider(GetEntityId(), m_colliderConfig.m_materialSelection); + AzPhysics::ShapeColliderPairList colliderShapePairs; colliderShapePairs.emplace_back(AZStd::make_shared(m_colliderConfig), m_shapeConfig); configuration.m_colliderAndShapeData = colliderShapePairs; diff --git a/Gems/PhysX/Code/Source/HeightfieldColliderComponent.cpp b/Gems/PhysX/Code/Source/HeightfieldColliderComponent.cpp index c1fa09f21f..b219253b6f 100644 --- a/Gems/PhysX/Code/Source/HeightfieldColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/HeightfieldColliderComponent.cpp @@ -140,6 +140,10 @@ namespace PhysX Physics::HeightfieldShapeConfiguration& configuration = static_cast(*m_shapeConfig.second); configuration = Utils::CreateHeightfieldShapeConfiguration(GetEntityId()); + + // Update material selection from the mapping + Physics::ColliderConfiguration* colliderConfig = m_shapeConfig.first.get(); + Utils::SetMaterialsFromHeightfieldProvider(GetEntityId(), colliderConfig->m_materialSelection); } void HeightfieldColliderComponent::RefreshHeightfield() diff --git a/Gems/PhysX/Code/Source/Utils.cpp b/Gems/PhysX/Code/Source/Utils.cpp index fecea57d9c..a988f6791c 100644 --- a/Gems/PhysX/Code/Source/Utils.cpp +++ b/Gems/PhysX/Code/Source/Utils.cpp @@ -66,6 +66,67 @@ namespace PhysX } } + AZStd::pair GetPhysXMaterialIndicesFromHeightfieldSamples( + const AZStd::vector& samples, + const int32_t row, const int32_t col, + const int32_t numRows, const int32_t numCols) + { + + uint8_t materialIndex0 = 0; + uint8_t materialIndex1 = 0; + + const bool lastRowIndex = (row == (numRows - 1)); + const bool lastColumnIndex = (col == (numCols - 1)); + + // In PhysX, the material indices refer to the quad down and to the right of the sample. + // If we're in the last row or last column, there aren't any quads down or to the right, + // so just clear these out. + + if (!lastRowIndex && !lastColumnIndex) + { + auto GetIndex = [numCols](int32_t row, int32_t col) + { + return (row * numCols) + col; + }; + + // Our source data is providing one material index per vertex, but PhysX wants one material index + // per triangle. The heuristic that we'll go with for selecting the material index is to choose + // the material for the vertex that's not on the diagonal of each triangle. + // Ex: A *---* B + // | / | For this, we'll use A for index0 and D for index1. + // C *---* D + // + // Ex: A *---* B + // | \ | For this, we'll use C for index0 and B for index1. + // C *---* D + // + // This is a pretty arbitrary choice, so the heuristic might need to be revisited over time if this + // causes incorrect or unpredictable physics material mappings. + + const Physics::HeightMaterialPoint& currentSample = samples[GetIndex(row, col)]; + + switch (currentSample.m_quadMeshType) + { + case Physics::QuadMeshType::SubdivideUpperLeftToBottomRight: + materialIndex0 = samples[GetIndex(row + 1, col)].m_materialIndex; + materialIndex1 = samples[GetIndex(row, col + 1)].m_materialIndex; + break; + case Physics::QuadMeshType::SubdivideBottomLeftToUpperRight: + materialIndex0 = currentSample.m_materialIndex; + materialIndex1 = samples[GetIndex(row + 1, col + 1)].m_materialIndex; + break; + case Physics::QuadMeshType::Hole: + materialIndex0 = physx::PxHeightFieldMaterial::eHOLE; + materialIndex1 = physx::PxHeightFieldMaterial::eHOLE; + break; + default: + AZ_Assert(false, "Unhandled case in GetPhysXMaterialIndicesFromHeightfieldSamples"); + break; + } + } + return { materialIndex0, materialIndex1 }; + } + void CreatePxGeometryFromHeightfield( Physics::HeightfieldShapeConfiguration& heightfieldConfig, physx::PxGeometryHolder& pxGeometry) { @@ -116,12 +177,8 @@ namespace PhysX for (int32_t row = 0; row < numRows; row++) { - const bool lastRowIndex = (row == (numRows - 1)); - for (int32_t col = 0; col < numCols; col++) { - const bool lastColumnIndex = (col == (numCols - 1)); - auto GetIndex = [numCols](int32_t row, int32_t col) { return (row * numCols) + col; @@ -134,52 +191,15 @@ namespace PhysX AZ_Assert(currentSample.m_materialIndex < physxMaximumMaterialIndex, "MaterialIndex must be less than 128"); currentPhysxSample.height = azlossy_cast( AZ::GetClamp(currentSample.m_height, minHeightBounds, maxHeightBounds) * scaleFactor); - if (lastRowIndex || lastColumnIndex) - { - // In PhysX, the material indices refer to the quad down and to the right of the sample. - // If we're in the last row or last column, there aren't any quads down or to the right, - // so just clear these out. - currentPhysxSample.materialIndex0 = 0; - currentPhysxSample.materialIndex1 = 0; - } - else - { - // Our source data is providing one material index per vertex, but PhysX wants one material index - // per triangle. The heuristic that we'll go with for selecting the material index is to choose - // the material for the vertex that's not on the diagonal of each triangle. - // Ex: A *---* B - // | / | For this, we'll use A for index0 and D for index1. - // C *---* D - // - // Ex: A *---* B - // | \ | For this, we'll use C for index0 and B for index1. - // C *---* D - // - // This is a pretty arbitrary choice, so the heuristic might need to be revisited over time if this - // causes incorrect or unpredictable physics material mappings. - switch (currentSample.m_quadMeshType) - { - case Physics::QuadMeshType::SubdivideUpperLeftToBottomRight: - currentPhysxSample.materialIndex0 = samples[GetIndex(row + 1, col)].m_materialIndex; - currentPhysxSample.materialIndex1 = samples[GetIndex(row, col + 1)].m_materialIndex; - // Set the tesselation flag to say that we need to go from UL to BR - currentPhysxSample.materialIndex0.setBit(); - break; - case Physics::QuadMeshType::SubdivideBottomLeftToUpperRight: - currentPhysxSample.materialIndex0 = currentSample.m_materialIndex; - currentPhysxSample.materialIndex1 = samples[GetIndex(row + 1, col + 1)].m_materialIndex; - break; - case Physics::QuadMeshType::Hole: - currentPhysxSample.materialIndex0 = physx::PxHeightFieldMaterial::eHOLE; - currentPhysxSample.materialIndex1 = physx::PxHeightFieldMaterial::eHOLE; - break; - default: - AZ_Warning("PhysX Heightfield", false, "Unhandled case in CreatePxGeometryFromConfig"); - currentPhysxSample.materialIndex0 = 0; - currentPhysxSample.materialIndex1 = 0; - break; - } + auto [materialIndex0, materialIndex1] = GetPhysXMaterialIndicesFromHeightfieldSamples(samples, row, col, numRows, numCols); + currentPhysxSample.materialIndex0 = materialIndex0; + currentPhysxSample.materialIndex1 = materialIndex1; + + if (currentSample.m_quadMeshType == Physics::QuadMeshType::SubdivideUpperLeftToBottomRight) + { + // Set the tesselation flag to say that we need to go from UL to BR + currentPhysxSample.setTessFlag(); } } } @@ -1562,6 +1582,20 @@ namespace PhysX return configuration; } + + void SetMaterialsFromHeightfieldProvider(const AZ::EntityId& heightfieldProviderId, Physics::MaterialSelection& materialSelection) + { + AZStd::vector materialList; + Physics::HeightfieldProviderRequestsBus::EventResult( + materialList, heightfieldProviderId, &Physics::HeightfieldProviderRequestsBus::Events::GetMaterialList); + + materialSelection.SetMaterialSlots(Physics::MaterialSelection::SlotsArray(materialList.size(), "")); + + for (int i = 0; i < materialList.size(); ++i) + { + materialSelection.SetMaterialId(materialList[i], i); + } + } } // namespace Utils namespace ReflectionUtils diff --git a/Gems/PhysX/Code/Source/Utils.h b/Gems/PhysX/Code/Source/Utils.h index 525db03315..5244926aa2 100644 --- a/Gems/PhysX/Code/Source/Utils.h +++ b/Gems/PhysX/Code/Source/Utils.h @@ -188,8 +188,15 @@ namespace PhysX //! Returns defaultValue if the input is infinite or NaN, otherwise returns the input unchanged. const AZ::Vector3& Sanitize(const AZ::Vector3& input, const AZ::Vector3& defaultValue = AZ::Vector3::CreateZero()); + AZStd::pair GetPhysXMaterialIndicesFromHeightfieldSamples( + const AZStd::vector& samples, + const int32_t row, const int32_t col, + const int32_t numRows, const int32_t numCols); + Physics::HeightfieldShapeConfiguration CreateHeightfieldShapeConfiguration(AZ::EntityId entityId); + void SetMaterialsFromHeightfieldProvider(const AZ::EntityId& heightfieldProviderId, Physics::MaterialSelection& materialSelection); + namespace Geometry { using PointList = AZStd::vector; diff --git a/Gems/PhysX/Code/Tests/EditorHeightfieldColliderComponentTests.cpp b/Gems/PhysX/Code/Tests/EditorHeightfieldColliderComponentTests.cpp index ef112d8623..9bdc63e60d 100644 --- a/Gems/PhysX/Code/Tests/EditorHeightfieldColliderComponentTests.cpp +++ b/Gems/PhysX/Code/Tests/EditorHeightfieldColliderComponentTests.cpp @@ -19,6 +19,7 @@ #include #include #include +#include using ::testing::NiceMock; using ::testing::Return; @@ -27,18 +28,28 @@ namespace PhysXEditorTests { AZStd::vector GetSamples() { - AZStd::vector samples{ { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 2.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 1.5f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 1.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 1.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 0.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight }, - { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight } }; + AZStd::vector samples{ { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 0 }, + { 2.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 1 }, + { 1.5f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 2 }, + { 1.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 0 }, + { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 1 }, + { 1.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 2 }, + { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 0 }, + { 0.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 1 }, + { 3.0f, Physics::QuadMeshType::SubdivideUpperLeftToBottomRight, 2 } }; return samples; } + AZStd::vector GetMaterialList() + { + AZStd::vector materials{ + {Physics::MaterialId::FromUUID("{EC976D51-2C26-4C1E-BBF2-75BAAAFA162C}")}, + {Physics::MaterialId::FromUUID("{B9836F51-A235-4781-95E3-A6302BEE9EFF}")}, + {Physics::MaterialId::FromUUID("{7E060707-BB03-47EB-B046-4503C7145B6E}")} + }; + return materials; + } + EntityPtr SetupHeightfieldComponent() { // create an editor entity with a shape collider component and a box shape component @@ -78,6 +89,7 @@ namespace PhysXEditorTests x = -3.0f; y = 3.0f; }); + ON_CALL(mockShapeRequests, GetMaterialList).WillByDefault(Return(GetMaterialList())); } EntityPtr TestCreateActiveGameEntityFromEditorEntity(AZ::Entity* editorEntity) @@ -89,6 +101,89 @@ namespace PhysXEditorTests return gameEntity; } + class PhysXEditorHeightfieldFixture : public PhysXEditorFixture + { + public: + void SetUp() override + { + PhysXEditorFixture::SetUp(); + PopulateDefaultMaterialLibrary(); + + m_editorEntity = SetupHeightfieldComponent(); + m_editorMockShapeRequests = AZStd::make_unique>(m_editorEntity->GetId()); + SetupMockMethods(*m_editorMockShapeRequests.get()); + m_editorEntity->Activate(); + + m_gameEntity = TestCreateActiveGameEntityFromEditorEntity(m_editorEntity.get()); + m_gameMockShapeRequests = AZStd::make_unique>(m_gameEntity->GetId()); + SetupMockMethods(*m_gameMockShapeRequests.get()); + m_gameEntity->Activate(); + } + + void TearDown() override + { + CleanupHeightfieldComponent(); + + m_editorEntity = nullptr; + m_gameEntity = nullptr; + m_editorMockShapeRequests = nullptr; + m_gameMockShapeRequests = nullptr; + + PhysXEditorFixture::TearDown(); + } + + void PopulateDefaultMaterialLibrary() + { + AZ::Data::AssetId assetId = AZ::Data::AssetId(AZ::Uuid::Create()); + + // Create an asset out of our Script Event + Physics::MaterialLibraryAsset* matLibAsset = aznew Physics::MaterialLibraryAsset; + { + AZStd::vector matIds = GetMaterialList(); + + for (Physics::MaterialId matId : matIds) + { + Physics::MaterialFromAssetConfiguration matConfig; + matConfig.m_id = matId; + matConfig.m_configuration.m_surfaceType = matId.GetUuid().ToString(); + matLibAsset->AddMaterialData(matConfig); + } + } + + // Note: There is no interface to simply update material library asset. It has to go via updating the entire configuration which causes assets reloading. + // It makes sense as a safety mechanism in the Editor but makes it harder to write tests. + // Hence have to work around it via const_cast here to be able to simply set the generated asset into configuration. + AzPhysics::SystemConfiguration* sysConfig = const_cast(AZ::Interface::Get()->GetConfiguration()); + + AZ::Data::Asset assetData(assetId, matLibAsset, AZ::Data::AssetLoadBehavior::Default); + sysConfig->m_materialLibraryAsset = assetData; + } + + Physics::Material* GetMaterialFromRaycast(float x, float y) + { + AzPhysics::RayCastRequest request; + request.m_start = AZ::Vector3(x, y, 5.0f); + request.m_direction = AZ::Vector3(0.0f, 0.0f, -1.0f); + request.m_distance = 10.0f; + + //query the scene + auto* sceneInterface = AZ::Interface::Get(); + AzPhysics::SceneQueryHits result = sceneInterface->QueryScene(m_defaultSceneHandle, &request); + EXPECT_EQ(result.m_hits.size(), 1); + + if (result) + { + return result.m_hits[0].m_material; + } + + return nullptr; + }; + + EntityPtr m_editorEntity; + EntityPtr m_gameEntity; + AZStd::unique_ptr> m_editorMockShapeRequests; + AZStd::unique_ptr> m_gameMockShapeRequests; + }; TEST_F(PhysXEditorFixture, EditorHeightfieldColliderComponentDependenciesSatisfiedEntityIsValid) { @@ -149,21 +244,13 @@ namespace PhysXEditorTests CleanupHeightfieldComponent(); } - TEST_F(PhysXEditorFixture, EditorHeightfieldColliderComponentHeightfieldColliderWithAABoxCorrectRuntimeGeometry) + TEST_F(PhysXEditorHeightfieldFixture, EditorHeightfieldColliderComponentHeightfieldColliderWithAABoxCorrectRuntimeGeometry) { - EntityPtr editorEntity = SetupHeightfieldComponent(); - NiceMock mockShapeRequests(editorEntity->GetId()); - SetupMockMethods(mockShapeRequests); - editorEntity->Activate(); - - EntityPtr gameEntity = TestCreateActiveGameEntityFromEditorEntity(editorEntity.get()); - NiceMock mockShapeRequests2(gameEntity->GetId()); - SetupMockMethods(mockShapeRequests2); - gameEntity->Activate(); + AZ::EntityId gameEntityId = m_gameEntity->GetId(); AzPhysics::SimulatedBody* staticBody = nullptr; AzPhysics::SimulatedBodyComponentRequestsBus::EventResult( - staticBody, gameEntity->GetId(), &AzPhysics::SimulatedBodyComponentRequests::GetSimulatedBody); + staticBody, gameEntityId, &AzPhysics::SimulatedBodyComponentRequests::GetSimulatedBody); const auto* pxRigidStatic = static_cast(staticBody->GetNativePointer()); PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene()); @@ -183,7 +270,7 @@ namespace PhysXEditorTests int32_t numRows{ 0 }; int32_t numColumns{ 0 }; Physics::HeightfieldProviderRequestsBus::Event( - gameEntity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldGridSize, numColumns, numRows); + gameEntityId, &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldGridSize, numColumns, numRows); EXPECT_EQ(numColumns, heightfield->getNbColumns()); EXPECT_EQ(numRows, heightfield->getNbRows()); @@ -194,12 +281,12 @@ namespace PhysXEditorTests float minHeightBounds{ 0.0f }; float maxHeightBounds{ 0.0f }; Physics::HeightfieldProviderRequestsBus::Event( - gameEntity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldHeightBounds, minHeightBounds, + gameEntityId, &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldHeightBounds, minHeightBounds, maxHeightBounds); AZStd::vector samples; Physics::HeightfieldProviderRequestsBus::EventResult( - samples, gameEntity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetHeightsAndMaterials); + samples, gameEntityId, &Physics::HeightfieldProviderRequestsBus::Events::GetHeightsAndMaterials); const float halfBounds{ (maxHeightBounds - minHeightBounds) / 2.0f }; const float scaleFactor = (maxHeightBounds <= minHeightBounds) ? 1.0f : AZStd::numeric_limits::max() / halfBounds; @@ -208,7 +295,80 @@ namespace PhysXEditorTests EXPECT_EQ(samplePhysX.height, azlossy_cast(samplePhysics.m_height * scaleFactor)); } } - CleanupHeightfieldComponent(); + } + + TEST_F(PhysXEditorHeightfieldFixture, EditorHeightfieldColliderComponentHeightfieldColliderCorrectMaterials) + { + AZ::EntityId gameEntityId = m_gameEntity->GetId(); + + int32_t numRows{ 0 }; + int32_t numColumns{ 0 }; + Physics::HeightfieldProviderRequestsBus::Event( + gameEntityId, &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldGridSize, numColumns, numRows); + + EXPECT_EQ(numRows, 3); + EXPECT_EQ(numColumns, 3); + + AZStd::vector samples; + Physics::HeightfieldProviderRequestsBus::EventResult( + samples, gameEntityId, &Physics::HeightfieldProviderRequestsBus::Events::GetHeightsAndMaterials); + + AzPhysics::SimulatedBody* staticBody = nullptr; + AzPhysics::SimulatedBodyComponentRequestsBus::EventResult( + staticBody, gameEntityId, &AzPhysics::SimulatedBodyComponentRequests::GetSimulatedBody); + + const auto* pxRigidStatic = static_cast(staticBody->GetNativePointer()); + PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene()); + + physx::PxShape* shape = nullptr; + pxRigidStatic->getShapes(&shape, 1, 0); + + physx::PxHeightFieldGeometry heightfieldGeometry; + shape->getHeightFieldGeometry(heightfieldGeometry); + + physx::PxHeightField* heightfield = heightfieldGeometry.heightField; + + AZStd::vector physicsSurfaceTypes; + for (Physics::MaterialId materialId : GetMaterialList()) + { + physicsSurfaceTypes.emplace_back(materialId.GetUuid().ToString()); + } + + // PhysX Heightfield cooking doesn't map 1-1 sample material indices to triangle material indices + // Hence hardcoding the expected material indices in the test + const int physicsMaterialsValidationDataIndex[] = {0, 2, 1, 1}; + + for (int sampleRow = 0; sampleRow < numRows; ++sampleRow) + { + for (int sampleColumn = 0; sampleColumn < numColumns; ++sampleColumn) + { + physx::PxHeightFieldSample samplePhysX = heightfield->getSample(sampleRow, sampleColumn); + Physics::HeightMaterialPoint samplePhysics = samples[sampleRow * numColumns + sampleColumn]; + + auto [materialIndex0, materialIndex1] = PhysX::Utils::GetPhysXMaterialIndicesFromHeightfieldSamples(samples, sampleRow, sampleColumn, numRows, numColumns); + EXPECT_EQ(samplePhysX.materialIndex0, materialIndex0); + EXPECT_EQ(samplePhysX.materialIndex1, materialIndex1); + + if (sampleRow != numRows - 1 && sampleColumn != numColumns - 1) + { + const float x_offset = -0.25f; + const float y_offset = 0.75f; + const float secondRayOffset = 0.5f; + + float rayX = x_offset + sampleColumn; + float rayY = y_offset + sampleRow; + + Physics::Material* mat1 = GetMaterialFromRaycast(rayX, rayY); + EXPECT_NE(mat1, nullptr); + + Physics::Material* mat2 = GetMaterialFromRaycast(rayX + secondRayOffset, rayY + secondRayOffset); + EXPECT_NE(mat2, nullptr); + + AZStd::string expectedMaterialName = physicsSurfaceTypes[physicsMaterialsValidationDataIndex[sampleRow * 2 + sampleColumn]]; + EXPECT_EQ(mat1->GetSurfaceTypeName(), expectedMaterialName); + } + } + } } } // namespace PhysXEditorTests diff --git a/Gems/PhysX/Code/Tests/EditorTestUtilities.cpp b/Gems/PhysX/Code/Tests/EditorTestUtilities.cpp index fa794c58a5..272d9157b2 100644 --- a/Gems/PhysX/Code/Tests/EditorTestUtilities.cpp +++ b/Gems/PhysX/Code/Tests/EditorTestUtilities.cpp @@ -70,6 +70,24 @@ namespace PhysXEditorTests } } + void PhysXEditorFixture::ConnectToPVD() + { + auto* debug = AZ::Interface::Get(); + if (debug) + { + debug->ConnectToPvd(); + } + } + + void PhysXEditorFixture::DisconnectFromPVD() + { + auto* debug = AZ::Interface::Get(); + if (debug) + { + debug->DisconnectFromPvd(); + } + } + // DefaultWorldBus AzPhysics::SceneHandle PhysXEditorFixture::GetDefaultSceneHandle() const { diff --git a/Gems/PhysX/Code/Tests/EditorTestUtilities.h b/Gems/PhysX/Code/Tests/EditorTestUtilities.h index 9dfe40f366..26566f724a 100644 --- a/Gems/PhysX/Code/Tests/EditorTestUtilities.h +++ b/Gems/PhysX/Code/Tests/EditorTestUtilities.h @@ -48,6 +48,9 @@ namespace PhysXEditorTests void SetUp() override; void TearDown() override; + void ConnectToPVD(); + void DisconnectFromPVD(); + // DefaultWorldBus AzPhysics::SceneHandle GetDefaultSceneHandle() const override; From f4befb22426d84eba7172ebf17ac2cf97e8dd8be Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Thu, 20 Jan 2022 11:39:28 -0800 Subject: [PATCH 085/413] Removed some dead code. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../RPI.Edit/Material/MaterialPropertyValueSerializer.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp index 10b45ca8df..9980d8f2ff 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyValueSerializer.cpp @@ -54,12 +54,6 @@ namespace AZ MaterialSourceData::Property* property = reinterpret_cast(outputValue); AZ_Assert(property, "Output value for JsonMaterialPropertyValueSerializer can't be null."); - // Construct the full property name (groupName.propertyName) by parsing it from the JSON path string. - size_t startPropertyName = context.GetPath().Get().rfind('/'); - size_t startGroupName = context.GetPath().Get().rfind('/', startPropertyName-1); - AZStd::string_view groupName = context.GetPath().Get().substr(startGroupName + 1, startPropertyName - startGroupName - 1); - AZStd::string_view propertyName = context.GetPath().Get().substr(startPropertyName + 1); - JSR::ResultCode result(JSR::Tasks::ReadField); if (inputValue.IsBool()) From 61dc7623d21108c3798c3fe3a6dd52fec851f955 Mon Sep 17 00:00:00 2001 From: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com> Date: Thu, 20 Jan 2022 12:41:25 -0700 Subject: [PATCH 086/413] Minor change to a comment Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com> --- .../DiffuseProbeGridComponentController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp index b7dbbdbcf5..8c8b29a053 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp @@ -34,7 +34,7 @@ namespace AZ if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(2) // ATOM-17127 + ->Version(2) // Added NumRaysPerProbe setting ->Field("ProbeSpacing", &DiffuseProbeGridComponentConfig::m_probeSpacing) ->Field("Extents", &DiffuseProbeGridComponentConfig::m_extents) ->Field("AmbientMultiplier", &DiffuseProbeGridComponentConfig::m_ambientMultiplier) From cc50a18fe997eeccc342d63f913942581d2fc9ae Mon Sep 17 00:00:00 2001 From: greerdv Date: Thu, 20 Jan 2022 11:38:22 +0000 Subject: [PATCH 087/413] add support for quad shapes in shape collider component Signed-off-by: greerdv --- .../Source/EditorShapeColliderComponent.cpp | 133 +++++++++++++++++- .../Source/EditorShapeColliderComponent.h | 11 ++ .../Code/Source/ShapeColliderComponent.h | 1 + 3 files changed, 144 insertions(+), 1 deletion(-) diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp index 59b659a0bf..f61b2fce74 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +65,17 @@ namespace PhysX return AZ::Edit::PropertyVisibility::Hide; } + AZ::Crc32 EditorShapeColliderComponent::SingleSidedVisibility() + { + if ((m_shapeType == ShapeType::QuadSingleSided || m_shapeType == ShapeType::QuadDoubleSided) + && GetEntity()->FindComponent() == nullptr) + { + return AZ::Edit::PropertyVisibility::Show; + } + + return AZ::Edit::PropertyVisibility::Hide; + } + void EditorShapeColliderComponent::Reflect(AZ::ReflectContext* context) { if (auto serializeContext = azrtti_cast(context)) @@ -74,6 +86,7 @@ namespace PhysX ->Field("DebugDrawSettings", &EditorShapeColliderComponent::m_colliderDebugDraw) ->Field("ShapeConfigs", &EditorShapeColliderComponent::m_shapeConfigs) ->Field("SubdivisionCount", &EditorShapeColliderComponent::m_subdivisionCount) + ->Field("SingleSided", &EditorShapeColliderComponent::m_singleSided) ; if (auto editContext = serializeContext->GetEditContext()) @@ -100,6 +113,10 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::Max, Utils::MaxFrustumSubdivisions) ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorShapeColliderComponent::OnSubdivisionCountChange) ->Attribute(AZ::Edit::Attributes::Visibility, &EditorShapeColliderComponent::SubdivisionCountVisibility) + ->DataElement(AZ::Edit::UIHandlers::Default, &EditorShapeColliderComponent::m_singleSided, "Single sided", + "If enabled, planar shapes will only collide from one direction (not valid for shapes attached to dynamic rigid bodies)") + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorShapeColliderComponent::OnSingleSidedChange) + ->Attribute(AZ::Edit::Attributes::Visibility, &EditorShapeColliderComponent::SingleSidedVisibility) ; } } @@ -126,7 +143,6 @@ namespace PhysX incompatible.push_back(AZ_CRC_CE("AxisAlignedBoxShapeService")); incompatible.push_back(AZ_CRC_CE("CompoundShapeService")); incompatible.push_back(AZ_CRC_CE("DiskShapeService")); - incompatible.push_back(AZ_CRC_CE("QuadShapeService")); incompatible.push_back(AZ_CRC_CE("TubeShapeService")); incompatible.push_back(AZ_CRC_CE("ReferenceShapeService")); } @@ -206,6 +222,12 @@ namespace PhysX break; } + case ShapeType::QuadSingleSided: + case ShapeType::QuadDoubleSided: + { + // a quad shape has no interior, just return an empty vector of sample points + break; + } default: AZ_WarningOnce("PhysX Shape Collider Component", false, "Unsupported shape type in UpdateCachedSamplePoints"); break; @@ -331,6 +353,11 @@ namespace PhysX UpdateCylinderConfig(uniformScale); } + else if (shapeCrc == ShapeConstants::Quad) + { + UpdateQuadConfig(overallScale); + } + else { m_shapeType = !shapeCrc ? ShapeType::None : ShapeType::Unsupported; @@ -354,6 +381,60 @@ namespace PhysX m_geometryCache.m_boxDimensions = scale * boxDimensions; } + void EditorShapeColliderComponent::UpdateQuadConfig(const AZ::Vector3& scale) + { + LmbrCentral::QuadShapeConfig quadShapeConfig; + LmbrCentral::QuadShapeComponentRequestBus::EventResult(quadShapeConfig, GetEntityId(), + &LmbrCentral::QuadShapeComponentRequests::GetQuadConfiguration); + + const float minDimension = 1e-3f; // used to prevent the dimensions being 0 in any direction + const float xDim = AZ::GetMax(minDimension, quadShapeConfig.m_width); + const float yDim = AZ::GetMax(minDimension, quadShapeConfig.m_height); + + if (m_singleSided) + { + AZStd::vector cookedData; + + constexpr AZ::u32 vertexCount = 4; + const AZ::Vector3 vertices[vertexCount] = + { + AZ::Vector3(-0.5f * xDim, -0.5f * yDim, 0.0f), + AZ::Vector3(-0.5f * xDim, 0.5f * yDim, 0.0f), + AZ::Vector3(0.5f * xDim, 0.5f * yDim, 0.0f), + AZ::Vector3(0.5f * xDim, -0.5f * yDim, 0.0f), + }; + + constexpr AZ::u32 indexCount = 6; + const AZ::u32 indices[indexCount] = + { + 0, 1, 2, + 0, 2, 3 + }; + + bool cookingResult = false; + Physics::SystemRequestBus::BroadcastResult(cookingResult, &Physics::SystemRequests::CookTriangleMeshToMemory, + vertices, vertexCount, indices, indexCount, cookedData); + + Physics::CookedMeshShapeConfiguration shapeConfig; + shapeConfig.SetCookedMeshData(cookedData.data(), cookedData.size(), + Physics::CookedMeshShapeConfiguration::MeshType::TriangleMesh); + shapeConfig.m_scale = scale; + + SetShapeConfig(ShapeType::QuadSingleSided, shapeConfig); + } + + else + { + // it's not possible to create a perfectly 2d convex in PhysX, so the best we can do is a very thin box + const float zDim = AZ::GetMax(minDimension, 1e-3f * AZ::GetMin(xDim, yDim)); + const AZ::Vector3 boxDimensions(xDim, yDim, zDim); + + SetShapeConfig(ShapeType::QuadDoubleSided, Physics::BoxShapeConfiguration(boxDimensions)); + + m_shapeConfigs.back()->m_scale = scale; + } + } + void EditorShapeColliderComponent::UpdateCapsuleConfig(const AZ::Vector3& scale) { LmbrCentral::CapsuleShapeConfig lmbrCentralCapsuleShapeConfig; @@ -425,6 +506,12 @@ namespace PhysX } } + void EditorShapeColliderComponent::OnSingleSidedChange() + { + UpdateShapeConfigs(); + CreateStaticEditorCollider(); + } + AZ::u32 EditorShapeColliderComponent::OnSubdivisionCountChange() { const AZ::Vector3 uniformScale = Utils::GetUniformScale(GetEntityId()); @@ -615,6 +702,8 @@ namespace PhysX m_editorSceneHandle = m_sceneInterface->GetSceneHandle(AzPhysics::EditorPhysicsSceneName); } + UpdateTriggerSettings(); + UpdateSingleSidedSettings(); UpdateShapeConfigs(); // Debug drawing @@ -767,6 +856,7 @@ namespace PhysX if (changeReason == LmbrCentral::ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged) { UpdateShapeConfigs(); + UpdateTriggerSettings(); CreateStaticEditorCollider(); Physics::ColliderComponentEventBus::Event(GetEntityId(), &Physics::ColliderComponentEvents::OnColliderChanged); @@ -849,4 +939,45 @@ namespace PhysX { return m_colliderConfig.m_isTrigger; } + + void EditorShapeColliderComponent::UpdateTriggerSettings() + { + if (m_shapeType == ShapeType::QuadSingleSided || m_shapeType == ShapeType::QuadDoubleSided) + { + if (!m_previousIsTrigger.has_value()) + { + m_previousIsTrigger = m_colliderConfig.m_isTrigger; + } + m_colliderConfig.SetPropertyVisibility(Physics::ColliderConfiguration::PropertyVisibility::IsTrigger, false); + } + else + { + if (m_previousIsTrigger.has_value()) + { + m_colliderConfig.m_isTrigger = m_previousIsTrigger.value(); + m_previousIsTrigger.reset(); + } + m_colliderConfig.SetPropertyVisibility(Physics::ColliderConfiguration::PropertyVisibility::IsTrigger, true); + } + } + + void EditorShapeColliderComponent::UpdateSingleSidedSettings() + { + if (GetEntity()->FindComponent()) + { + if (!m_previousSingleSided.has_value()) + { + m_previousSingleSided = m_singleSided; + } + m_singleSided = false; + } + else + { + if (m_previousSingleSided.has_value()) + { + m_singleSided = m_previousSingleSided.value(); + m_previousSingleSided.reset(); + } + } + } } // namespace PhysX diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h index 3422d4959f..0f5350b781 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.h @@ -41,6 +41,8 @@ namespace PhysX Sphere, PolygonPrism, Cylinder, + QuadDoubleSided, + QuadSingleSided, Unsupported }; @@ -89,6 +91,7 @@ namespace PhysX AZ::u32 OnConfigurationChanged(); void UpdateShapeConfigs(); void UpdateBoxConfig(const AZ::Vector3& scale); + void UpdateQuadConfig(const AZ::Vector3& scale); void UpdateCapsuleConfig(const AZ::Vector3& scale); void UpdateSphereConfig(const AZ::Vector3& scale); void UpdateCylinderConfig(const AZ::Vector3& scale); @@ -103,6 +106,8 @@ namespace PhysX AZ::u32 OnSubdivisionCountChange(); AZ::Crc32 SubdivisionCountVisibility(); + void OnSingleSidedChange(); + AZ::Crc32 SingleSidedVisibility(); // AZ::Component void Activate() override; @@ -137,6 +142,9 @@ namespace PhysX AZ::Aabb GetColliderShapeAabb() override; bool IsTrigger() override; + void UpdateTriggerSettings(); + void UpdateSingleSidedSettings(); + Physics::ColliderConfiguration m_colliderConfig; //!< Stores collision layers, whether the collider is a trigger, etc. DebugDraw::Collider m_colliderDebugDraw; //!< Handles drawing the collider based on global and local AzPhysics::SceneInterface* m_sceneInterface = nullptr; @@ -151,6 +159,9 @@ namespace PhysX //! @note 16 is the number of subdivisions in the debug cylinder that is loaded as a mesh (not generated procedurally) AZ::u8 m_subdivisionCount = 16; mutable GeometryCache m_geometryCache; //!< Cached data for generating sample points inside the attached shape. + AZStd::optional m_previousIsTrigger; //!< Stores the previous trigger setting if the shape is changed to one which does not support triggers. + bool m_singleSided = false; //!< Used for 2d shapes like quad which may be treated as either single or doubled sided. + AZStd::optional m_previousSingleSided; //!< Stores the previous single sided setting when unable to support single-sided shapes (such as when used with a dynamic rigid body). AzPhysics::SystemEvents::OnConfigurationChangedEvent::Handler m_physXConfigChangedHandler; AzPhysics::SystemEvents::OnMaterialLibraryChangedEvent::Handler m_onMaterialLibraryChangedEventHandler; diff --git a/Gems/PhysX/Code/Source/ShapeColliderComponent.h b/Gems/PhysX/Code/Source/ShapeColliderComponent.h index 2065f17dcf..cfc51f08ed 100644 --- a/Gems/PhysX/Code/Source/ShapeColliderComponent.h +++ b/Gems/PhysX/Code/Source/ShapeColliderComponent.h @@ -30,6 +30,7 @@ namespace PhysX static const AZ::Crc32 Sphere = AZ_CRC("Sphere", 0x55f96687); static const AZ::Crc32 PolygonPrism = AZ_CRC("PolygonPrism", 0xd6b50036); static const AZ::Crc32 Cylinder = AZ_CRC("Cylinder", 0x9b045bea); + static const AZ::Crc32 Quad = AZ_CRC("QuadShape", 0x40d75e14); } // namespace ShapeConstants /// Component that provides a collider based on geometry from a shape component. From a8eb5be2e6f3952ce1fdff147104dd1e1e049d7a Mon Sep 17 00:00:00 2001 From: greerdv Date: Thu, 20 Jan 2022 13:24:01 +0000 Subject: [PATCH 088/413] fix order of triangle indices for single-sided quad collider Signed-off-by: greerdv --- Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp index f61b2fce74..b935ff2536 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp @@ -407,8 +407,8 @@ namespace PhysX constexpr AZ::u32 indexCount = 6; const AZ::u32 indices[indexCount] = { - 0, 1, 2, - 0, 2, 3 + 0, 2, 1, + 0, 3, 2 }; bool cookingResult = false; From f61011f5ac8382c7db145538f873933a64e76b51 Mon Sep 17 00:00:00 2001 From: greerdv Date: Thu, 20 Jan 2022 18:14:33 +0000 Subject: [PATCH 089/413] add editor side tests for quad colliders Signed-off-by: greerdv --- .../Source/EditorShapeColliderComponent.cpp | 3 +- .../Tests/ShapeColliderComponentTests.cpp | 150 +++++++++++++++++- 2 files changed, 148 insertions(+), 5 deletions(-) diff --git a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp index b935ff2536..bdf70fc227 100644 --- a/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorShapeColliderComponent.cpp @@ -702,9 +702,9 @@ namespace PhysX m_editorSceneHandle = m_sceneInterface->GetSceneHandle(AzPhysics::EditorPhysicsSceneName); } - UpdateTriggerSettings(); UpdateSingleSidedSettings(); UpdateShapeConfigs(); + UpdateTriggerSettings(); // Debug drawing m_colliderDebugDraw.Connect(GetEntityId()); @@ -947,6 +947,7 @@ namespace PhysX if (!m_previousIsTrigger.has_value()) { m_previousIsTrigger = m_colliderConfig.m_isTrigger; + m_colliderConfig.m_isTrigger = false; } m_colliderConfig.SetPropertyVisibility(Physics::ColliderConfiguration::PropertyVisibility::IsTrigger, false); } diff --git a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp index 06ba4f3e9c..21d381a259 100644 --- a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp +++ b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -452,21 +453,55 @@ namespace PhysXEditorTests EXPECT_TRUE(aabb.GetMin().IsClose(translation - 0.5f * scale * boxDimensions)); } - void SetTrigger(PhysX::EditorShapeColliderComponent* editorShapeColliderComponent, bool isTrigger) + void SetBoolValueOnComponent(AZ::Component* component, AZ::Crc32 name, bool value) { AZ::SerializeContext* serializeContext = nullptr; AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); AzToolsFramework::InstanceDataHierarchy instanceDataHierarchy; - instanceDataHierarchy.AddRootInstance(editorShapeColliderComponent); + instanceDataHierarchy.AddRootInstance(component); instanceDataHierarchy.Build(serializeContext, AZ::SerializeContext::ENUM_ACCESS_FOR_WRITE); AzToolsFramework::InstanceDataHierarchy::InstanceDataNode* instanceNode = - instanceDataHierarchy.FindNodeByPartialAddress({ AZ_CRC("Trigger", 0x1a6b0f5d) }); + instanceDataHierarchy.FindNodeByPartialAddress({ name }); if (instanceNode) { - instanceNode->Write(isTrigger); + instanceNode->Write(value); } } + void SetTrigger(PhysX::EditorShapeColliderComponent* editorShapeColliderComponent, bool isTrigger) + { + SetBoolValueOnComponent(editorShapeColliderComponent, AZ_CRC("Trigger", 0x1a6b0f5d), isTrigger); + } + + bool GetBoolValueFromComponent(AZ::Component* component, AZ::Crc32 name) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AzToolsFramework::InstanceDataHierarchy instanceDataHierarchy; + instanceDataHierarchy.AddRootInstance(component); + instanceDataHierarchy.Build(serializeContext, AZ::SerializeContext::ENUM_ACCESS_FOR_READ); + AzToolsFramework::InstanceDataHierarchy::InstanceDataNode* instanceNode = + instanceDataHierarchy.FindNodeByPartialAddress({ name }); + bool value = false; + instanceNode->Read(value); + return value; + } + + bool IsTrigger(PhysX::EditorShapeColliderComponent* editorShapeColliderComponent) + { + return GetBoolValueFromComponent(editorShapeColliderComponent, AZ_CRC("Trigger")); + } + + void SetSingleSided(PhysX::EditorShapeColliderComponent* editorShapeColliderComponent, bool singleSided) + { + SetBoolValueOnComponent(editorShapeColliderComponent, AZ_CRC("SingleSided"), singleSided); + } + + bool IsSingleSided(PhysX::EditorShapeColliderComponent* editorShapeColliderComponent) + { + return GetBoolValueFromComponent(editorShapeColliderComponent, AZ_CRC("SingleSided")); + } + EntityPtr CreateRigidBox(const AZ::Vector3& boxDimensions, const AZ::Vector3& position) { EntityPtr rigidBodyEditorEntity = CreateInactiveEditorEntity("RigidBodyEditorEntity"); @@ -566,4 +601,111 @@ namespace PhysXEditorTests EXPECT_THAT(aabb.GetMin(), UnitTest::IsClose(-0.5f * boxDimensions * parentScale)); } + class PhysXEditorParamBoolFixture + : public ::testing::WithParamInterface + , public PhysXEditorFixture + { + }; + + TEST_P(PhysXEditorParamBoolFixture, EditorShapeColliderComponent_ShapeColliderWithQuadShapeNonUniformlyScalesCorrectly) + { + // test both single and double-sided quad colliders + bool singleSided = GetParam(); + + EntityPtr editorEntity = CreateInactiveEditorEntity("QuadEntity"); + editorEntity->CreateComponent(LmbrCentral::EditorQuadShapeComponentTypeId); + auto* shapeColliderComponent = editorEntity->CreateComponent(); + SetSingleSided(shapeColliderComponent, singleSided); + editorEntity->CreateComponent(); + const auto entityId = editorEntity->GetId(); + + editorEntity->Activate(); + + LmbrCentral::QuadShapeComponentRequestBus::Event(entityId, &LmbrCentral::QuadShapeComponentRequests::SetQuadWidth, 1.2f); + LmbrCentral::QuadShapeComponentRequestBus::Event(entityId, &LmbrCentral::QuadShapeComponentRequests::SetQuadHeight, 0.8f); + + // update the transform scale and non-uniform scale + AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::SetLocalUniformScale, 3.0f); + AZ::NonUniformScaleRequestBus::Event(entityId, &AZ::NonUniformScaleRequests::SetScale, AZ::Vector3(1.5f, 0.5f, 1.0f)); + + // make a game entity and check that its AABB is as expected + EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get()); + AZ::Aabb aabb = gameEntity->FindComponent()->GetAabb(); + + EXPECT_NEAR(aabb.GetMin().GetX(), -2.7f, 1e-3f); + EXPECT_NEAR(aabb.GetMin().GetY(), -0.6f, 1e-3f); + EXPECT_NEAR(aabb.GetMax().GetX(), 2.7f, 1e-3f); + EXPECT_NEAR(aabb.GetMax().GetY(), 0.6f, 1e-3f); + EXPECT_TRUE(true); + } + + TEST_P(PhysXEditorParamBoolFixture, EditorShapeColliderComponent_TriggerSettingIsRememberedWhenSwitchingToQuadAndBack) + { + bool initialTriggerSetting = GetParam(); + + // create an editor entity with a box component (which does support trigger) + EntityPtr editorEntity = CreateInactiveEditorEntity("QuadEntity"); + auto* boxShapeComponent = editorEntity->CreateComponent(LmbrCentral::EditorBoxShapeComponentTypeId); + auto* shapeColliderComponent = editorEntity->CreateComponent(); + SetTrigger(shapeColliderComponent, initialTriggerSetting); + editorEntity->Activate(); + + // the trigger setting should be what it was set to + EXPECT_EQ(IsTrigger(shapeColliderComponent), initialTriggerSetting); + + // deactivate the entity and swap the box for a quad (which does not support trigger) + editorEntity->Deactivate(); + editorEntity->RemoveComponent(boxShapeComponent); + auto* quadShapeComponent = editorEntity->CreateComponent(LmbrCentral::EditorQuadShapeComponentTypeId); + editorEntity->Activate(); + + // the trigger setting should now be false, because quad shape does not support triggers + EXPECT_FALSE(IsTrigger(shapeColliderComponent)); + + // swap back to a box shape + editorEntity->Deactivate(); + editorEntity->RemoveComponent(quadShapeComponent); + editorEntity->AddComponent(boxShapeComponent); + editorEntity->Activate(); + + // the original trigger setting should have been remembered + EXPECT_EQ(IsTrigger(shapeColliderComponent), initialTriggerSetting); + + // the quad shape component is no longer attached to the entity so won't be automatically cleared up + delete quadShapeComponent; + } + + TEST_P(PhysXEditorParamBoolFixture, EditorShapeColliderComponent_SingleSidedSettingIsRememberedWhenAddingAndRemovingRigidBody) + { + bool initialSingleSidedSetting = GetParam(); + + // create an editor entity without a rigid body (that means both single-sided and double-sided quads are valid) + EntityPtr editorEntity = CreateInactiveEditorEntity("QuadEntity"); + editorEntity->CreateComponent(LmbrCentral::EditorQuadShapeComponentTypeId); + auto* shapeColliderComponent = editorEntity->CreateComponent(); + SetSingleSided(shapeColliderComponent, initialSingleSidedSetting); + editorEntity->Activate(); + + // verify that the single sided setting matches the initial value + EXPECT_EQ(IsSingleSided(shapeColliderComponent), initialSingleSidedSetting); + + // add an editor rigid body component (this should mean single-sided quads are not supported) + editorEntity->Deactivate(); + auto rigidBodyComponent = editorEntity->CreateComponent(); + editorEntity->Activate(); + + EXPECT_FALSE(IsSingleSided(shapeColliderComponent)); + + // remove the editor rigid body component (the previous single-sided setting should be restored) + editorEntity->Deactivate(); + editorEntity->RemoveComponent(rigidBodyComponent); + editorEntity->Activate(); + + EXPECT_EQ(IsSingleSided(shapeColliderComponent), initialSingleSidedSetting); + + // the rigid body component is no longer attached to the entity so won't be automatically cleared up + delete rigidBodyComponent; + } + + INSTANTIATE_TEST_CASE_P(PhysXEditorTests, PhysXEditorParamBoolFixture, ::testing::Bool()); } // namespace PhysXEditorTests From 6a700e6b955d784b814cf7d39aa1ed65244236fa Mon Sep 17 00:00:00 2001 From: greerdv Date: Thu, 20 Jan 2022 19:10:56 +0000 Subject: [PATCH 090/413] add test for runtime behaviour of single sided quad collider Signed-off-by: greerdv --- .../Tests/ShapeColliderComponentTests.cpp | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp index 21d381a259..c164e5de63 100644 --- a/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp +++ b/Gems/PhysX/Code/Tests/ShapeColliderComponentTests.cpp @@ -707,5 +707,39 @@ namespace PhysXEditorTests delete rigidBodyComponent; } - INSTANTIATE_TEST_CASE_P(PhysXEditorTests, PhysXEditorParamBoolFixture, ::testing::Bool()); + INSTANTIATE_TEST_CASE_P(PhysXEditorTest, PhysXEditorParamBoolFixture, ::testing::Bool()); + + TEST_F(PhysXEditorFixture, EditorShapeColliderComponent_SingleSidedQuadDoesNotCollideFromBelow) + { + // create an editor entity without a rigid body (that means both single-sided and double-sided quads are valid), positioned at the origin + EntityPtr editorQuadEntity = CreateInactiveEditorEntity("QuadEntity"); + editorQuadEntity->CreateComponent(LmbrCentral::EditorQuadShapeComponentTypeId); + auto* shapeColliderComponent = editorQuadEntity->CreateComponent(); + SetSingleSided(shapeColliderComponent, true); + editorQuadEntity->Activate(); + LmbrCentral::QuadShapeComponentRequestBus::Event(editorQuadEntity->GetId(), &LmbrCentral::QuadShapeComponentRequests::SetQuadHeight, 10.0f); + LmbrCentral::QuadShapeComponentRequestBus::Event(editorQuadEntity->GetId(), &LmbrCentral::QuadShapeComponentRequests::SetQuadWidth, 10.0f); + + // add a second entity with a box collider and a rigid body, positioned below the quad + EntityPtr editorBoxEntity = CreateInactiveEditorEntity("BoxEntity"); + editorBoxEntity->CreateComponent(LmbrCentral::BoxShapeComponentTypeId); + editorBoxEntity->CreateComponent(); + editorBoxEntity->CreateComponent(); + editorBoxEntity->Activate(); + AZ::TransformBus::Event(editorBoxEntity->GetId(), &AZ::TransformBus::Events::SetWorldTranslation, -AZ::Vector3::CreateAxisZ()); + + EntityPtr gameQuadEntity = CreateActiveGameEntityFromEditorEntity(editorQuadEntity.get()); + EntityPtr gameBoxEntity = CreateActiveGameEntityFromEditorEntity(editorBoxEntity.get()); + + // give the box enough upward velocity to rise above the level of the quad and simulate + Physics::RigidBodyRequestBus::Event(gameBoxEntity->GetId(), &Physics::RigidBodyRequests::SetLinearVelocity, AZ::Vector3::CreateAxisZ(6.0f)); + PhysX::TestUtils::UpdateScene(m_defaultScene, AzPhysics::SystemConfiguration::DefaultFixedTimestep, 200); + + // the box should travel through the base of the quad because it has no collision from that direction + // and land on the top surface of the quad, which does have collision + float finalHeight = 0.0f; + AZ::TransformBus::EventResult(finalHeight, gameBoxEntity->GetId(), &AZ::TransformBus::Events::GetWorldZ); + + EXPECT_GT(finalHeight, 0.0f); + } } // namespace PhysXEditorTests From 59e43813f0b091f4456a0a90892bf08f7e7b5141 Mon Sep 17 00:00:00 2001 From: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Date: Thu, 20 Jan 2022 13:00:02 -0800 Subject: [PATCH 091/413] GCC Support for Linux Updates and fixes to support GCC for Linux Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> --- Code/Editor/Include/SandboxAPI.h | 2 +- .../Platform/Common/GCC/editor_lib_gcc.cmake | 9 ++ Code/Editor/TopRendererWnd.h | 2 - Code/Framework/AzCore/AzCore/EBus/EBus.h | 9 +- .../AzCore/EBus/Internal/BusContainer.h | 10 +- .../AzCore/EBus/Internal/CallstackEntry.h | 2 +- Code/Framework/AzCore/AzCore/IO/Path/Path.inl | 94 ++++++------ .../AzCore/AzCore/Math/MathIntrinsics.h | 4 +- .../AzCore/AzCore/Memory/AllocatorManager.h | 4 +- .../AzCore/AzCore/Name/NameDictionary.h | 4 +- Code/Framework/AzCore/AzCore/PlatformDef.h | 92 +++++++++++- .../AzCore/AzCore/RTTI/BehaviorContext.h | 7 +- Code/Framework/AzCore/AzCore/RTTI/RTTI.h | 29 ++-- Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h | 36 +++-- .../AzCore/AzCore/Script/ScriptContext.h | 2 +- .../Serialization/Json/RegistrationContext.h | 6 + .../AzCore/AzCore/UnitTest/TestTypes.h | 11 +- .../AzCore/AzCore/azcore_files.cmake | 1 + Code/Framework/AzCore/AzCore/base.h | 61 +------- .../AzCore/std/containers/compressed_pair.h | 1 + .../AzCore/std/containers/fixed_vector.h | 2 +- .../AzCore/AzCore/std/containers/map.h | 2 +- .../AzCore/std/containers/node_handle.h | 7 +- .../AzCore/AzCore/std/containers/set.h | 2 +- .../AzCore/std/containers/unordered_map.h | 2 +- .../AzCore/std/containers/unordered_set.h | 2 +- .../AzCore/std/function/function_base.h | 4 +- .../AzCore/std/function/function_template.h | 2 +- .../AzCore/AzCore/std/function/invoke.h | 1 + .../AzCore/AzCore/std/string/fixed_string.inl | 20 ++- .../AzCore/AzCore/std/string/string.h | 8 +- .../AzCore/AzCore/std/string/string_view.h | 110 +++++++++++--- .../AzCore/std/typetraits/conjunction.h | 1 + .../AzCore/AzCore/std/typetraits/intrinsics.h | 7 +- Code/Framework/AzCore/AzCore/variadic.h | 64 +++++++++ .../OverrunDetectionAllocator_Unimplemented.h | 2 +- .../Platform/Linux/platform_linux.cmake | 3 +- Code/Framework/AzCore/Tests/AZStd/String.cpp | 54 +++---- Code/Framework/AzCore/Tests/EBus.cpp | 30 ++-- Code/Framework/AzCore/Tests/Serialization.cpp | 17 ++- .../TcpTransport/TcpConnection.cpp | 2 +- .../TcpTransport/TcpConnectionSet.cpp | 2 +- .../UdpTransport/UdpNetworkInterface.cpp | 2 +- .../Platform/Linux/AzTest_Traits_Linux.h | 2 - .../AssetBrowser/Entries/AssetBrowserEntry.h | 1 - .../Entity/EditorEntityHelpers.h | 2 +- .../AzToolsFramework/Slice/SliceUtilities.cpp | 2 +- .../AzToolsFramework/Thumbnails/Thumbnail.h | 2 +- .../Common/GCC/aztoolsframework_gcc.cmake} | 1 - Code/Framework/GridMate/CMakeLists.txt | 1 - .../GridMate/GridMate/Carrier/Carrier.cpp | 4 +- .../GridMate/Carrier/SecureSocketDriver.cpp | 2 + .../Carrier/StreamSecureSocketDriver.cpp | 5 + Code/Legacy/CrySystem/IDebugCallStack.cpp | 2 +- .../Common/GCC/projectmanager_gcc.cmake | 12 ++ .../GCC/pythonbindingsexample_gcc.cmake | 12 ++ .../Code/Include/Framework/AWSApiRequestJob.h | 93 ++++++------ .../Include/Framework/ServiceRequestJob.h | 135 +++++++++--------- ...mageprocessingatom_editor_static_gcc.cmake | 12 ++ .../GCC/atom_asset_shader_static_gcc.cmake | 12 ++ .../Feature/ParamMacros/MapParamCommon.inl | 1 + .../Common/atom_feature_common_gcc.cmake | 12 ++ .../Common/GCC/atom_feature_common_gcc.cmake | 13 ++ .../Include/Atom/RPI.Public/GpuQuery/Query.h | 4 +- .../Include/Atom/RPI.Public/Pass/ParentPass.h | 8 +- .../Common/GCC/atom_rpi_public_gcc.cmake | 12 +- .../GCC/editorpythonbindings_static_gcc.cmake | 12 ++ .../GCC/editorpythonbindings_tests_gcc.cmake | 12 ++ .../Code/Tests/ExpressionEngineTestFixture.h | 2 +- .../Code/Tests/MathExpressionTests.cpp | 44 +++--- .../GradientSignal/Code/Source/ImageAsset.cpp | 1 + .../Code/Source/Animation/AnimSplineTrack.h | 2 +- .../Code/Source/Cinematics/AnimSplineTrack.h | 2 +- .../Platform/Common/GCC/metastream_gcc.cmake | 10 ++ Gems/PhysX/Code/CMakeLists.txt | 2 + .../Clang/physx_editor_static_clang.cmake | 7 + .../Common/GCC/physx_editor_static_gcc.cmake | 12 ++ .../MSVC/physx_editor_static_msvc.cmake | 7 + .../GCC/pythonassetbuilder_static_gcc.cmake | 12 ++ .../GCC/pythonassetbuilder_tests_gcc.cmake | 12 ++ .../Platform/Common/GCC/qtforpython_gcc.cmake | 12 ++ .../Code/Editor/Components/EditorGraph.cpp | 2 +- .../Code/Editor/Components/GraphUpgrade.cpp | 2 +- .../Libraries/Core/ScriptEventBase.h | 2 +- ...scriptcanvastesting_editor_tests_gcc.cmake | 7 + .../Include/ScriptEvents/ScriptEventsAsset.h | 9 +- .../ScriptEventsSystemEditorComponent.cpp | 2 +- Gems/WhiteBox/Code/CMakeLists.txt | 1 + .../Common/Clang/whitebox_editor_clang.cmake | 7 + .../Common/GCC/whitebox_editor_gcc.cmake | 12 ++ .../Common/MSVC/whitebox_editor_msvc.cmake | 7 + .../Linux/BuiltInPackages_linux.cmake | 4 +- cmake/Configurations.cmake | 17 ++- .../Common/GCC/Configurations_gcc.cmake | 87 +++++++++++ .../Platform/Linux/Configurations_linux.cmake | 27 ++++ cmake/Platform/Linux/PAL_linux.cmake | 3 + .../build/Platform/Linux/build_config.json | 32 +++++ scripts/build/Platform/Linux/build_linux.sh | 27 +++- 98 files changed, 1050 insertions(+), 429 deletions(-) create mode 100644 Code/Editor/Platform/Common/GCC/editor_lib_gcc.cmake create mode 100644 Code/Framework/AzCore/AzCore/variadic.h rename Code/Framework/{GridMate/Platform/Common/gridmate_msvc.cmake => AzToolsFramework/Platform/Common/GCC/aztoolsframework_gcc.cmake} (99%) create mode 100644 Code/Tools/ProjectManager/Platform/Common/GCC/projectmanager_gcc.cmake create mode 100644 Code/Tools/PythonBindingsExample/source/Platform/Common/GCC/pythonbindingsexample_gcc.cmake create mode 100644 Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Platform/Common/GCC/imageprocessingatom_editor_static_gcc.cmake create mode 100644 Gems/Atom/Asset/Shader/Code/Source/Platform/Common/GCC/atom_asset_shader_static_gcc.cmake create mode 100644 Gems/Atom/Feature/Common/Code/Platform/Common/atom_feature_common_gcc.cmake create mode 100644 Gems/Atom/Feature/Common/Code/Source/Platform/Common/GCC/atom_feature_common_gcc.cmake rename Code/Framework/GridMate/Platform/Common/gridmate_clang.cmake => Gems/Atom/RPI/Code/Source/Platform/Common/GCC/atom_rpi_public_gcc.cmake (52%) create mode 100644 Gems/EditorPythonBindings/Code/Source/Platform/Common/GCC/editorpythonbindings_static_gcc.cmake create mode 100644 Gems/EditorPythonBindings/Code/Source/Platform/Common/GCC/editorpythonbindings_tests_gcc.cmake create mode 100644 Gems/Metastream/Code/Source/Platform/Common/GCC/metastream_gcc.cmake create mode 100644 Gems/PhysX/Code/Source/Platform/Common/Clang/physx_editor_static_clang.cmake create mode 100644 Gems/PhysX/Code/Source/Platform/Common/GCC/physx_editor_static_gcc.cmake create mode 100644 Gems/PhysX/Code/Source/Platform/Common/MSVC/physx_editor_static_msvc.cmake create mode 100644 Gems/PythonAssetBuilder/Code/Source/Platform/Common/GCC/pythonassetbuilder_static_gcc.cmake create mode 100644 Gems/PythonAssetBuilder/Code/Source/Platform/Common/GCC/pythonassetbuilder_tests_gcc.cmake create mode 100644 Gems/QtForPython/Code/Source/Platform/Common/GCC/qtforpython_gcc.cmake create mode 100644 Gems/ScriptCanvasTesting/Code/Platform/Common/GCC/scriptcanvastesting_editor_tests_gcc.cmake create mode 100644 Gems/WhiteBox/Code/Source/Platform/Common/Clang/whitebox_editor_clang.cmake create mode 100644 Gems/WhiteBox/Code/Source/Platform/Common/GCC/whitebox_editor_gcc.cmake create mode 100644 Gems/WhiteBox/Code/Source/Platform/Common/MSVC/whitebox_editor_msvc.cmake create mode 100644 cmake/Platform/Common/GCC/Configurations_gcc.cmake diff --git a/Code/Editor/Include/SandboxAPI.h b/Code/Editor/Include/SandboxAPI.h index 4e0cafea4a..757b799837 100644 --- a/Code/Editor/Include/SandboxAPI.h +++ b/Code/Editor/Include/SandboxAPI.h @@ -21,7 +21,7 @@ #endif #if defined(SANDBOX_IMPORTS) && defined(SANDBOX_EXPORTS) -#error SANDBOX_EXPORTS and SANDBOX_IMPORTS can't be defined at the same time +#error SANDBOX_EXPORTS and SANDBOX_IMPORTS cannot be defined at the same time #endif #if defined(SANDBOX_EXPORTS) diff --git a/Code/Editor/Platform/Common/GCC/editor_lib_gcc.cmake b/Code/Editor/Platform/Common/GCC/editor_lib_gcc.cmake new file mode 100644 index 0000000000..bc945f55c9 --- /dev/null +++ b/Code/Editor/Platform/Common/GCC/editor_lib_gcc.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(LY_COMPILE_OPTIONS PRIVATE -fexceptions) diff --git a/Code/Editor/TopRendererWnd.h b/Code/Editor/TopRendererWnd.h index c5bc7a31f2..7bdf2eaff2 100644 --- a/Code/Editor/TopRendererWnd.h +++ b/Code/Editor/TopRendererWnd.h @@ -81,8 +81,6 @@ public: bool m_bShowStatObjects; bool m_bShowWater; bool m_bAutoScaleGreyRange; - - friend class QTopRendererWnd; }; #endif // CRYINCLUDE_EDITOR_TOPRENDERERWND_H diff --git a/Code/Framework/AzCore/AzCore/EBus/EBus.h b/Code/Framework/AzCore/AzCore/EBus/EBus.h index 67cffb4e41..4ab4f9a76c 100644 --- a/Code/Framework/AzCore/AzCore/EBus/EBus.h +++ b/Code/Framework/AzCore/AzCore/EBus/EBus.h @@ -23,6 +23,11 @@ #include #include + // Included for backwards compatibility purposes +#include +#include +#include + #include #include @@ -515,7 +520,7 @@ namespace AZ * This is not EBus Context Mutex when LocklessDispatch is set */ template - using DispatchLockGuard = typename ImplTraits::template DispatchLockGuard; + using DispatchLockGuardTemplate = typename ImplTraits::template DispatchLockGuard; ////////////////////////////////////////////////////////////////////////// // Check to help identify common mistakes @@ -645,7 +650,7 @@ namespace AZ * during broadcast/event dispatch. * @see EBusTraits::LocklessDispatch */ - using DispatchLockGuard = DispatchLockGuard; + using DispatchLockGuard = DispatchLockGuardTemplate; /** * The scoped lock guard to use during connection. Some specialized policies execute handler methods which diff --git a/Code/Framework/AzCore/AzCore/EBus/Internal/BusContainer.h b/Code/Framework/AzCore/AzCore/EBus/Internal/BusContainer.h index 2c57359c67..ce79b93805 100644 --- a/Code/Framework/AzCore/AzCore/EBus/Internal/BusContainer.h +++ b/Code/Framework/AzCore/AzCore/EBus/Internal/BusContainer.h @@ -93,14 +93,14 @@ namespace AZ // This struct will hold the handlers per address struct HandlerHolder; // This struct will hold each handler - using HandlerNode = HandlerNode; + using HandlerNode = AZ::Internal::HandlerNode; // Defines how handler holders are stored (will be some sort of map-like structure from id -> handler holder) using AddressStorage = AddressStoragePolicy; // Defines how handlers are stored per address (will be some sort of list) using HandlerStorage = HandlerStoragePolicy; using Handler = IdHandler; - using MultiHandler = MultiHandler; + using MultiHandler = AZ::Internal::MultiHandler; using BusPtr = AZStd::intrusive_ptr; EBusContainer() = default; @@ -774,13 +774,13 @@ namespace AZ // This struct will hold the handler per address struct HandlerHolder; // This struct will hold each handler - using HandlerNode = HandlerNode; + using HandlerNode = AZ::Internal::HandlerNode; // Defines how handler holders are stored (will be some sort of map-like structure from id -> handler holder) using AddressStorage = AddressStoragePolicy; // No need for HandlerStorage, there's only 1 so it will always just be a HandlerNode* using Handler = IdHandler; - using MultiHandler = MultiHandler; + using MultiHandler = AZ::Internal::MultiHandler; using BusPtr = AZStd::intrusive_ptr; EBusContainer() = default; @@ -1316,7 +1316,7 @@ namespace AZ // This struct will hold the handlers per address struct HandlerHolder; // This struct will hold each handler - using HandlerNode = HandlerNode; + using HandlerNode = AZ::Internal::HandlerNode; // Defines how handlers are stored per address (will be some sort of list) using HandlerStorage = HandlerStoragePolicy; // No need for AddressStorage, there's only 1 diff --git a/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h b/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h index bcda78aef8..391a0ea18e 100644 --- a/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h +++ b/Code/Framework/AzCore/AzCore/EBus/Internal/CallstackEntry.h @@ -161,7 +161,7 @@ namespace AZ template struct EBusCallstackStorage { - AZ_THREAD_LOCAL static C* s_entry; + static AZ_THREAD_LOCAL C* s_entry; EBusCallstackStorage() = default; ~EBusCallstackStorage() = default; diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path.inl b/Code/Framework/AzCore/AzCore/IO/Path/Path.inl index 0dc1799528..ab991e1750 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path.inl +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path.inl @@ -13,50 +13,6 @@ #include -// extern instantiations of Path templates to prevent implicit instantiations -namespace AZ::IO -{ - // Class templates explicit declarations - extern template class BasicPath; - extern template class BasicPath; - extern template class PathIterator; - extern template class PathIterator; - extern template class PathIterator; - - // Swap function explicit declarations - extern template void swap(Path& lhs, Path& rhs) noexcept; - extern template void swap(FixedMaxPath& lhs, FixedMaxPath& rhs) noexcept; - - // Hash function explicit declarations - extern template size_t hash_value(const Path& pathToHash); - extern template size_t hash_value(const FixedMaxPath& pathToHash); - - // Append operator explicit declarations - extern template BasicPath operator/(const BasicPath& lhs, const PathView& rhs); - extern template BasicPath operator/(const BasicPath& lhs, const PathView& rhs); - extern template BasicPath operator/(const BasicPath& lhs, AZStd::string_view rhs); - extern template BasicPath operator/(const BasicPath& lhs, AZStd::string_view rhs); - extern template BasicPath operator/(const BasicPath& lhs, - const typename BasicPath::value_type* rhs); - extern template BasicPath operator/(const BasicPath& lhs, - const typename BasicPath::value_type* rhs); - - // Iterator compare explicit declarations - extern template bool operator==(const PathIterator& lhs, - const PathIterator& rhs); - extern template bool operator==(const PathIterator& lhs, - const PathIterator& rhs); - extern template bool operator==(const PathIterator& lhs, - const PathIterator& rhs); - extern template bool operator!=(const PathIterator& lhs, - const PathIterator& rhs); - extern template bool operator!=(const PathIterator& lhs, - const PathIterator& rhs); - extern template bool operator!=(const PathIterator& lhs, - const PathIterator& rhs); -} - - //! PathView implementation namespace AZ::IO { @@ -939,13 +895,13 @@ namespace AZ::IO // then it has no root directory nor filename if (rootNameView.end() == m_path.end()) { - // has_root_directory || has_filename = false - // If the root name is of the form - // # C: - then it isn't absolute unless it has a root directory C:\ - // # \\?\ = is a UNC path that can't exist without a root directory - // # \\server - Is absolute, but has no root directory - // Therefore if the rootName is larger than three characters - // then append the path separator + /* has_root_directory || has_filename = false + If the root name is of the form + C: - then it isn't absolute unless it has a root directory C:\. + \\?\ = is a UNC path that can't exist without a root directory. + \\server - Is absolute, but has no root directory. + Therefore if the rootName is larger than three characters + then append the path separator. */ if (rootNameView.size() >= 3) { m_path.push_back(m_preferred_separator); @@ -1550,3 +1506,39 @@ namespace AZ::IO return AZStd::hash{}(pathToHash); } } + +// extern instantiations of Path templates to prevent implicit instantiations +namespace AZ::IO +{ + // Swap function explicit declarations + extern template void swap(Path& lhs, Path& rhs) noexcept; + extern template void swap(FixedMaxPath& lhs, FixedMaxPath& rhs) noexcept; + + // Hash function explicit declarations + extern template size_t hash_value(const Path& pathToHash); + extern template size_t hash_value(const FixedMaxPath& pathToHash); + + // Append operator explicit declarations + extern template BasicPath operator/(const BasicPath& lhs, const PathView& rhs); + extern template BasicPath operator/(const BasicPath& lhs, const PathView& rhs); + extern template BasicPath operator/(const BasicPath& lhs, AZStd::string_view rhs); + extern template BasicPath operator/(const BasicPath& lhs, AZStd::string_view rhs); + extern template BasicPath operator/(const BasicPath& lhs, + const typename BasicPath::value_type* rhs); + extern template BasicPath operator/(const BasicPath& lhs, + const typename BasicPath::value_type* rhs); + + // Iterator compare explicit declarations + extern template bool operator==(const PathIterator& lhs, + const PathIterator& rhs); + extern template bool operator==(const PathIterator& lhs, + const PathIterator& rhs); + extern template bool operator==(const PathIterator& lhs, + const PathIterator& rhs); + extern template bool operator!=(const PathIterator& lhs, + const PathIterator& rhs); + extern template bool operator!=(const PathIterator& lhs, + const PathIterator& rhs); + extern template bool operator!=(const PathIterator& lhs, + const PathIterator& rhs); +} diff --git a/Code/Framework/AzCore/AzCore/Math/MathIntrinsics.h b/Code/Framework/AzCore/AzCore/Math/MathIntrinsics.h index 7b731a12b2..32441aaa32 100644 --- a/Code/Framework/AzCore/AzCore/Math/MathIntrinsics.h +++ b/Code/Framework/AzCore/AzCore/Math/MathIntrinsics.h @@ -14,7 +14,7 @@ #define az_clz_u64(x) _lzcnt_u64(x) #define az_popcnt_u32(x) __popcnt(x) #define az_popcnt_u64(x) __popcnt64(x) -#elif defined(AZ_COMPILER_CLANG) +#elif defined(AZ_COMPILER_CLANG) || defined(AZ_COMPILER_GCC) #define az_ctz_u32(x) __builtin_ctz(x) #define az_ctz_u64(x) __builtin_ctzll(x) #define az_clz_u32(x) __builtin_clz(x) @@ -22,5 +22,5 @@ #define az_popcnt_u32(x) __builtin_popcount(x) #define az_popcnt_u64(x) __builtin_popcountll(x) #else - #error Count Leading Zeros, Count Trailing Zeros and Pop Count intrinsics isn't supported for this compiler + #error Count Leading Zeros, Count Trailing Zeros and Pop Count intrinsics isnt supported for this compiler #endif diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h index 14dec68ad1..50afce929a 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.h @@ -39,6 +39,9 @@ namespace AZ template constexpr friend void AZStd::destroy_at(T*); public: + + AllocatorManager(); + typedef AZStd::function OutOfMemoryCBType; static void PreRegisterAllocator(IAllocator* allocator); // Only call if the environment is not yet attached @@ -185,7 +188,6 @@ namespace AZ AZ::Debug::AllocationRecords::Mode m_defaultTrackingRecordMode; AZStd::unique_ptr m_mallocSchema; - AllocatorManager(); ~AllocatorManager(); static AllocatorManager g_allocMgr; ///< The single instance of the allocator manager diff --git a/Code/Framework/AzCore/AzCore/Name/NameDictionary.h b/Code/Framework/AzCore/AzCore/Name/NameDictionary.h index 8f9af4be3a..3df05f04b5 100644 --- a/Code/Framework/AzCore/AzCore/Name/NameDictionary.h +++ b/Code/Framework/AzCore/AzCore/Name/NameDictionary.h @@ -45,7 +45,9 @@ namespace AZ //! that already exist. class NameDictionary final { + public: AZ_CLASS_ALLOCATOR(NameDictionary, AZ::OSAllocator, 0); + private: friend Module; friend Name; @@ -75,8 +77,8 @@ namespace AZ //! @return A Name instance. If the hash was not found, the Name will be empty. Name FindName(Name::Hash hash) const; - private: NameDictionary(); + private: ~NameDictionary(); void ReportStats() const; diff --git a/Code/Framework/AzCore/AzCore/PlatformDef.h b/Code/Framework/AzCore/AzCore/PlatformDef.h index 7f00f7e90e..8609ad5756 100644 --- a/Code/Framework/AzCore/AzCore/PlatformDef.h +++ b/Code/Framework/AzCore/AzCore/PlatformDef.h @@ -10,10 +10,17 @@ ////////////////////////////////////////////////////////////////////////// // Platforms +#include + #include "PlatformRestrictedFileDef.h" #if defined(__clang__) #define AZ_COMPILER_CLANG __clang_major__ +#elif defined(__GNUC__) + // Assign AZ_COMPILER_GCC to a number that represents the major+minor (2 digits) + path level (2 digits) i.e. 3.2.0 == 30200 + #define AZ_COMPILER_GCC (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) #elif defined(_MSC_VER) #define AZ_COMPILER_MSVC _MSC_VER #else @@ -29,7 +36,7 @@ #define AZ_DYNAMIC_LIBRARY_PREFIX AZ_TRAIT_OS_DYNAMIC_LIBRARY_PREFIX #define AZ_DYNAMIC_LIBRARY_EXTENSION AZ_TRAIT_OS_DYNAMIC_LIBRARY_EXTENSION -#if defined(AZ_COMPILER_CLANG) +#if defined(AZ_COMPILER_CLANG) || defined(AZ_COMPILER_GCC) #define AZ_DLL_EXPORT AZ_TRAIT_OS_DLL_EXPORT_CLANG #define AZ_DLL_IMPORT AZ_TRAIT_OS_DLL_IMPORT_CLANG #elif defined(AZ_COMPILER_MSVC) @@ -67,12 +74,36 @@ #if defined(AZ_COMPILER_MSVC) /// Disables a warning using push style. For use matched with an AZ_POP_WARNING -#define AZ_PUSH_DISABLE_WARNING(_msvcOption, __) \ - __pragma(warning(push)) \ + +// Compiler specific AZ_PUSH_DISABLE_WARNING +#define AZ_PUSH_DISABLE_WARNING_MSVC(_msvcOption) \ + __pragma(warning(push)) \ + __pragma(warning(disable : _msvcOption)) +#define AZ_PUSH_DISABLE_WARNING_CLANG(_clangOption) +#define AZ_PUSH_DISABLE_WARNING_GCC(_gccOption) + +/// Compiler specific AZ_POP_DISABLE_WARNING. This needs to be matched with the compiler specific AZ_PUSH_DISABLE_WARNINGs +#define AZ_POP_DISABLE_WARNING_CLANG +#define AZ_POP_DISABLE_WARNING_MSVC \ + __pragma(warning(pop)) +#define AZ_POP_DISABLE_WARNING_GCC + + +// Variadic definitions for AZ_PUSH_DISABLE_WARNING for the current compiler +#define AZ_PUSH_DISABLE_WARNING_1(_msvcOption) \ + __pragma(warning(push)) \ + __pragma(warning(disable : _msvcOption)) + +#define AZ_PUSH_DISABLE_WARNING_2(_msvcOption, _2) \ + __pragma(warning(push)) \ + __pragma(warning(disable : _msvcOption)) + +#define AZ_PUSH_DISABLE_WARNING_3(_msvcOption, _2, _3) \ + __pragma(warning(push)) \ __pragma(warning(disable : _msvcOption)) /// Pops the warning stack. For use matched with an AZ_PUSH_DISABLE_WARNING -#define AZ_POP_DISABLE_WARNING \ +#define AZ_POP_DISABLE_WARNING \ __pragma(warning(pop)) @@ -94,17 +125,62 @@ # define AZ_FUNCTION_SIGNATURE __FUNCSIG__ ////////////////////////////////////////////////////////////////////////// -#elif defined(AZ_COMPILER_CLANG) +#elif defined(AZ_COMPILER_CLANG) || defined(AZ_COMPILER_GCC) + +#if defined(AZ_COMPILER_CLANG) /// Disables a single warning using push style. For use matched with an AZ_POP_WARNING -#define AZ_PUSH_DISABLE_WARNING(__, _clangOption) \ - _Pragma("clang diagnostic push") \ + +// Compiler specific AZ_PUSH_DISABLE_WARNING +#define AZ_PUSH_DISABLE_WARNING_CLANG(_clangOption) \ + _Pragma("clang diagnostic push") \ _Pragma(AZ_STRINGIZE(clang diagnostic ignored _clangOption)) +#define AZ_PUSH_DISABLE_WARNING_MSVC(_msvcOption) +#define AZ_PUSH_DISABLE_WARNING_GCC(_gccOption) + +/// Compiler specific AZ_POP_DISABLE_WARNING. This needs to be matched with the compiler specific AZ_PUSH_DISABLE_WARNINGs +#define AZ_POP_DISABLE_WARNING_CLANG \ + _Pragma("clang diagnostic pop") +#define AZ_POP_DISABLE_WARNING_MSVC +#define AZ_POP_DISABLE_WARNING_GCC + +// Variadic definitions for AZ_PUSH_DISABLE_WARNING for the current compiler +#define AZ_PUSH_DISABLE_WARNING_1(_1) +#define AZ_PUSH_DISABLE_WARNING_2(_1, _clangOption) AZ_PUSH_DISABLE_WARNING_CLANG(_clangOption) +#define AZ_PUSH_DISABLE_WARNING_3(_1, _clangOption, _2) AZ_PUSH_DISABLE_WARNING_CLANG(_clangOption) /// Pops the warning stack. For use matched with an AZ_PUSH_DISABLE_WARNING #define AZ_POP_DISABLE_WARNING \ _Pragma("clang diagnostic pop") +#else + +/// Disables a single warning using push style. For use matched with an AZ_POP_WARNING + +// Compiler specific AZ_PUSH_DISABLE_WARNING +#define AZ_PUSH_DISABLE_WARNING_GCC(_gccOption) \ + _Pragma("GCC diagnostic push") \ + _Pragma(AZ_STRINGIZE(GCC diagnostic ignored _gccOption)) +#define AZ_PUSH_DISABLE_WARNING_CLANG(_clangOption) +#define AZ_PUSH_DISABLE_WARNING_MSVC(_msvcOption) + +/// Compiler specific AZ_POP_DISABLE_WARNING. This needs to be matched with the compiler specific AZ_PUSH_DISABLE_WARNINGs +#define AZ_POP_DISABLE_WARNING_CLANG +#define AZ_POP_DISABLE_WARNING_MSVC +#define AZ_POP_DISABLE_WARNING_GCC \ + _Pragma("GCC diagnostic pop") + +// Variadic definitions for AZ_PUSH_DISABLE_WARNING for the current compiler +#define AZ_PUSH_DISABLE_WARNING_1(_1) +#define AZ_PUSH_DISABLE_WARNING_2(_1, _2) +#define AZ_PUSH_DISABLE_WARNING_3(_1, _2, _gccOption) AZ_PUSH_DISABLE_WARNING_GCC(_gccOption) + +/// Pops the warning stack. For use matched with an AZ_PUSH_DISABLE_WARNING +#define AZ_POP_DISABLE_WARNING + _Pragma("GCC diagnostic pop") + +#endif // defined(AZ_COMPILER_CLANG) + #define AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING #define AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING #define AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING @@ -121,6 +197,8 @@ #error Compiler not supported #endif +#define AZ_PUSH_DISABLE_WARNING(...) AZ_MACRO_SPECIALIZE(AZ_PUSH_DISABLE_WARNING_, AZ_VA_NUM_ARGS(__VA_ARGS__), (__VA_ARGS__)) + // We need to define AZ_DEBUG_BUILD in debug mode. We can also define it in debug optimized mode (left up to the user). // note that _DEBUG is not in fact always defined on all platforms, and only AZ_DEBUG_BUILD should be relied on. #if !defined(AZ_DEBUG_BUILD) && defined(_DEBUG) diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h index 7f48f301aa..0f7470eb39 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.h @@ -1541,7 +1541,7 @@ namespace AZ } template - static bool SetClassEqualityComparer(BehaviorClass* behaviorClass, const T*) + static void SetClassEqualityComparer(BehaviorClass* behaviorClass, const T*) { behaviorClass->m_equalityComparer = &DefaultEqualityComparer; } @@ -2341,8 +2341,6 @@ namespace AZ // For some reason the Script.cpp test validates that an incomplete type can be used with the SetResult struct template static constexpr bool IsCopyAssignable = false; - template - static constexpr bool IsCopyAssignable() = AZStd::declval())>> = true; template static bool Set(BehaviorValueParameter& param, T&& result, bool IsValueCopy) @@ -2402,6 +2400,9 @@ namespace AZ } }; + template + constexpr bool SetResult::IsCopyAssignable() = AZStd::declval())>> = true; + AZ_FORCE_INLINE BehaviorValueParameter& BehaviorValueParameter::operator=(BehaviorValueParameter&& other) { *static_cast(this) = AZStd::move(static_cast(other)); diff --git a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h index acf6f64f77..e8ccaa79cf 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/RTTI.h +++ b/Code/Framework/AzCore/AzCore/RTTI/RTTI.h @@ -977,26 +977,32 @@ namespace AZ { return AzGenericTypeInfo::Uuid(); } - + + #if defined(AZ_COMPILER_MSVC) + // There is a bug with the MSVC compiler when using the 'auto' keyword here. It appears that MSVC is unable to distinguish between a template + // template argument with a type variadic pack vs a template template argument with a non-type auto variadic pack. template class U, typename = void> + #else + template class U, typename = void> + #endif // defined(AZ_COMPILER_MSVC) inline const AZ::TypeId& RttiTypeId() { return AzGenericTypeInfo::Uuid(); } - template class U, typename = void> + template class U, typename = void> inline const AZ::TypeId& RttiTypeId() { return AzGenericTypeInfo::Uuid(); } - template class U, typename = void> + template class U, typename = void> inline const AZ::TypeId& RttiTypeId() { return AzGenericTypeInfo::Uuid(); } - template class U, typename = void> + template class U, typename = void> inline const AZ::TypeId& RttiTypeId() { return AzGenericTypeInfo::Uuid(); @@ -1027,15 +1033,22 @@ namespace AZ } // Returns true if the type is contained, otherwise false. Safe to call for type not supporting AZRtti (returns false unless type fully match). + +#if defined(AZ_COMPILER_MSVC) + // There is a bug with the MSVC compiler when using the 'auto' keyword here. It appears that MSVC is unable to distinguish between a template + // template argument with a type variadic pack vs a template template argument with a non-type auto variadic pack. template class T, class U> - inline bool RttiIsTypeOf(const U&) +#else + template class T, class U> +#endif // defined(AZ_COMPILER_MSVC) + inline bool RttiIsTypeOf(const U&) { using CheckType = typename AZ::Internal::RttiRemoveQualifiers::type; return AzGenericTypeInfo::Uuid() == RttiTypeId(); } // Returns true if the type is contained, otherwise false. Safe to call for type not supporting AZRtti (returns false unless type fully match). - template class T, class U> + template class T, class U> inline bool RttiIsTypeOf(const U&) { using CheckType = typename AZ::Internal::RttiRemoveQualifiers::type; @@ -1043,7 +1056,7 @@ namespace AZ } // Returns true if the type is contained, otherwise false.Safe to call for type not supporting AZRtti(returns false unless type fully match). - template class T, class U> + template class T, class U> inline bool RttiIsTypeOf(const U&) { using CheckType = typename AZ::Internal::RttiRemoveQualifiers::type; @@ -1051,7 +1064,7 @@ namespace AZ } // Returns true if the type is contained, otherwise false.Safe to call for type not supporting AZRtti(returns false unless type fully match). - template class T, class U> + template class T, class U> inline bool RttiIsTypeOf(const U&) { using CheckType = typename AZ::Internal::RttiRemoveQualifiers::type; diff --git a/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h b/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h index 022025a3df..2cff17a638 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h +++ b/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h @@ -148,11 +148,18 @@ namespace AZ { /// Needs to match declared parameter type. template