Update glslang and spirv-tools to support specialization constants
authorMaciej Jesionowski <maciej.jesionowski@mobica.com>
Thu, 7 Apr 2016 07:47:44 +0000 (09:47 +0200)
committerMaciej Jesionowski <maciej.jesionowski@mobica.com>
Mon, 18 Apr 2016 07:49:44 +0000 (09:49 +0200)
external/fetch_sources.py
external/glslang/CMakeLists.txt
external/vulkancts/framework/vulkan/vkSpirVAsm.cpp

index 67024d5..fe5f96e 100644 (file)
@@ -170,11 +170,11 @@ PACKAGES = [
                postExtract = postExtractLibpng),
        GitRepo(
                "https://github.com/KhronosGroup/SPIRV-Tools.git",
-               "f7e63786a919040cb2e0e572d960a0650f2c2881",
+               "7649c7362d9b7622399fa0ead24de836b0c7540e",
                "spirv-tools"),
        GitRepo(
                "https://github.com/KhronosGroup/glslang.git",
-               "5639f3aca5b75cbe5419a623eecf5e3794fab917",
+               "7e3e48634429785092ef872068a95ef7834e50c8",
                "glslang"),
 ]
 
index 7c040e3..9ad57e0 100644 (file)
@@ -31,6 +31,7 @@ if (EXISTS ${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/CodeGen.cpp)
                ${GLSLANG_ABS_PATH}/glslang/OSDependent
                ${GLSLANG_ABS_PATH}/OGLCompilersDLL
                ${GLSLANG_ABS_PATH}/SPIRV
+               ${GLSLANG_ABS_PATH}/hlsl
                )
 
        set(GLSLANG_SRCS
@@ -70,6 +71,10 @@ if (EXISTS ${GLSLANG_ABS_PATH}/glslang/GenericCodeGen/CodeGen.cpp)
                ${GLSLANG_ABS_PATH}/SPIRV/doc.cpp
                ${GLSLANG_ABS_PATH}/SPIRV/disassemble.cpp
 
+               ${GLSLANG_ABS_PATH}/hlsl/hlslGrammar.cpp
+               ${GLSLANG_ABS_PATH}/hlsl/hlslParseHelper.cpp
+               ${GLSLANG_ABS_PATH}/hlsl/hlslScanContext.cpp
+
                osinclude.cpp
                )
 
index db39634..1c13aeb 100644 (file)
@@ -39,9 +39,11 @@ using std::vector;
 
 #if defined(DEQP_HAVE_SPIRV_TOOLS)
 
+static const spv_target_env s_defaultEnvironment = SPV_ENV_VULKAN_1_0;
+
 bool assembleSpirV (const SpirVAsmSource* program, std::vector<deUint32>* dst, SpirVProgramInfo* buildInfo)
 {
-       const spv_context       context         = spvContextCreate();
+       const spv_context       context         = spvContextCreate(s_defaultEnvironment);
        spv_binary                      binary          = DE_NULL;
        spv_diagnostic          diagnostic      = DE_NULL;
 
@@ -80,7 +82,7 @@ bool assembleSpirV (const SpirVAsmSource* program, std::vector<deUint32>* dst, S
 
 void disassembleSpirV (size_t binarySizeInWords, const deUint32* binary, std::ostream* dst)
 {
-       const spv_context       context         = spvContextCreate();
+       const spv_context       context         = spvContextCreate(s_defaultEnvironment);
        spv_text                        text            = DE_NULL;
        spv_diagnostic          diagnostic      = DE_NULL;
 
@@ -112,7 +114,7 @@ void disassembleSpirV (size_t binarySizeInWords, const deUint32* binary, std::os
 
 bool validateSpirV (size_t binarySizeInWords, const deUint32* binary, std::ostream* infoLog)
 {
-       const spv_context       context         = spvContextCreate();
+       const spv_context       context         = spvContextCreate(s_defaultEnvironment);
        spv_diagnostic          diagnostic      = DE_NULL;
 
        try