浏览代码

Merge branch 'development' of https://github.com/aws-lumberyard-dev/o3de-extras

byrcolin 3 年之前
父节点
当前提交
b32d5e2e29
共有 42 个文件被更改,包括 128 次插入223 次删除
  1. 5 8
      Gems/OpenXRVk/3rdParty/Platform/Android/BuiltInPackages_android.cmake
  2. 5 8
      Gems/OpenXRVk/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake
  3. 5 8
      Gems/OpenXRVk/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake
  4. 5 8
      Gems/OpenXRVk/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake
  5. 5 8
      Gems/OpenXRVk/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake
  6. 4 1
      Gems/OpenXRVk/Code/CMakeLists.txt
  7. 0 0
      Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXRVkGladFuncLoader.h
  8. 1 1
      Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXRVkInput.h
  9. 1 1
      Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXRVkUtils.h
  10. 11 3
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Android/OpenXRVk_Android.h
  11. 2 1
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Android/OpenXRVk_Platform.h
  12. 18 3
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Linux/OpenXRVk_Linux.h
  13. 1 0
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Linux/platform_private_linux_files.cmake
  14. 0 17
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Mac/Atom_RHI_Vulkan_Mac.h
  15. 0 10
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Mac/Atom_RHI_Vulkan_Platform.h
  16. 2 1
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Windows/OpenXRVk_Platform.h
  17. 0 10
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/iOS/Atom_RHI_Vulkan_Platform.h
  18. 0 11
      Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/iOS/platform_builders_ios_files.cmake
  19. 1 1
      Gems/OpenXRVk/Code/Source/OpenXRVkGladFuncLoader.cpp
  20. 23 23
      Gems/OpenXRVk/Code/Source/OpenXRVkInstance.cpp
  21. 1 1
      Gems/OpenXRVk/Code/Source/OpenXRVkModule.cpp
  22. 5 5
      Gems/OpenXRVk/Code/Source/OpenXRVkSession.cpp
  23. 7 7
      Gems/OpenXRVk/Code/Source/OpenXRVkSwapChain.cpp
  24. 7 7
      Gems/OpenXRVk/Code/Source/OpenXRVkSystemComponent.cpp
  25. 2 2
      Gems/OpenXRVk/Code/Source/Platform/Android/OpenXRVk_Traits_Android.h
  26. 2 2
      Gems/OpenXRVk/Code/Source/Platform/Linux/OpenXRVk_Traits_Linux.h
  27. 3 3
      Gems/OpenXRVk/Code/openxrvk_private_common_files.cmake
  28. 0 11
      Gems/XR/3rdParty/Platform/Android/BuiltInPackages_android.cmake
  29. 0 11
      Gems/XR/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake
  30. 0 10
      Gems/XR/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake
  31. 0 10
      Gems/XR/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake
  32. 0 10
      Gems/XR/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake
  33. 0 4
      Gems/XR/CMakeLists.txt
  34. 3 0
      Gems/XR/Code/CMakeLists.txt
  35. 2 1
      Gems/XR/Code/Include/XR/Platform/Android/XR_Platform.h
  36. 1 0
      Gems/XR/Code/Include/XR/Platform/Linux/platform_private_linux_files.cmake
  37. 0 13
      Gems/XR/Code/Include/XR/Platform/Mac/XR_Mac.h
  38. 1 0
      Gems/XR/Code/Include/XR/Platform/Mac/platform_private_mac_files.cmake
  39. 2 1
      Gems/XR/Code/Include/XR/Platform/Windows/XR_Platform.h
  40. 1 0
      Gems/XR/Code/Include/XR/Platform/iOS/platform_private_ios_files.cmake
  41. 1 1
      Gems/XR/Code/Source/Platform/Android/XR_Traits_Platform.h
  42. 1 1
      Gems/XR/Code/Source/XRSystem.cpp

+ 5 - 8
Gems/OpenXRVk/3rdParty/Platform/Android/BuiltInPackages_android.cmake

@@ -1,12 +1,9 @@
 #
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
+#
 #
 
 ly_associate_package(PACKAGE_NAME OpenXR-1.0.22-rev1-android    TARGETS OpenXR  PACKAGE_HASH 1227204583ce224c7e3843e82bb36deb576df6b458eecce46740cb8941902f21)

