Collection of miscellaneous PAL changes required for restricted platforms. (#6482)

Signed-off-by: bosnichd <bosnichd@amazon.com>
This commit is contained in:
bosnichd
2021-12-20 08:15:10 -07:00
committed by GitHub
parent fea4d0e6b1
commit d5b9cf10cf
25 changed files with 139 additions and 36 deletions
@@ -15,7 +15,7 @@
#include <CryCommon/CryListenerSet.h>
#include <CryCommon/StaticInstance.h>
#if !defined(RELEASE) || defined(RELEASE_LOGGING) || defined(ENABLE_PROFILING_CODE)
#if (!defined(RELEASE) || defined(RELEASE_LOGGING) || defined(ENABLE_PROFILING_CODE)) && !defined(AZ_LEGACY_CRYSYSTEM_TRAIT_REMOTE_CONSOLE_UNSUPPORTED)
#define USE_REMOTE_CONSOLE
struct SRemoteServer;
@@ -41,17 +41,17 @@ void CRemoteConsole::Stop()
}
/////////////////////////////////////////////////////////////////////////////////////////////
void CRemoteConsole::AddLogMessage(const char* log)
void CRemoteConsole::AddLogMessage(const char*)
{
}
/////////////////////////////////////////////////////////////////////////////////////////////
void CRemoteConsole::AddLogWarning(const char* log)
void CRemoteConsole::AddLogWarning(const char*)
{
}
/////////////////////////////////////////////////////////////////////////////////////////////
void CRemoteConsole::AddLogError(const char* log)
void CRemoteConsole::AddLogError(const char*)
{
}
@@ -61,11 +61,11 @@ void CRemoteConsole::Update()
}
/////////////////////////////////////////////////////////////////////////////////////////////
void CRemoteConsole::RegisterListener(IRemoteConsoleListener* pListener, const char* name)
void CRemoteConsole::RegisterListener(IRemoteConsoleListener*, const char*)
{
}
/////////////////////////////////////////////////////////////////////////////////////////////
void CRemoteConsole::UnregisterListener(IRemoteConsoleListener* pListener)
void CRemoteConsole::UnregisterListener(IRemoteConsoleListener*)
{
}
@@ -123,6 +123,10 @@ namespace ImageProcessingAtomEditor
{
readableString = "iOS";
}
else if (platformStrLowerCase == "salem")
{
readableString = "Salem";
}
else if (platformStrLowerCase == "jasper")
{
readableString = "Jasper";
@@ -492,6 +492,14 @@ namespace AZ
{
platformId = AzFramework::PlatformId::IOS;
}
else if (platformIdentifier == "salem")
{
platformId = AzFramework::PlatformId::SALEM;
}
else if (platformIdentifier == "jasper")
{
platformId = AzFramework::PlatformId::JASPER;
}
else if (platformIdentifier == "server")
{
platformId = AzFramework::PlatformId::SERVER;
+8 -2
View File
@@ -96,6 +96,12 @@ ly_add_target(
if(PAL_TRAIT_BUILD_HOST_TOOLS)
set(runtime_dependencies_tools ${pal_source_dir}/runtime_dependencies_tools.cmake)
foreach(pal_tools_platform ${LY_PAL_TOOLS_ENABLED})
ly_get_list_relative_pal_filename(pal_runtime_dependencies_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${pal_tools_platform})
list(APPEND runtime_dependencies_tools ${pal_runtime_dependencies_source_dir}/runtime_dependencies_tools.cmake)
endforeach()
ly_add_target(
NAME Atom_Feature_Common.Editor GEM_MODULE
@@ -103,7 +109,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
FILES_CMAKE
atom_feature_common_editor_files.cmake
PLATFORM_INCLUDE_FILES
${pal_source_dir}/runtime_dependencies_tools.cmake
${runtime_dependencies_tools}
INCLUDE_DIRECTORIES
PRIVATE
.
@@ -136,7 +142,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
FILES_CMAKE
atom_feature_common_builders_files.cmake
PLATFORM_INCLUDE_FILES
${pal_source_dir}/runtime_dependencies_tools.cmake
${runtime_dependencies_tools}
INCLUDE_DIRECTORIES
PRIVATE
Source/Builders
@@ -13,6 +13,7 @@
#include <Atom/RPI.Public/Pass/PassUtils.h>
#include <Atom/RPI.Public/RenderPipeline.h>
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom_Feature_Traits_Platform.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.h>
#include <RayTracing/RayTracingFeatureProcessor.h>
@@ -30,7 +31,15 @@ namespace AZ
DiffuseProbeGridBlendDistancePass::DiffuseProbeGridBlendDistancePass(const RPI::PassDescriptor& descriptor)
: RPI::RenderPass(descriptor)
{
LoadShader();
if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// GI is not supported on this platform
SetEnabled(false);
}
else
{
LoadShader();
}
}
void DiffuseProbeGridBlendDistancePass::LoadShader()
@@ -13,6 +13,7 @@
#include <Atom/RPI.Public/Pass/PassUtils.h>
#include <Atom/RPI.Public/RenderPipeline.h>
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom_Feature_Traits_Platform.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.h>
#include <RayTracing/RayTracingFeatureProcessor.h>
@@ -30,7 +31,15 @@ namespace AZ
DiffuseProbeGridBlendIrradiancePass::DiffuseProbeGridBlendIrradiancePass(const RPI::PassDescriptor& descriptor)
: RPI::RenderPass(descriptor)
{
LoadShader();
if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// GI is not supported on this platform
SetEnabled(false);
}
else
{
LoadShader();
}
}
void DiffuseProbeGridBlendIrradiancePass::LoadShader()
@@ -13,6 +13,7 @@
#include <Atom/RPI.Public/Pass/PassUtils.h>
#include <Atom/RPI.Public/RenderPipeline.h>
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom_Feature_Traits_Platform.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.h>
#include <RayTracing/RayTracingFeatureProcessor.h>
@@ -30,17 +31,25 @@ namespace AZ
DiffuseProbeGridBorderUpdatePass::DiffuseProbeGridBorderUpdatePass(const RPI::PassDescriptor& descriptor)
: RPI::RenderPass(descriptor)
{
LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateRow.azshader",
m_rowShader,
m_rowPipelineState,
m_rowSrgLayout,
m_rowDispatchArgs);
if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// GI is not supported on this platform
SetEnabled(false);
}
else
{
LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateRow.azshader",
m_rowShader,
m_rowPipelineState,
m_rowSrgLayout,
m_rowDispatchArgs);
LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateColumn.azshader",
m_columnShader,
m_columnPipelineState,
m_columnSrgLayout,
m_columnDispatchArgs);
LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateColumn.azshader",
m_columnShader,
m_columnPipelineState,
m_columnSrgLayout,
m_columnDispatchArgs);
}
}
void DiffuseProbeGridBorderUpdatePass::LoadShader(AZStd::string shaderFilePath,
@@ -17,6 +17,7 @@
#include <Atom/RPI.Reflect/Pass/PassTemplate.h>
#include <Atom/RPI.Public/View.h>
#include <Atom/RPI.Public/Scene.h>
#include <Atom_Feature_Traits_Platform.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.h>
#include <RayTracing/RayTracingFeatureProcessor.h>
@@ -34,7 +35,15 @@ namespace AZ
DiffuseProbeGridClassificationPass::DiffuseProbeGridClassificationPass(const RPI::PassDescriptor& descriptor)
: RPI::RenderPass(descriptor)
{
LoadShader();
if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// GI is not supported on this platform
SetEnabled(false);
}
else
{
LoadShader();
}
}
void DiffuseProbeGridClassificationPass::LoadShader()
@@ -19,6 +19,7 @@
#include <Atom/RPI.Public/Pass/PassUtils.h>
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom/RPI.Public/View.h>
#include <Atom_Feature_Traits_Platform.h>
#include <Atom/Feature/TransformService/TransformServiceFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.h>
@@ -38,9 +39,9 @@ namespace AZ
: RPI::RenderPass(descriptor)
{
RHI::Ptr<RHI::Device> device = RHI::RHISystemInterface::Get()->GetDevice();
if (device->GetFeatures().m_rayTracing == false)
if (device->GetFeatures().m_rayTracing == false || !AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// raytracing is not supported on this platform
// raytracing or GI is not supported on this platform
SetEnabled(false);
}
}
@@ -17,6 +17,7 @@
#include <Atom/RPI.Reflect/Pass/PassTemplate.h>
#include <Atom/RPI.Public/View.h>
#include <Atom/RPI.Public/Scene.h>
#include <Atom_Feature_Traits_Platform.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.h>
#include <RayTracing/RayTracingFeatureProcessor.h>
@@ -34,7 +35,15 @@ namespace AZ
DiffuseProbeGridRelocationPass::DiffuseProbeGridRelocationPass(const RPI::PassDescriptor& descriptor)
: RPI::RenderPass(descriptor)
{
LoadShader();
if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// GI is not supported on this platform
SetEnabled(false);
}
else
{
LoadShader();
}
}
void DiffuseProbeGridRelocationPass::LoadShader()
@@ -11,6 +11,7 @@
#include <Atom/RPI.Public/Image/ImageSystemInterface.h>
#include <Atom/RPI.Public/RenderPipeline.h>
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom_Feature_Traits_Platform.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.h>
#include <DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h>
#include <RayTracing/RayTracingFeatureProcessor.h>
@@ -27,6 +28,13 @@ namespace AZ
DiffuseProbeGridRenderPass::DiffuseProbeGridRenderPass(const RPI::PassDescriptor& descriptor)
: Base(descriptor)
{
if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED)
{
// GI is not supported on this platform
SetEnabled(false);
return;
}
// create the shader resource group
// Note: the shader may not be available on all platforms
AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridRender.azshader";
@@ -27,6 +27,7 @@
#include <Atom/RPI.Public/RPIUtils.h>
#include <Atom/RPI.Public/Scene.h>
#include <Atom_Feature_Traits_Platform.h>
#include <Atom/Feature/ImGui/SystemBus.h>
namespace AZ
@@ -460,6 +461,9 @@ namespace AZ
{
auto imguiContextScope = ImguiContextScope(m_imguiContext);
auto& io = ImGui::GetIO();
#if defined(AZ_TRAIT_IMGUI_INI_FILENAME)
io.IniFilename = AZ_TRAIT_IMGUI_INI_FILENAME;
#endif
// ImGui IO Setup
{
@@ -9,3 +9,4 @@
#define AZ_TRAIT_LUXCORE_SUPPORTED 0
#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT
#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1
@@ -9,3 +9,4 @@
#define AZ_TRAIT_LUXCORE_SUPPORTED 0
#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT
#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1
@@ -9,3 +9,4 @@
#define AZ_TRAIT_LUXCORE_SUPPORTED 0
#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT
#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1
@@ -9,3 +9,4 @@
#define AZ_TRAIT_LUXCORE_SUPPORTED 0
#define AZ_TRAIT_LUXCORE_EXEPATH "Gems/Atom/Feature/Common/External/LuxCore2.2/win64/dll/luxcoreui.exe"
#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1
@@ -9,3 +9,4 @@
#define AZ_TRAIT_LUXCORE_SUPPORTED 0
#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT
#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1
@@ -91,7 +91,10 @@ namespace AZ
m_pageAllocator = &pageAllocator;
m_descriptor = descriptor;
m_descriptor.m_addressBase = 0;
m_descriptor.m_capacityInBytes = m_pageAllocator->GetPageSize();
if (m_descriptor.m_capacityInBytes == 0)
{
m_descriptor.m_capacityInBytes = m_pageAllocator->GetPageSize();
}
}
template <class Traits>
@@ -33,6 +33,13 @@ if(aftermath_header)
set(PAL_TRAIT_AFTERMATH_AVAILABLE TRUE)
endif()
ly_add_source_properties(
SOURCES
Source/RHI.Builders/ShaderPlatformInterfaceSystemComponent.cpp
PROPERTY COMPILE_DEFINITIONS
VALUES ${LY_PAL_TOOLS_DEFINES}
)
# Disable windows OS version check until infra can upgrade all our jenkins nodes
# if(NOT CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL "10.0.17763")
# message(FATAL_ERROR "Windows DX12 RHI implementation requires an OS version and SDK matching windows 10 build 1809 or greater")
@@ -15,15 +15,15 @@
#include <AzCore/Serialization/SerializeContext.h>
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#if defined(TOOLS_SUPPORT_JASPER)
#include <Platform/Jasper/RHI.Builders/ShaderPlatformInterface_Jasper.h>
#endif
#if defined(TOOLS_SUPPORT_PROVO)
#include <Platform/Provo/RHI.Builders/ShaderPlatformInterface_Provo.h>
#endif
#if defined(TOOLS_SUPPORT_SALEM)
#include <Platform/Salem/RHI.Builders/ShaderPlatformInterface_Salem.h>
#endif
# if defined(TOOLS_SUPPORT_JASPER)
# include AZ_RESTRICTED_FILE_EXPLICIT(RHI.Builders/ShaderPlatformInterface, Jasper)
# endif
# if defined(TOOLS_SUPPORT_PROVO)
# include AZ_RESTRICTED_FILE_EXPLICIT(RHI.Builders/ShaderPlatformInterface, Provo)
# endif
# if defined(TOOLS_SUPPORT_SALEM)
# include AZ_RESTRICTED_FILE_EXPLICIT(RHI.Builders/ShaderPlatformInterface, Salem)
# endif
#endif
#include <Atom/RHI.Reflect/DX12/Base.h>
+1
View File
@@ -15,6 +15,7 @@
"Atom_RHI_DX12",
"Atom_RHI_Metal",
"Atom_RHI_Vulkan",
"Atom_RHI_Salem",
"Atom_RHI_Null",
"Atom_Feature_Common"
]
@@ -68,6 +68,14 @@ ly_create_alias(NAME Atom_AtomBridge.Clients NAMESPACE Gem TARGETS Gem::Atom_Ato
ly_create_alias(NAME Atom_AtomBridge.Servers NAMESPACE Gem TARGETS Gem::Atom_AtomBridge)
if(PAL_TRAIT_BUILD_HOST_TOOLS)
set(additional_tool_deps ${pal_dir}/additional_${PAL_PLATFORM_NAME_LOWERCASE}_tool_deps.cmake)
foreach(pal_tools_platform ${LY_PAL_TOOLS_ENABLED})
string(TOLOWER ${pal_tools_platform} pal_tools_platform_lowercase)
ly_get_list_relative_pal_filename(pal_runtime_dependencies_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${pal_tools_platform})
list(APPEND additional_tool_deps ${pal_runtime_dependencies_source_dir}/additional_${pal_tools_platform_lowercase}_tool_deps.cmake)
endforeach()
ly_add_target(
NAME Atom_AtomBridge.Editor ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
NAMESPACE Gem
@@ -79,7 +87,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
PUBLIC
Include
PLATFORM_INCLUDE_FILES
${pal_dir}/additional_${PAL_PLATFORM_NAME_LOWERCASE}_tool_deps.cmake
${additional_tool_deps}
COMPILE_DEFINITIONS
PRIVATE
EDITOR
+3 -1
View File
@@ -115,7 +115,9 @@ void ImGuiManager::Initialize()
// Set config file
ImGuiIO& io = ImGui::GetIO();
io.IniFilename = "imgui.ini";
#if defined(IMGUI_DISABLE_AUTOMATIC_INI_SAVING_LOADING)
io.IniFilename = nullptr;
#endif
// Enable Nav Keyboard by default and allow
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
+1
View File
@@ -12,6 +12,7 @@
"android_assets": "android",
"ios_assets": "ios",
"mac_assets": "mac",
"salem_assets": "salem",
"allowed_list": "",
"remote_ip": "127.0.0.1",
"remote_port": 45643,