Browse Source

Updated glslang.

Бранимир Караџић 6 years ago
parent
commit
f50315c955

+ 1 - 1
3rdparty/glslang/OGLCompilersDLL/CMakeLists.txt

@@ -11,5 +11,5 @@ endif(WIN32)
 if(ENABLE_GLSLANG_INSTALL)
     install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
             ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-	install(EXPORT OGLCompilerTargets DESTINATION lib/cmake)
+	install(EXPORT OGLCompilerTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 endif(ENABLE_GLSLANG_INSTALL)

+ 6 - 3
3rdparty/glslang/SPIRV/CMakeLists.txt

@@ -36,7 +36,7 @@ set(SPVREMAP_HEADERS
 add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
 set_property(TARGET SPIRV PROPERTY FOLDER glslang)
 set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_include_directories(SPIRV PUBLIC 
+target_include_directories(SPIRV PUBLIC
 	$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
 	$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
 
@@ -91,8 +91,11 @@ if(ENABLE_GLSLANG_INSTALL)
                 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()
 
-    install(EXPORT SPVRemapperTargets DESTINATION lib/cmake)
-    install(EXPORT SPIRVTargets DESTINATION lib/cmake)
+    if (ENABLE_SPVREMAPPER)
+        install(EXPORT SPVRemapperTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+    endif()
+
+    install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 
     install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
     install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)

+ 22 - 15
3rdparty/glslang/StandAlone/CMakeLists.txt

@@ -9,21 +9,20 @@ target_include_directories(glslang-default-resource-limits
 
 
 set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
-set(REMAPPER_SOURCES spirv-remap.cpp)
 
 add_executable(glslangValidator ${SOURCES})
-add_executable(spirv-remap ${REMAPPER_SOURCES})
 set_property(TARGET glslangValidator PROPERTY FOLDER tools)
-set_property(TARGET spirv-remap PROPERTY FOLDER tools)
 glslang_set_link_args(glslangValidator)
-glslang_set_link_args(spirv-remap)
 
 set(LIBRARIES
     glslang
     SPIRV
-    SPVRemapper
     glslang-default-resource-limits)
 
+if(ENABLE_SPVREMAPPER)
+    set(LIBRARIES ${LIBRARIES} SPVRemapper)
+endif()
+
 if(WIN32)
     set(LIBRARIES ${LIBRARIES} psapi)
 elseif(UNIX)
@@ -33,10 +32,17 @@ elseif(UNIX)
 endif(WIN32)
 
 target_link_libraries(glslangValidator ${LIBRARIES})
-target_link_libraries(spirv-remap ${LIBRARIES})
-target_include_directories(glslangValidator PUBLIC 
-	$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
-	$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+target_include_directories(glslangValidator PUBLIC
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
+    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+
+if(ENABLE_SPVREMAPPER)
+    set(REMAPPER_SOURCES spirv-remap.cpp)
+    add_executable(spirv-remap ${REMAPPER_SOURCES})
+    set_property(TARGET spirv-remap PROPERTY FOLDER tools)
+    glslang_set_link_args(spirv-remap)
+    target_link_libraries(spirv-remap ${LIBRARIES})
+endif()
 
 if(WIN32)
     source_group("Source" FILES ${SOURCES})
@@ -45,16 +51,17 @@ endif(WIN32)
 if(ENABLE_GLSLANG_INSTALL)
     install(TARGETS glslangValidator EXPORT glslangValidatorTargets
             RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+    install(EXPORT glslangValidatorTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 
-    install(TARGETS spirv-remap EXPORT spirv-remapTargets
+    if(ENABLE_SPVREMAPPER)
+        install(TARGETS spirv-remap EXPORT spirv-remapTargets
             RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-	
-	install(EXPORT glslangValidatorTargets DESTINATION lib/cmake)
-	install(EXPORT spirv-remapTargets DESTINATION lib/cmake)
-            
+        install(EXPORT spirv-remapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+    endif()
+
     if(BUILD_SHARED_LIBS)
         install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
                 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-		install(EXPORT glslang-default-resource-limitsTargets DESTINATION lib/cmake)
+        install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
     endif()
 endif(ENABLE_GLSLANG_INSTALL)

+ 3 - 0
3rdparty/glslang/Test/100.frag

@@ -219,6 +219,9 @@ int init1 = gl_FrontFacing ? 1 : 2; // ERROR, non-const initializer
 
 int init2 = gl_FrontFacing ? 1 : 2;
 
+#define A__B // error
+int a__b;    // error
+
 #pragma STDGL invariant(all)
 
 #line 3000

+ 5 - 1
3rdparty/glslang/Test/baseResults/100.frag.out

@@ -83,9 +83,11 @@ ERROR: 0:193: '.length' : not supported for this version or the enabled extensio
 ERROR: 0:194: '.' : cannot apply to an array: method
 ERROR: 0:194: 'a' : can't use function syntax on variable 
 ERROR: 0:214: 'non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)' : not supported for this version or the enabled extensions 
+ERROR: 0:222: '#define' : names containing consecutive underscores are reserved, and an error if version < 300: A__B
+ERROR: 0:223: 'a__b' : identifiers containing consecutive underscores ("__") are reserved, and an error if version < 300 
 ERROR: 0:3000: '#error' : line of this error should be 3000  
 ERROR: 0:3002: '' :  syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
-ERROR: 77 compilation errors.  No code generated.
+ERROR: 79 compilation errors.  No code generated.
 
 
 Shader version: 100
@@ -421,6 +423,7 @@ ERROR: node is still EOpNull!
 0:?       5.000000
 0:?     'init1' ( global mediump int)
 0:?     'init2' ( global mediump int)
+0:?     'a__b' ( global mediump int)
 
 
 Linked fragment stage:
@@ -573,4 +576,5 @@ ERROR: node is still EOpNull!
 0:?       5.000000
 0:?     'init1' ( global mediump int)
 0:?     'init2' ( global mediump int)
+0:?     'a__b' ( global mediump int)
 

+ 3 - 3
3rdparty/glslang/Test/baseResults/300BuiltIns.frag.out

@@ -1,9 +1,9 @@
 300BuiltIns.frag
 ERROR: 0:6: 'float' : type requires declaration of default precision qualifier 
 ERROR: 0:70: 'noise2' : no matching overloaded function found 
-ERROR: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved, and an error if version <= 300 
-ERROR: 0:75: '#define' : names containing consecutive underscores are reserved, and an error if version <= 300: __D
-ERROR: 4 compilation errors.  No code generated.
+WARNING: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved 
+WARNING: 0:75: '#define' : names containing consecutive underscores are reserved: __D
+ERROR: 2 compilation errors.  No code generated.
 
 
 Shader version: 300

+ 82 - 0
3rdparty/glslang/Test/baseResults/spv.8bit-16bit-construction.frag.out

@@ -0,0 +1,82 @@
+spv.8bit-16bit-construction.frag
+Validation failed
+// Module Version 10000
+// Generated by (magic number): 80008
+// Id's are bound by 43
+
+                              Capability Shader
+                              Capability StorageUniformBufferBlock16
+                              Capability UniformAndStorageBuffer8BitAccess
+                              Extension  "SPV_KHR_16bit_storage"
+                              Extension  "SPV_KHR_8bit_storage"
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main"
+                              ExecutionMode 4 OriginUpperLeft
+                              Source GLSL 450
+                              SourceExtension  "GL_EXT_shader_16bit_storage"
+                              SourceExtension  "GL_EXT_shader_8bit_storage"
+                              Name 4  "main"
+                              Name 11  "B"
+                              MemberName 11(B) 0  "i8_from_i16"
+                              MemberName 11(B) 1  "i16_from_i8"
+                              MemberName 11(B) 2  "u8_from_u16"
+                              MemberName 11(B) 3  "u16_from_u8"
+                              MemberName 11(B) 4  "f16_from_i8"
+                              Name 13  ""
+                              MemberDecorate 11(B) 0 Offset 0
+                              MemberDecorate 11(B) 1 Offset 2
+                              MemberDecorate 11(B) 2 Offset 4
+                              MemberDecorate 11(B) 3 Offset 6
+                              MemberDecorate 11(B) 4 Offset 8
+                              Decorate 11(B) BufferBlock
+                              Decorate 13 DescriptorSet 0
+                              Decorate 13 Binding 0
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeInt 8 1
+               7:             TypeInt 16 1
+               8:             TypeInt 8 0
+               9:             TypeInt 16 0
+              10:             TypeFloat 16
+           11(B):             TypeStruct 6(int8_t) 7(int16_t) 8(int8_t) 9(int16_t) 10(float16_t)
+              12:             TypePointer Uniform 11(B)
+              13:     12(ptr) Variable Uniform
+              14:             TypeInt 32 1
+              15:     14(int) Constant 0
+              16:     14(int) Constant 1
+              19:             TypePointer Uniform 6(int8_t)
+              23:             TypePointer Uniform 7(int16_t)
+              25:     14(int) Constant 2
+              26:             TypeInt 32 0
+              27:     26(int) Constant 1
+              30:             TypePointer Uniform 8(int8_t)
+              32:     14(int) Constant 3
+              35:             TypePointer Uniform 9(int16_t)
+              37:     14(int) Constant 4
+              39:             TypeFloat 32
+              41:             TypePointer Uniform 10(float16_t)
+         4(main):           2 Function None 3
+               5:             Label
+              17:  7(int16_t) SConvert 16
+              18:   6(int8_t) SConvert 17
+              20:     19(ptr) AccessChain 13 15
+                              Store 20 18
+              21:   6(int8_t) SConvert 16
+              22:  7(int16_t) SConvert 21
+              24:     23(ptr) AccessChain 13 16
+                              Store 24 22
+              28:  9(int16_t) UConvert 27
+              29:   8(int8_t) UConvert 28
+              31:     30(ptr) AccessChain 13 25
+                              Store 31 29
+              33:   8(int8_t) UConvert 27
+              34:  9(int16_t) UConvert 33
+              36:     35(ptr) AccessChain 13 32
+                              Store 36 34
+              38:   6(int8_t) SConvert 16
+              40:10(float16_t) FConvert 38
+              42:     41(ptr) AccessChain 13 37
+                              Store 42 40
+                              Return
+                              FunctionEnd

+ 22 - 0
3rdparty/glslang/Test/spv.8bit-16bit-construction.frag

@@ -0,0 +1,22 @@
+#version 450 core
+
+#extension GL_EXT_shader_8bit_storage : enable
+#extension GL_EXT_shader_16bit_storage : enable
+
+buffer B
+{
+    int8_t i8_from_i16;
+    int16_t i16_from_i8;
+    uint8_t u8_from_u16;
+    uint16_t u16_from_u8;
+    float16_t f16_from_i8;
+};
+
+void main()
+{
+    i8_from_i16 = int8_t(int16_t(1));
+    i16_from_i8 = int16_t(int8_t(1));
+    u8_from_u16 = uint8_t(uint16_t(1));
+    u16_from_u8 = uint16_t(uint8_t(1));
+    f16_from_i8 = float16_t(int8_t(1));
+}

+ 1 - 1
3rdparty/glslang/glslang/CMakeLists.txt

@@ -112,7 +112,7 @@ if(ENABLE_GLSLANG_INSTALL)
         install(TARGETS glslang EXPORT glslangTargets
                 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()
-	install(EXPORT glslangTargets DESTINATION lib/cmake)
+	install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 endif(ENABLE_GLSLANG_INSTALL)
 
 if(ENABLE_GLSLANG_INSTALL)

+ 1 - 1
3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp

@@ -6331,7 +6331,7 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
     //============================================================================
 
     TString& s = commonBuiltins;
-    const int maxSize = 80;
+    const int maxSize = 200;
     char builtInConstant[maxSize];
 
     //

+ 48 - 18
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp

@@ -2,7 +2,7 @@
 // Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
 // Copyright (C) 2012-2015 LunarG, Inc.
 // Copyright (C) 2015-2018 Google, Inc.
-// Copyright (C) 2017 ARM Limited.
+// Copyright (C) 2017, 2019 ARM Limited.
 //
 // All rights reserved.
 //
@@ -2669,14 +2669,14 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
         if (builtInName(identifier))
             error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), "");
 
-        // "__" are not supposed to be an error.  ES 310 (and desktop) added the clarification:
+        // "__" are not supposed to be an error.  ES 300 (and desktop) added the clarification:
         // "In addition, all identifiers containing two consecutive underscores (__) are
         // reserved; using such a name does not itself result in an error, but may result
         // in undefined behavior."
         // however, before that, ES tests required an error.
         if (identifier.find("__") != TString::npos) {
-            if (isEsProfile() && version <= 300)
-                error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version <= 300", identifier.c_str(), "");
+            if (isEsProfile() && version < 300)
+                error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version < 300", identifier.c_str(), "");
             else
                 warn(loc, "identifiers containing consecutive underscores (\"__\") are reserved", identifier.c_str(), "");
         }
@@ -2688,7 +2688,7 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
 //
 void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* identifier, const char* op)
 {
-    // "__" are not supposed to be an error.  ES 310 (and desktop) added the clarification:
+    // "__" are not supposed to be an error.  ES 300 (and desktop) added the clarification:
     // "All macro names containing two consecutive underscores ( __ ) are reserved;
     // defining such a name does not itself result in an error, but may result in
     // undefined behavior.  All macro names prefixed with "GL_" ("GL" followed by a
@@ -2706,8 +2706,8 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
              strcmp(identifier, "__VERSION__") == 0))
             ppError(loc, "predefined names can't be (un)defined:", op,  identifier);
         else {
-            if (isEsProfile() && version <= 300)
-                ppError(loc, "names containing consecutive underscores are reserved, and an error if version <= 300:", op, identifier);
+            if (isEsProfile() && version < 300)
+                ppError(loc, "names containing consecutive underscores are reserved, and an error if version < 300:", op, identifier);
             else
                 ppWarn(loc, "names containing consecutive underscores are reserved:", op, identifier);
         }
@@ -6922,7 +6922,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
     // This avoids requesting a matrix of a new type that is going to be discarded anyway.
     // TODO: This could be generalized to more type combinations, but that would require
     // more extensive testing and full algorithm rework. For now, the need to do two changes makes
-    // the recursive call work, and avoids the most aggregious case of creating integer matrices.
+    // the recursive call work, and avoids the most egregious case of creating integer matrices.
     if (node->getType().isMatrix() && (type.isScalar() || type.isVector()) &&
             type.isFloatingDomain() != node->getType().isFloatingDomain()) {
         TType transitionType(node->getBasicType(), glslang::EvqTemporary, type.getVectorSize(), 0, 0, node->isVector());
@@ -7017,8 +7017,14 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
         if (!intermediate.getArithemeticFloat16Enabled()) {
             TType tempType(EbtFloat, EvqTemporary, type.getVectorSize());
             newNode = node;
-            if (tempType != newNode->getType())
-                newNode = intermediate.setAggregateOperator(newNode, (TOperator)(EOpConstructVec2 + op - EOpConstructF16Vec2), tempType, node->getLoc());
+            if (tempType != newNode->getType()) {
+                TOperator aggregateOp;
+                if (op == EOpConstructFloat16)
+                    aggregateOp = EOpConstructFloat;
+                else
+                    aggregateOp = (TOperator)(EOpConstructVec2 + op - EOpConstructF16Vec2);
+                newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc());
+            }
             newNode = intermediate.addConversion(EbtFloat16, newNode);
             return newNode;
         }
@@ -7034,8 +7040,14 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
         if (!intermediate.getArithemeticInt8Enabled()) {
             TType tempType(EbtInt, EvqTemporary, type.getVectorSize());
             newNode = node;
-            if (tempType != newNode->getType())
-                newNode = intermediate.setAggregateOperator(newNode, (TOperator)(EOpConstructIVec2 + op - EOpConstructI8Vec2), tempType, node->getLoc());
+            if (tempType != newNode->getType()) {
+                TOperator aggregateOp;
+                if (op == EOpConstructInt8)
+                    aggregateOp = EOpConstructInt;
+                else
+                    aggregateOp = (TOperator)(EOpConstructIVec2 + op - EOpConstructI8Vec2);
+                newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc());
+            }
             newNode = intermediate.addConversion(EbtInt8, newNode);
             return newNode;
         }
@@ -7051,8 +7063,14 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
         if (!intermediate.getArithemeticInt8Enabled()) {
             TType tempType(EbtUint, EvqTemporary, type.getVectorSize());
             newNode = node;
-            if (tempType != newNode->getType())
-                newNode = intermediate.setAggregateOperator(newNode, (TOperator)(EOpConstructUVec2 + op - EOpConstructU8Vec2), tempType, node->getLoc());
+            if (tempType != newNode->getType()) {
+                TOperator aggregateOp;
+                if (op == EOpConstructUint8)
+                    aggregateOp = EOpConstructUint;
+                else
+                    aggregateOp = (TOperator)(EOpConstructUVec2 + op - EOpConstructU8Vec2);
+                newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc());
+            }
             newNode = intermediate.addConversion(EbtUint8, newNode);
             return newNode;
         }
@@ -7068,8 +7086,14 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
         if (!intermediate.getArithemeticInt16Enabled()) {
             TType tempType(EbtInt, EvqTemporary, type.getVectorSize());
             newNode = node;
-            if (tempType != newNode->getType())
-                newNode = intermediate.setAggregateOperator(newNode, (TOperator)(EOpConstructIVec2 + op - EOpConstructI16Vec2), tempType, node->getLoc());
+            if (tempType != newNode->getType()) {
+                TOperator aggregateOp;
+                if (op == EOpConstructInt16)
+                    aggregateOp = EOpConstructInt;
+                else
+                    aggregateOp = (TOperator)(EOpConstructIVec2 + op - EOpConstructI16Vec2);
+                newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc());
+            }
             newNode = intermediate.addConversion(EbtInt16, newNode);
             return newNode;
         }
@@ -7085,8 +7109,14 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
         if (!intermediate.getArithemeticInt16Enabled()) {
             TType tempType(EbtUint, EvqTemporary, type.getVectorSize());
             newNode = node;
-            if (tempType != newNode->getType())
-                newNode = intermediate.setAggregateOperator(newNode, (TOperator)(EOpConstructUVec2 + op - EOpConstructU16Vec2), tempType, node->getLoc());
+            if (tempType != newNode->getType()) {
+                TOperator aggregateOp;
+                if (op == EOpConstructUint16)
+                    aggregateOp = EOpConstructUint;
+                else
+                    aggregateOp = (TOperator)(EOpConstructUVec2 + op - EOpConstructU16Vec2);
+                newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc());
+            }
             newNode = intermediate.addConversion(EbtUint16, newNode);
             return newNode;
         }

+ 1 - 1
3rdparty/glslang/glslang/OSDependent/Unix/CMakeLists.txt

@@ -22,5 +22,5 @@ endif()
 if(ENABLE_GLSLANG_INSTALL)
     install(TARGETS OSDependent EXPORT OSDependentTargets
             ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-	install(EXPORT OSDependentTargets DESTINATION lib/cmake)
+	install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 endif(ENABLE_GLSLANG_INSTALL)

+ 1 - 1
3rdparty/glslang/glslang/OSDependent/Windows/CMakeLists.txt

@@ -17,5 +17,5 @@ endif(WIN32)
 if(ENABLE_GLSLANG_INSTALL)
     install(TARGETS OSDependent EXPORT OSDependentTargets
             ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-	install(EXPORT OSDependentTargets DESTINATION lib/cmake)
+	install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 endif(ENABLE_GLSLANG_INSTALL)

+ 12 - 5
3rdparty/glslang/gtests/CMakeLists.txt

@@ -20,10 +20,12 @@ if(BUILD_TESTING)
             ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.Vk.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp)
 
-            # -- Remapper tests
-            ${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp)
+        if(ENABLE_SPVREMAPPER)
+            set(TEST_SOURCES ${TEST_SOURCES}
+                ${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp)
+        endif()
 
         glslang_pch(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp)
 
@@ -33,7 +35,7 @@ if(BUILD_TESTING)
         if(ENABLE_GLSLANG_INSTALL)
             install(TARGETS glslangtests EXPORT glslangtestsTargets
                     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-			install(EXPORT glslangtestsTargets DESTINATION lib/cmake)
+			install(EXPORT glslangtestsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
         endif(ENABLE_GLSLANG_INSTALL)
 
         set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test")
@@ -49,8 +51,13 @@ if(BUILD_TESTING)
                                    ${gtest_SOURCE_DIR}/include)
 
         set(LIBRARIES
-            SPVRemapper glslang OSDependent OGLCompiler glslang
+            glslang OSDependent OGLCompiler glslang
             SPIRV glslang-default-resource-limits)
+
+        if(ENABLE_SPVREMAPPER)
+            set(LIBRARIES ${LIBRARIES} SPVRemapper)
+        endif()
+
         if(ENABLE_HLSL)
             set(LIBRARIES ${LIBRARIES} HLSL)
         endif(ENABLE_HLSL)

+ 2 - 0
3rdparty/glslang/gtests/Spv.FromFile.cpp

@@ -1,5 +1,6 @@
  //
 // Copyright (C) 2016 Google, Inc.
+// Copyright (C) 2019 ARM Limited.
 //
 // All rights reserved.
 //
@@ -263,6 +264,7 @@ INSTANTIATE_TEST_CASE_P(
         "spv.8bitstorage_Error-uint.frag",
         "spv.8bitstorage-ubo.vert",
         "spv.8bitstorage-ssbo.vert",
+        "spv.8bit-16bit-construction.frag",
         "spv.accessChain.frag",
         "spv.aggOps.frag",
         "spv.always-discard.frag",

+ 1 - 1
3rdparty/glslang/hlsl/CMakeLists.txt

@@ -41,5 +41,5 @@ if(ENABLE_GLSLANG_INSTALL)
         install(TARGETS HLSL EXPORT HLSLTargets
                 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()
-	install(EXPORT HLSLTargets DESTINATION lib/cmake)
+	install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
 endif(ENABLE_GLSLANG_INSTALL)