+ 5 - 8
Gems/OpenXRVk/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake

@@ -1,12 +1,9 @@
 #
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
+#
 #
 
 ly_associate_package(PACKAGE_NAME OpenXR-1.0.22-rev2-linux  TARGETS OpenXR  PACKAGE_HASH 7d9045de0078a3f4a88bea2e3167e2c159acc8c62ac40ae15f8a31902b8d1f08)

+ 5 - 8
Gems/OpenXRVk/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake

@@ -1,10 +1,7 @@
 #
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
+#
 #

+ 5 - 8
Gems/OpenXRVk/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake

@@ -1,12 +1,9 @@
 #
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
+#
 #
 
 ly_associate_package(PACKAGE_NAME OpenXR-1.0.22-rev1-windows    TARGETS OpenXR  PACKAGE_HASH 55235d77253efe1af046a4a3e7dd7a8e5f6768401326d5e077c827cce323cd11)

+ 5 - 8
Gems/OpenXRVk/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake

@@ -1,10 +1,7 @@
 #
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
+#
 #

+ 4 - 1
Gems/OpenXRVk/Code/CMakeLists.txt

@@ -58,7 +58,7 @@ ly_add_target(
             3rdParty::OpenXR
             3rdParty::glad_vulkan
             AZ::AtomCore
-	    Gem::Atom_RHI_Vulkan.Reflect
+            Gem::Atom_RHI_Vulkan.Reflect
             Gem::XR.Static
 )
 
@@ -79,3 +79,6 @@ ly_add_target(
             Gem::OpenXRVk.Static
 )
 
+# use the OpenXRVk module in clients and tools:
+ly_create_alias(NAME OpenXRVk.Clients NAMESPACE Gem TARGETS Gem::OpenXRVk)
+ly_create_alias(NAME OpenXRVk.Tools NAMESPACE Gem TARGETS Gem::OpenXRVk)

+ 0 - 0
Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXrVkGladFunctionLoader.h → Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXRVkGladFuncLoader.h


+ 1 - 1
Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXRVkInput.h

@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include <XR/XRinput.h>
+#include <XR/XRInput.h>
 #include <OpenXRVk_Platform.h>
 
 namespace OpenXRVk

+ 1 - 1
Gems/OpenXRVk/Code/Include/OpenXRVk/OpenXRVkUtils.h

@@ -45,7 +45,7 @@ namespace OpenXRVk
     
 #define WARN_IF_UNSUCCESSFUL(result) \
     if (result != XR_SUCCESS) {\
-        AZ_Warning("OpenXrVk", false, "Warning error code: %s", to_string(result));\
+        AZ_Warning("OpenXRVk", false, "Warning error code: %s", to_string(result));\
     }
 
 #define ASSERT_IF_UNSUCCESSFUL(result) \

+ 11 - 3
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Android/OpenXRVk_Android.h

@@ -10,8 +10,16 @@
 #include <AzCore/base.h>
 #include <AzCore/PlatformIncl.h>
 #include <AzCore/std/algorithm.h>
-#include <vulkan/vulkan.h>
 #include <limits.h>
-#include <RHI/Vulkan.h>
 
-#define AZ_VULKAN_SURFACE_EXTENSION_NAME VK_KHR_ANDROID_SURFACE_EXTENSION_NAME
+#include <glad/vulkan.h>
+
+#include <jni.h>
+
+ // Tell OpenXR what platform code we'll be using
+#define XR_USE_PLATFORM_ANDROID
+#define XR_USE_GRAPHICS_API_VULKAN
+
+#include <openxr/openxr.h>
+#include <openxr/openxr_platform.h>
+#include <openxr/openxr_reflection.h>

+ 2 - 1
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Android/OpenXRVk_Platform.h

