Update SPIR-V Tools, SPIR-V Headers and glslang
authorNeil Henning <neil@codeplay.com>
Mon, 14 Aug 2017 12:12:10 +0000 (13:12 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Mon, 18 Sep 2017 15:19:40 +0000 (11:19 -0400)
David Neto has kindly produced vulkan-1.1-dev branches for SPIR-V Tools
and SPIR-V Headers that match SPIR-V 1.3 functionality. This commit
updates us to those changelists.

In tandem I also updated glslang to the master commit on gitlab - this
is the tracking branch for Vulkan 1.1. Glslang had changed some of the
files, so I took the liberty of cleaning up the include process for
glslang to try and mitigate any future additions/removal of files, by
defensively setting some of glslang's CMake options to disable
functionality, and renaming glslang_library -> glslang_libraries to
include the 3 libraries the CTS depends on.

Components: Vulkan

Change-Id: I1a47ff96adbbcab5a89e7b9805ba53f783ecc693
(cherry picked from commit c4bf8571ff93212f7f07124531e144d6520dafda)

external/fetch_sources.py
external/glslang/CMakeLists.txt
external/vulkancts/framework/vulkan/CMakeLists.txt

index 3ebc186..7bc42e1 100644 (file)
@@ -252,17 +252,17 @@ PACKAGES = [
        GitRepo(
                "https://gitlab.khronos.org/spirv/spirv-tools.git",
                "git@gitlab.khronos.org:spirv/spirv-tools.git",
-               "5ef1440f3ec5a5fc6e5cf368383c4b1ae323f0f8",
+               "4e4e306927c311fcf58db30ea852c5eae306a87f",
                "spirv-tools"),
        GitRepo(
                "https://gitlab.khronos.org/GLSL/glslang.git",
                "git@gitlab.khronos.org:GLSL/glslang.git",
-               "bac5d60bdf5df38bc4d3d58379aa6efc45f1ea83",
+               "e8dd330c430e176592b7f475c32cad0b60c6db4e",
                "glslang"),
        GitRepo(
                "https://gitlab.khronos.org/spirv/SPIRV-Headers.git",
                "git@gitlab.khronos.org:spirv/SPIRV-Headers.git",
-               "73a7a9e467b42ca696e9c1f1b4ea37776c79b9f8",
+               "ef6cb7b4e04cc15870fdc0874ec2ee33766980c9",
                "spirv-headers"),
 ]
 
index f97fe4e..94f8189 100644 (file)
@@ -21,87 +21,23 @@ endif ()
 if (EXISTS ${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/CodeGen.cpp)
        message(STATUS "glslang found; building with DEQP_SUPPORT_GLSLANG")
 
-       include_directories(
-               ${GLSLANG_ABS_PATH}
-               ${GLSLANG_ABS_PATH}/glslang
-               ${GLSLANG_ABS_PATH}/glslang/Include
-               ${GLSLANG_ABS_PATH}/glslang/Public
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent
-               ${GLSLANG_ABS_PATH}/glslang/GenericCodeGen
-               ${GLSLANG_ABS_PATH}/glslang/OSDependent
-               ${GLSLANG_ABS_PATH}/hlsl
-               ${GLSLANG_ABS_PATH}/OGLCompilersDLL
-               ${GLSLANG_ABS_PATH}/SPIRV
-               )
+       # Disable glslang install as part of cmake install.
+       set(SKIP_GLSLANG_INSTALL OFF CACHE BOOL "" FORCE)
 
-       set(GLSLANG_SRCS
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Constant.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/glslang_tab.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/InfoSink.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Initialize.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Intermediate.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/intermOut.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/iomapper.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/IntermTraverse.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/limits.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/linkValidate.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/parseConst.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/ParseContextBase.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/ParseHelper.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/PoolAlloc.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/propagateNoContraction.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/reflection.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/RemoveTree.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Scan.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/ShaderLang.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/SymbolTable.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/Versions.cpp
-
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpAtom.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpContext.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/Pp.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpScanner.cpp
-               ${GLSLANG_ABS_PATH}/glslang/MachineIndependent/preprocessor/PpTokens.cpp
-
-               ${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/CodeGen.cpp
-               ${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/Link.cpp
-
-               ${GLSLANG_ABS_PATH}/OGLCompilersDLL/InitializeDll.cpp
-
-               ${GLSLANG_ABS_PATH}/hlsl/hlslAttributes.cpp
-               ${GLSLANG_ABS_PATH}/hlsl/hlslGrammar.cpp
-               ${GLSLANG_ABS_PATH}/hlsl/hlslOpMap.cpp
-               ${GLSLANG_ABS_PATH}/hlsl/hlslParseables.cpp
-               ${GLSLANG_ABS_PATH}/hlsl/hlslParseHelper.cpp
-               ${GLSLANG_ABS_PATH}/hlsl/hlslScanContext.cpp
-               ${GLSLANG_ABS_PATH}/hlsl/hlslTokenStream.cpp
-
-               ${GLSLANG_ABS_PATH}/SPIRV/disassemble.cpp
-               ${GLSLANG_ABS_PATH}/SPIRV/doc.cpp
-               ${GLSLANG_ABS_PATH}/SPIRV/GlslangToSpv.cpp
-               ${GLSLANG_ABS_PATH}/SPIRV/InReadableOrder.cpp
-               ${GLSLANG_ABS_PATH}/SPIRV/Logger.cpp
-               ${GLSLANG_ABS_PATH}/SPIRV/SpvBuilder.cpp
-               ${GLSLANG_ABS_PATH}/SPIRV/SPVRemapper.cpp
-
-               osinclude.cpp
-               )
+       # Do not build glslang binaries.
+       set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "" FORCE)
 
+       # Overwrite the CMake flags for glslang with the our 3rd party ones.
        set(CMAKE_C_FLAGS       ${DE_3RD_PARTY_C_FLAGS})
        set(CMAKE_CXX_FLAGS     ${DE_3RD_PARTY_CXX_FLAGS})
 
-       if (DE_COMPILER_IS_GCC OR DE_COMPILER_IS_CLANG)
-               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-       endif ()
-
-       add_library(glslang STATIC ${GLSLANG_SRCS})
-       target_link_libraries(glslang dethread ${ZLIB_LIBRARY})
+       add_subdirectory(${GLSLANG_ABS_PATH})
 
        add_definitions(-DENABLE_HLSL)
 
-       set(GLSLANG_INCLUDE_PATH        ${GLSLANG_ABS_PATH}     PARENT_SCOPE)
-       set(GLSLANG_LIBRARY                     glslang                         PARENT_SCOPE)
-       set(DEQP_HAVE_GLSLANG           ON                                      PARENT_SCOPE)
+       set(GLSLANG_INCLUDE_PATH        ${GLSLANG_ABS_PATH}                     PARENT_SCOPE)
+       set(GLSLANG_LIBRARIES           glslang SPIRV SPVRemapper       PARENT_SCOPE)
+       set(DEQP_HAVE_GLSLANG           ON                                                      PARENT_SCOPE)
 
 else ()
        message(STATUS "glslang not found; GLSL to SPIR-V compilation not available")
index dc94d63..39313f9 100644 (file)
@@ -74,7 +74,7 @@ if (DEQP_HAVE_GLSLANG)
                        PROPERTIES COMPILE_FLAGS "${DE_3RD_PARTY_CXX_FLAGS} -std=c++11")
        endif ()
 
-       set(VKUTIL_LIBS ${VKUTIL_LIBS} ${GLSLANG_LIBRARY})
+       set(VKUTIL_LIBS ${VKUTIL_LIBS} ${GLSLANG_LIBRARIES})
 endif ()
 
 if(DEQP_HAVE_SPIRV_TOOLS)