Prechádzať zdrojové kódy

Adds additional packages (#5)

* Adds the Aws Iot Device SDK's package script
* Adds the Blast package builder
* Adds Crashpad build scripts
* Adds D3DX12 headers library build script
* Adds etc2comp package build source
* Updates the spacing in the copyright headers.

Signed-off-by: lawsonamzn <[email protected]>
Nicholas Lawson 4 rokov pred
rodič
commit
461252c7ab
46 zmenil súbory, kde vykonal 2824 pridanie a 29 odobranie
  1. 2 1
      Scripts/builders/__init__.py
  2. 2 1
      Scripts/builders/monkeypatch_tempdir_cleanup.py
  3. 2 1
      Scripts/builders/vcpkgbuilder.py
  4. 2 1
      Scripts/cmake/FindPackageName.cmake.in
  5. 2 1
      Scripts/cmake/PackageName-config.cmake.in
  6. 2 1
      Scripts/cmake/Platform/Android/Toolchain_android.cmake
  7. 2 1
      Scripts/cmake/Platform/iOS/SDK_ios.cmake
  8. 2 1
      Scripts/cmake/Platform/iOS/Toolchain_ios.cmake
  9. 2 1
      Scripts/cmake/package.cmake
  10. 2 1
      Scripts/extras/pull_and_build_from_git.py
  11. 5 1
      package-system/.gitignore
  12. 43 0
      package-system/AwsIotDeviceSdkCpp/FindAwsIotDeviceSdkCpp.cmake.template
  13. 56 0
      package-system/AwsIotDeviceSdkCpp/aws-iot-device-sdk-cpp-v2-v1.12.2.patch
  14. 167 0
      package-system/AwsIotDeviceSdkCpp/build_config.json
  15. 35 0
      package-system/AwsIotDeviceSdkCpp/readme.txt
  16. 71 0
      package-system/Blast/FindBlast.cmake
  17. 203 0
      package-system/Blast/build_package_image.py
  18. 95 0
      package-system/Crashpad/FindCrashpad_windows.cmake.template
  19. 234 0
      package-system/Crashpad/add_o3de_handler_extensions.patch
  20. 154 0
      package-system/Crashpad/build_package_image.py
  21. 2 1
      package-system/Lua/CMakeLists.txt
  22. 2 1
      package-system/Lua/FindLua.cmake.template
  23. 2 1
      package-system/OpenSSL/FindOpenSSL.cmake.template
  24. 2 1
      package-system/OpenSSL/FindOpenSSL_linux.cmake.template
  25. 2 1
      package-system/OpenSSL/build_package_image.py
  26. 17 0
      package-system/d3dx12-windows/Findd3dx12.cmake
  27. 6 0
      package-system/d3dx12-windows/PackageInfo.json
  28. 1514 0
      package-system/d3dx12-windows/d3dx12/include/d3dx12.h
  29. 21 0
      package-system/d3dx12-windows/d3dx12/license.txt
  30. 34 0
      package-system/etc2comp/Findetc2comp.cmake.template
  31. 37 0
      package-system/etc2comp/Findetc2comp_windows.cmake.template
  32. 25 0
      package-system/etc2comp/add_install_for_etclib.patch
  33. 51 0
      package-system/etc2comp/build_config.json
  34. 2 1
      package-system/python/build_package_image.py
  35. 2 1
      package-system/python/darwin_x64/FindPython.cmake
  36. 2 1
      package-system/python/darwin_x64/make-python.sh
  37. 2 1
      package-system/python/linux_x64/FindPython.cmake
  38. 2 1
      package-system/python/linux_x64/make-python.sh
  39. 2 1
      package-system/python/linux_x64/python-config-version.cmake
  40. 2 1
      package-system/python/linux_x64/python-config.cmake
  41. 2 1
      package-system/python/quick_validate_python.py
  42. 2 1
      package-system/python/win_x64/FindPython.cmake
  43. 2 1
      package-system/python/win_x64/build_python.bat
  44. 2 1
      package-system/python/win_x64/python-config-version.cmake
  45. 2 1
      package-system/python/win_x64/python-config.cmake
  46. 2 1
      package-system/xxhash-multiplatform/Findxxhash.cmake

+ 2 - 1
Scripts/builders/__init__.py

@@ -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
 #

+ 2 - 1
Scripts/builders/monkeypatch_tempdir_cleanup.py

@@ -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
 #

+ 2 - 1
Scripts/builders/vcpkgbuilder.py

@@ -1,7 +1,8 @@
 #!/usr/bin/env python3
 
 #
-# 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
 #

+ 2 - 1
Scripts/cmake/FindPackageName.cmake.in

@@ -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
 #

+ 2 - 1
Scripts/cmake/PackageName-config.cmake.in

@@ -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
 #

+ 2 - 1
Scripts/cmake/Platform/Android/Toolchain_android.cmake

@@ -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
 #

+ 2 - 1
Scripts/cmake/Platform/iOS/SDK_ios.cmake

@@ -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
 #

+ 2 - 1
Scripts/cmake/Platform/iOS/Toolchain_ios.cmake

@@ -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
 #

+ 2 - 1
Scripts/cmake/package.cmake

@@ -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
 #

+ 2 - 1
Scripts/extras/pull_and_build_from_git.py

@@ -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
 #

+ 5 - 1
package-system/.gitignore

@@ -1,2 +1,6 @@
 Lua-*
-OpenSSL-*
+OpenSSL-*
+AwsIotDeviceSdkCpp-*
+Blast-*
+Crashpad-*
+etc2comp-*

+ 43 - 0
package-system/AwsIotDeviceSdkCpp/FindAwsIotDeviceSdkCpp.cmake.template

@@ -0,0 +1,43 @@
+#
+# 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
+#
+#
+
+# this file actually ingests the library and defines targets.
+
+set(TARGET_WITH_NAMESPACE "3rdParty::AwsIotDeviceSdkCpp")
+if (TARGET $${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+set(AWSIOTDEVICESDKCPP_INCLUDE_DIR $${CMAKE_CURRENT_LIST_DIR}/AwsIotDeviceSdkCpp/include)
+set(AWSIOTDEVICESDKCPP_LIBS_DIR $${CMAKE_CURRENT_LIST_DIR}/AwsIotDeviceSdkCpp/lib/$$<IF:$$<CONFIG:Debug>,Debug,Release>)
+
+set(AWSIOTDEVICESDKCPP_LIBS
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-crt-cpp$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-mqtt$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-auth$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-http$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-compression$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-cal$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-io$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-event-stream$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-checksums$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    "$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-common$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    #"$${AWSIOTDEVICESDKCPP_LIBS_DIR}/aws-c-iot$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    Ncrypt
+    Secur32
+    Shlwapi
+)
+
+add_library($${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+
+ly_target_include_system_directories(TARGET $${TARGET_WITH_NAMESPACE} INTERFACE $${AWSIOTDEVICESDKCPP_INCLUDE_DIR})
+
+target_link_libraries($${TARGET_WITH_NAMESPACE} INTERFACE $${AWSIOTDEVICESDKCPP_LIBS})
+
+set(AWSIOTDEVICESDKCPP_FOUND TRUE)
+

+ 56 - 0
package-system/AwsIotDeviceSdkCpp/aws-iot-device-sdk-cpp-v2-v1.12.2.patch

@@ -0,0 +1,56 @@
+--- aws-iot-device-sdk-cpp-v2-orig/crt/aws-crt-cpp/crt/aws-c-common/cmake/AwsSharedLibSetup.cmake	2021-04-19 10:00:25.727859800 -0500
++++ aws-iot-device-sdk-cpp-v2/crt/aws-crt-cpp/crt/aws-c-common/cmake/AwsSharedLibSetup.cmake	2021-04-19 09:34:20.334467600 -0500
+@@ -1,13 +1,21 @@
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ # SPDX-License-Identifier: Apache-2.0.
+ 
+-set(LIBRARY_DIRECTORY lib)
+-set(RUNTIME_DIRECTORY bin)
++if(DEFINED CMAKE_INSTALL_LIBDIR)
++    set(LIBRARY_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
++else()
++    set(LIBRARY_DIRECTORY lib)
++endif()
++
++if(DEFINED CMAKE_INSTALL_BINDIR)
++    set(RUNTIME_DIRECTORY ${CMAKE_INSTALL_BINDIR})
++else()
++    set(RUNTIME_DIRECTORY bin)
++endif()
++
+ # Set the default lib installation path on GNU systems with GNUInstallDirs
+ if (UNIX AND NOT APPLE)
+     include(GNUInstallDirs)
+-    set(LIBRARY_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
+-    set(RUNTIME_DIRECTORY ${CMAKE_INSTALL_BINDIR})
+     
+     # this is the absolute dumbest thing in the world, but find_package won't work without it
+     # also I verified this is correctly NOT "lib64" when CMAKE_C_FLAGS includes "-m32"
+--- aws-iot-device-sdk-cpp-v2-orig/crt/aws-crt-cpp/crt/aws-checksums/cmake/AwsSharedLibSetup.cmake	2021-04-19 10:00:41.994449100 -0500
++++ aws-iot-device-sdk-cpp-v2/crt/aws-crt-cpp/crt/aws-checksums/cmake/AwsSharedLibSetup.cmake	2021-04-19 09:35:03.311355400 -0500
+@@ -1,13 +1,21 @@
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ # SPDX-License-Identifier: Apache-2.0.
+ 
+-set(LIBRARY_DIRECTORY lib)
+-set(RUNTIME_DIRECTORY bin)
++if(DEFINED CMAKE_INSTALL_LIBDIR)
++    set(LIBRARY_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
++else()
++    set(LIBRARY_DIRECTORY lib)
++endif()
++
++if(DEFINED CMAKE_INSTALL_BINDIR)
++    set(RUNTIME_DIRECTORY ${CMAKE_INSTALL_BINDIR})
++else()
++    set(RUNTIME_DIRECTORY bin)
++endif()
++
+ # Set the default lib installation path on GNU systems with GNUInstallDirs
+ if (UNIX AND NOT APPLE)
+     include(GNUInstallDirs)
+-    set(LIBRARY_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
+-    set(RUNTIME_DIRECTORY ${CMAKE_INSTALL_BINDIR})
+     
+     # this is the absolute dumbest thing in the world, but find_package won't work without it
+     # also I verified this is correctly NOT "lib64" when CMAKE_C_FLAGS includes "-m32"

+ 167 - 0
package-system/AwsIotDeviceSdkCpp/build_config.json

@@ -0,0 +1,167 @@
+{
+   "git_url":"https://github.com/aws/aws-iot-device-sdk-cpp-v2.git",
+   "git_tag":"v1.12.2",
+   "package_name":"AwsIotDeviceSdkCpp",
+   "package_version":"1.12.2-rev1",
+   "package_url":"https://github.com/aws/aws-iot-device-sdk-cpp-v2",
+   "package_license":"Apache-2.0",
+   "package_license_file":"LICENSE",
+   "cmake_find_template":"FindAwsIotDeviceSdkCpp.cmake.template",
+   "cmake_find_target":"FindAwsIotDeviceSdkCpp.cmake",
+   "patch_file":"aws-iot-device-sdk-cpp-v2-v1.12.2.patch",
+   "Platforms":{
+      "Windows":{
+         "Windows":{
+            "cmake_generate_args_debug": [
+               "-G",
+               "\"Visual Studio 16 2019\"",
+               "-A",
+               "x64",
+               "-DCMAKE_INSTALL_LIBDIR=\"lib/Debug\"",
+               "-DCMAKE_BUILD_TYPE=\"Debug\""
+            ],
+            "cmake_generate_args_release": [
+               "-G",
+               "\"Visual Studio 16 2019\"",
+               "-A",
+               "x64",
+               "-DCMAKE_INSTALL_LIBDIR=\"lib/Release\"",
+               "-DCMAKE_BUILD_TYPE=\"Release\""
+            ],
+            "cmake_build_args":[
+               "-j"
+            ],
+            "custom_additional_compile_definitions":[
+               
+            ],
+            "custom_additional_link_options":[
+            ],
+            "custom_additional_libraries": [
+               "Bcrypt",
+               "Secur32",
+               "Shlwapi"
+            ]
+         },
+         "Android":{
+            "custom_cmake_install":true,
+            "cmake_generate_args_debug": [
+               "-G",
+               "Ninja",
+               "-DCMAKE_TOOLCHAIN_FILE=%LY_ANDROID_NDK_ROOT%\\build\\cmake\\android.toolchain.cmake",
+               "-DANDROID_ABI=arm64-v8a",
+               "-DCMAKE_CXX_FLAGS=\"-fPIC\"",
+               "-DCMAKE_CXX_STANDARD=17",
+               "-DBUILD_SHARED_LIBS=ON",
+               "-DBUILD_DEPS=ON",
+               "-DS2N_NO_PQ_ASM=ON",
+               "-DCMAKE_BUILD_TYPE=Debug"
+            ],
+            "cmake_generate_args_release":[
+               "-G",
+               "Ninja",
+               "-DCMAKE_TOOLCHAIN_FILE=%LY_ANDROID_NDK_ROOT%\\build\\cmake\\android.toolchain.cmake",
+               "-DANDROID_ABI=arm64-v8a",
+               "-DCMAKE_CXX_FLAGS=\"-fPIC\"",
+               "-DCMAKE_CXX_STANDARD=17",
+               "-DBUILD_SHARED_LIBS=ON",
+               "-DBUILD_DEPS=ON",
+               "-DS2N_NO_PQ_ASM=ON",
+               "-DCMAKE_BUILD_TYPE=Release"
+            ],
+            "custom_additional_compile_definitions":[
+            ],
+            "custom_additional_link_options":[
+               
+            ],
+            "custom_additional_libraries":[
+               
+            ]
+         }
+      },
+      "Darwin":{
+         "Mac":{
+            "build_configs":[
+               "Release"
+            ],
+            "cmake_generate_args":[
+               "-G",
+               "Xcode",
+               "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12",
+               "-DCMAKE_OSX_ARCHITECTURES=x86_64",
+               "-DCMAKE_CXX_FLAGS=\"-fPIC -fno-aligned-allocation\"",
+               "-DCMAKE_CXX_STANDARD=17"
+            ],
+            "cmake_build_args":[
+               "-j",
+               "8"
+            ],
+            "custom_additional_compile_definitions":[
+               
+            ],
+            "custom_additional_link_options":[
+               
+            ],
+            "custom_additional_libraries":[
+               
+            ]
+         },
+         "iOS":{
+            "custom_cmake_install":true,
+            "cmake_generate_args":[
+               "-G",
+               "Xcode",
+               "-DCMAKE_SYSTEM_NAME=iOS",
+               "-DCMAKE_CXX_STANDARD=17",
+               "-DCMAKE_OSX_ARCHITECTURES=arm64",
+               "-DCMAKE_THREAD_LIBS_INIT=-pthread",
+               "-DCMAKE_CXX_FLAGS=\"-fPIC -fno-aligned-allocation\""
+            ],
+            "cmake_build_args":[
+               
+            ],
+            "custom_additional_compile_definitions":[
+            ],
+            "custom_additional_link_options":[
+               
+            ],
+            "custom_additional_libraries":[
+               
+            ]
+         }
+      },
+      "Linux":{
+         "Linux":{
+            "custom_cmake_install":true,
+            "cmake_generate_args_debug":[
+               "-G",
+               "Unix\\ Makefiles",
+               "-DCMAKE_C_COMPILER=clang-6.0",
+               "-DCMAKE_CXX_COMPILER=clang++-6.0",
+               "-DCMAKE_CXX_FLAGS=\"-fPIC -fno-aligned-allocation\"",
+               "-DCMAKE_CXX_STANDARD=17",
+               "-DCMAKE_BUILD_TYPE=Debug"
+            ],
+            "cmake_generate_args_release":[
+               "-G",
+               "Unix\\ Makefiles",
+               "-DCMAKE_C_COMPILER=clang-6.0",
+               "-DCMAKE_CXX_COMPILER=clang++-6.0",
+               "-DCMAKE_CXX_FLAGS=\"-fPIC -fno-aligned-allocation\"",
+               "-DCMAKE_CXX_STANDARD=17",
+               "-DCMAKE_BUILD_TYPE=Release"
+            ],
+            "cmake_build_args":[
+               "-j"
+            ],
+            "custom_additional_compile_definitions":[
+            ],
+            "custom_additional_link_options":[
+               
+            ],
+            "custom_additional_libraries":[
+               
+            ]
+         }
+      }
+   }
+}

+ 35 - 0
package-system/AwsIotDeviceSdkCpp/readme.txt

@@ -0,0 +1,35 @@
+This package will download and build aws-iot-device-sdk-cpp-v2 from the original Github source.  
+
+A few things to be aware of:
+
+1. This sdk requires an extremely short build path to build (on Windows only), such as 'd:\aws' or 'd:\temp'.  Otherwise it will fail to build due to excessively long file names.  
+
+2. As of v1.12.2, the build scripts for the aws-c-common and aws-checksums submodules need to be patched to build their libraries correctly into Debug and Release subdirectories.  Without the patches, the base iot libraries will build into the subdirectories, but the aws-c-common libraries will build into a root 'lib' directory and overwrite each other when the different configurations are built.  These patches have been submitted as PRs, but have not yet been accepted or integrated back into aws-iot-device-sdk-cpp-v2.
+	Submitted pull requests:
+	https://github.com/awslabs/aws-checksums/pull/47
+	https://github.com/awslabs/aws-c-common/pull/792
+
+3. The iOS version doesn't currently build, it has the following error:
+/Users/Shared/ly/lyengine/3rdPartySource/package-system/AwsIotDeviceSdkCpp/temp/src/crt/aws-crt-cpp/crt/aws-c-io/source/tls_channel_handler.c:333:5: error: 
+   implicit declaration of function 's_tls_ctx_options_pem_clean_up' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+  s_tls_ctx_options_pem_clean_up(options);
+  ^
+/Users/Shared/ly/lyengine/3rdPartySource/package-system/AwsIotDeviceSdkCpp/temp/src/crt/aws-crt-cpp/crt/aws-c-io/source/tls_channel_handler.c:333:5: note: 
+   did you mean 'aws_tls_ctx_options_clean_up'?
+/Users/Shared/ly/lyengine/3rdPartySource/package-system/AwsIotDeviceSdkCpp/temp/src/crt/aws-crt-cpp/crt/aws-c-io/source/tls_channel_handler.c:25:6: note: 
+   'aws_tls_ctx_options_clean_up' declared here
+void aws_tls_ctx_options_clean_up(struct aws_tls_ctx_options *options) {
+   ^
+/Users/Shared/ly/lyengine/3rdPartySource/package-system/AwsIotDeviceSdkCpp/temp/src/crt/aws-crt-cpp/crt/aws-c-io/source/tls_channel_handler.c:352:5: error: 
+   implicit declaration of function 's_tls_ctx_options_pem_clean_up' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
+  s_tls_ctx_options_pem_clean_up(options);
+  ^
+2 errors generated.
+
+4. The Android version requires 'go' and 'perl' installed.
+https://www.activestate.com/products/perl/downloads/
+https://golang.org/doc/install?download=go1.16.3.windows-amd64.msi
+You may also need to do the following for go to work:
+	go env -w GOPRIVATE=*
+
+

+ 71 - 0
package-system/Blast/FindBlast.cmake

@@ -0,0 +1,71 @@
+# 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(MY_NAME "Blast")
+set(TARGET_WITH_NAMESPACE "3rdParty::${MY_NAME}")
+if (TARGET ${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+set(_PACKAGE_DIR ${CMAKE_CURRENT_LIST_DIR}/Blast)
+
+set(${MY_NAME}_INCLUDE_DIR ${_PACKAGE_DIR}/sdk/common
+                           ${_PACKAGE_DIR}/sdk/extensions/assetutils/include
+                           ${_PACKAGE_DIR}/sdk/extensions/authoring/include
+                           ${_PACKAGE_DIR}/sdk/extensions/exporter/include
+                           ${_PACKAGE_DIR}/sdk/extensions/physx/include
+                           ${_PACKAGE_DIR}/sdk/extensions/serialization/include
+                           ${_PACKAGE_DIR}/sdk/extensions/shaders/include
+                           ${_PACKAGE_DIR}/sdk/extensions/stress/include
+                           ${_PACKAGE_DIR}/sdk/globals/include
+                           ${_PACKAGE_DIR}/sdk/lowlevel/include
+                           ${_PACKAGE_DIR}/sdk/toolkit/include)
+
+set(_LIBS_DIR ${_PACKAGE_DIR}/lib)
+set(_DLLS_DIR ${_PACKAGE_DIR}/bin)
+if(${PAL_PLATFORM_NAME} STREQUAL "Windows")
+    set(${MY_NAME}_LIBRARIES
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlast_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtAssetUtils_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtAuthoring_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtExporter_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtImport_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtPhysX_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtPxSerialization_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtSerialization_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtShaders_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtStress_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtTkSerialization_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastGlobals_x64.lib
+        ${_LIBS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastTk_x64.lib)
+
+    set(${MY_NAME}_RUNTIME_DEPENDENCIES
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlast_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtAssetUtils_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtAuthoring_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtExporter_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtPhysX_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtPxSerialization_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtSerialization_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtShaders_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtStress_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastExtTkSerialization_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastGlobals_x64.dll
+        ${_DLLS_DIR}/vc15win64-cmake/$<LOWER_CASE:$<CONFIG>>/NvBlastTk_x64.dll
+    )
+endif()
+
+add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${MY_NAME}_INCLUDE_DIR})
+target_link_libraries(${TARGET_WITH_NAMESPACE} INTERFACE ${${MY_NAME}_LIBRARIES})
+target_compile_definitions(${TARGET_WITH_NAMESPACE} INTERFACE ${${MY_NAME}_COMPILE_DEFINITIONS})
+if(DEFINED ${MY_NAME}_RUNTIME_DEPENDENCIES)
+    ly_add_target_files(TARGETS ${TARGET_WITH_NAMESPACE} FILES ${${MY_NAME}_RUNTIME_DEPENDENCIES})
+endif()
+
+set(${MY_NAME}_FOUND True)

+ 203 - 0
package-system/Blast/build_package_image.py

@@ -0,0 +1,203 @@
+#!/usr/bin/env python3
+#
+# 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
+#
+#
+
+import argparse
+import functools
+import json
+import os
+import pathlib
+from pathlib import Path
+import shutil
+import subprocess
+from tempfile import TemporaryDirectory
+
+import sys
+sys.path.append(str(Path(__file__).parent.parent.parent / 'Scripts'))
+from builders.vcpkgbuilder import VcpkgBuilder
+import builders.monkeypatch_tempdir_cleanup
+
+class BlastBuilder(object):
+    def __init__(self, workingDir: pathlib.Path, targetPlatform: str):
+        self._workingDir = workingDir
+        self._platform = targetPlatform
+        self._env = dict(os.environ)
+        self._env.update(
+            PM_PACKAGES_ROOT=str(workingDir / 'packman-repo'),
+        )
+
+        self.check_call = functools.partial(subprocess.check_call,
+            cwd=self.workingDir,
+            env=self.env
+        )
+
+    @property
+    def workingDir(self):
+        return self._workingDir
+
+    @property
+    def platform(self):
+        return self._platform
+
+    @property
+    def env(self):
+        return self._env
+
+    def clone(self, lockToCommit: str):
+        if not (self.workingDir / '.git').exists():
+            self.check_call(
+                ['git', 'init',],
+            )
+            self.check_call(
+                ['git', 'remote', 'add', 'origin', 'https://github.com/NVIDIAGameWorks/Blast.git',],
+            )
+
+        self.check_call(
+            ['git', 'fetch', 'origin', '--depth=1', lockToCommit,],
+        )
+        self.check_call(
+            ['git', 'checkout', lockToCommit,],
+        )
+
+    def build(self):
+        cmake = str(self.workingDir / 'packman-repo/chk/cmake-x64/3.7.0/bin/cmake.exe') 
+        self.check_call(
+            ['cmd.exe', '/C', 'generate_projects_vc15win64.bat'],
+        )
+
+        for config in ('debug', 'profile', 'release'):
+            self.check_call(
+                [cmake, '--build', str(self.workingDir / 'compiler' / 'vc15win64-cmake'), '--config', config, '--', '/m:2']
+            )
+
+    def copyBuildOutputTo(self, packageDir: pathlib.Path):
+        if packageDir.exists():
+            shutil.rmtree(packageDir)
+
+        def ignoreFilter(dirname, filenames):
+            """
+            Describes files that are generated by the Blast build that are excluded from the resulting package
+            """
+            # These filenames are always ignored
+            staticIgnores = [
+                'PhysXCommon_64.dll',
+                'PhysXCooking_64.dll',
+                'PhysXFoundation_64.dll',
+                'PhysXGpu_64.dll',
+                'PhysX_64.dll',
+                'ApexImporter_x64.exe',
+                'ApexImporter_x64.ilk',
+                'ApexImporter_x64.pdb',
+                'AuthoringTool_x64.exe',
+                'AuthoringTool_x64.ilk',
+                'AuthoringTool_x64.pdb',
+                'BlastPerfTests_x64.exe',
+                'BlastPerfTests_x64.ilk',
+                'BlastPerfTests_x64.pdb',
+                'BlastUnitTests_x64.exe',
+                'BlastUnitTests_x64.ilk',
+                'BlastUnitTests_x64.pdb',
+                'GFSDK_SSAO_D3D11.win64.dll',
+                'GFSDK_ShadowLib_DX11.win64.dll',
+                'LegacyConverter_x64.exe',
+                'LegacyConverter_x64.ilk',
+                'LegacyConverter_x64.pdb',
+                'SampleAssetViewer_x64.exe',
+                'SampleAssetViewer_x64.ilk',
+                'SampleAssetViewer_x64.pdb',
+                'd3dcompiler_47.dll',
+                'nvToolsExt64_1.dll',
+                'ApexImporter_x64.exp',
+                'ApexImporter_x64.lib',
+                'AuthoringTool_x64.exp',
+                'AuthoringTool_x64.lib',
+                'BlastPerfTests_x64.exp',
+                'BlastPerfTests_x64.lib',
+                'BlastUnitTests_x64.exp',
+                'BlastUnitTests_x64.lib',
+                'SampleAssetViewer_x64.exp',
+                'SampleAssetViewer_x64.lib',
+                'SampleBase_x64.lib',
+                'SampleBase_x64.pdb',
+            ]
+
+            relDir = Path(dirname).relative_to(self.workingDir)
+            # For files coming from the sdk/ and shared/ directories, we only want to copy the headers.
+            # Path.is_relative_to needs Python 3.9 or newer
+            if relDir.is_relative_to('sdk/') or relDir.is_relative_to('shared/'):
+                # We want to keep all directories, so don't add directories to the ignore list
+                # We only want to keep .h and .inl files
+                # Ignore all others
+                return [fn for fn in filenames if (path := Path(fn)) and ((not (self.workingDir/relDir/path).is_dir()) and (path.suffix not in ('.h', '.inl')))] \
+                    + staticIgnores
+            return staticIgnores
+
+        for dirname in ('bin/vc15win64-cmake', 'lib/vc15win64-cmake', 'sdk', 'shared/utils'):
+            shutil.copytree(
+                src=self.workingDir / dirname,
+                dst=packageDir / dirname,
+                symlinks=True,
+                ignore=ignoreFilter,
+            )
+        shutil.copy2(
+            src=self.workingDir / 'license.txt',
+            dst=packageDir / 'license.txt',
+        )
+
+    def writePackageInfoFile(self, packageDir: pathlib.Path, settings: dict):
+        with (packageDir / 'PackageInfo.json').open('w') as fh:
+            json.dump(settings, fh, indent=4)
+
+def main():
+    parser = argparse.ArgumentParser()
+    parser.add_argument(
+        '--platform-name',
+        dest='platformName',
+        choices=['windows'],
+        default=VcpkgBuilder.defaultPackagePlatformName(),
+    )
+    args = parser.parse_args()
+
+    packageSystemDir = Path(__file__).resolve().parents[1]
+    packageSourceDir = packageSystemDir / 'Blast'
+    packageRoot = packageSystemDir / f'Blast-{args.platformName}'
+
+    cmakeFindFile = packageSourceDir / f'FindBlast_{args.platformName}.cmake'
+    if not cmakeFindFile.exists():
+        cmakeFindFile = packageSourceDir / 'FindBlast.cmake'
+
+    with TemporaryDirectory() as tempdir:
+        tempdir = Path(tempdir)
+        builder = BlastBuilder(workingDir=tempdir, targetPlatform=args.platformName)
+        builder.clone('eb169fe87c9957d89e6132048317a5732299f6bf')
+        builder.build()
+        builder.copyBuildOutputTo(packageRoot/'Blast')
+
+        # This version comes from running:
+        # git clone https://github.com/NVIDIAGameWorks/Blast.git
+        # git checkout eb169fe87c9957d89e6132048317a5732299f6bf
+        # git describe
+        # This yields v1.1.7_rc2-9-geb169fe, which describes commit eb169fe, which is 9 commits above the tag v1.1.7_rc2
+        builder.writePackageInfoFile(
+            packageRoot,
+            settings={
+                'PackageName': f'Blast-v1.1.7_rc2-9-geb169fe-rev1-{args.platformName}',
+                'URL': 'https://github.com/NVIDIAGameWorks/Blast',
+                'License': 'custom',
+                'LicenseFile': 'Blast/license.txt',
+            },
+        )
+
+        shutil.copy2(
+            src=cmakeFindFile,
+            dst=packageRoot / 'FindBlast.cmake'
+        )
+
+if __name__ == '__main__':
+    main()

+ 95 - 0
package-system/Crashpad/FindCrashpad_windows.cmake.template

@@ -0,0 +1,95 @@
+# 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(CMakeParseArguments)
+
+set(CRASHPAD_PACKAGE_NAME Crashpad)
+set(CRASHPAD_LIBS_DIR $${CMAKE_CURRENT_LIST_DIR}/Crashpad/$$<$$<CONFIG:debug>:debug/>lib)
+set(CRASHPAD_INCLUDE_DIR $${CMAKE_CURRENT_LIST_DIR}/Crashpad/include/crashpad)
+
+# Helper function to define crashpad libraries
+function(ly_declare_crashpad_library)
+
+    set(options HANDLER)
+    set(oneValueArgs NAME)
+    set(multiValueArgs ADDITIONAL_INCLUDE_DIRS LIBS BUILD_DEPENDENCIES)
+
+    cmake_parse_arguments(ly_declare_crashpad_library "$${options}" "$${oneValueArgs}" "$${multiValueArgs}" $${ARGN})
+
+    if (ly_declare_crashpad_library_HANDLER)
+        set(TARGET_WITH_NAMESPACE "3rdParty::$${CRASHPAD_PACKAGE_NAME}::Handler")
+    else()
+        set(TARGET_WITH_NAMESPACE "3rdParty::$${CRASHPAD_PACKAGE_NAME}")
+    endif()
+
+    if (TARGET $${TARGET_WITH_NAMESPACE})
+        return()
+    endif()
+
+    add_library($${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+
+    if (ly_declare_crashpad_library_ADDITIONAL_INCLUDE_DIRS)
+        ly_target_include_system_directories(TARGET $${TARGET_WITH_NAMESPACE}
+            INTERFACE
+                "$${CRASHPAD_INCLUDE_DIR}"
+                "$${CRASHPAD_INCLUDE_DIR}/mini_chromium"
+                $${ly_declare_crashpad_library_ADDITIONAL_INCLUDE_DIRS}
+        )
+    else()
+        ly_target_include_system_directories(TARGET $${TARGET_WITH_NAMESPACE}
+            INTERFACE
+                "$${CRASHPAD_INCLUDE_DIR}"
+                "$${CRASHPAD_INCLUDE_DIR}/mini_chromium"
+        )
+    endif()
+
+    if (ly_declare_crashpad_library_BUILD_DEPENDENCIES)
+        target_link_libraries($${TARGET_WITH_NAMESPACE}
+            INTERFACE
+                $${ly_declare_crashpad_library_LIBS}
+                $${ly_declare_crashpad_library_BUILD_DEPENDENCIES}
+        )
+    else()
+        target_link_libraries($${TARGET_WITH_NAMESPACE}
+            INTERFACE
+                $${ly_declare_crashpad_library_LIBS}
+        )
+    endif()
+
+endfunction()
+
+#### Crashpad ####
+ly_declare_crashpad_library(
+    LIBS
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}base$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}client$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}util$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+)
+
+#### Crashpad Handler ####
+ly_declare_crashpad_library(
+    HANDLER
+    ADDITIONAL_INCLUDE_DIRS
+        "$${CRASHPAD_INCLUDE_DIR}/getopt"
+    LIBS
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}compat$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}context$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}format$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}minidump$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}getopt$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}handler$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}snapshot$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}tool_support$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+        "$${CRASHPAD_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}zlib$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    BUILD_DEPENDENCIES
+        "3rdParty::$${CRASHPAD_PACKAGE_NAME}"
+        # Built-in Windows libraries
+        winhttp
+        version
+        powrprof
+)  

+ 234 - 0
package-system/Crashpad/add_o3de_handler_extensions.patch

@@ -0,0 +1,234 @@
+diff --git a/ports/crashpad/CONTROL b/ports/crashpad/CONTROL
+index dab2671..2275f0a 100644
+--- a/ports/crashpad/CONTROL
++++ b/ports/crashpad/CONTROL
+@@ -1,7 +1,6 @@
+ Source: crashpad
+-Version: 2020-03-18
++Version: 2021-04-09
+ Homepage: https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md
+ Description: Crashpad is a crash-reporting system.
+   Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss.
+-Build-Depends: zlib
+ Supports: x64 & (osx|windows)
+diff --git a/ports/crashpad/o3de_handler_extensions.patch b/ports/crashpad/o3de_handler_extensions.patch
+new file mode 100644
+index 0000000..49ea935
+--- /dev/null
++++ b/ports/crashpad/o3de_handler_extensions.patch
+@@ -0,0 +1,84 @@
++diff --git a/handler/crash_report_upload_thread.cc b/handler/crash_report_upload_thread.cc
++index b7e445fd..27556a79 100644
++--- a/handler/crash_report_upload_thread.cc
+++++ b/handler/crash_report_upload_thread.cc
++@@ -12,6 +12,9 @@
++ // See the License for the specific language governing permissions and
++ // limitations under the License.
++
+++ // Modifications Copyright (c) Contributors to the Open 3D Engine Project. 
+++ // SPDX-License-Identifier: Apache-2.0 OR MIT
+++ // (See O3DE tagged section(s) below) 
++ #include "handler/crash_report_upload_thread.h"
++
++ #include <errno.h>
++@@ -44,6 +47,15 @@
++ #include "handler/mac/file_limit_annotation.h"
++ #endif  // OS_APPLE
++
+++// O3DE - Handle giving the user the option of whether or not to send the report.
+++namespace O3de {
+++    bool CheckConfirmation(const crashpad::CrashReportDatabase::Report& report);
+++    bool AddAttachments(crashpad::HTTPMultipartBuilder& multipartBuilder);
+++    bool UpdateHttpTransport(
+++        std::unique_ptr<crashpad::HTTPTransport>& httpTransport,
+++        const std::string& baseURL);
+++}  // namespace O3de
+++
++ namespace crashpad {
++
++ CrashReportUploadThread::CrashReportUploadThread(CrashReportDatabase* database,
++@@ -153,6 +165,14 @@ void CrashReportUploadThread::ProcessPendingReport(
++     return;
++   }
++
+++  // O3DE - Handle giving the user the option of whether or not to send the report.
+++  if (!O3de::CheckConfirmation(report)) {
+++    database_->SkipReportUpload(report.uuid,
+++                                Metrics::CrashSkippedReason::kUploadsDisabled);
+++    database_->DeleteReport(report.uuid);
+++    return;
+++  }
+++
++   // This currently implements very simplistic rate-limiting, compatible with
++   // the Breakpad client, where the strategy is to permit one upload attempt per
++   // hour, and retire reports that would exceed this limit or for which the
++@@ -293,6 +313,9 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
++                                            reader,
++                                            "application/octet-stream");
++
+++  // O3DE
+++  O3de::AddAttachments(http_multipart_builder);
+++
++   std::unique_ptr<HTTPTransport> http_transport(HTTPTransport::Create());
++   if (!http_transport) {
++     return UploadResult::kPermanentFailure;
++@@ -332,6 +355,9 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
++   }
++   http_transport->SetURL(url);
++
+++  // O3DE
+++  O3de::UpdateHttpTransport(http_transport, url);
+++
++   if (!http_transport->ExecuteSynchronously(response_body)) {
++     return UploadResult::kRetry;
++   }
++diff --git a/tools/BUILD.gn b/tools/BUILD.gn
++index 7da109bc..3bd0e895 100644
++--- a/tools/BUILD.gn
+++++ b/tools/BUILD.gn
++@@ -12,9 +12,13 @@
++ # See the License for the specific language governing permissions and
++ # limitations under the License.
++
+++ // Modifications Copyright (c) Contributors to the Open 3D Engine Project. 
+++ // SPDX-License-Identifier: Apache-2.0 OR MIT
+++ // (See O3DE tagged section(s) below) 
++ import("../build/crashpad_buildconfig.gni")
++
++-source_set("tool_support") {
+++# O3DE - Change the tool_support target type from source set to static library
+++crashpad_static_library("tool_support") {
++   sources = [
++     "tool_support.cc",
++     "tool_support.h",
+diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake
+index 30026d5..e286b32 100644
+--- a/ports/crashpad/portfile.cmake
++++ b/ports/crashpad/portfile.cmake
+@@ -7,7 +7,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+ vcpkg_from_git(
+     OUT_SOURCE_PATH SOURCE_PATH
+     URL https://chromium.googlesource.com/crashpad/crashpad
+-    REF 9a31d3f8e9815774026a753a1ff6155347cd549f
++    REF f1943fcb571c211418657dc614e1cf6f74a2334e
++    PATCHES "o3de_handler_extensions.patch"
+ )
+ 
+ function(checkout_in_path PATH URL REF)
+@@ -28,38 +29,13 @@ endfunction()
+ checkout_in_path(
+     "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium"
+     "https://chromium.googlesource.com/chromium/mini_chromium"
+-    "c426ff98e1d9e9d59777fe8b883a5c0ceeca9ca3"
++    "329ca82f73a592d832e79334bed842fba85b9fdd"
+ )
+ 
+-function(replace_gn_dependency INPUT_FILE OUTPUT_FILE LIBRARY_NAMES)
+-    unset(_LIBRARY_DEB CACHE)
+-    find_library(_LIBRARY_DEB NAMES ${LIBRARY_NAMES}
+-        PATHS "${CURRENT_INSTALLED_DIR}/debug/lib"
+-        NO_DEFAULT_PATH)
+-
+-    if(_LIBRARY_DEB MATCHES "-NOTFOUND")
+-        message(FATAL_ERROR "Could not find debug library with names: ${LIBRARY_NAMES}")
+-    endif()
+-
+-    unset(_LIBRARY_REL CACHE)
+-    find_library(_LIBRARY_REL NAMES ${LIBRARY_NAMES}
+-        PATHS "${CURRENT_INSTALLED_DIR}/lib"
+-        NO_DEFAULT_PATH)
+-
+-    if(_LIBRARY_REL MATCHES "-NOTFOUND")
+-        message(FATAL_ERROR "Could not find library with names: ${LIBRARY_NAMES}")
+-    endif()
+-
+-    set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include")
+-
+-    file(REMOVE "${OUTPUT_FILE}")
+-    configure_file("${INPUT_FILE}" "${OUTPUT_FILE}" @ONLY)
+-endfunction()
+-
+-replace_gn_dependency(
+-    "${CMAKE_CURRENT_LIST_DIR}/zlib.gn"
+-    "${SOURCE_PATH}/third_party/zlib/BUILD.gn"
+-    "z;zlib;zlibd"
++checkout_in_path(
++    "${SOURCE_PATH}/third_party/zlib/zlib"
++    "https://chromium.googlesource.com/chromium/src/third_party/zlib"
++    "13dc246a58e4b72104d35f9b1809af95221ebda7"
+ )
+ 
+ set(OPTIONS_DBG "is_debug=true")
+@@ -102,7 +78,7 @@ vcpkg_configure_gn(
+ 
+ vcpkg_install_gn(
+     SOURCE_PATH "${SOURCE_PATH}"
+-    TARGETS client util third_party/mini_chromium/mini_chromium/base handler:crashpad_handler
++    TARGETS client compat handler minidump:format minidump snapshot:context snapshot third_party/getopt third_party/mini_chromium/mini_chromium/base third_party/zlib tools:tool_support util
+ )
+ 
+ message(STATUS "Installing headers...")
+@@ -111,19 +87,40 @@ function(install_headers DIR)
+     file(COPY "${DIR}" DESTINATION "${PACKAGES_INCLUDE_DIR}" FILES_MATCHING PATTERN "*.h")
+ endfunction()
+ install_headers("${SOURCE_PATH}/client")
++install_headers("${SOURCE_PATH}/compat")
++install_headers("${SOURCE_PATH}/handler")
++install_headers("${SOURCE_PATH}/minidump")
++install_headers("${SOURCE_PATH}/snapshot")
++install_headers("${SOURCE_PATH}/third_party/getopt")
++install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium")
++install_headers("${SOURCE_PATH}/third_party/zlib/zlib")
++install_headers("${SOURCE_PATH}/tools")
+ install_headers("${SOURCE_PATH}/util")
+-install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/base")
+-install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/build")
+ 
+ # remove empty directories
+ file(REMOVE_RECURSE
+     "${PACKAGES_INCLUDE_DIR}/util/net/testdata"
+-    "${PACKAGES_INCLUDE_DIR}/build/ios")
+-
+-configure_file("${CMAKE_CURRENT_LIST_DIR}/crashpadConfig.cmake.in"
+-        "${CURRENT_PACKAGES_DIR}/share/${PORT}/crashpadConfig.cmake" @ONLY)
++    "${PACKAGES_INCLUDE_DIR}/build/ios"
++    "${PACKAGES_INCLUDE_DIR}/build/config"
++    "${PACKAGES_INCLUDE_DIR}/compat/ios"
++    "${PACKAGES_INCLUDE_DIR}/mini_chromium/build/config"
++    "${PACKAGES_INCLUDE_DIR}/mini_chromium/build/ios"
++    "${PACKAGES_INCLUDE_DIR}/snapshot/elf/elf_image_reader_fuzzer_corpus"
++    "${PACKAGES_INCLUDE_DIR}/tools/mac"
++    "${PACKAGES_INCLUDE_DIR}/zlib/google/test"
++    )
+ 
+ vcpkg_copy_pdbs()
+ file(INSTALL "${SOURCE_PATH}/LICENSE"
+     DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
+     RENAME copyright)
++
++message(STATUS "Installing third party licenses...")
++file(INSTALL "${SOURCE_PATH}/third_party/getopt/LICENSE"
++    DESTINATION "${PACKAGES_INCLUDE_DIR}/getopt")
++file(INSTALL "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/LICENSE"
++    DESTINATION "${PACKAGES_INCLUDE_DIR}/mini_chromium")
++file(INSTALL "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/base/third_party/icu/LICENSE"
++    DESTINATION "${PACKAGES_INCLUDE_DIR}/mini_chromium/base/third_party/icu")
++file(INSTALL "${SOURCE_PATH}/third_party/zlib/zlib/LICENSE"
++    DESTINATION "${PACKAGES_INCLUDE_DIR}/zlib")
+\ No newline at end of file
+diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
+index 36bbc6e..3a1eff6 100644
+--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
++++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
+@@ -129,9 +129,9 @@ function(vcpkg_find_acquire_program VAR)
+       set(GN_PLATFORM "mac-amd64")
+       set(HASH "03ee64cb15bae7fceb412900d470601090bce147cfd45eb9b46683ac1a5dca848465a5d74c55a47df7f0e334d708151249a6d37bb021de74dd48b97ed4a07937")
+     else()
+-      set(GN_VERSION "qUkAhy9J0P7c5racy-9wB6AHNK_btS18im8S06_ehhwC")
++      set(GN_VERSION "wQfA3hac83q4RphIC4nawg-fZT4kzjVyTq04gR-3hGAC")
+       set(GN_PLATFORM "windows-amd64")
+-      set(HASH "263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db")
++      set(HASH "b6331e74785d5c45b7137a391668c73bec0440613891424d5cc461936993363f01a9030a4ec97d7919ced00adc3890b35a3d51803f46de388a1f7acecc24ce20")
+     endif()
+     set(SUBDIR "${GN_VERSION}")
+     set(URL "${CIPD_DOWNLOAD_GN}/${GN_PLATFORM}/+/${GN_VERSION}")

+ 154 - 0
package-system/Crashpad/build_package_image.py

@@ -0,0 +1,154 @@
+# 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
+#
+#
+
+
+import argparse
+from pathlib import Path
+import re
+import shutil
+from tempfile import TemporaryDirectory
+
+import sys
+sys.path.append(str(Path(__file__).parent.parent.parent / 'Scripts'))
+from builders.vcpkgbuilder import VcpkgBuilder
+import builders.monkeypatch_tempdir_cleanup
+
+
+def regex_to_remove(platform_name: str):
+    """
+    Get the regular expression for files and sub-folders to remove.
+
+    :param platform_name: Name of the platform.
+    :return: Regular expression for files and sub-folders to remove.
+    """
+    regex_map = {
+        'windows':
+            '^(?:.*_|.*\\\\)?(?:ios|mac|android|linux|fuchsia|non|x86|test|testing|vcpkg|BUILD_INFO|CONTROL)(?:_.*)?(?:\\.h)?$'
+    }
+    return regex_map.get(platform_name, '.*')
+
+def remove_files_by_regex(package_dir: Path, regex: str):
+    """
+    Remove files and sub-folders from the package by an regular expression.
+
+    :param package_dir: Path to the package directory.
+    :param regex: Regular expression for the files and sub-folders to remove.
+    """
+    pattern = re.compile(regex)
+    for item in package_dir.glob('**/*'):
+        if re.search(pattern, item.name) and item.exists():
+            if item.is_file():
+                item.unlink()
+            else:
+                shutil.rmtree(item)
+
+
+def main():
+    parser = argparse.ArgumentParser(description='Builds this package')
+    parser.add_argument(
+        '--platform-name',
+        choices=['windows', 'android', 'mac', 'ios', 'linux'],
+        default=VcpkgBuilder.defaultPackagePlatformName(),
+    )
+    args = parser.parse_args()
+
+    package_system_dir = Path(__file__).resolve().parents[1]
+    crashpad_package_source_dir = package_system_dir / 'Crashpad'
+    output_dir = package_system_dir / f'Crashpad-{args.platform_name}'
+    crashpad_patch = crashpad_package_source_dir / 'add_o3de_handler_extensions.patch'
+
+    cmake_find_file = crashpad_package_source_dir / f'FindCrashpad_{args.platform_name}.cmake.template'
+    if not cmake_find_file.exists():
+        cmake_find_file = crashpad_package_source_dir / 'FindCrashpad.cmake.template'
+    cmake_find_file_template = cmake_find_file.open().read()
+
+    with TemporaryDirectory() as tempdir:
+        tempdir = Path(tempdir)
+        builder = VcpkgBuilder('Crashpad', 'crashpad', tempdir, args.platform_name, static=False)
+        builder.cloneVcpkg('3639676313a3e8b6fe1e94b9e7917b71d32511e3')
+        builder.bootstrap()
+        builder.patch(crashpad_patch)
+        builder.build()
+
+        builder.copyBuildOutputTo(
+            output_dir,
+            extraFiles={
+                Path(f'{builder.vcpkgDir}/buildtrees/{builder.portName}/{builder.triplet}-rel/gen/build/chromeos_buildflags.h'):
+                    Path(f'{output_dir}/{builder.packageName}/include/{builder.portName}/mini_chromium/build/'),
+                Path(f'{builder.vcpkgDir}/ports/{builder.portName}/o3de_handler_extensions.patch'):
+                    Path(f'{output_dir}/{builder.packageName}/share/{builder.portName}/')
+            })
+
+        port_dir = output_dir / builder.packageName / 'include' / builder.portName
+        package_info_list = [
+            {
+                'dir': output_dir,
+                'settings': {
+                    'PackageName': f'Crashpad-0.8.0-rev1-{args.platform_name}',
+                    'URL': 'https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md',
+                    'License': 'Apache-2.0',
+                    'LicenseFile': f'{builder.packageName}/share/{builder.portName}/copyright'
+                }
+            },
+            {
+                'dir': port_dir / 'getopt',
+                'settings': {
+                    'PackageName': 'getopt',
+                    'URL': 'https://sourceware.org/legacy-ml/newlib/2005/msg00758.html',
+                    'License': 'custom',
+                    'LicenseFile': 'LICENSE'
+                }
+            },
+            {
+                'dir': port_dir / 'mini_chromium' / 'base' / 'third_party' / 'icu',
+                'settings': {
+                    'PackageName': 'ICU',
+                    'URL': 'http://site.icu-project.org/',
+                    'License': 'Unicode-DFS-2016',
+                    'LicenseFile': 'LICENSE'
+                }
+            },
+            {
+                'dir': port_dir / 'mini_chromium',
+                'settings': {
+                    'PackageName': 'mini_chromium',
+                    'URL': 'https://chromium.googlesource.com/chromium/mini_chromium/',
+                    'License': 'BSD-3-Clause',
+                    'LicenseFile': 'LICENSE'
+                }
+            },
+            {
+                'dir': port_dir / 'zlib',
+                'settings': {
+                    'PackageName': 'zlib',
+                    'URL': 'https://zlib.net/',
+                    'License': 'Zlib',
+                    'LicenseFile': 'LICENSE'
+                }
+            }
+        ]
+
+        for package_info in package_info_list:
+            builder.writePackageInfoFile(
+                package_info.get('dir', ''),
+                settings=package_info.get('settings', {})
+            )
+
+        builder.writeCMakeFindFile(
+            output_dir,
+            template=cmake_find_file_template
+        )
+
+        remove_files_by_regex(
+            output_dir,
+            regex_to_remove(args.platform_name)
+        )
+
+
+if __name__ == '__main__':
+    main()

+ 2 - 1
package-system/Lua/CMakeLists.txt

@@ -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
 #

+ 2 - 1
package-system/Lua/FindLua.cmake.template

@@ -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
 #

+ 2 - 1
package-system/OpenSSL/FindOpenSSL.cmake.template

@@ -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
 #

+ 2 - 1
package-system/OpenSSL/FindOpenSSL_linux.cmake.template

@@ -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
 #

+ 2 - 1
package-system/OpenSSL/build_package_image.py

@@ -1,7 +1,8 @@
 #!/usr/bin/env python3
 
 #
-# 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
 #

+ 17 - 0
package-system/d3dx12-windows/Findd3dx12.cmake

@@ -0,0 +1,17 @@
+#
+# 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(LIB_NAME "d3dx12")
+set(TARGET_WITH_NAMESPACE "3rdParty::${LIB_NAME}")
+set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/d3dx12/include)
+
+# declare the target so that others can 'depend on it'
+add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+
+ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${LIB_NAME}_INCLUDE_DIR})
+set(${LIB_NAME}_FOUND True)

+ 6 - 0
package-system/d3dx12-windows/PackageInfo.json

@@ -0,0 +1,6 @@
+{
+    "PackageName" : "d3dx12-headers-rev1-windows",
+    "URL"         : "https://github.com/microsoft/DirectX-Headers",
+    "License"     : "MIT License",
+    "LicenseFile" : "d3dx12/license.txt"
+}

+ 1514 - 0
package-system/d3dx12-windows/d3dx12/include/d3dx12.h

@@ -0,0 +1,1514 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
+// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
+// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
+//
+
+#ifdef AZ_COMPILER_CLANG
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Weverything"
+#endif
+
+#ifndef __D3DX12_H__
+#define __D3DX12_H__
+
+#include "d3d12.h"
+
+#if defined( __cplusplus )
+
+struct CD3DX12_DEFAULT {};
+extern const DECLSPEC_SELECTANY CD3DX12_DEFAULT D3D12_DEFAULT;
+
+//------------------------------------------------------------------------------------------------
+inline bool operator==( const D3D12_VIEWPORT& l, const D3D12_VIEWPORT& r )
+{
+    return l.TopLeftX == r.TopLeftX && l.TopLeftY == r.TopLeftY && l.Width == r.Width &&
+        l.Height == r.Height && l.MinDepth == r.MinDepth && l.MaxDepth == r.MaxDepth;
+}
+
+//------------------------------------------------------------------------------------------------
+inline bool operator!=( const D3D12_VIEWPORT& l, const D3D12_VIEWPORT& r )
+{ return !( l == r ); }
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RECT : public D3D12_RECT
+{
+    CD3DX12_RECT()
+    {}
+    explicit CD3DX12_RECT( const D3D12_RECT& o ) :
+        D3D12_RECT( o )
+    {}
+    explicit CD3DX12_RECT(
+        LONG Left,
+        LONG Top,
+        LONG Right,
+        LONG Bottom )
+    {
+        left = Left;
+        top = Top;
+        right = Right;
+        bottom = Bottom;
+    }
+    ~CD3DX12_RECT() {}
+    operator const D3D12_RECT&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_BOX : public D3D12_BOX
+{
+    CD3DX12_BOX()
+    {}
+    explicit CD3DX12_BOX( const D3D12_BOX& o ) :
+        D3D12_BOX( o )
+    {}
+    explicit CD3DX12_BOX(
+        LONG Left,
+        LONG Right )
+    {
+        left = Left;
+        top = 0;
+        front = 0;
+        right = Right;
+        bottom = 1;
+        back = 1;
+    }
+    explicit CD3DX12_BOX(
+        LONG Left,
+        LONG Top,
+        LONG Right,
+        LONG Bottom )
+    {
+        left = Left;
+        top = Top;
+        front = 0;
+        right = Right;
+        bottom = Bottom;
+        back = 1;
+    }
+    explicit CD3DX12_BOX(
+        LONG Left,
+        LONG Top,
+        LONG Front,
+        LONG Right,
+        LONG Bottom,
+        LONG Back )
+    {
+        left = Left;
+        top = Top;
+        front = Front;
+        right = Right;
+        bottom = Bottom;
+        back = Back;
+    }
+    ~CD3DX12_BOX() {}
+    operator const D3D12_BOX&() const { return *this; }
+};
+inline bool operator==( const D3D12_BOX& l, const D3D12_BOX& r )
+{
+    return l.left == r.left && l.top == r.top && l.front == r.front &&
+        l.right == r.right && l.bottom == r.bottom && l.back == r.back;
+}
+inline bool operator!=( const D3D12_BOX& l, const D3D12_BOX& r )
+{ return !( l == r ); }
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DEPTH_STENCIL_DESC : public D3D12_DEPTH_STENCIL_DESC
+{
+    CD3DX12_DEPTH_STENCIL_DESC()
+    {}
+    explicit CD3DX12_DEPTH_STENCIL_DESC( const D3D12_DEPTH_STENCIL_DESC& o ) :
+        D3D12_DEPTH_STENCIL_DESC( o )
+    {}
+    explicit CD3DX12_DEPTH_STENCIL_DESC( CD3DX12_DEFAULT )
+    {
+        DepthEnable = TRUE;
+        DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+        DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+        StencilEnable = FALSE;
+        StencilReadMask = D3D12_DEFAULT_STENCIL_READ_MASK;
+        StencilWriteMask = D3D12_DEFAULT_STENCIL_WRITE_MASK;
+        const D3D12_DEPTH_STENCILOP_DESC defaultStencilOp =
+        { D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_COMPARISON_FUNC_ALWAYS };
+        FrontFace = defaultStencilOp;
+        BackFace = defaultStencilOp;
+    }
+    explicit CD3DX12_DEPTH_STENCIL_DESC(
+        BOOL depthEnable,
+        D3D12_DEPTH_WRITE_MASK depthWriteMask,
+        D3D12_COMPARISON_FUNC depthFunc,
+        BOOL stencilEnable,
+        UINT8 stencilReadMask,
+        UINT8 stencilWriteMask,
+        D3D12_STENCIL_OP frontStencilFailOp,
+        D3D12_STENCIL_OP frontStencilDepthFailOp,
+        D3D12_STENCIL_OP frontStencilPassOp,
+        D3D12_COMPARISON_FUNC frontStencilFunc,
+        D3D12_STENCIL_OP backStencilFailOp,
+        D3D12_STENCIL_OP backStencilDepthFailOp,
+        D3D12_STENCIL_OP backStencilPassOp,
+        D3D12_COMPARISON_FUNC backStencilFunc )
+    {
+        DepthEnable = depthEnable;
+        DepthWriteMask = depthWriteMask;
+        DepthFunc = depthFunc;
+        StencilEnable = stencilEnable;
+        StencilReadMask = stencilReadMask;
+        StencilWriteMask = stencilWriteMask;
+        FrontFace.StencilFailOp = frontStencilFailOp;
+        FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
+        FrontFace.StencilPassOp = frontStencilPassOp;
+        FrontFace.StencilFunc = frontStencilFunc;
+        BackFace.StencilFailOp = backStencilFailOp;
+        BackFace.StencilDepthFailOp = backStencilDepthFailOp;
+        BackFace.StencilPassOp = backStencilPassOp;
+        BackFace.StencilFunc = backStencilFunc;
+    }
+    ~CD3DX12_DEPTH_STENCIL_DESC() {}
+    operator const D3D12_DEPTH_STENCIL_DESC&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_BLEND_DESC : public D3D12_BLEND_DESC
+{
+    CD3DX12_BLEND_DESC()
+    {}
+    explicit CD3DX12_BLEND_DESC( const D3D12_BLEND_DESC& o ) :
+        D3D12_BLEND_DESC( o )
+    {}
+    explicit CD3DX12_BLEND_DESC( CD3DX12_DEFAULT )
+    {
+        AlphaToCoverageEnable = FALSE;
+        IndependentBlendEnable = FALSE;
+        const D3D12_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc =
+        {
+            FALSE,FALSE,
+            D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD,
+            D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD,
+            D3D12_LOGIC_OP_NOOP,
+            D3D12_COLOR_WRITE_ENABLE_ALL,
+        };
+        for (UINT i = 0; i < D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i)
+            RenderTarget[ i ] = defaultRenderTargetBlendDesc;
+    }
+    ~CD3DX12_BLEND_DESC() {}
+    operator const D3D12_BLEND_DESC&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RASTERIZER_DESC : public D3D12_RASTERIZER_DESC
+{
+    CD3DX12_RASTERIZER_DESC()
+    {}
+    explicit CD3DX12_RASTERIZER_DESC( const D3D12_RASTERIZER_DESC& o ) :
+        D3D12_RASTERIZER_DESC( o )
+    {}
+    explicit CD3DX12_RASTERIZER_DESC( CD3DX12_DEFAULT )
+    {
+        FillMode = D3D12_FILL_MODE_SOLID;
+        CullMode = D3D12_CULL_MODE_BACK;
+        FrontCounterClockwise = FALSE;
+        DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+        DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+        SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+        DepthClipEnable = TRUE;
+        MultisampleEnable = FALSE;
+        AntialiasedLineEnable = FALSE;
+        ForcedSampleCount = 0;
+        ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+    }
+    explicit CD3DX12_RASTERIZER_DESC(
+        D3D12_FILL_MODE fillMode,
+        D3D12_CULL_MODE cullMode,
+        BOOL frontCounterClockwise,
+        INT depthBias,
+        FLOAT depthBiasClamp,
+        FLOAT slopeScaledDepthBias,
+        BOOL depthClipEnable,
+        BOOL multisampleEnable,
+        BOOL antialiasedLineEnable, 
+        UINT forcedSampleCount, 
+        D3D12_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster)
+    {
+        FillMode = fillMode;
+        CullMode = cullMode;
+        FrontCounterClockwise = frontCounterClockwise;
+        DepthBias = depthBias;
+        DepthBiasClamp = depthBiasClamp;
+        SlopeScaledDepthBias = slopeScaledDepthBias;
+        DepthClipEnable = depthClipEnable;
+        MultisampleEnable = multisampleEnable;
+        AntialiasedLineEnable = antialiasedLineEnable;
+        ForcedSampleCount = forcedSampleCount;
+        ConservativeRaster = conservativeRaster;
+    }
+    ~CD3DX12_RASTERIZER_DESC() {}
+    operator const D3D12_RASTERIZER_DESC&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_ALLOCATION_INFO : public D3D12_RESOURCE_ALLOCATION_INFO
+{
+    CD3DX12_RESOURCE_ALLOCATION_INFO()
+    {}
+    explicit CD3DX12_RESOURCE_ALLOCATION_INFO( const D3D12_RESOURCE_ALLOCATION_INFO& o ) :
+        D3D12_RESOURCE_ALLOCATION_INFO( o )
+    {}
+    CD3DX12_RESOURCE_ALLOCATION_INFO(
+        UINT64 size,
+        UINT64 alignment )
+    {
+        SizeInBytes = size;
+        Alignment = alignment;
+    }
+    operator const D3D12_RESOURCE_ALLOCATION_INFO&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_HEAP_PROPERTIES : public D3D12_HEAP_PROPERTIES
+{
+    CD3DX12_HEAP_PROPERTIES()
+    {}
+    explicit CD3DX12_HEAP_PROPERTIES(const D3D12_HEAP_PROPERTIES &o) :
+        D3D12_HEAP_PROPERTIES(o)
+    {}
+    CD3DX12_HEAP_PROPERTIES( 
+        D3D12_CPU_PAGE_PROPERTY cpuPageProperty, 
+        D3D12_MEMORY_POOL memoryPoolPreference,
+        UINT creationNodeMask = 1, 
+        UINT nodeMask = 1 )
+    {
+        Type = D3D12_HEAP_TYPE_CUSTOM;
+        CPUPageProperty = cpuPageProperty;
+        MemoryPoolPreference = memoryPoolPreference;
+        CreationNodeMask = creationNodeMask;
+        VisibleNodeMask = nodeMask;
+    }
+    explicit CD3DX12_HEAP_PROPERTIES( 
+        D3D12_HEAP_TYPE type, 
+        UINT creationNodeMask = 1, 
+        UINT nodeMask = 1 )
+    {
+        Type = type;
+        CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+        MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+        CreationNodeMask = creationNodeMask;
+        VisibleNodeMask = nodeMask;
+    }
+    operator const D3D12_HEAP_PROPERTIES&() const { return *this; }
+    bool IsCPUAccessible() const
+    {
+        return Type == D3D12_HEAP_TYPE_UPLOAD || Type == D3D12_HEAP_TYPE_READBACK || (Type == D3D12_HEAP_TYPE_CUSTOM &&
+            (CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE || CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_BACK));
+    }
+};
+inline bool operator==( const D3D12_HEAP_PROPERTIES& l, const D3D12_HEAP_PROPERTIES& r )
+{
+    return l.Type == r.Type && l.CPUPageProperty == r.CPUPageProperty && 
+        l.MemoryPoolPreference == r.MemoryPoolPreference &&
+        l.CreationNodeMask == r.CreationNodeMask &&
+        l.VisibleNodeMask == r.VisibleNodeMask;
+}
+inline bool operator!=( const D3D12_HEAP_PROPERTIES& l, const D3D12_HEAP_PROPERTIES& r )
+{ return !( l == r ); }
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_HEAP_DESC : public D3D12_HEAP_DESC
+{
+    CD3DX12_HEAP_DESC()
+    {}
+    explicit CD3DX12_HEAP_DESC(const D3D12_HEAP_DESC &o) :
+        D3D12_HEAP_DESC(o)
+    {}
+    CD3DX12_HEAP_DESC( 
+        UINT64 size, 
+        D3D12_HEAP_PROPERTIES properties, 
+        UINT64 alignment = 0, 
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE )
+    {
+        SizeInBytes = size;
+        Properties = properties;
+        Alignment = alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC( 
+        UINT64 size, 
+        D3D12_HEAP_TYPE type, 
+        UINT64 alignment = 0, 
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE )
+    {
+        SizeInBytes = size;
+        Properties = CD3DX12_HEAP_PROPERTIES( type );
+        Alignment = alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC( 
+        UINT64 size, 
+        D3D12_CPU_PAGE_PROPERTY cpuPageProperty, 
+        D3D12_MEMORY_POOL memoryPoolPreference, 
+        UINT64 alignment = 0, 
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE )
+    {
+        SizeInBytes = size;
+        Properties = CD3DX12_HEAP_PROPERTIES( cpuPageProperty, memoryPoolPreference );
+        Alignment = alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC( 
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_HEAP_PROPERTIES properties, 
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE )
+    {
+        SizeInBytes = resAllocInfo.SizeInBytes;
+        Properties = properties;
+        Alignment = resAllocInfo.Alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC( 
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_HEAP_TYPE type, 
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE )
+    {
+        SizeInBytes = resAllocInfo.SizeInBytes;
+        Properties = CD3DX12_HEAP_PROPERTIES( type );
+        Alignment = resAllocInfo.Alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC( 
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_CPU_PAGE_PROPERTY cpuPageProperty, 
+        D3D12_MEMORY_POOL memoryPoolPreference, 
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE )
+    {
+        SizeInBytes = resAllocInfo.SizeInBytes;
+        Properties = CD3DX12_HEAP_PROPERTIES( cpuPageProperty, memoryPoolPreference );
+        Alignment = resAllocInfo.Alignment;
+        Flags = flags;
+    }
+    operator const D3D12_HEAP_DESC&() const { return *this; }
+    bool IsCPUAccessible() const
+    { return static_cast< const CD3DX12_HEAP_PROPERTIES* >( &Properties )->IsCPUAccessible(); }
+};
+inline bool operator==( const D3D12_HEAP_DESC& l, const D3D12_HEAP_DESC& r )
+{
+    return l.SizeInBytes == r.SizeInBytes &&
+        l.Properties == r.Properties && 
+        l.Alignment == r.Alignment &&
+        l.Flags == r.Flags;
+}
+inline bool operator!=( const D3D12_HEAP_DESC& l, const D3D12_HEAP_DESC& r )
+{ return !( l == r ); }
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_CLEAR_VALUE : public D3D12_CLEAR_VALUE
+{
+    CD3DX12_CLEAR_VALUE()
+    {}
+    explicit CD3DX12_CLEAR_VALUE(const D3D12_CLEAR_VALUE &o) :
+        D3D12_CLEAR_VALUE(o)
+    {}
+    CD3DX12_CLEAR_VALUE( 
+        DXGI_FORMAT format, 
+        const FLOAT color[4] )
+    {
+        Format = format;
+        memcpy( Color, color, sizeof( Color ) );
+    }
+    CD3DX12_CLEAR_VALUE( 
+        DXGI_FORMAT format, 
+        FLOAT depth,
+        UINT8 stencil )
+    {
+        Format = format;
+        /* Use memcpy to preserve NAN values */
+        memcpy( &DepthStencil.Depth, &depth, sizeof( depth ) );
+        DepthStencil.Stencil = stencil;
+    }
+    operator const D3D12_CLEAR_VALUE&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RANGE : public D3D12_RANGE
+{
+    CD3DX12_RANGE()
+    {}
+    explicit CD3DX12_RANGE(const D3D12_RANGE &o) :
+        D3D12_RANGE(o)
+    {}
+    CD3DX12_RANGE( 
+        SIZE_T begin, 
+        SIZE_T end )
+    {
+        Begin = begin;
+        End = end;
+    }
+    operator const D3D12_RANGE&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILED_RESOURCE_COORDINATE : public D3D12_TILED_RESOURCE_COORDINATE
+{
+    CD3DX12_TILED_RESOURCE_COORDINATE()
+    {}
+    explicit CD3DX12_TILED_RESOURCE_COORDINATE(const D3D12_TILED_RESOURCE_COORDINATE &o) :
+        D3D12_TILED_RESOURCE_COORDINATE(o)
+    {}
+    CD3DX12_TILED_RESOURCE_COORDINATE( 
+        UINT x, 
+        UINT y, 
+        UINT z, 
+        UINT subresource ) 
+    {
+        X = x;
+        Y = y;
+        Z = z;
+        Subresource = subresource;
+    }
+    operator const D3D12_TILED_RESOURCE_COORDINATE&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILE_REGION_SIZE : public D3D12_TILE_REGION_SIZE
+{
+    CD3DX12_TILE_REGION_SIZE()
+    {}
+    explicit CD3DX12_TILE_REGION_SIZE(const D3D12_TILE_REGION_SIZE &o) :
+        D3D12_TILE_REGION_SIZE(o)
+    {}
+    CD3DX12_TILE_REGION_SIZE( 
+        UINT numTiles, 
+        BOOL useBox, 
+        UINT width, 
+        UINT16 height, 
+        UINT16 depth ) 
+    {
+        NumTiles = numTiles;
+        UseBox = useBox;
+        Width = width;
+        Height = height;
+        Depth = depth;
+    }
+    operator const D3D12_TILE_REGION_SIZE&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_TILING : public D3D12_SUBRESOURCE_TILING
+{
+    CD3DX12_SUBRESOURCE_TILING()
+    {}
+    explicit CD3DX12_SUBRESOURCE_TILING(const D3D12_SUBRESOURCE_TILING &o) :
+        D3D12_SUBRESOURCE_TILING(o)
+    {}
+    CD3DX12_SUBRESOURCE_TILING( 
+        UINT widthInTiles, 
+        UINT16 heightInTiles, 
+        UINT16 depthInTiles, 
+        UINT startTileIndexInOverallResource ) 
+    {
+        WidthInTiles = widthInTiles;
+        HeightInTiles = heightInTiles;
+        DepthInTiles = depthInTiles;
+        StartTileIndexInOverallResource = startTileIndexInOverallResource;
+    }
+    operator const D3D12_SUBRESOURCE_TILING&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILE_SHAPE : public D3D12_TILE_SHAPE
+{
+    CD3DX12_TILE_SHAPE()
+    {}
+    explicit CD3DX12_TILE_SHAPE(const D3D12_TILE_SHAPE &o) :
+        D3D12_TILE_SHAPE(o)
+    {}
+    CD3DX12_TILE_SHAPE( 
+        UINT widthInTexels, 
+        UINT heightInTexels, 
+        UINT depthInTexels ) 
+    {
+        WidthInTexels = widthInTexels;
+        HeightInTexels = heightInTexels;
+        DepthInTexels = depthInTexels;
+    }
+    operator const D3D12_TILE_SHAPE&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_BARRIER : public D3D12_RESOURCE_BARRIER
+{
+    CD3DX12_RESOURCE_BARRIER()
+    {}
+    explicit CD3DX12_RESOURCE_BARRIER(const D3D12_RESOURCE_BARRIER &o) :
+        D3D12_RESOURCE_BARRIER(o)
+    {}
+    static inline CD3DX12_RESOURCE_BARRIER Transition(
+        _In_ ID3D12Resource* pResource,
+        D3D12_RESOURCE_STATES stateBefore,
+        D3D12_RESOURCE_STATES stateAfter,
+        UINT subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES,
+        D3D12_RESOURCE_BARRIER_FLAGS flags = D3D12_RESOURCE_BARRIER_FLAG_NONE)
+    {
+        CD3DX12_RESOURCE_BARRIER result;
+        ZeroMemory(&result, sizeof(result));
+        D3D12_RESOURCE_BARRIER &barrier = result;
+        result.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+        result.Flags = flags;
+        barrier.Transition.pResource = pResource;
+        barrier.Transition.StateBefore = stateBefore;
+        barrier.Transition.StateAfter = stateAfter;
+        barrier.Transition.Subresource = subresource;
+        return result;
+    }
+    static inline CD3DX12_RESOURCE_BARRIER Aliasing(
+        _In_ ID3D12Resource* pResourceBefore,
+        _In_ ID3D12Resource* pResourceAfter)
+    {
+        CD3DX12_RESOURCE_BARRIER result;
+        ZeroMemory(&result, sizeof(result));
+        D3D12_RESOURCE_BARRIER &barrier = result;
+        result.Type = D3D12_RESOURCE_BARRIER_TYPE_ALIASING;
+        barrier.Aliasing.pResourceBefore = pResourceBefore;
+        barrier.Aliasing.pResourceAfter = pResourceAfter;
+        return result;
+    }
+    static inline CD3DX12_RESOURCE_BARRIER UAV(
+        _In_ ID3D12Resource* pResource)
+    {
+        CD3DX12_RESOURCE_BARRIER result;
+        ZeroMemory(&result, sizeof(result));
+        D3D12_RESOURCE_BARRIER &barrier = result;
+        result.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
+        barrier.UAV.pResource = pResource;
+        return result;
+    }
+    operator const D3D12_RESOURCE_BARRIER&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_PACKED_MIP_INFO : public D3D12_PACKED_MIP_INFO
+{
+    CD3DX12_PACKED_MIP_INFO()
+    {}
+    explicit CD3DX12_PACKED_MIP_INFO(const D3D12_PACKED_MIP_INFO &o) :
+        D3D12_PACKED_MIP_INFO(o)
+    {}
+    CD3DX12_PACKED_MIP_INFO( 
+        UINT8 numStandardMips, 
+        UINT8 numPackedMips, 
+        UINT numTilesForPackedMips, 
+        UINT startTileIndexInOverallResource ) 
+    {
+        NumStandardMips = numStandardMips;
+        NumPackedMips = numPackedMips;
+        NumTilesForPackedMips = numTilesForPackedMips;
+        StartTileIndexInOverallResource = startTileIndexInOverallResource;
+    }
+    operator const D3D12_PACKED_MIP_INFO&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_FOOTPRINT : public D3D12_SUBRESOURCE_FOOTPRINT
+{
+    CD3DX12_SUBRESOURCE_FOOTPRINT()
+    {}
+    explicit CD3DX12_SUBRESOURCE_FOOTPRINT(const D3D12_SUBRESOURCE_FOOTPRINT &o) :
+        D3D12_SUBRESOURCE_FOOTPRINT(o)
+    {}
+    CD3DX12_SUBRESOURCE_FOOTPRINT( 
+        DXGI_FORMAT format, 
+        UINT width, 
+        UINT height, 
+        UINT depth, 
+        UINT rowPitch ) 
+    {
+        Format = format;
+        Width = width;
+        Height = height;
+        Depth = depth;
+        RowPitch = rowPitch;
+    }
+    explicit CD3DX12_SUBRESOURCE_FOOTPRINT( 
+        const D3D12_RESOURCE_DESC& resDesc, 
+        UINT rowPitch ) 
+    {
+        Format = resDesc.Format;
+        Width = UINT( resDesc.Width );
+        Height = resDesc.Height;
+        Depth = (resDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? resDesc.DepthOrArraySize : 1);
+        RowPitch = rowPitch;
+    }
+    operator const D3D12_SUBRESOURCE_FOOTPRINT&() const { return *this; }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TEXTURE_COPY_LOCATION : public D3D12_TEXTURE_COPY_LOCATION
+{ 
+    CD3DX12_TEXTURE_COPY_LOCATION()
+    {}
+    explicit CD3DX12_TEXTURE_COPY_LOCATION(const D3D12_TEXTURE_COPY_LOCATION &o) :
+        D3D12_TEXTURE_COPY_LOCATION(o)
+    {}
+    CD3DX12_TEXTURE_COPY_LOCATION(ID3D12Resource* pRes) { pResource = pRes; }
+    CD3DX12_TEXTURE_COPY_LOCATION(ID3D12Resource* pRes, D3D12_PLACED_SUBRESOURCE_FOOTPRINT const& Footprint)
+    {
+        pResource = pRes;
+        Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
+        PlacedFootprint = Footprint;
+    }
+    CD3DX12_TEXTURE_COPY_LOCATION(ID3D12Resource* pRes, UINT Sub)
+    {
+        pResource = pRes;
+        Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+        SubresourceIndex = Sub;
+    }
+}; 
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DESCRIPTOR_RANGE : public D3D12_DESCRIPTOR_RANGE
+{
+    CD3DX12_DESCRIPTOR_RANGE() { }
+    explicit CD3DX12_DESCRIPTOR_RANGE(const D3D12_DESCRIPTOR_RANGE &o) :
+        D3D12_DESCRIPTOR_RANGE(o)
+    {}
+    CD3DX12_DESCRIPTOR_RANGE(
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
+    {
+        Init(rangeType, numDescriptors, baseShaderRegister, registerSpace, offsetInDescriptorsFromTableStart);
+    }
+    
+    inline void Init(
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
+    {
+        Init(*this, rangeType, numDescriptors, baseShaderRegister, registerSpace, offsetInDescriptorsFromTableStart);
+    }
+    
+    static inline void Init(
+        _Out_ D3D12_DESCRIPTOR_RANGE &range,
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
+    {
+        range.RangeType = rangeType;
+        range.NumDescriptors = numDescriptors;
+        range.BaseShaderRegister = baseShaderRegister;
+        range.RegisterSpace = registerSpace;
+        range.OffsetInDescriptorsFromTableStart = offsetInDescriptorsFromTableStart;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_DESCRIPTOR_TABLE : public D3D12_ROOT_DESCRIPTOR_TABLE
+{
+    CD3DX12_ROOT_DESCRIPTOR_TABLE() {}
+    explicit CD3DX12_ROOT_DESCRIPTOR_TABLE(const D3D12_ROOT_DESCRIPTOR_TABLE &o) :
+        D3D12_ROOT_DESCRIPTOR_TABLE(o)
+    {}
+    CD3DX12_ROOT_DESCRIPTOR_TABLE(
+        UINT numDescriptorRanges,
+        _In_reads_opt_(numDescriptorRanges) const D3D12_DESCRIPTOR_RANGE* _pDescriptorRanges)
+    {
+        Init(numDescriptorRanges, _pDescriptorRanges);
+    }
+    
+    inline void Init(
+        UINT numDescriptorRanges,
+        _In_reads_opt_(numDescriptorRanges) const D3D12_DESCRIPTOR_RANGE* _pDescriptorRanges)
+    {
+        Init(*this, numDescriptorRanges, _pDescriptorRanges);
+    }
+    
+    static inline void Init(
+        _Out_ D3D12_ROOT_DESCRIPTOR_TABLE &rootDescriptorTable,
+        UINT numDescriptorRanges,
+        _In_reads_opt_(numDescriptorRanges) const D3D12_DESCRIPTOR_RANGE* _pDescriptorRanges)
+    {
+        rootDescriptorTable.NumDescriptorRanges = numDescriptorRanges;
+        rootDescriptorTable.pDescriptorRanges = _pDescriptorRanges;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_CONSTANTS : public D3D12_ROOT_CONSTANTS
+{
+    CD3DX12_ROOT_CONSTANTS() {}
+    explicit CD3DX12_ROOT_CONSTANTS(const D3D12_ROOT_CONSTANTS &o) :
+        D3D12_ROOT_CONSTANTS(o)
+    {}
+    CD3DX12_ROOT_CONSTANTS(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0)
+    {
+        Init(num32BitValues, shaderRegister, registerSpace);
+    }
+    
+    inline void Init(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0)
+    {
+        Init(*this, num32BitValues, shaderRegister, registerSpace);
+    }
+    
+    static inline void Init(
+        _Out_ D3D12_ROOT_CONSTANTS &rootConstants,
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0)
+    {
+        rootConstants.Num32BitValues = num32BitValues;
+        rootConstants.ShaderRegister = shaderRegister;
+        rootConstants.RegisterSpace = registerSpace;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_DESCRIPTOR : public D3D12_ROOT_DESCRIPTOR
+{
+    CD3DX12_ROOT_DESCRIPTOR() {}
+    explicit CD3DX12_ROOT_DESCRIPTOR(const D3D12_ROOT_DESCRIPTOR &o) :
+        D3D12_ROOT_DESCRIPTOR(o)
+    {}
+    CD3DX12_ROOT_DESCRIPTOR(
+        UINT shaderRegister,
+        UINT registerSpace = 0)
+    {
+        Init(shaderRegister, registerSpace);
+    }
+    
+    inline void Init(
+        UINT shaderRegister,
+        UINT registerSpace = 0)
+    {
+        Init(*this, shaderRegister, registerSpace);
+    }
+    
+    static inline void Init(_Out_ D3D12_ROOT_DESCRIPTOR &table, UINT shaderRegister, UINT registerSpace = 0)
+    {
+        table.ShaderRegister = shaderRegister;
+        table.RegisterSpace = registerSpace;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_PARAMETER : public D3D12_ROOT_PARAMETER
+{
+    CD3DX12_ROOT_PARAMETER() {}
+    explicit CD3DX12_ROOT_PARAMETER(const D3D12_ROOT_PARAMETER &o) :
+        D3D12_ROOT_PARAMETER(o)
+    {}
+    
+    static inline void InitAsDescriptorTable(
+        _Out_ D3D12_ROOT_PARAMETER &rootParam,
+        UINT numDescriptorRanges,
+        _In_reads_(numDescriptorRanges) const D3D12_DESCRIPTOR_RANGE* pDescriptorRanges,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR_TABLE::Init(rootParam.DescriptorTable, numDescriptorRanges, pDescriptorRanges);
+    }
+
+    static inline void InitAsConstants(
+        _Out_ D3D12_ROOT_PARAMETER &rootParam,
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_CONSTANTS::Init(rootParam.Constants, num32BitValues, shaderRegister, registerSpace);
+    }
+
+    static inline void InitAsConstantBufferView(
+        _Out_ D3D12_ROOT_PARAMETER &rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR::Init(rootParam.Descriptor, shaderRegister, registerSpace);
+    }
+
+    static inline void InitAsShaderResourceView(
+        _Out_ D3D12_ROOT_PARAMETER &rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_SRV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR::Init(rootParam.Descriptor, shaderRegister, registerSpace);
+    }
+
+    static inline void InitAsUnorderedAccessView(
+        _Out_ D3D12_ROOT_PARAMETER &rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR::Init(rootParam.Descriptor, shaderRegister, registerSpace);
+    }
+    
+    inline void InitAsDescriptorTable(
+        UINT numDescriptorRanges,
+        _In_reads_(numDescriptorRanges) const D3D12_DESCRIPTOR_RANGE* pDescriptorRanges,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        InitAsDescriptorTable(*this, numDescriptorRanges, pDescriptorRanges, visibility);
+    }
+    
+    inline void InitAsConstants(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        InitAsConstants(*this, num32BitValues, shaderRegister, registerSpace, visibility);
+    }
+
+    inline void InitAsConstantBufferView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        InitAsConstantBufferView(*this, shaderRegister, registerSpace, visibility);
+    }
+
+    inline void InitAsShaderResourceView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        InitAsShaderResourceView(*this, shaderRegister, registerSpace, visibility);
+    }
+
+    inline void InitAsUnorderedAccessView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL)
+    {
+        InitAsUnorderedAccessView(*this, shaderRegister, registerSpace, visibility);
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_STATIC_SAMPLER_DESC : public D3D12_STATIC_SAMPLER_DESC
+{
+    CD3DX12_STATIC_SAMPLER_DESC() {}
+    explicit CD3DX12_STATIC_SAMPLER_DESC(const D3D12_STATIC_SAMPLER_DESC &o) :
+        D3D12_STATIC_SAMPLER_DESC(o)
+    {}
+    CD3DX12_STATIC_SAMPLER_DESC(
+         UINT shaderRegister,
+         D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
+         D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         FLOAT mipLODBias = 0,
+         UINT maxAnisotropy = 16,
+         D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
+         D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
+         FLOAT minLOD = 0.f,
+         FLOAT maxLOD = D3D12_FLOAT32_MAX,
+         D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL, 
+         UINT registerSpace = 0)
+    {
+        Init(
+            shaderRegister,
+            filter,
+            addressU,
+            addressV,
+            addressW,
+            mipLODBias,
+            maxAnisotropy,
+            comparisonFunc,
+            borderColor,
+            minLOD,
+            maxLOD,
+            shaderVisibility,
+            registerSpace);
+    }
+    
+    static inline void Init(
+        _Out_ D3D12_STATIC_SAMPLER_DESC &samplerDesc,
+         UINT shaderRegister,
+         D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
+         D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         FLOAT mipLODBias = 0,
+         UINT maxAnisotropy = 16,
+         D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
+         D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
+         FLOAT minLOD = 0.f,
+         FLOAT maxLOD = D3D12_FLOAT32_MAX,
+         D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL, 
+         UINT registerSpace = 0)
+    {
+        samplerDesc.ShaderRegister = shaderRegister;
+        samplerDesc.Filter = filter;
+        samplerDesc.AddressU = addressU;
+        samplerDesc.AddressV = addressV;
+        samplerDesc.AddressW = addressW;
+        samplerDesc.MipLODBias = mipLODBias;
+        samplerDesc.MaxAnisotropy = maxAnisotropy;
+        samplerDesc.ComparisonFunc = comparisonFunc;
+        samplerDesc.BorderColor = borderColor;
+        samplerDesc.MinLOD = minLOD;
+        samplerDesc.MaxLOD = maxLOD;
+        samplerDesc.ShaderVisibility = shaderVisibility;
+        samplerDesc.RegisterSpace = registerSpace;
+    }
+    inline void Init(
+         UINT shaderRegister,
+         D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
+         D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+         FLOAT mipLODBias = 0,
+         UINT maxAnisotropy = 16,
+         D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
+         D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
+         FLOAT minLOD = 0.f,
+         FLOAT maxLOD = D3D12_FLOAT32_MAX,
+         D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL, 
+         UINT registerSpace = 0)
+    {
+        Init(
+            *this,
+            shaderRegister,
+            filter,
+            addressU,
+            addressV,
+            addressW,
+            mipLODBias,
+            maxAnisotropy,
+            comparisonFunc,
+            borderColor,
+            minLOD,
+            maxLOD,
+            shaderVisibility,
+            registerSpace);
+    }
+    
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_SIGNATURE_DESC : public D3D12_ROOT_SIGNATURE_DESC
+{
+    CD3DX12_ROOT_SIGNATURE_DESC() {}
+    explicit CD3DX12_ROOT_SIGNATURE_DESC(const D3D12_ROOT_SIGNATURE_DESC &o) :
+        D3D12_ROOT_SIGNATURE_DESC(o)
+    {}
+    CD3DX12_ROOT_SIGNATURE_DESC(
+        UINT numParameters,
+        _In_reads_opt_(numParameters) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_(numStaticSamplers) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = NULL,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE)
+    {
+        Init(numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags);
+    }
+    CD3DX12_ROOT_SIGNATURE_DESC(CD3DX12_DEFAULT)
+    {
+        Init(0, NULL, 0, NULL, D3D12_ROOT_SIGNATURE_FLAG_NONE);
+    }
+    
+    inline void Init(
+        UINT numParameters,
+        _In_reads_opt_(numParameters) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_(numStaticSamplers) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = NULL,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE)
+    {
+        Init(*this, numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags);
+    }
+
+    static inline void Init(
+        _Out_ D3D12_ROOT_SIGNATURE_DESC &desc,
+        UINT numParameters,
+        _In_reads_opt_(numParameters) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_(numStaticSamplers) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = NULL,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE)
+    {
+        desc.NumParameters = numParameters;
+        desc.pParameters = _pParameters;
+        desc.NumStaticSamplers = numStaticSamplers;
+        desc.pStaticSamplers = _pStaticSamplers;
+        desc.Flags = flags;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
+{
+    CD3DX12_CPU_DESCRIPTOR_HANDLE() {}
+    explicit CD3DX12_CPU_DESCRIPTOR_HANDLE(const D3D12_CPU_DESCRIPTOR_HANDLE &o) :
+        D3D12_CPU_DESCRIPTOR_HANDLE(o)
+    {}
+    CD3DX12_CPU_DESCRIPTOR_HANDLE(CD3DX12_DEFAULT) { ptr = 0; }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &other, INT offsetScaledByIncrementSize)
+    {
+        InitOffsetted(other, offsetScaledByIncrementSize);
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &other, INT offsetInDescriptors, UINT descriptorIncrementSize)
+    {
+        InitOffsetted(other, offsetInDescriptors, descriptorIncrementSize);
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize)
+    { 
+        ptr += offsetInDescriptors * descriptorIncrementSize;
+        return *this;
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize) 
+    { 
+        ptr += offsetScaledByIncrementSize;
+        return *this;
+    }
+    bool operator==(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other)
+    {
+        return (ptr == other.ptr);
+    }
+    bool operator!=(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other)
+    {
+        return (ptr != other.ptr);
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE &operator=(const D3D12_CPU_DESCRIPTOR_HANDLE &other)
+    {
+        ptr = other.ptr;
+        return *this;
+    }
+    
+    inline void InitOffsetted(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetScaledByIncrementSize)
+    {
+        InitOffsetted(*this, base, offsetScaledByIncrementSize);
+    }
+    
+    inline void InitOffsetted(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize)
+    {
+        InitOffsetted(*this, base, offsetInDescriptors, descriptorIncrementSize);
+    }
+    
+    static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetScaledByIncrementSize)
+    {
+        handle.ptr = base.ptr + offsetScaledByIncrementSize;
+    }
+    
+    static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize)
+    {
+        handle.ptr = base.ptr + offsetInDescriptors * descriptorIncrementSize;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
+{
+    CD3DX12_GPU_DESCRIPTOR_HANDLE() {}
+    explicit CD3DX12_GPU_DESCRIPTOR_HANDLE(const D3D12_GPU_DESCRIPTOR_HANDLE &o) :
+        D3D12_GPU_DESCRIPTOR_HANDLE(o)
+    {}
+    CD3DX12_GPU_DESCRIPTOR_HANDLE(CD3DX12_DEFAULT) { ptr = 0; }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &other, INT offsetScaledByIncrementSize)
+    {
+        InitOffsetted(other, offsetScaledByIncrementSize);
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &other, INT offsetInDescriptors, UINT descriptorIncrementSize)
+    {
+        InitOffsetted(other, offsetInDescriptors, descriptorIncrementSize);
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize)
+    { 
+        ptr += offsetInDescriptors * descriptorIncrementSize;
+        return *this;
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize) 
+    { 
+        ptr += offsetScaledByIncrementSize;
+        return *this;
+    }
+    inline bool operator==(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other)
+    {
+        return (ptr == other.ptr);
+    }
+    inline bool operator!=(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other)
+    {
+        return (ptr != other.ptr);
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE &operator=(const D3D12_GPU_DESCRIPTOR_HANDLE &other)
+    {
+        ptr = other.ptr;
+        return *this;
+    }
+    
+    inline void InitOffsetted(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetScaledByIncrementSize)
+    {
+        InitOffsetted(*this, base, offsetScaledByIncrementSize);
+    }
+    
+    inline void InitOffsetted(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize)
+    {
+        InitOffsetted(*this, base, offsetInDescriptors, descriptorIncrementSize);
+    }
+    
+    static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetScaledByIncrementSize)
+    {
+        handle.ptr = base.ptr + offsetScaledByIncrementSize;
+    }
+    
+    static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize)
+    {
+        handle.ptr = base.ptr + offsetInDescriptors * descriptorIncrementSize;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+inline UINT D3D12CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT PlaneSlice, UINT MipLevels, UINT ArraySize )
+{ 
+    return MipSlice + ArraySlice * MipLevels + PlaneSlice * MipLevels * ArraySize; 
+}
+
+//------------------------------------------------------------------------------------------------
+template <typename T, typename U, typename V>
+inline void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels, UINT ArraySize, _Out_ T& MipSlice, _Out_ U& ArraySlice, _Out_ V& PlaneSlice )
+{
+    MipSlice = static_cast<T>(Subresource % MipLevels);
+    ArraySlice = static_cast<U>((Subresource / MipLevels) % ArraySize);
+    PlaneSlice = static_cast<V>(Subresource / (MipLevels * ArraySize));
+}
+
+//------------------------------------------------------------------------------------------------
+inline UINT8 D3D12GetFormatPlaneCount(
+    _In_ ID3D12Device* pDevice,
+    DXGI_FORMAT Format
+    )
+{
+    D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {Format};
+    if (FAILED(pDevice->CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO, &formatInfo, sizeof(formatInfo))))
+    {
+        return 0;
+    }
+    return formatInfo.PlaneCount;
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_DESC : public D3D12_RESOURCE_DESC
+{
+    CD3DX12_RESOURCE_DESC()
+    {}
+    explicit CD3DX12_RESOURCE_DESC( const D3D12_RESOURCE_DESC& o ) :
+        D3D12_RESOURCE_DESC( o )
+    {}
+    CD3DX12_RESOURCE_DESC( 
+        D3D12_RESOURCE_DIMENSION dimension,
+        UINT64 alignment,
+        UINT64 width,
+        UINT height,
+        UINT16 depthOrArraySize,
+        UINT16 mipLevels,
+        DXGI_FORMAT format,
+        UINT sampleCount,
+        UINT sampleQuality,
+        D3D12_TEXTURE_LAYOUT layout,
+        D3D12_RESOURCE_FLAGS flags )
+    {
+        Dimension = dimension;
+        Alignment = alignment;
+        Width = width;
+        Height = height;
+        DepthOrArraySize = depthOrArraySize;
+        MipLevels = mipLevels;
+        Format = format;
+        SampleDesc.Count = sampleCount;
+        SampleDesc.Quality = sampleQuality;
+        Layout = layout;
+        Flags = flags;
+    }
+    static inline CD3DX12_RESOURCE_DESC Buffer( 
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE )
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_BUFFER, resAllocInfo.Alignment, resAllocInfo.SizeInBytes, 
+            1, 1, 1, DXGI_FORMAT_UNKNOWN, 1, 0, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Buffer( 
+        UINT64 width,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        UINT64 alignment = 0 )
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_BUFFER, alignment, width, 1, 1, 1, 
+            DXGI_FORMAT_UNKNOWN, 1, 0, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Tex1D( 
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT16 arraySize = 1,
+        UINT16 mipLevels = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 )
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_TEXTURE1D, alignment, width, 1, arraySize, 
+            mipLevels, format, 1, 0, layout, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Tex2D( 
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT height,
+        UINT16 arraySize = 1,
+        UINT16 mipLevels = 0,
+        UINT sampleCount = 1,
+        UINT sampleQuality = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 )
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_TEXTURE2D, alignment, width, height, arraySize, 
+            mipLevels, format, sampleCount, sampleQuality, layout, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Tex3D( 
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT height,
+        UINT16 depth,
+        UINT16 mipLevels = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 )
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_TEXTURE3D, alignment, width, height, depth, 
+            mipLevels, format, 1, 0, layout, flags );
+    }
+    inline UINT16 Depth() const
+    { return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1); }
+    inline UINT16 ArraySize() const
+    { return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1); }
+    inline UINT8 PlaneCount(_In_ ID3D12Device* pDevice) const
+    { return D3D12GetFormatPlaneCount(pDevice, Format); }
+    inline UINT Subresources(_In_ ID3D12Device* pDevice) const
+    { return MipLevels * ArraySize() * PlaneCount(pDevice); }
+    inline UINT CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT PlaneSlice)
+    { return D3D12CalcSubresource(MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize()); }
+    operator const D3D12_RESOURCE_DESC&() const { return *this; }
+};
+inline bool operator==( const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r )
+{
+    return l.Dimension == r.Dimension &&
+        l.Alignment == r.Alignment &&
+        l.Width == r.Width &&
+        l.Height == r.Height &&
+        l.DepthOrArraySize == r.DepthOrArraySize &&
+        l.MipLevels == r.MipLevels &&
+        l.Format == r.Format &&
+        l.SampleDesc.Count == r.SampleDesc.Count &&
+        l.SampleDesc.Quality == r.SampleDesc.Quality &&
+        l.Layout == r.Layout &&
+        l.Flags == r.Flags;
+}
+inline bool operator!=( const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r )
+{ return !( l == r ); }
+
+//------------------------------------------------------------------------------------------------
+// Row-by-row memcpy
+inline void MemcpySubresource(
+    _In_ const D3D12_MEMCPY_DEST* pDest,
+    _In_ const D3D12_SUBRESOURCE_DATA* pSrc,
+    SIZE_T RowSizeInBytes,
+    UINT NumRows,
+    UINT NumSlices)
+{
+    for (UINT z = 0; z < NumSlices; ++z)
+    {
+        BYTE* pDestSlice = reinterpret_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
+        const BYTE* pSrcSlice = reinterpret_cast<const BYTE*>(pSrc->pData) + pSrc->SlicePitch * z;
+        for (UINT y = 0; y < NumRows; ++y)
+        {
+            memcpy(pDestSlice + pDest->RowPitch * y,
+                   pSrcSlice + pSrc->RowPitch * y,
+                   RowSizeInBytes);
+        }
+    }
+}
+
+//------------------------------------------------------------------------------------------------
+// Returns required size of a buffer to be used for data upload
+inline UINT64 GetRequiredIntermediateSize(
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
+    _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources)
+{
+    D3D12_RESOURCE_DESC Desc = pDestinationResource->GetDesc();
+    UINT64 RequiredSize = 0;
+    
+    ID3D12Device* pDevice;
+    pDestinationResource->GetDevice(__uuidof(*pDevice), reinterpret_cast<void**>(&pDevice));
+    pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, 0, nullptr, nullptr, nullptr, &RequiredSize);
+    pDevice->Release();
+    
+    return RequiredSize;
+}
+
+//------------------------------------------------------------------------------------------------
+// All arrays must be populated (e.g. by calling GetCopyableFootprints)
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
+    _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources,
+    UINT64 RequiredSize,
+    _In_reads_(NumSubresources) const D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
+    _In_reads_(NumSubresources) const UINT* pNumRows,
+    _In_reads_(NumSubresources) const UINT64* pRowSizesInBytes,
+    _In_reads_(NumSubresources) const D3D12_SUBRESOURCE_DATA* pSrcData)
+{
+    // Minor validation
+    D3D12_RESOURCE_DESC IntermediateDesc = pIntermediate->GetDesc();
+    D3D12_RESOURCE_DESC DestinationDesc = pDestinationResource->GetDesc();
+    if (IntermediateDesc.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER || 
+        IntermediateDesc.Width < RequiredSize + pLayouts[0].Offset || 
+        RequiredSize > (SIZE_T)-1 || 
+        (DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER && 
+            (FirstSubresource != 0 || NumSubresources != 1)))
+    {
+        return 0;
+    }
+    
+    BYTE* pData;
+    HRESULT hr = pIntermediate->Map(0, NULL, reinterpret_cast<void**>(&pData));
+    if (FAILED(hr))
+    {
+        return 0;
+    }
+    
+    for (UINT i = 0; i < NumSubresources; ++i)
+    {
+        if (pRowSizesInBytes[i] > (SIZE_T)-1) return 0;
+        D3D12_MEMCPY_DEST DestData = { pData + pLayouts[i].Offset, pLayouts[i].Footprint.RowPitch, pLayouts[i].Footprint.RowPitch * pNumRows[i] };
+        MemcpySubresource(&DestData, &pSrcData[i], (SIZE_T)pRowSizesInBytes[i], pNumRows[i], pLayouts[i].Footprint.Depth);
+    }
+    pIntermediate->Unmap(0, NULL);
+    
+    if (DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
+    {
+        CD3DX12_BOX SrcBox( UINT( pLayouts[0].Offset ), UINT( pLayouts[0].Offset + pLayouts[0].Footprint.Width ) );
+        pCmdList->CopyBufferRegion(
+            pDestinationResource, 0, pIntermediate, pLayouts[0].Offset, pLayouts[0].Footprint.Width);
+    }
+    else
+    {
+        for (UINT i = 0; i < NumSubresources; ++i)
+        {
+            CD3DX12_TEXTURE_COPY_LOCATION Dst(pDestinationResource, i + FirstSubresource);
+            CD3DX12_TEXTURE_COPY_LOCATION Src(pIntermediate, pLayouts[i]);
+            pCmdList->CopyTextureRegion(&Dst, 0, 0, 0, &Src, nullptr);
+        }
+    }
+    return RequiredSize;
+}
+
+//------------------------------------------------------------------------------------------------
+// Heap-allocating UpdateSubresources implementation
+inline UINT64 UpdateSubresources( 
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    UINT64 IntermediateOffset,
+    _In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
+    _In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources,
+    _In_reads_(NumSubresources) const D3D12_SUBRESOURCE_DATA* pSrcData)
+{
+    UINT64 RequiredSize = 0;
+    UINT64 MemToAlloc = static_cast<UINT64>(sizeof(D3D12_PLACED_SUBRESOURCE_FOOTPRINT) + sizeof(UINT) + sizeof(UINT64)) * NumSubresources;
+    if (MemToAlloc > SIZE_MAX)
+    {
+       return 0;
+    }
+    void* pMem = HeapAlloc(GetProcessHeap(), 0, static_cast<SIZE_T>(MemToAlloc));
+    if (pMem == NULL)
+    {
+       return 0;
+    }
+    D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts = reinterpret_cast<D3D12_PLACED_SUBRESOURCE_FOOTPRINT*>(pMem);
+    UINT64* pRowSizesInBytes = reinterpret_cast<UINT64*>(pLayouts + NumSubresources);
+    UINT* pNumRows = reinterpret_cast<UINT*>(pRowSizesInBytes + NumSubresources);
+    
+    D3D12_RESOURCE_DESC Desc = pDestinationResource->GetDesc();
+    ID3D12Device* pDevice;
+    pDestinationResource->GetDevice(__uuidof(*pDevice), reinterpret_cast<void**>(&pDevice));
+    pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, pLayouts, pNumRows, pRowSizesInBytes, &RequiredSize);
+    pDevice->Release();
+    
+    UINT64 Result = UpdateSubresources(pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, pLayouts, pNumRows, pRowSizesInBytes, pSrcData);
+    HeapFree(GetProcessHeap(), 0, pMem);
+    return Result;
+}
+
+//------------------------------------------------------------------------------------------------
+// Stack-allocating UpdateSubresources implementation
+template <UINT MaxSubresources>
+inline UINT64 UpdateSubresources( 
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    UINT64 IntermediateOffset,
+    _In_range_(0, MaxSubresources) UINT FirstSubresource,
+    _In_range_(1, MaxSubresources - FirstSubresource) UINT NumSubresources,
+    _In_reads_(NumSubresources) D3D12_SUBRESOURCE_DATA* pSrcData)
+{
+    UINT64 RequiredSize = 0;
+    D3D12_PLACED_SUBRESOURCE_FOOTPRINT Layouts[MaxSubresources];
+    UINT NumRows[MaxSubresources];
+    UINT64 RowSizesInBytes[MaxSubresources];
+    
+    D3D12_RESOURCE_DESC Desc = pDestinationResource->GetDesc();
+    ID3D12Device* pDevice;
+    pDestinationResource->GetDevice(__uuidof(*pDevice), reinterpret_cast<void**>(&pDevice));
+    pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, Layouts, NumRows, RowSizesInBytes, &RequiredSize);
+    pDevice->Release();
+    
+    return UpdateSubresources(pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, Layouts, NumRows, RowSizesInBytes, pSrcData);
+}
+
+//------------------------------------------------------------------------------------------------
+inline bool D3D12IsLayoutOpaque( D3D12_TEXTURE_LAYOUT Layout )
+{ return Layout == D3D12_TEXTURE_LAYOUT_UNKNOWN || Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE; }
+
+//------------------------------------------------------------------------------------------------
+inline ID3D12CommandList * const * CommandListCast(ID3D12GraphicsCommandList * const * pp)
+{
+    // This cast is useful for passing strongly typed command list pointers into
+    // ExecuteCommandLists.
+    // This cast is valid as long as the const-ness is respected. D3D12 APIs do
+    // respect the const-ness of their arguments.
+    return reinterpret_cast<ID3D12CommandList * const *>(pp);
+}
+
+
+#endif // defined( __cplusplus )
+
+#endif //__D3DX12_H__
+
+#ifdef AZ_COMPILER_CLANG
+#pragma clang diagnostic pop
+#endif

+ 21 - 0
package-system/d3dx12-windows/d3dx12/license.txt

@@ -0,0 +1,21 @@
+Copyright (c) Microsoft Corporation.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 34 - 0
package-system/etc2comp/Findetc2comp.cmake.template

@@ -0,0 +1,34 @@
+#
+# 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
+#
+#
+
+# this file actually ingests the library and defines targets.
+
+set(TARGET_WITH_NAMESPACE "3rdParty::etc2comp")
+if (TARGET $${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+set(ETC2COMP_INCLUDE_DIR $${CMAKE_CURRENT_LIST_DIR}/etc2comp/include)
+set(ETC2COMP_LIBS_DIR $${CMAKE_CURRENT_LIST_DIR}/etc2comp/lib)
+
+set(ETC2COMP_COMPILE_DEFINITIONS
+${CUSTOM_ADDITIONAL_COMPILE_DEFINITIONS})
+
+set(ETC2COMP_LIBRARY
+    "$${ETC2COMP_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}EtcLib$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+${CUSTOM_ADDITIONAL_LIBRARIES})
+
+add_library($${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+
+ly_target_include_system_directories(TARGET $${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_INCLUDE_DIR})
+
+target_link_libraries($${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_LIBRARY})
+
+target_compile_definitions($${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_COMPILE_DEFINITIONS})
+
+set(ETC2COMP_FOUND TRUE)

+ 37 - 0
package-system/etc2comp/Findetc2comp_windows.cmake.template

@@ -0,0 +1,37 @@
+#
+# 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
+#
+#
+
+# this file actually ingests the library and defines targets.
+
+set(TARGET_WITH_NAMESPACE "3rdParty::etc2comp")
+if (TARGET $${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+set(ETC2COMP_INCLUDE_DIR $${CMAKE_CURRENT_LIST_DIR}/etc2comp/include)
+set(ETC2COMP_LIBS_DIR $${CMAKE_CURRENT_LIST_DIR}/etc2comp/lib)
+
+set(ETC2COMP_COMPILE_DEFINITIONS
+${CUSTOM_ADDITIONAL_COMPILE_DEFINITIONS})
+
+set(ETC2COMP_LIBRARY
+    "$${ETC2COMP_LIBS_DIR}/$${CMAKE_STATIC_LIBRARY_PREFIX}EtcLib$$<$$<CONFIG:debug>:d>$${CMAKE_STATIC_LIBRARY_SUFFIX}"
+${CUSTOM_ADDITIONAL_LIBRARIES})
+
+add_library($${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+
+ly_target_include_system_directories(TARGET $${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_INCLUDE_DIR})
+
+target_link_libraries($${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_LIBRARY})
+
+target_compile_definitions($${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_COMPILE_DEFINITIONS})
+
+set(ETC2COMP_LINK_OPTIONS $$<$$<STREQUAL:$${PAL_TRAIT_COMPILER_ID},Clang>:-Wl,>/ignore:4099)
+target_link_options($${TARGET_WITH_NAMESPACE} INTERFACE $${ETC2COMP_LINK_OPTIONS})
+
+set(ETC2COMP_FOUND TRUE)

+ 25 - 0
package-system/etc2comp/add_install_for_etclib.patch

@@ -0,0 +1,25 @@
+diff --git a/EtcLib/CMakeLists.txt b/EtcLib/CMakeLists.txt
+index b584b88..b4ad3f6 100644
+--- a/EtcLib/CMakeLists.txt
++++ b/EtcLib/CMakeLists.txt
+@@ -16,9 +16,17 @@ project(EtcLib)
+ include_directories(./Etc)
+ include_directories(./EtcCodec)
+ 
+-file(GLOB SOURCES
++file(GLOB HEADERS
+ 	${PROJECT_SOURCE_DIR}/Etc/*.h
+-	${PROJECT_SOURCE_DIR}/EtcCodec/*.h
++	${PROJECT_SOURCE_DIR}/EtcCodec/*.h)
++file(GLOB SOURCES
+ 	${PROJECT_SOURCE_DIR}/Etc/*.cpp
+ 	${PROJECT_SOURCE_DIR}/EtcCodec/*.cpp)
+-ADD_LIBRARY(EtcLib ${SOURCES})
++ADD_LIBRARY(EtcLib ${HEADERS} ${SOURCES})
++set_target_properties(EtcLib PROPERTIES PUBLIC_HEADER "${HEADERS}")
++
++install(TARGETS EtcLib
++    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++)

+ 51 - 0
package-system/etc2comp/build_config.json

@@ -0,0 +1,51 @@
+{
+    "git_url":"https://github.com/google/etc2comp.git",
+    "git_tag":"master",
+    "git_commit":"9cd0f9cae0f32338943699bb418107db61bb66f2",
+    "package_name":"etc2comp",
+    "package_version":"9cd0f9cae0-rev1",
+    "package_url":"https://github.com/google/etc2comp",
+    "package_license":"Apache-2.0",
+    "package_license_file":"LICENSE",
+    "cmake_find_target":"Findetc2comp.cmake",
+    "patch_file":"add_install_for_etclib.patch",
+    "Platforms":{
+        "Windows":{
+            "Windows":{
+                "cmake_generate_args_debug":[
+                    "-DCMAKE_CXX_STANDARD=17",
+                    "-DCMAKE_DEBUG_POSTFIX=d"
+                ],
+                "cmake_generate_args_release":[
+                    "-DCMAKE_CXX_STANDARD=17"
+                ],
+                "cmake_find_template":"Findetc2comp_windows.cmake.template"
+            }
+        },
+        "Darwin":{
+            "Mac":{
+                "cmake_generate_args_release":[
+                    "-DCMAKE_CXX_STANDARD=17",
+                    "-DCMAKE_BUILD_TYPE=Release"
+                ],
+                "build_configs":[
+                    "Release"
+                ],
+                "cmake_find_template":"Findetc2comp.cmake.template"
+            }
+        },
+        "Linux":{
+            "Linux":{
+                "cmake_generate_args_release":[
+                    "-DCMAKE_CXX_STANDARD=17",
+                    "-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
+                    "-DCMAKE_BUILD_TYPE=Release"
+                ],
+                "build_configs":[
+                    "Release"
+                ],
+                "cmake_find_template":"Findetc2comp.cmake.template"
+            }
+        }
+    }
+}

+ 2 - 1
package-system/python/build_package_image.py

@@ -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
 #

+ 2 - 1
package-system/python/darwin_x64/FindPython.cmake

@@ -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
 #

+ 2 - 1
package-system/python/darwin_x64/make-python.sh

@@ -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
 #

+ 2 - 1
package-system/python/linux_x64/FindPython.cmake

@@ -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
 #

+ 2 - 1
package-system/python/linux_x64/make-python.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
 
 #
-# 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
 #

+ 2 - 1
package-system/python/linux_x64/python-config-version.cmake

@@ -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
 #

+ 2 - 1
package-system/python/linux_x64/python-config.cmake

@@ -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
 #

+ 2 - 1
package-system/python/quick_validate_python.py

@@ -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
 #

+ 2 - 1
package-system/python/win_x64/FindPython.cmake

@@ -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
 #

+ 2 - 1
package-system/python/win_x64/build_python.bat

@@ -2,7 +2,8 @@
 @echo off
 
 REM
-REM 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.
+REM Copyright (c) Contributors to the Open 3D Engine Project.
+REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
 REM 
 REM SPDX-License-Identifier: Apache-2.0 OR MIT
 REM

+ 2 - 1
package-system/python/win_x64/python-config-version.cmake

@@ -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
 #

+ 2 - 1
package-system/python/win_x64/python-config.cmake

@@ -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
 #

+ 2 - 1
package-system/xxhash-multiplatform/Findxxhash.cmake

@@ -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
 #