@@ -1,5 +1,6 @@
 /*
- * 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.
+ * 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
  *

+ 18 - 3
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Linux/OpenXRVk_Linux.h

@@ -10,8 +10,23 @@
 #include <AzCore/base.h>
 #include <AzCore/PlatformIncl.h>
 #include <AzCore/std/algorithm.h>
-#include <vulkan/vulkan.h>
 #include <limits.h>
-#include <RHI/Vulkan.h>
 
-#define AZ_VULKAN_SURFACE_EXTENSION_NAME VK_KHR_XCB_SURFACE_EXTENSION_NAME
+#if defined(PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB)
+    #include <xcb/xcb.h> // needed for glad vulkan
+#endif
+#include <glad/vulkan.h>
+
+ // Tell OpenXR what platform code we'll be using
+#if defined(PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB)
+    #define XR_USE_PLATFORM_XCB
+#elif defined(PAL_TRAIT_LINUX_WINDOW_MANAGER_WAYLAND)
+    #define XR_USE_PLATFORM_WAYLAND
+#else
+    #error "Linux Window Manager not recognized."
+#endif
+#define XR_USE_GRAPHICS_API_VULKAN
+
+#include <openxr/openxr.h>
+#include <openxr/openxr_platform.h>
+#include <openxr/openxr_reflection.h>

+ 1 - 0
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Linux/platform_private_linux_files.cmake

@@ -8,4 +8,5 @@
 
 set(FILES
     OpenXRVk_Platform.h
+    OpenXRVk_Linux.h
 )

+ 0 - 17
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Mac/Atom_RHI_Vulkan_Mac.h

@@ -1,17 +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 <AzCore/base.h>
-#include <AzCore/PlatformIncl.h>
-#include <AzCore/std/algorithm.h>
-#include <vulkan/vulkan.h>
-#include <limits.h>
-#include <RHI/Vulkan.h>
-
-#define AZ_VULKAN_SURFACE_EXTENSION_NAME VK_MVK_MACOS_SURFACE_EXTENSION_NAME

+ 0 - 10
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Mac/Atom_RHI_Vulkan_Platform.h

@@ -1,10 +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 <Atom_RHI_Vulkan_Mac.h>

+ 2 - 1
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/Windows/OpenXRVk_Platform.h

@@ -1,5 +1,6 @@
 /*
- * 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.
+ * 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
  *

+ 0 - 10
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/iOS/Atom_RHI_Vulkan_Platform.h

@@ -1,10 +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
-
-

+ 0 - 11
Gems/OpenXRVk/Code/Include/OpenXRVk/Platform/iOS/platform_builders_ios_files.cmake

@@ -1,11 +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
-    Atom_RHI_Vulkan_Platform.h
-)

+ 1 - 1
Gems/OpenXRVk/Code/Source/OpenXRVkGladFunctionLoader.cpp → Gems/OpenXRVk/Code/Source/OpenXRVkGladFuncLoader.cpp

@@ -10,7 +10,7 @@
 #define GLAD_VULKAN_IMPLEMENTATION
 #include <OpenXRVk_Platform.h>
 
-#include <OpenXRVk/OpenXRVkGladFunctionLoader.h>
+#include <OpenXRVk/OpenXRVkGladFuncLoader.h>
 #include <AzCore/Module/DynamicModuleHandle.h>
 
 namespace

+ 23 - 23
Gems/OpenXRVk/Code/Source/OpenXRVkInstance.cpp

@@ -84,8 +84,8 @@ namespace OpenXRVk
 
     AZ::RHI::ResultCode Instance::InitInstanceInternal(AZ::RHI::ValidationMode validationMode)
     {
-        XR::RawStringList optionalLayers = XR::RawStringList{};
-        XR::RawStringList optionalExtensions = XR::RawStringList{ { XR_KHR_VULKAN_ENABLE_EXTENSION_NAME } };
+        XR::RawStringList optionalLayers;
+        XR::RawStringList optionalExtensions = { XR_KHR_VULKAN_ENABLE_EXTENSION_NAME };
 
         XR::StringList instanceLayerNames = GetInstanceLayerNames();
         XR::RawStringList supportedLayers = FilterList(optionalLayers, instanceLayerNames);
@@ -97,16 +97,16 @@ namespace OpenXRVk
 
         if (validationMode == AZ::RHI::ValidationMode::Enabled)
         {
-            AZ_Printf("OpenXrVk", "Available Extensions: (%i)\n", instanceExtensions.size());
+            AZ_Printf("OpenXRVk", "Available Extensions: (%i)\n", instanceExtensions.size());
             for (const AZStd::string& extension : instanceExtensions)
             {
-                AZ_Printf("OpenXrVk", "Name=%s\n", extension.c_str());
+                AZ_Printf("OpenXRVk", "Name=%s\n", extension.c_str());
             }
 
-            AZ_Printf("OpenXrVk", "Available Layers: (%i)\n", instanceLayerNames.size());
+            AZ_Printf("OpenXRVk", "Available Layers: (%i)\n", instanceLayerNames.size());
             for (const AZStd::string& layerName : instanceLayerNames)
             {
-                AZ_Printf("OpenXrVk", "Name=%s \n", layerName.c_str());
+                AZ_Printf("OpenXRVk", "Name=%s \n", layerName.c_str());
             }
         }
 
@@ -125,7 +125,7 @@ namespace OpenXRVk
         XrResult result = xrCreateInstance(&createInfo, &m_xrInstance);
         if(IsError(result))
         {
-            AZ_Warning("OpenXrVk", false, "Failed to create XR instance");
+            AZ_Warning("OpenXRVk", false, "Failed to create XR instance");
             return AZ::RHI::ResultCode::Fail;
         }
 
@@ -139,7 +139,7 @@ namespace OpenXRVk
                 XR_VERSION_MAJOR(instanceProperties.runtimeVersion),
                 XR_VERSION_MINOR(instanceProperties.runtimeVersion),
                 XR_VERSION_PATCH(instanceProperties.runtimeVersion));
-                AZ_Printf("OpenXrVk", "Instance RuntimeName=%s RuntimeVersion=%s\n", instanceProperties.runtimeName, verStr.c_str());
+                AZ_Printf("OpenXRVk", "Instance RuntimeName=%s RuntimeVersion=%s\n", instanceProperties.runtimeName, verStr.c_str());
             }
         }
 
@@ -160,7 +160,7 @@ namespace OpenXRVk
         result = xrGetSystem(m_xrInstance, &systemInfo, &m_xrSystemId);
         if (IsError(result))
         {
-            AZ_Warning("OpenXrVk", false, "Failed to get XR System id");
+            AZ_Warning("OpenXRVk", false, "Failed to get XR System id");
             return AZ::RHI::ResultCode::Fail;
         }
 
@@ -179,17 +179,17 @@ namespace OpenXRVk
 
         if (validationMode == AZ::RHI::ValidationMode::Enabled)
         {
-            AZ_Printf("OpenXrVk", "graphicsRequirements.maxApiVersionSupported %d.%d.%d\n",
+            AZ_Printf("OpenXRVk", "graphicsRequirements.maxApiVersionSupported %d.%d.%d\n",
             XR_VERSION_MAJOR(graphicsRequirements.maxApiVersionSupported),
             XR_VERSION_MINOR(graphicsRequirements.maxApiVersionSupported),
             XR_VERSION_PATCH(graphicsRequirements.maxApiVersionSupported));
 
-            AZ_Printf("OpenXrVk", "graphicsRequirements.minApiVersionSupported %d.%d.%d\n",
+            AZ_Printf("OpenXRVk", "graphicsRequirements.minApiVersionSupported %d.%d.%d\n",
             XR_VERSION_MAJOR(graphicsRequirements.minApiVersionSupported),
             XR_VERSION_MINOR(graphicsRequirements.minApiVersionSupported),
             XR_VERSION_PATCH(graphicsRequirements.minApiVersionSupported));
 
-            AZ_Printf("OpenXrVk", "Using system %d for form factor %s\n", m_xrSystemId, to_string(m_formFactor));
+            AZ_Printf("OpenXRVk", "Using system %d for form factor %s\n", m_xrSystemId, to_string(m_formFactor));
             LogViewConfigurations();
         }
 		
@@ -206,19 +206,19 @@ namespace OpenXRVk
         result = xrEnumerateViewConfigurations(m_xrInstance, m_xrSystemId, viewConfigTypeCount, &viewConfigTypeCount, viewConfigTypes.data());
         RETURN_IF_UNSUCCESSFUL(result);
 
-        AZ_Warning("OpenXrVk", aznumeric_cast<AZ::u32>(viewConfigTypes.size()) == viewConfigTypeCount, "Size Mismatch");
+        AZ_Warning("OpenXRVk", aznumeric_cast<AZ::u32>(viewConfigTypes.size()) == viewConfigTypeCount, "Size Mismatch");
 
-        AZ_Printf("OpenXrVk", "Available View Configuration Types: (%d)\n", viewConfigTypeCount);
+        AZ_Printf("OpenXRVk", "Available View Configuration Types: (%d)\n", viewConfigTypeCount);
         for (XrViewConfigurationType viewConfigType : viewConfigTypes)
         {
-            AZ_Printf("OpenXrVk", "View Configuration Type: %s %s\n", to_string(viewConfigType),
+            AZ_Printf("OpenXRVk", "View Configuration Type: %s %s\n", to_string(viewConfigType),
             viewConfigType == m_viewConfigType ? "(Selected)" : "");
 
             XrViewConfigurationProperties viewConfigProperties{ XR_TYPE_VIEW_CONFIGURATION_PROPERTIES };
             result = xrGetViewConfigurationProperties(m_xrInstance, m_xrSystemId, viewConfigType, &viewConfigProperties);
             RETURN_IF_UNSUCCESSFUL(result);
 
-            AZ_Printf("OpenXrVk", "View configuration FovMutable=%s\n", viewConfigProperties.fovMutable == XR_TRUE ? "True" : "False");
+            AZ_Printf("OpenXRVk", "View configuration FovMutable=%s\n", viewConfigProperties.fovMutable == XR_TRUE ? "True" : "False");
 
             AZ::u32 viewCount = 0;
             result = xrEnumerateViewConfigurationViews(m_xrInstance, m_xrSystemId, viewConfigType, 0, &viewCount, nullptr);
@@ -237,16 +237,16 @@ namespace OpenXRVk
                 {
                     const XrViewConfigurationView& view = views[i];
                     AZ_Printf(
-                        "OpenXrVk", "View [%d]: Recommended Width=%d Height=%d SampleCount=%d\n", i, view.recommendedImageRectWidth,
+                        "OpenXRVk", "View [%d]: Recommended Width=%d Height=%d SampleCount=%d\n", i, view.recommendedImageRectWidth,
                         view.recommendedImageRectHeight, view.recommendedSwapchainSampleCount);
                     AZ_Printf(
-                        "OpenXrVk", "View [%d]:     Maximum Width=%d Height=%d SampleCount=%d\n", i, view.maxImageRectWidth,
+                        "OpenXRVk", "View [%d]:     Maximum Width=%d Height=%d SampleCount=%d\n", i, view.maxImageRectWidth,
                         view.maxImageRectHeight, view.maxSwapchainSampleCount);
                 }
             }
             else
             {
-                AZ_Printf("OpenXrVk", "Empty view configuration type\n");
+                AZ_Printf("OpenXRVk", "Empty view configuration type\n");
             }
 
             LogEnvironmentBlendMode(viewConfigType);
@@ -257,20 +257,20 @@ namespace OpenXRVk
     {
         AZ::u32 count = 0;
         XrResult result = xrEnumerateEnvironmentBlendModes(m_xrInstance, m_xrSystemId, type, 0, &count, nullptr);
-        AZ_Warning("OpenXrVk", count > 0, "BlendModes not supported");
+        AZ_Warning("OpenXRVk", count > 0, "BlendModes not supported");
         RETURN_IF_UNSUCCESSFUL(result);
 
-        AZ_Printf("OpenXrVk", "Available Environment Blend Mode count : (%d)\n", count);
+        AZ_Printf("OpenXRVk", "Available Environment Blend Mode count : (%d)\n", count);
 
         AZStd::vector<XrEnvironmentBlendMode> blendModes(count);
         result = xrEnumerateEnvironmentBlendModes(m_xrInstance, m_xrSystemId, type, count, &count, blendModes.data());
         RETURN_IF_UNSUCCESSFUL(result);
 
-        bool blendModeFound = false;
+        [[maybe_unused]] bool blendModeFound = false;
         for (XrEnvironmentBlendMode mode : blendModes)
         {
             const bool blendModeMatch = (mode == m_environmentBlendMode);
-            AZ_Printf("OpenXrVk", "Environment Blend Mode (%s) : %s\n", to_string(mode), blendModeMatch ? "(Selected)" : "");
+            AZ_Printf("OpenXRVk", "Environment Blend Mode (%s) : %s\n", to_string(mode), blendModeMatch ? "(Selected)" : "");
             blendModeFound |= blendModeMatch;
         }
     }

+ 1 - 1
Gems/OpenXRVk/Code/Source/OpenXRVkModule.cpp

@@ -8,7 +8,7 @@
 
 #include <AzCore/Memory/SystemAllocator.h>
 #include <AzCore/Module/Module.h>
-#include <OpenXrVk/OpenXrVkSystemComponent.h>
+#include <OpenXRVk/OpenXRVkSystemComponent.h>
 
 namespace OpenXRVk
 {   

+ 5 - 5
Gems/OpenXRVk/Code/Source/OpenXRVkSession.cpp

@@ -30,7 +30,7 @@ namespace OpenXRVk
         Device* xrVkDevice = static_cast<Device*>(GetDescriptor().m_device.get());
 
         m_xrInstance = xrVkInstance->GetXRInstance();
-        AZ_Printf("OpenXrVk", "Creating session...\n");
+        AZ_Printf("OpenXRVk", "Creating session...\n");
         m_graphicsBinding.instance = xrVkInstance->GetNativeInstance();
         m_graphicsBinding.physicalDevice = xrVkInstance->GetActivePhysicalDevice();
         m_graphicsBinding.device = xrVkDevice->GetNativeDevice();
@@ -73,10 +73,10 @@ namespace OpenXRVk
             AZStd::vector<XrReferenceSpaceType> spaces(spaceCount);
             result = xrEnumerateReferenceSpaces(m_session, spaceCount, &spaceCount, spaces.data());
 
-            AZ_Printf("OpenXrVk", "Available reference spaces: %d\n", spaceCount);
+            AZ_Printf("OpenXRVk", "Available reference spaces: %d\n", spaceCount);
             for (XrReferenceSpaceType space : spaces)
             {
-                AZ_Printf("OpenXrVk", "  Name: %s\n", to_string(space));
+                AZ_Printf("OpenXRVk", "  Name: %s\n", to_string(space));
             }
         }
     }
@@ -181,7 +181,7 @@ namespace OpenXRVk
                     if (GetDescriptor().m_validationMode == AZ::RHI::ValidationMode::Enabled)
                     {
                         [[maybe_unused]] const auto& instanceLossPending = *reinterpret_cast<const XrEventDataInstanceLossPending*>(event);
-                        AZ_Printf("OpenXrVk", "XrEventDataInstanceLossPending by %lld\n", instanceLossPending.lossTime);
+                        AZ_Printf("OpenXRVk", "XrEventDataInstanceLossPending by %lld\n", instanceLossPending.lossTime);
                     }
                     m_exitRenderLoop = true;
                     m_requestRestart = true;
@@ -211,7 +211,7 @@ namespace OpenXRVk
                 {
                     if (GetDescriptor().m_validationMode == AZ::RHI::ValidationMode::Enabled)
                     {
-                        AZ_Printf("OpenXrVk", "Ignoring event type %d\n", event->type);
+                        AZ_Printf("OpenXRVk", "Ignoring event type %d\n", event->type);
                     }
                     break;
                 }

+ 7 - 7
Gems/OpenXRVk/Code/Source/OpenXRVkSwapChain.cpp

@@ -95,12 +95,12 @@ namespace OpenXRVk
         if(GetDescriptor().m_validationMode == AZ::RHI::ValidationMode::Enabled)
         {
             // Log system properties.
-            AZ_Printf("OpenXrVk", "System Properties: Name=%s VendorId=%d\n", systemProperties.systemName, systemProperties.vendorId);
-            AZ_Printf("OpenXrVk",
+            AZ_Printf("OpenXRVk", "System Properties: Name=%s VendorId=%d\n", systemProperties.systemName, systemProperties.vendorId);
+            AZ_Printf("OpenXRVk",
                 "System Graphics Properties: MaxWidth=%d MaxHeight=%d MaxLayers=%d\n",
                     systemProperties.graphicsProperties.maxSwapchainImageWidth, systemProperties.graphicsProperties.maxSwapchainImageHeight,
                     systemProperties.graphicsProperties.maxLayerCount);
-            AZ_Printf("OpenXrVk",
+            AZ_Printf("OpenXRVk",
                 "System Tracking Properties: OrientationTracking=%s PositionTracking=%s\n",
                     systemProperties.trackingProperties.orientationTracking == XR_TRUE ? "True" : "False",
                     systemProperties.trackingProperties.positionTracking == XR_TRUE ? "True" : "False");
@@ -147,13 +147,13 @@ namespace OpenXRVk
                     {
                         swapchainFormatsString += "[";
                     }
-                    swapchainFormatsString += AZStd::string::format("%i", format);
+                    swapchainFormatsString += AZStd::string::format("%" PRId64, format);
                     if (selected)
                     {
                         swapchainFormatsString += "]";
                     }
                 }
-                AZ_Printf("OpenXrVk", "Swapchain Formats: %s\n", swapchainFormatsString.c_str());
+                AZ_Printf("OpenXRVk", "Swapchain Formats: %s\n", swapchainFormatsString.c_str());
             }
 
             // Create a swapchain for each view.
@@ -163,7 +163,7 @@ namespace OpenXRVk
 
                 if (GetDescriptor().m_validationMode == AZ::RHI::ValidationMode::Enabled)
                 {
-                    AZ_Printf("OpenXrVk",
+                    AZ_Printf("OpenXRVk",
                           "Creating swapchain for view %d with dimensions Width=%d Height=%d SampleCount=%d\n", i,
                         configView.recommendedImageRectWidth, configView.recommendedImageRectHeight, configView.recommendedSwapchainSampleCount);
                 }
@@ -233,7 +233,7 @@ namespace OpenXRVk
                 AZStd::end(SupportedColorSwapchainFormats));
         if (swapchainFormatIt == runtimeFormats.end()) 
         {
-            AZ_Error("OpenXrVk", false, "No runtime swapchain format supported for color swapchain");
+            AZ_Error("OpenXRVk", false, "No runtime swapchain format supported for color swapchain");
         }
 
         return *swapchainFormatIt;

+ 7 - 7
Gems/OpenXRVk/Code/Source/OpenXRVkSystemComponent.cpp

@@ -7,13 +7,13 @@
  */
 
 #include <AzCore/Serialization/SerializeContext.h>
