diff --git a/External/DirectXShaderCompiler.cmake b/External/DirectXShaderCompiler.cmake index 4b4b9ef7..ea80e8cf 100644 --- a/External/DirectXShaderCompiler.cmake +++ b/External/DirectXShaderCompiler.cmake @@ -1,14 +1,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -set(DirectXShaderCompiler_REV "b053bfbaae0d4d14e7d715ebe5592ade82388637") +set(DirectXShaderCompiler_REV "002ed9737e389cebbefd1e8376bff6ad8a642340") -UpdateExternalLib("DirectXShaderCompiler" "https://github.com/Microsoft/DirectXShaderCompiler.git" ${DirectXShaderCompiler_REV} need_patch) -if(need_patch) - foreach(patch "0001-Fix-a-couple-warnings-in-code") - ApplyPatch("DirectXShaderCompiler" "${CMAKE_CURRENT_SOURCE_DIR}/Patches/${patch}.patch") - endforeach() -endif() +UpdateExternalLib("DirectXShaderCompiler" "https://github.com/Microsoft/DirectXShaderCompiler.git" ${DirectXShaderCompiler_REV}) set(ENABLE_SPIRV_CODEGEN ON CACHE BOOL "" FORCE) set(CLANG_ENABLE_ARCMT OFF CACHE BOOL "" FORCE) @@ -17,6 +12,7 @@ set(CLANG_INCLUDE_TESTS OFF CACHE BOOL "" FORCE) set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "" FORCE) set(HLSL_INCLUDE_TESTS OFF CACHE BOOL "" FORCE) set(HLSL_BUILD_DXILCONV OFF CACHE BOOL "" FORCE) +set(HLSL_SUPPORT_QUERY_GIT_COMMIT_INFO OFF CACHE BOOL "" FORCE) set(LLVM_TARGETS_TO_BUILD "None" CACHE STRING "" FORCE) set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "" FORCE) set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE) @@ -61,7 +57,7 @@ foreach(target "LLVMLinker" "LLVMLTO" "LLVMMSSupport" "LLVMOption" "LLVMPasses" "LLVMPassPrinters" "LLVMProfileData" "LLVMScalarOpts" "LLVMSupport" "LLVMTableGen" "LLVMTarget" "LLVMTransformUtils" "LLVMVectorize" "ClangDriverOptions" "DxcEtw" "intrinsics_gen" "TablegenHLSLOptions" - "clang-tblgen" "GIT_COMMIT_INFO_ALWAYS_REBUILD" "llvm-tblgen" "hlsl_dxcversion_autogen" "hlsl_version_autogen") + "clang-tblgen" "llvm-tblgen" "hlsl_dxcversion_autogen" "hlsl_version_autogen") get_target_property(vsFolder ${target} FOLDER) if(NOT vsFolder) set(vsFolder "") diff --git a/External/Patches/0001-Fix-a-couple-warnings-in-code.patch b/External/Patches/0001-Fix-a-couple-warnings-in-code.patch deleted file mode 100644 index d871be88..00000000 --- a/External/Patches/0001-Fix-a-couple-warnings-in-code.patch +++ /dev/null @@ -1,39 +0,0 @@ -From ff8411aad557d35436272cc7175d211009982151 Mon Sep 17 00:00:00 2001 -From: Minmin Gong -Date: Wed, 4 Mar 2020 19:04:38 -0800 -Subject: [PATCH] Fix a couple warnings in code - -1. A warning about unused "group" variable -2. A CMake warning about unmatched if and endif ---- - lib/HLSL/HLOperationLower.cpp | 4 +--- - projects/CMakeLists.txt | 2 +- - 2 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/lib/HLSL/HLOperationLower.cpp b/lib/HLSL/HLOperationLower.cpp -index 33151e1e..eb080fd9 100644 ---- a/lib/HLSL/HLOperationLower.cpp -+++ b/lib/HLSL/HLOperationLower.cpp -@@ -108,9 +108,7 @@ public: - - void MarkHasCounter(Value *handle, Type *i8Ty) { - CallInst *CIHandle = cast(handle); -- hlsl::HLOpcodeGroup group = -- hlsl::GetHLOpcodeGroup(CIHandle->getCalledFunction()); -- DXASSERT(group == HLOpcodeGroup::HLAnnotateHandle, "else invalid handle"); -+ DXASSERT(hlsl::GetHLOpcodeGroup(CIHandle->getCalledFunction()) == HLOpcodeGroup::HLAnnotateHandle, "else invalid handle"); - // Mark has counter for the input handle. - Value *counterHandle = - CIHandle->getArgOperand(HLOperandIndex::kAnnotateHandleHandleOpIdx); -diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt -index 2e424938..13e4e733 100644 ---- a/projects/CMakeLists.txt -+++ b/projects/CMakeLists.txt -@@ -1,3 +1,3 @@ - if(WIN32 AND HLSL_BUILD_DXILCONV) - add_subdirectory(dxilconv) --endif (WIN32) -+endif (WIN32 AND HLSL_BUILD_DXILCONV) --- -2.17.1.windows.2 - diff --git a/External/SPIRV-Cross.cmake b/External/SPIRV-Cross.cmake index 8c2594cb..0664fab4 100644 --- a/External/SPIRV-Cross.cmake +++ b/External/SPIRV-Cross.cmake @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -set(SPIRV_Cross_REV "d19f30a90eff98fb4c33a2f24b05699c7de87ecb") +set(SPIRV_Cross_REV "1ad1662a2b4a41ed0076750b0cc2732cb89a19e8") UpdateExternalLib("SPIRV-Cross" "https://github.com/KhronosGroup/SPIRV-Cross.git" ${SPIRV_Cross_REV}) diff --git a/External/SPIRV-Header.cmake b/External/SPIRV-Header.cmake index 00a58b74..05385f16 100644 --- a/External/SPIRV-Header.cmake +++ b/External/SPIRV-Header.cmake @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -set(SPIRV_Headers_REV "5dbc1c32182e17b8ab8e8158a802ecabaf35aad3") +set(SPIRV_Headers_REV "f8bf11a0253a32375c32cad92c841237b96696c0") UpdateExternalLib("SPIRV-Headers" "https://github.com/KhronosGroup/SPIRV-Headers.git" ${SPIRV_Headers_REV}) diff --git a/External/SPIRV-Tools.cmake b/External/SPIRV-Tools.cmake index 6c51a928..89300bef 100644 --- a/External/SPIRV-Tools.cmake +++ b/External/SPIRV-Tools.cmake @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -set(SPIRV_Tools_REV "70f888131ede3d267cb19a413c9fef3fc51ccc22") +set(SPIRV_Tools_REV "fd773eb50d628c1981338addc093df879757c2cf") UpdateExternalLib("SPIRV-Tools" "https://github.com/KhronosGroup/SPIRV-Tools.git" ${SPIRV_Tools_REV}) diff --git a/Source/Tests/Data/Expected/DetailTessellation_HS.msl b/Source/Tests/Data/Expected/DetailTessellation_HS.msl index b2239276..ae523267 100644 --- a/Source/Tests/Data/Expected/DetailTessellation_HS.msl +++ b/Source/Tests/Data/Expected/DetailTessellation_HS.msl @@ -73,7 +73,7 @@ struct main0_in float3 in_var_LIGHTVECTORTS [[attribute(3)]]; }; -kernel void main0(main0_in in [[stage_in]], constant type_cbMain& cbMain [[buffer(0)]], uint gl_InvocationID [[thread_index_in_threadgroup]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) +kernel void main0(main0_in in [[stage_in]], constant type_cbMain& cbMain [[buffer(0)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) { device main0_out* gl_out = &spvOut[gl_PrimitiveID * 3]; if (gl_InvocationID < spvIndirectParams[0])