소스 검색

[spirv] Update SPIR-V dependencies and disable debug iterators (#574)

Lei Zhang 8 년 전
부모
커밋
f96f92d711
7개의 변경된 파일6개의 추가작업 그리고 13개의 파일을 삭제
  1. 1 3
      cmake/modules/AddLLVM.cmake
  2. 1 0
      external/CMakeLists.txt
  3. 1 1
      external/SPIRV-Headers
  4. 1 1
      external/SPIRV-Tools
  5. 1 1
      external/googletest
  6. 1 1
      external/re2
  7. 0 6
      tools/clang/unittests/HLSL/CompilerTest.cpp

+ 1 - 3
cmake/modules/AddLLVM.cmake

@@ -46,9 +46,7 @@ function(llvm_update_compile_flags name)
       message(ERROR "Unimplemented")
     endif (MSVC)
   endif (LLVM_ENABLE_EH)
-  # Disable debug iterators for faster debug and to remove some additional allocations with improper noexcept attribution.
-  # Currently commented out because SPIR-V libs compile their debug modules with debug iterators.
-  # add_definitions(/D_ITERATOR_DEBUG_LEVEL=0)
+  add_definitions(/D_ITERATOR_DEBUG_LEVEL=0)
   # HLSL Changes End
 
   # Assume that;

+ 1 - 0
external/CMakeLists.txt

@@ -22,6 +22,7 @@ if (${ENABLE_SPIRV_CODEGEN})
   if (IS_DIRECTORY ${DXC_SPIRV_TOOLS_DIR})
     # We only need the library from SPIRV-Tools.
     set(SPIRV_SKIP_EXECUTABLES ON CACHE BOOL "Skip building SPIRV-Tools executables")
+    set(SPIRV_TOOLS_EXTRA_DEFINITIONS /D_ITERATOR_DEBUG_LEVEL=0)
     add_subdirectory(${DXC_SPIRV_TOOLS_DIR} EXCLUDE_FROM_ALL)
   endif()
   if (NOT TARGET SPIRV-Tools)

+ 1 - 1
external/SPIRV-Headers

@@ -1 +1 @@
-Subproject commit 63e1062a194750b354d48be8c16750d7a4d0dc4e
+Subproject commit cd3088edf6258ae7c806686a6cdcba27350137af

+ 1 - 1
external/SPIRV-Tools

@@ -1 +1 @@
-Subproject commit dbc2049aa35a06b160b91fb76820358a17b77bfa
+Subproject commit 768d9b42d38c7562bd42dbc29b22c61046848ee8

+ 1 - 1
external/googletest

@@ -1 +1 @@
-Subproject commit 59c795ce08be0c8b225bc894f8da6c7954ea5c14
+Subproject commit b7e8a993b4125d1083cb431d91407d8ee4dba2ad

+ 1 - 1
external/re2

@@ -1 +1 @@
-Subproject commit b2c9765b4a7afbea8b6be1dae548b6f4d5f39e42
+Subproject commit 971f917a35125c6dcfabf099d5fe9a1e5c383265

+ 0 - 6
tools/clang/unittests/HLSL/CompilerTest.cpp

@@ -193,10 +193,6 @@ bool VersionSupportInfo::SkipDxilVersion(unsigned major, unsigned minor) {
   return false;
 }
 bool VersionSupportInfo::SkipOutOfMemoryTest() {
-  if (m_CompilerIsDebugBuild) { // same detection logic at the moment
-    WEX::Logging::Log::Comment(L"Test skipped due to out-of-memory robustness requirement.");
-    return true;
-  }
   return false;
 }
 
@@ -2533,8 +2529,6 @@ TEST_F(CompilerTest, CompileWhenNoMemThenOOM) {
   // In Debug, without /D_ITERATOR_DEBUG_LEVEL=0, debug iterators will be used;
   // this causes a problem where std::string is specified as noexcept, and yet
   // a sentinel is allocated that may fail and throw.
-  // To run this in Debug without debug iterators, uncomment the following line in cmake/modules/AddLLVM.cmake
-  // add_definitions(/D_ITERATOR_DEBUG_LEVEL=0)
   if (m_ver.SkipOutOfMemoryTest()) return;
 
   // Now, fail each allocation and make sure we get an error.