-#include <OpenXrVk/OpenXrVkDevice.h>
-#include <OpenXrVk/OpenXrVkInput.h>
-#include <OpenXrVk/OpenXrVkInstance.h>
-#include <OpenXrVk/OpenXrVkSession.h>
-#include <OpenXrVk/OpenXrVkSpace.h>
-#include <OpenXrVk/OpenXrVkSwapchain.h>
-#include <OpenXrVk/OpenXrVkSystemComponent.h>
+#include <OpenXRVk/OpenXRVkDevice.h>
+#include <OpenXRVk/OpenXRVkInput.h>
+#include <OpenXRVk/OpenXRVkInstance.h>
+#include <OpenXRVk/OpenXRVkSession.h>
+#include <OpenXRVk/OpenXRVkSpace.h>
+#include <OpenXRVk/OpenXRVkSwapChain.h>
+#include <OpenXRVk/OpenXRVkSystemComponent.h>
 
 namespace OpenXRVk
 {

+ 2 - 2
Gems/OpenXRVk/Code/Source/Platform/Android/OpenXRVk_Traits_Android.h

@@ -7,5 +7,5 @@
  */
 #pragma once
 
-#define VULKAN_DLL "vulkan.dll"
-#define VULKAN_1_DLL "vulkan-1.dll"
+#define VULKAN_DLL "libvulkan.so"
+#define VULKAN_1_DLL "libvulkan.so.1"

+ 2 - 2
Gems/OpenXRVk/Code/Source/Platform/Linux/OpenXRVk_Traits_Linux.h

@@ -7,5 +7,5 @@
  */
 #pragma once
 
-#define VULKAN_DLL "vulkan.dll"
-#define VULKAN_1_DLL "vulkan-1.dll"
+#define VULKAN_DLL "libvulkan.so"
+#define VULKAN_1_DLL "libvulkan.so.1"

+ 3 - 3
Gems/OpenXRVk/Code/openxrvk_private_common_files.cmake

@@ -17,7 +17,7 @@ set(FILES
     Include/OpenXRVk/OpenXRVkSystemComponent.h
     Include/OpenXRVk/OpenXRVkUtils.h
     Include/OpenXRVk/OpenXRVkFunctionLoader.h
-    Include/OpenXRVk/OpenXRVkGladFunctionLoader.h
+    Include/OpenXRVk/OpenXRVkGladFuncLoader.h
     Source/OpenXRVkDevice.cpp
     Source/OpenXRVkInput.cpp
     Source/OpenXRVkInstance.cpp
@@ -28,12 +28,12 @@ set(FILES
     Source/OpenXRVkSystemComponent.cpp
     Source/OpenXRVkUtils.cpp
     Source/OpenXRVkFunctionLoader.cpp
-    Source/OpenXRVkGladFunctionLoader.cpp
+    Source/OpenXRVkGladFuncLoader.cpp
 )
 
 set(SKIP_UNITY_BUILD_INCLUSION_FILES
     # The following file defines GLAD_VULKAN_IMPLEMENTATION before including vulkan.h changing
     # the behavior inside vulkan.h. Other files also includes vulkan.h so this file cannot
     # be added to unity, other files could end up including vulkan.h and making this one fail.
-    Source/OpenXRVkGladFunctionLoader.cpp
+    Source/OpenXRVkGladFuncLoader.cpp
 )

+ 0 - 11
Gems/XR/3rdParty/Platform/Android/BuiltInPackages_android.cmake

@@ -1,11 +0,0 @@
-#
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#
-

+ 0 - 11
Gems/XR/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake

@@ -1,11 +0,0 @@
-#
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#
-

+ 0 - 10
Gems/XR/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake

@@ -1,10 +0,0 @@
-#
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#

+ 0 - 10
Gems/XR/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake

@@ -1,10 +0,0 @@
-#
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#

+ 0 - 10
Gems/XR/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake

@@ -1,10 +0,0 @@
-#
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#

+ 0 - 4
Gems/XR/CMakeLists.txt

@@ -10,8 +10,4 @@ set(gem_path ${CMAKE_CURRENT_LIST_DIR})
 set(gem_json ${gem_path}/gem.json)
 o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
 
-o3de_pal_dir(pal_3rdparty_dir ${CMAKE_CURRENT_LIST_DIR}/3rdParty/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
-
-include(${pal_3rdparty_dir}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
-
 add_subdirectory(Code)

+ 3 - 0
Gems/XR/Code/CMakeLists.txt

@@ -75,3 +75,6 @@ ly_add_target(
             Gem::XR.Static
 )
 
+# use the XR module in clients and tools:
+ly_create_alias(NAME XR.Clients NAMESPACE Gem TARGETS Gem::XR)
+ly_create_alias(NAME XR.Tools NAMESPACE Gem TARGETS Gem::XR)

+ 2 - 1
Gems/XR/Code/Include/XR/Platform/Android/XR_Platform.h

@@ -1,5 +1,6 @@
 /*
- * 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.
+ * 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
  *

+ 1 - 0
Gems/XR/Code/Include/XR/Platform/Linux/platform_private_linux_files.cmake

@@ -8,4 +8,5 @@
 
 set(FILES
     XR_Platform.h
+    XR_Linux.h
 )

+ 0 - 13
Gems/XR/Code/Include/XR/Platform/Mac/XR_Mac.h

@@ -1,13 +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 <AzCore/base.h>
-#include <AzCore/PlatformIncl.h>
-#include <AzCore/std/algorithm.h>
-

+ 1 - 0
Gems/XR/Code/Include/XR/Platform/Mac/platform_private_mac_files.cmake

@@ -7,4 +7,5 @@
 #
 
 set(FILES
+    XR_Platform.h
 )

+ 2 - 1
Gems/XR/Code/Include/XR/Platform/Windows/XR_Platform.h

@@ -1,5 +1,6 @@
 /*
- * 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.
+ * 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
  *

+ 1 - 0
Gems/XR/Code/Include/XR/Platform/iOS/platform_private_ios_files.cmake

@@ -7,4 +7,5 @@
 #
 
 set(FILES
+    XR_Platform.h
 )

+ 1 - 1
Gems/XR/Code/Source/Platform/Android/XR_Traits_Platform.h

@@ -7,4 +7,4 @@
  */
 #pragma once
 
-#include <OpenXRVk_Traits_Android.h>
+#include <XR_Traits_Android.h>

+ 1 - 1
Gems/XR/Code/Source/XRSystem.cpp

@@ -6,7 +6,7 @@
  *
  */
 
-#include <AZCore/Interface/Interface.h>
+#include <AzCore/Interface/Interface.h>
 #include <AzCore/Debug/Profiler.h>
 #include <XR/XRFactory.h>
 #include <XR/XRSystem.h>