ソースを参照

Add SPIRV/SpvTools.h back to the public headers

Clean up the includes in SpvTools.h so that it doesn't require any
transitive dependencies and add it back to the headers that get
installed.
Arcady Goldmints-Orlov 1 年間 前
コミット
7e896697dc
4 ファイル変更9 行追加2 行削除
  1. 2 0
      SPIRV/CInterface/spirv_c_interface.cpp
  2. 2 1
      SPIRV/CMakeLists.txt
  3. 1 0
      SPIRV/SpvTools.cpp
  4. 4 1
      SPIRV/SpvTools.h

+ 2 - 0
SPIRV/CInterface/spirv_c_interface.cpp

@@ -32,6 +32,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include "glslang/Include/glslang_c_interface.h"
 #include "glslang/Include/glslang_c_interface.h"
 
 
+#include <cstring>
+#include "glslang/Public/ShaderLang.h"
 #include "SPIRV/GlslangToSpv.h"
 #include "SPIRV/GlslangToSpv.h"
 #include "SPIRV/Logger.h"
 #include "SPIRV/Logger.h"
 #include "SPIRV/SpvTools.h"
 #include "SPIRV/SpvTools.h"

+ 2 - 1
SPIRV/CMakeLists.txt

@@ -76,7 +76,8 @@ set(PUBLIC_HEADERS
     disassemble.h
     disassemble.h
     Logger.h
     Logger.h
     spirv.hpp
     spirv.hpp
-    SPVRemapper.h)
+    SPVRemapper.h
+    SpvTools.h)
 
 
 add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
 add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
 add_library(glslang::SPIRV ALIAS SPIRV)
 add_library(glslang::SPIRV ALIAS SPIRV)

+ 1 - 0
SPIRV/SpvTools.cpp

@@ -44,6 +44,7 @@
 
 
 #include "SpvTools.h"
 #include "SpvTools.h"
 #include "spirv-tools/optimizer.hpp"
 #include "spirv-tools/optimizer.hpp"
+#include "glslang/MachineIndependent/localintermediate.h"
 
 
 namespace glslang {
 namespace glslang {
 
 

+ 4 - 1
SPIRV/SpvTools.h

@@ -44,10 +44,11 @@
 #if ENABLE_OPT
 #if ENABLE_OPT
 #include <vector>
 #include <vector>
 #include <ostream>
 #include <ostream>
+#include <unordered_set>
 #include "spirv-tools/libspirv.h"
 #include "spirv-tools/libspirv.h"
 #endif
 #endif
 
 
-#include "glslang/MachineIndependent/localintermediate.h"
+#include "glslang/MachineIndependent/Versions.h"
 #include "GlslangToSpv.h"
 #include "GlslangToSpv.h"
 #include "Logger.h"
 #include "Logger.h"
 
 
@@ -55,6 +56,8 @@ namespace glslang {
 
 
 #if ENABLE_OPT
 #if ENABLE_OPT
 
 
+class TIntermediate;
+
 // Translate glslang's view of target versioning to what SPIRV-Tools uses.
 // Translate glslang's view of target versioning to what SPIRV-Tools uses.
 spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);
 spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);