Pārlūkot izejas kodu

Update for dxc to the latest version. (#211)

The new dxc version fixes multiple issues that we encounter during
shader compilation with the older version.

We have tested this on linux (x64) and windows, but could not test in on
linux (aarch) or mac, letting the asset processor compile all shaders
(some changes are needed: https://github.com/o3de/o3de/pull/16568). On
windows when building with a newer visual studio version,
`package-system/DirectXShaderCompiler/build_dxc_windows.cmd` needs to be
modified, either removing or changing `-vs2019` to `-vs2022` as we did,
but this is not included in this patch.

Signed-off-by: Joerg H. Mueller <[email protected]>
jhmueller-huawei 1 gadu atpakaļ
vecāks
revīzija
280f5e2c53

+ 0 - 1
package-system/DirectXShaderCompiler/FindDirectXShaderCompilerDxc.cmake.Linux

@@ -26,7 +26,6 @@ ly_add_target_files(TARGETS ${TARGET_WITH_NAMESPACE} OUTPUT_SUBDIRECTORY "${outp
 
 set(${MY_NAME}_LIB_RUNTIME_DEPENDENCIES
         ${${MY_NAME}_LIB_DIR}/libdxcompiler.so
-        ${${MY_NAME}_LIB_DIR}/libdxcompiler.so.3.7
         )
 ly_add_target_files(TARGETS ${TARGET_WITH_NAMESPACE} OUTPUT_SUBDIRECTORY "${output_subfolder}/lib" FILES ${${MY_NAME}_LIB_RUNTIME_DEPENDENCIES})
 

+ 2 - 2
package-system/DirectXShaderCompiler/build_config.json

@@ -1,8 +1,8 @@
 {
    "git_url":"https://github.com/o3de/DirectXShaderCompiler.git",
-   "git_tag":"release-1.6.2112-o3de",
+   "git_tag":"release-1.7.2308-o3de",
    "package_name":"DirectXShaderCompilerDxc",
-   "package_version":"1.6.2112-o3de-rev1",
+   "package_version":"1.7.2308-o3de-rev1",
    "package_url":"https://github.com/o3de/DirectXShaderCompiler",
    "package_license":"NCSA",
    "package_license_file":"LICENSE.TXT",

+ 2 - 2
package_build_list_host_darwin.json

@@ -38,7 +38,7 @@
         "SQLite-3.37.2-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/sqlite --platform-name Mac --package-root ../../package-system --clean",
         "squish-ccr-deb557d-rev1-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Mac --package-root ../../package-system --clean",
         "astc-encoder-3.2-rev5-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/astc-encoder --platform-name Mac --package-root ../../package-system --clean",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Mac --package-root ../../package-system --clean",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Mac --package-root ../../package-system --clean",
         "azslc-1.8.15-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Mac --package-root ../../package-system/azslc/temp --clean",
         "python-3.10.5-rev2-darwin": "package-system/python/build_package_image.py",
         "mcpp-2.7.2_az.2-rev1-mac": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.2-rev1",
@@ -95,7 +95,7 @@
         "SPIRVCross-2021.04.29-rev1-mac": "package-system/SPIRVCross-mac",
         "squish-ccr-deb557d-rev1-mac": "package-system/squish-ccr-mac",
         "astc-encoder-3.2-rev5-mac": "package-system/astc-encoder-mac",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-mac": "package-system/DirectXShaderCompilerDxc-mac",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-mac": "package-system/DirectXShaderCompilerDxc-mac",
         "azslc-1.8.15-rev2-mac": "package-system/azslc/temp/azslc-mac",
         "SQLite-3.37.2-rev2-mac": "package-system/SQLite-mac",
         "xxhash-0.7.4-rev1-multiplatform": "package-system/xxhash-multiplatform",

+ 2 - 2
package_build_list_host_linux-aarch64.json

@@ -11,7 +11,7 @@
         "AWSNativeSDK-1.9.50-rev4-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux-aarch64 --clean",
         "azslc-1.8.15-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Linux-aarch64 --clean",
         "cityhash-1.1-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/cityhash --platform-name Linux-aarch64 --clean",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux-aarch64 --clean",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux-aarch64 --clean",
         "expat-2.4.2-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Linux-aarch64 --clean",
         "freetype-2.11.1-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/freetype --platform-name Linux-aarch64 --clean",
         "googlebenchmark-1.7.0-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/googlebenchmark --platform-name Linux-aarch64 --clean",
@@ -52,7 +52,7 @@
         "AWSNativeSDK-1.9.50-rev4-linux-aarch64": "package-system/AWSNativeSDK/temp/AWSNativeSDK-linux-aarch64",
         "azslc-1.8.15-rev1-linux-aarch64": "package-system/azslc/temp/azslc-linux-aarch64",
         "cityhash-1.1-rev1-linux-aarch64": "package-system/cityhash/temp/cityhash-linux-aarch64",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-linux-aarch64": "package-system/DirectXShaderCompiler/temp/DirectXShaderCompilerDxc-linux-aarch64",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-linux-aarch64": "package-system/DirectXShaderCompiler/temp/DirectXShaderCompilerDxc-linux-aarch64",
         "expat-2.4.2-rev2-linux-aarch64": "package-system/expat/temp/expat-linux-aarch64",
         "freetype-2.11.1-rev1-linux-aarch64": "package-system/freetype/temp/freetype-linux-aarch64",
         "googlebenchmark-1.7.0-rev1-linux-aarch64": "package-system/googlebenchmark/temp/googlebenchmark-linux-aarch64",

+ 2 - 2
package_build_list_host_linux.json

@@ -38,7 +38,7 @@
         "squish-ccr-deb557d-rev1-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Linux --clean",
         "squish-ccr-deb557d-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Linux-aarch64 --clean",
         "astc-encoder-3.2-rev3-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/astc-encoder --platform-name Linux --package-root ../../package-system --clean",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux --package-root ../../package-system --clean",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux --package-root ../../package-system --clean",
         "azslc-1.8.15-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Linux --package-root ../../package-system/azslc/temp --clean",
         "tiff-4.2.0.15-rev3-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Linux --package-root ../../package-system --clean",
         "python-3.10.5-rev4-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/python --platform-name Linux --clean",
@@ -79,7 +79,7 @@
         "squish-ccr-deb557d-rev1-linux": "package-system/squish-ccr/temp/squish-ccr-linux",
         "squish-ccr-deb557d-rev1-linux-aarch64": "package-system/squish-ccr/temp/squish-ccr-linux-aarch64",
         "astc-encoder-3.2-rev3-linux": "package-system/astc-encoder-linux",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-linux": "package-system/DirectXShaderCompilerDxc-linux",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-linux": "package-system/DirectXShaderCompilerDxc-linux",
         "azslc-1.8.15-rev2-linux": "package-system/azslc/temp/azslc-linux",
         "tiff-4.2.0.15-rev3-linux": "package-system/tiff-linux",
         "python-3.10.5-rev4-linux": "package-system/python/temp/python-linux",

+ 2 - 2
package_build_list_host_windows.json

@@ -13,7 +13,7 @@
         "AWSNativeSDK-1.9.50-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Windows --package-root ../../package-system --clean",
         "Blast-v1.1.7_rc2-9-geb169fe-rev2-windows": "package-system/Blast/build_package_image.py --platform-name windows",
         "Crashpad-0.8.0-rev1-windows": "package-system/Crashpad/build_package_image.py",
-        "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Windows --package-root ../../package-system --clean",
+        "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Windows --package-root ../../package-system --clean",
         "expat-2.4.2-rev2-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Android --package-root ../../package-system/expat/temp --clean",
         "expat-2.4.2-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Windows --package-root ../../package-system/expat/temp --clean",
         "freetype-2.11.1-rev1-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/freetype --platform-name Android --package-root ../../package-system/freetype/temp --clean",
@@ -77,7 +77,7 @@
     "cityhash-1.1-multiplatform": "package-system/cityhash-multiplatform",
     "civetweb-1.8-rev1-windows": "package-system/civetweb-windows",
     "Crashpad-0.8.0-rev1-windows": "package-system/Crashpad-windows",
-    "DirectXShaderCompilerDxc-1.6.2112-o3de-rev1-windows": "package-system/DirectXShaderCompilerDxc-windows",
+    "DirectXShaderCompilerDxc-1.7.2308-o3de-rev1-windows": "package-system/DirectXShaderCompilerDxc-windows",
     "d3dx12-headers-rev1-windows": "package-system/d3dx12-windows",
     "expat-2.4.2-rev2-android": "package-system/expat/temp/expat-android",
     "expat-2.4.2-rev2-windows": "package-system/expat/temp/expat-windows",