From f53066d2b87dc5b7fd58364243e199b780cbfb31 Mon Sep 17 00:00:00 2001 From: galibzon <66021303+galibzon@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:23:23 -0500 Subject: [PATCH] [SPEC-7592] Running Linux asset_profile - AP Failed to process assests - (#2031) Trace::Error: Failed to load dynamic library at path Fixes the following harmless errors that occur when running AssetProcessorBatch on Linux: 1. Module: Unable to locate required entry point 'InitializeDynamicModule' within module '/GIT/o3de/build/linux_profile/bin/profile/libAtom_RHI_DX12.Builders.so'. 2. Module: Unable to locate required entry point 'InitializeDynamicModule' within module '/GIT/o3de/build/linux_profile/bin/profile/libAtom_RHI_Metal.Builders.so'. Signed-off-by: galibzon --- .../RHI.Builders/BuilderModule_Linux.cpp | 36 +++++++++++++++++++ .../Linux/platform_builders_linux_files.cmake | 1 + .../RHI.Builders/BuilderModule_Linux.cpp | 36 +++++++++++++++++++ .../Linux/platform_builders_linux_files.cmake | 1 + 4 files changed, 74 insertions(+) create mode 100644 Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp create mode 100644 Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp new file mode 100644 index 0000000000..28609898bf --- /dev/null +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp @@ -0,0 +1,36 @@ +/* + * 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 AZ +{ + namespace DX12 + { + //! Exposes DX12 RHI Building components to the Asset Processor. + class BuilderModule final + : public AZ::Module + { + public: + AZ_RTTI(BuilderModule, "{5A01F206-87C7-419A-9E37-43E4AD51B070}", AZ::Module); + + BuilderModule() + { + m_descriptors.insert(m_descriptors.end(), { + ReflectSystemComponent::CreateDescriptor() + }); + } + }; + } // namespace DX12 +} // namespace AZ + +// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM +// The first parameter should be GemName_GemIdLower +// The second should be the fully qualified name of the class above +AZ_DECLARE_MODULE_CLASS(Gem_Atom_RHI_DX12_Builders, AZ::DX12::BuilderModule); diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake index ea5912045e..3ca8e19fda 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Linux/platform_builders_linux_files.cmake @@ -6,4 +6,5 @@ # set(FILES + RHI.Builders/BuilderModule_Linux.cpp ) diff --git a/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp new file mode 100644 index 0000000000..90fd79f68b --- /dev/null +++ b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/RHI.Builders/BuilderModule_Linux.cpp @@ -0,0 +1,36 @@ +/* + * 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 AZ +{ + namespace Metal + { + //! Exposes Metal RHI Building components to the Asset Processor. + class BuilderModule final + : public AZ::Module + { + public: + AZ_RTTI(BuilderModule, "{B5D96879-3772-4079-A030-AE3EB0BC22D2}", AZ::Module); + + BuilderModule() + { + m_descriptors.insert(m_descriptors.end(), { + ReflectSystemComponent::CreateDescriptor() + }); + } + }; + } // namespace Metal +} // namespace AZ + +// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM +// The first parameter should be GemName_GemIdLower +// The second should be the fully qualified name of the class above +AZ_DECLARE_MODULE_CLASS(Gem_Atom_RHI_Metal_Builders, AZ::Metal::BuilderModule); diff --git a/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake index ea5912045e..3ca8e19fda 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake +++ b/Gems/Atom/RHI/Metal/Code/Source/Platform/Linux/platform_builders_linux_files.cmake @@ -6,4 +6,5 @@ # set(FILES + RHI.Builders/BuilderModule_Linux.cpp )