Răsfoiți Sursa

Updated glslang.

Бранимир Караџић 4 ani în urmă
părinte
comite
93efa0c36b

+ 0 - 48
3rdparty/glslang/OGLCompilersDLL/CMakeLists.txt

@@ -1,48 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-set(SOURCES InitializeDll.cpp InitializeDll.h)
-
-add_library(OGLCompiler STATIC ${SOURCES})
-set_property(TARGET OGLCompiler PROPERTY FOLDER glslang)
-set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-if(WIN32)
-    source_group("Source" FILES ${SOURCES})
-endif(WIN32)
-
-if(ENABLE_GLSLANG_INSTALL)
-    install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
-            ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-	install(EXPORT OGLCompilerTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-endif(ENABLE_GLSLANG_INSTALL)

+ 0 - 138
3rdparty/glslang/SPIRV/CMakeLists.txt

@@ -1,138 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-set(SOURCES
-    GlslangToSpv.cpp
-    InReadableOrder.cpp
-    Logger.cpp
-    SpvBuilder.cpp
-    SpvPostProcess.cpp
-    doc.cpp
-    SpvTools.cpp
-    disassemble.cpp
-    CInterface/spirv_c_interface.cpp)
-
-set(SPVREMAP_SOURCES
-    SPVRemapper.cpp
-    doc.cpp)
-
-set(HEADERS
-    bitutils.h
-    spirv.hpp
-    GLSL.std.450.h
-    GLSL.ext.EXT.h
-    GLSL.ext.KHR.h
-    GlslangToSpv.h
-    hex_float.h
-    Logger.h
-    SpvBuilder.h
-    spvIR.h
-    doc.h
-    SpvTools.h
-    disassemble.h
-    GLSL.ext.AMD.h
-    GLSL.ext.NV.h
-    NonSemanticDebugPrintf.h)
-
-set(SPVREMAP_HEADERS
-    SPVRemapper.h
-    doc.h)
-
-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
-    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
-    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
-
-glslang_add_build_info_dependency(SPIRV)
-
-if (ENABLE_SPVREMAPPER)
-    add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
-    set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
-    set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
-endif()
-
-if(WIN32 AND BUILD_SHARED_LIBS)
-    set_target_properties(SPIRV PROPERTIES PREFIX "")
-    if (ENABLE_SPVREMAPPER)
-        set_target_properties(SPVRemapper PROPERTIES PREFIX "")
-    endif()
-endif()
-
-if(ENABLE_OPT)
-    target_include_directories(SPIRV
-        PRIVATE ${spirv-tools_SOURCE_DIR}/include
-        PRIVATE ${spirv-tools_SOURCE_DIR}/source
-    )
-    target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)
-    target_include_directories(SPIRV PUBLIC
-        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
-        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
-else()
-    target_link_libraries(SPIRV PRIVATE MachineIndependent)
-endif(ENABLE_OPT)
-
-if(WIN32)
-    source_group("Source" FILES ${SOURCES} ${HEADERS})
-    source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
-endif(WIN32)
-
-if(ENABLE_GLSLANG_INSTALL)
-    if(BUILD_SHARED_LIBS)
-        if (ENABLE_SPVREMAPPER)
-            install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
-                    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-        endif()
-        install(TARGETS SPIRV EXPORT SPIRVTargets
-                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-    else()
-        if (ENABLE_SPVREMAPPER)
-            install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
-                    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-        endif()
-        install(TARGETS SPIRV EXPORT SPIRVTargets
-                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-    endif()
-
-    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}/glslang/SPIRV/)
-endif(ENABLE_GLSLANG_INSTALL)

+ 8 - 7
3rdparty/glslang/SPIRV/GlslangToSpv.cpp

@@ -3652,13 +3652,14 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
 
     spv::Id initializer = spv::NoResult;
 
-    if (node->getType().getQualifier().storage == glslang::EvqUniform &&
-        !node->getConstArray().empty()) {
-            int nextConst = 0;
-            initializer = createSpvConstantFromConstUnionArray(node->getType(),
-                                                               node->getConstArray(),
-                                                               nextConst,
-                                                               false /* specConst */);
+    if (node->getType().getQualifier().storage == glslang::EvqUniform && !node->getConstArray().empty()) {
+        int nextConst = 0;
+        initializer = createSpvConstantFromConstUnionArray(node->getType(),
+                                                           node->getConstArray(),
+                                                           nextConst,
+                                                           false /* specConst */);
+    } else if (node->getType().getQualifier().isNullInit()) {
+        initializer = builder.makeNullConstant(spvType);
     }
 
     return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer);

+ 24 - 0
3rdparty/glslang/SPIRV/SpvBuilder.cpp

@@ -869,6 +869,30 @@ bool Builder::isSpecConstantOpCode(Op opcode) const
     }
 }
 
+Id Builder::makeNullConstant(Id typeId)
+{
+    Instruction* constant;
+
+    // See if we already made it.
+    Id existing = NoResult;
+    for (int i = 0; i < (int)nullConstants.size(); ++i) {
+        constant = nullConstants[i];
+        if (constant->getTypeId() == typeId)
+            existing = constant->getResultId();
+    }
+
+    if (existing != NoResult)
+        return existing;
+
+    // Make it
+    Instruction* c = new Instruction(getUniqueId(), typeId, OpConstantNull);
+    constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+    nullConstants.push_back(c);
+    module.mapInstruction(c);
+
+    return c->getResultId();
+}
+
 Id Builder::makeBoolConstant(bool b, bool specConstant)
 {
     Id typeId = makeBoolType();

+ 3 - 0
3rdparty/glslang/SPIRV/SpvBuilder.h

@@ -293,6 +293,7 @@ public:
     }
 
     // For making new constants (will return old constant if the requested one was already made).
+    Id makeNullConstant(Id typeId);
     Id makeBoolConstant(bool b, bool specConstant = false);
     Id makeInt8Constant(int i, bool specConstant = false)
         { return makeIntConstant(makeIntType(8),  (unsigned)i, specConstant); }
@@ -838,6 +839,8 @@ public:
     std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants;
     // map type opcodes to type instructions
     std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes;
+    // list of OpConstantNull instructions
+    std::vector<Instruction*> nullConstants;
 
     // stack of switches
     std::stack<Block*> switchMerges;

+ 0 - 106
3rdparty/glslang/StandAlone/CMakeLists.txt

@@ -1,106 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-add_library(glslang-default-resource-limits
-            ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp)
-set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
-set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-target_include_directories(glslang-default-resource-limits
-                           PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-                           PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
-
-set(SOURCES StandAlone.cpp DirStackFileIncluder.h)
-
-add_executable(glslangValidator ${SOURCES})
-set_property(TARGET glslangValidator PROPERTY FOLDER tools)
-glslang_set_link_args(glslangValidator)
-
-set(LIBRARIES
-    glslang
-    SPIRV
-    glslang-default-resource-limits)
-
-if(ENABLE_SPVREMAPPER)
-    set(LIBRARIES ${LIBRARIES} SPVRemapper)
-endif()
-
-if(WIN32)
-    set(LIBRARIES ${LIBRARIES} psapi)
-elseif(UNIX)
-    if(NOT ANDROID)
-        set(LIBRARIES ${LIBRARIES} pthread)
-    endif()
-endif(WIN32)
-
-target_link_libraries(glslangValidator ${LIBRARIES})
-target_include_directories(glslangValidator PUBLIC
-    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
-    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
-
-if(ENABLE_OPT)
-    target_include_directories(glslangValidator
-        PRIVATE ${spirv-tools_SOURCE_DIR}/include
-    )
-endif(ENABLE_OPT)
-
-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})
-endif(WIN32)
-
-if(ENABLE_GLSLANG_INSTALL)
-    install(TARGETS glslangValidator EXPORT glslangValidatorTargets
-            RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-    install(EXPORT glslangValidatorTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-
-    if(ENABLE_SPVREMAPPER)
-        install(TARGETS spirv-remap EXPORT spirv-remapTargets
-            RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-        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 ${CMAKE_INSTALL_LIBDIR}/cmake)
-    endif()
-endif(ENABLE_GLSLANG_INSTALL)

+ 0 - 226
3rdparty/glslang/glslang/CMakeLists.txt

@@ -1,226 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-if(WIN32)
-    add_subdirectory(OSDependent/Windows)
-elseif(UNIX)
-    add_subdirectory(OSDependent/Unix)
-else(WIN32)
-    message("unknown platform")
-endif(WIN32)
-
-if(EMSCRIPTEN OR ENABLE_GLSLANG_JS)
-    # May be enabled on non-Emscripten builds for binary-size testing.
-    add_subdirectory(OSDependent/Web)
-endif(EMSCRIPTEN OR ENABLE_GLSLANG_JS)
-
-################################################################################
-# GenericCodeGen
-################################################################################
-add_library(GenericCodeGen STATIC
-    GenericCodeGen/CodeGen.cpp
-    GenericCodeGen/Link.cpp)
-set_property(TARGET GenericCodeGen PROPERTY POSITION_INDEPENDENT_CODE ON)
-set_property(TARGET GenericCodeGen PROPERTY FOLDER glslang)
-
-################################################################################
-# MachineIndependent
-################################################################################
-set(MACHINEINDEPENDENT_SOURCES
-    MachineIndependent/glslang.m4
-    MachineIndependent/glslang.y
-    MachineIndependent/glslang_tab.cpp
-    MachineIndependent/attribute.cpp
-    MachineIndependent/Constant.cpp
-    MachineIndependent/iomapper.cpp
-    MachineIndependent/InfoSink.cpp
-    MachineIndependent/Initialize.cpp
-    MachineIndependent/IntermTraverse.cpp
-    MachineIndependent/Intermediate.cpp
-    MachineIndependent/ParseContextBase.cpp
-    MachineIndependent/ParseHelper.cpp
-    MachineIndependent/PoolAlloc.cpp
-    MachineIndependent/RemoveTree.cpp
-    MachineIndependent/Scan.cpp
-    MachineIndependent/ShaderLang.cpp
-    MachineIndependent/SymbolTable.cpp
-    MachineIndependent/Versions.cpp
-    MachineIndependent/intermOut.cpp
-    MachineIndependent/limits.cpp
-    MachineIndependent/linkValidate.cpp
-    MachineIndependent/parseConst.cpp
-    MachineIndependent/reflection.cpp
-    MachineIndependent/preprocessor/Pp.cpp
-    MachineIndependent/preprocessor/PpAtom.cpp
-    MachineIndependent/preprocessor/PpContext.cpp
-    MachineIndependent/preprocessor/PpScanner.cpp
-    MachineIndependent/preprocessor/PpTokens.cpp
-    MachineIndependent/propagateNoContraction.cpp
-)
-
-set(MACHINEINDEPENDENT_HEADERS
-    MachineIndependent/attribute.h
-    MachineIndependent/glslang_tab.cpp.h
-    MachineIndependent/gl_types.h
-    MachineIndependent/Initialize.h
-    MachineIndependent/iomapper.h
-    MachineIndependent/LiveTraverser.h
-    MachineIndependent/localintermediate.h
-    MachineIndependent/ParseHelper.h
-    MachineIndependent/reflection.h
-    MachineIndependent/RemoveTree.h
-    MachineIndependent/Scan.h
-    MachineIndependent/ScanContext.h
-    MachineIndependent/SymbolTable.h
-    MachineIndependent/Versions.h
-    MachineIndependent/parseVersions.h
-    MachineIndependent/propagateNoContraction.h
-    MachineIndependent/preprocessor/PpContext.h
-    MachineIndependent/preprocessor/PpTokens.h
-)
-
-if(ENABLE_HLSL)
-    list(APPEND MACHINEINDEPENDENT_SOURCES
-        HLSL/hlslAttributes.cpp
-        HLSL/hlslParseHelper.cpp
-        HLSL/hlslScanContext.cpp
-        HLSL/hlslOpMap.cpp
-        HLSL/hlslTokenStream.cpp
-        HLSL/hlslGrammar.cpp
-        HLSL/hlslParseables.cpp)
-
-    list(APPEND MACHINEINDEPENDENT_HEADERS
-        HLSL/hlslAttributes.h
-        HLSL/hlslParseHelper.h
-        HLSL/hlslTokens.h
-        HLSL/hlslScanContext.h
-        HLSL/hlslOpMap.h
-        HLSL/hlslTokenStream.h
-        HLSL/hlslGrammar.h
-        HLSL/hlslParseables.h)
-endif(ENABLE_HLSL)
-
-add_library(MachineIndependent STATIC ${MACHINEINDEPENDENT_SOURCES} ${MACHINEINDEPENDENT_HEADERS})
-set_property(TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON)
-set_property(TARGET MachineIndependent PROPERTY FOLDER glslang)
-
-glslang_add_build_info_dependency(MachineIndependent)
-
-glslang_pch(MachineIndependent MachineIndependent/pch.h)
-
-target_link_libraries(MachineIndependent PRIVATE OGLCompiler OSDependent GenericCodeGen)
-
-################################################################################
-# glslang
-################################################################################
-set(GLSLANG_SOURCES
-    CInterface/glslang_c_interface.cpp)
-
-set(GLSLANG_HEADERS
-    Public/ShaderLang.h
-    Include/arrays.h
-    Include/BaseTypes.h
-    Include/Common.h
-    Include/ConstantUnion.h
-    Include/glslang_c_interface.h
-    Include/glslang_c_shader_types.h
-    Include/InfoSink.h
-    Include/InitializeGlobals.h
-    Include/intermediate.h
-    Include/PoolAlloc.h
-    Include/ResourceLimits.h
-    Include/ShHandle.h
-    Include/Types.h)
-
-add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS})
-set_target_properties(glslang PROPERTIES
-    FOLDER glslang
-    POSITION_INDEPENDENT_CODE ON
-    VERSION   "${GLSLANG_VERSION}"
-    SOVERSION "${GLSLANG_VERSION_MAJOR}")
-target_link_libraries(glslang PRIVATE OGLCompiler OSDependent MachineIndependent)
-target_include_directories(glslang PUBLIC
-    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
-    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
-
-glslang_add_build_info_dependency(glslang)
-
-glslang_only_export_explicit_symbols(glslang)
-
-if(WIN32 AND BUILD_SHARED_LIBS)
-    set_target_properties(glslang PROPERTIES PREFIX "")
-endif()
-
-################################################################################
-# source_groups
-################################################################################
-if(WIN32)
-    source_group("Public" REGULAR_EXPRESSION "Public/*")
-    source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
-    source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
-    source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
-    source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
-    source_group("HLSL" REGULAR_EXPRESSION "HLSL/*")
-    source_group("CInterface" REGULAR_EXPRESSION "CInterface/*")
-endif(WIN32)
-
-################################################################################
-# install
-################################################################################
-if(ENABLE_GLSLANG_INSTALL)
-    if(BUILD_SHARED_LIBS)
-        install(TARGETS glslang
-                EXPORT  glslangTargets
-                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-    else()
-        install(TARGETS glslang MachineIndependent GenericCodeGen
-                EXPORT  glslangTargets
-                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-    endif()
-
-    install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-
-    set(ALL_HEADERS
-        ${GLSLANG_HEADERS}
-        ${MACHINEINDEPENDENT_HEADERS})
-
-    foreach(file ${ALL_HEADERS})
-        get_filename_component(dir ${file} DIRECTORY)
-        install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
-    endforeach()
-
-    install(FILES ${GLSLANG_BUILD_INFO_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang)
-
-endif(ENABLE_GLSLANG_INSTALL)

+ 9 - 0
3rdparty/glslang/glslang/Include/Types.h

@@ -499,6 +499,7 @@ public:
         declaredBuiltIn = EbvNone;
 #ifndef GLSLANG_WEB
         noContraction = false;
+        nullInit = false;
 #endif
     }
 
@@ -512,6 +513,7 @@ public:
         clearMemory();
         specConstant = false;
         nonUniform = false;
+        nullInit = false;
         clearLayout();
     }
 
@@ -588,6 +590,8 @@ public:
     bool isNoContraction() const { return false; }
     void setNoContraction() { }
     bool isPervertexNV() const { return false; }
+    void setNullInit() { }
+    bool isNullInit() const { return false; }
 #else
     bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
     bool nopersp      : 1;
@@ -609,6 +613,7 @@ public:
     bool subgroupcoherent  : 1;
     bool shadercallcoherent : 1;
     bool nonprivate   : 1;
+    bool nullInit : 1;
     bool isWriteOnly() const { return writeonly; }
     bool isReadOnly() const { return readonly; }
     bool isRestrict() const { return restrict; }
@@ -644,6 +649,8 @@ public:
     bool isNoContraction() const { return noContraction; }
     void setNoContraction() { noContraction = true; }
     bool isPervertexNV() const { return pervertexNV; }
+    void setNullInit() { nullInit = true; }
+    bool isNullInit() const { return nullInit; }
 #endif
 
     bool isPipeInput() const
@@ -2164,6 +2171,8 @@ public:
             appendStr(" specialization-constant");
         if (qualifier.nonUniform)
             appendStr(" nonuniform");
+        if (qualifier.isNullInit())
+            appendStr(" null-init");
         appendStr(" ");
         appendStr(getStorageQualifierString());
         if (isArray()) {

+ 3 - 2
3rdparty/glslang/glslang/Include/glslang_c_shader_types.h

@@ -100,8 +100,9 @@ typedef enum {
 typedef enum {
     GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
     GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
+    GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12),
     GLSLANG_TARGET_OPENGL_450 = 450,
-    LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT),
+    LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 4),
 } glslang_target_client_version_t;
 
 /* SH_TARGET_LanguageVersion counterpart */
@@ -112,7 +113,7 @@ typedef enum {
     GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8),
     GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8),
     GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8),
-    LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT),
+    LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT = 6),
 } glslang_target_language_version_t;
 
 /* EShExecutable counterpart */

+ 41 - 5
3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp

@@ -6815,6 +6815,11 @@ TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString&
 //
 TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable)
 {
+    // A null initializer is an aggregate that hasn't had an op assigned yet
+    // (still EOpNull, no relation to nullInit), and has no children.
+    bool nullInit = initializer->getAsAggregate() && initializer->getAsAggregate()->getOp() == EOpNull &&
+        initializer->getAsAggregate()->getSequence().size() == 0;
+
     //
     // Identifier must be of type constant, a global, or a temporary, and
     // starting at version 120, desktop allows uniforms to have initializers.
@@ -6822,9 +6827,36 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
     TStorageQualifier qualifier = variable->getType().getQualifier().storage;
     if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst ||
            (qualifier == EvqUniform && !isEsProfile() && version >= 120))) {
-        error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), "");
+        if (qualifier == EvqShared) {
+            // GL_EXT_null_initializer allows this for shared, if it's a null initializer
+            if (nullInit) {
+                const char* feature = "initialization with shared qualifier";
+                profileRequires(loc, EEsProfile, 0, E_GL_EXT_null_initializer, feature);
+                profileRequires(loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, feature);
+            } else {
+                error(loc, "initializer can only be a null initializer ('{}')", "shared", "");
+            }
+        } else {
+            error(loc, " cannot initialize this type of qualifier ",
+                  variable->getType().getStorageQualifierString(), "");
+            return nullptr;
+        }
+    }
+
+    if (nullInit) {
+        // only some types can be null initialized
+        if (variable->getType().containsUnsizedArray()) {
+            error(loc, "null initializers can't size unsized arrays", "{}", "");
+            return nullptr;
+        }
+        if (variable->getType().containsOpaque()) {
+            error(loc, "null initializers can't be used on opaque values", "{}", "");
+            return nullptr;
+        }
+        variable->getWritableType().getQualifier().setNullInit();
         return nullptr;
     }
+
     arrayObjectCheck(loc, variable->getType(), "array initializer");
 
     //
@@ -6868,13 +6900,15 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
 
     // Uniforms require a compile-time constant initializer
     if (qualifier == EvqUniform && ! initializer->getType().getQualifier().isFrontEndConstant()) {
-        error(loc, "uniform initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+        error(loc, "uniform initializers must be constant", "=", "'%s'",
+              variable->getType().getCompleteString().c_str());
         variable->getWritableType().getQualifier().makeTemporary();
         return nullptr;
     }
     // Global consts require a constant initializer (specialization constant is okay)
     if (qualifier == EvqConst && symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) {
-        error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+        error(loc, "global const initializers must be constant", "=", "'%s'",
+              variable->getType().getCompleteString().c_str());
         variable->getWritableType().getQualifier().makeTemporary();
         return nullptr;
     }
@@ -6894,7 +6928,8 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
         // "In declarations of global variables with no storage qualifier or with a const
         // qualifier any initializer must be a constant expression."
         if (symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) {
-            const char* initFeature = "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)";
+            const char* initFeature =
+                "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)";
             if (isEsProfile()) {
                 if (relaxedErrors() && ! extensionTurnedOn(E_GL_EXT_shader_non_constant_global_initializers))
                     warn(loc, "not allowed in this version", initFeature, "");
@@ -6908,7 +6943,8 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
         // Compile-time tagging of the variable with its constant value...
 
         initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer);
-        if (! initializer || ! initializer->getType().getQualifier().isConstant() || variable->getType() != initializer->getType()) {
+        if (! initializer || ! initializer->getType().getQualifier().isConstant() ||
+            variable->getType() != initializer->getType()) {
             error(loc, "non-matching or non-convertible constant type for const initializer",
                   variable->getType().getStorageQualifierString(), "");
             variable->getWritableType().getQualifier().makeTemporary();

+ 8 - 1
3rdparty/glslang/glslang/MachineIndependent/Versions.cpp

@@ -305,6 +305,7 @@ void TParseVersions::initializeExtensionBehavior()
     extensionBehavior[E_GL_EXT_tessellation_point_size]              = EBhDisable;
     extensionBehavior[E_GL_EXT_texture_buffer]                       = EBhDisable;
     extensionBehavior[E_GL_EXT_texture_cube_map_array]               = EBhDisable;
+    extensionBehavior[E_GL_EXT_null_initializer]                     = EBhDisable;
 
     // OES matching AEP
     extensionBehavior[E_GL_OES_geometry_shader]          = EBhDisable;
@@ -408,9 +409,12 @@ void TParseVersions::getPreamble(std::string& preamble)
             "#define GL_EXT_shader_non_constant_global_initializers 1\n"
             ;
 
-            if (isEsProfile() && version >= 300) {
+            if (version >= 300) {
                 preamble += "#define GL_NV_shader_noperspective_interpolation 1\n";
             }
+            if (version >= 310) {
+                preamble += "#define GL_EXT_null_initializer 1\n";
+            }
 
     } else { // !isEsProfile()
         preamble =
@@ -538,6 +542,9 @@ void TParseVersions::getPreamble(std::string& preamble)
             if (profile == ECompatibilityProfile)
                 preamble += "#define GL_compatibility_profile 1\n";
         }
+        if (version >= 140) {
+            preamble += "#define GL_EXT_null_initializer 1\n";
+        }
 #endif // GLSLANG_WEB
     }
 

+ 1 - 0
3rdparty/glslang/glslang/MachineIndependent/Versions.h

@@ -201,6 +201,7 @@ const char* const E_GL_EXT_blend_func_extended              = "GL_EXT_blend_func
 const char* const E_GL_EXT_shader_implicit_conversions      = "GL_EXT_shader_implicit_conversions";
 const char* const E_GL_EXT_fragment_shading_rate            = "GL_EXT_fragment_shading_rate";
 const char* const E_GL_EXT_shader_image_int64               = "GL_EXT_shader_image_int64";
+const char* const E_GL_EXT_null_initializer                 = "GL_EXT_null_initializer";
 
 // Arrays of extensions for the above viewportEXTs duplications
 

+ 6 - 0
3rdparty/glslang/glslang/MachineIndependent/glslang.m4

@@ -3575,6 +3575,12 @@ GLSLANG_WEB_EXCLUDE_ON
         parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
         $$ = $2;
     }
+    | LEFT_BRACE RIGHT_BRACE {
+        const char* initFeature = "empty { } initializer";
+        parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+        parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+        $$ = parseContext.intermediate.makeAggregate($1.loc);
+    }
 GLSLANG_WEB_EXCLUDE_OFF
     ;
 

+ 6 - 0
3rdparty/glslang/glslang/MachineIndependent/glslang.y

@@ -3575,6 +3575,12 @@ initializer
         parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
         $$ = $2;
     }
+    | LEFT_BRACE RIGHT_BRACE {
+        const char* initFeature = "empty { } initializer";
+        parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+        parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+        $$ = parseContext.intermediate.makeAggregate($1.loc);
+    }
 
     ;
 

Fișier diff suprimat deoarece este prea mare
+ 796 - 354
3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp


+ 0 - 59
3rdparty/glslang/glslang/OSDependent/Unix/CMakeLists.txt

@@ -1,59 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-add_library(OSDependent STATIC ossource.cpp ../osinclude.h)
-set_property(TARGET OSDependent PROPERTY FOLDER glslang)
-set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-# Link pthread
-set(CMAKE_THREAD_PREFER_PTHREAD ON)
-if(${CMAKE_VERSION} VERSION_LESS "3.1.0" OR CMAKE_CROSSCOMPILING)
-    # Needed as long as we support CMake 2.8 for Ubuntu 14.04,
-    # which does not support the recommended Threads::Threads target.
-    # https://cmake.org/cmake/help/v2.8.12/cmake.html#module:FindThreads
-    # Also needed when cross-compiling to work around
-    # https://gitlab.kitware.com/cmake/cmake/issues/16920
-    find_package(Threads)
-    target_link_libraries(OSDependent ${CMAKE_THREAD_LIBS_INIT})
-else()
-    # This is the recommended way, so we use it for 3.1+.
-    set(THREADS_PREFER_PTHREAD_FLAG ON)
-    find_package(Threads)
-    target_link_libraries(OSDependent Threads::Threads)
-endif()
-
-if(ENABLE_GLSLANG_INSTALL)
-    install(TARGETS OSDependent EXPORT OSDependentTargets
-            ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-	install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-endif(ENABLE_GLSLANG_INSTALL)

+ 0 - 71
3rdparty/glslang/glslang/OSDependent/Web/CMakeLists.txt

@@ -1,71 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-if(ENABLE_GLSLANG_JS)
-    add_executable(glslang.js "glslang.js.cpp")
-    glslang_set_link_args(glslang.js)
-    target_link_libraries(glslang.js glslang SPIRV)
-
-    # Link library names that start with "-" are treated as link flags.
-    # "-Os" should be OK in MSVC; don't use /Os because CMake won't
-    # treat it as a link flag.
-    target_link_libraries(glslang.js "-Os")
-
-    if(EMSCRIPTEN)
-        set_target_properties(glslang.js PROPERTIES
-            OUTPUT_NAME "glslang"
-            SUFFIX ".js")
-        em_link_pre_js(glslang.js "${CMAKE_CURRENT_SOURCE_DIR}/glslang.pre.js")
-
-        target_link_libraries(glslang.js "--llvm-lto 1")
-        target_link_libraries(glslang.js "--closure 1")
-        target_link_libraries(glslang.js "-s MODULARIZE=1")
-        target_link_libraries(glslang.js "-s ALLOW_MEMORY_GROWTH=1")
-        target_link_libraries(glslang.js "-s FILESYSTEM=0")
-
-        if(ENABLE_EMSCRIPTEN_SINGLE_FILE)
-            target_link_libraries(glslang.js "-s SINGLE_FILE=1")
-        endif(ENABLE_EMSCRIPTEN_SINGLE_FILE)
-
-        if(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE)
-            target_link_libraries(glslang.js "-s ENVIRONMENT=node -s BINARYEN_ASYNC_COMPILATION=0")
-        else()
-            target_link_libraries(glslang.js "-s ENVIRONMENT=web,worker")
-        endif()
-
-        if(NOT ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE)
-            add_custom_command(TARGET glslang.js POST_BUILD
-                COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js)
-        endif()
-    endif(EMSCRIPTEN)
-endif(ENABLE_GLSLANG_JS)

+ 0 - 54
3rdparty/glslang/glslang/OSDependent/Windows/CMakeLists.txt

@@ -1,54 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-set(SOURCES ossource.cpp ../osinclude.h)
-
-add_library(OSDependent STATIC ${SOURCES})
-set_property(TARGET OSDependent PROPERTY FOLDER glslang)
-set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-# MinGW GCC complains about function pointer casts to void*.
-# Turn that off with -fpermissive.
-if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-    target_compile_options(OSDependent PRIVATE -fpermissive)
-endif()
-
-if(WIN32)
-    source_group("Source" FILES ${SOURCES})
-endif(WIN32)
-
-if(ENABLE_GLSLANG_INSTALL)
-    install(TARGETS OSDependent EXPORT OSDependentTargets
-            ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-	install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-endif(ENABLE_GLSLANG_INSTALL)

+ 2 - 2
3rdparty/glslang/glslang/Public/ShaderLang.h

@@ -167,7 +167,7 @@ typedef enum {
     EShTargetVulkan_1_1 = (1 << 22) | (1 << 12),      // Vulkan 1.1
     EShTargetVulkan_1_2 = (1 << 22) | (2 << 12),      // Vulkan 1.2
     EShTargetOpenGL_450 = 450,                        // OpenGL
-    LAST_ELEMENT_MARKER(EShTargetClientVersionCount),
+    LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4),
 } EShTargetClientVersion;
 
 typedef EShTargetClientVersion EshTargetClientVersion;
@@ -179,7 +179,7 @@ typedef enum {
     EShTargetSpv_1_3 = (1 << 16) | (3 << 8),          // SPIR-V 1.3
     EShTargetSpv_1_4 = (1 << 16) | (4 << 8),          // SPIR-V 1.4
     EShTargetSpv_1_5 = (1 << 16) | (5 << 8),          // SPIR-V 1.5
-    LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount),
+    LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 6),
 } EShTargetLanguageVersion;
 
 struct TInputLanguage {

+ 0 - 59
3rdparty/glslang/hlsl/CMakeLists.txt

@@ -1,59 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-# The HLSL source is directly embedded into the glslang target when ENABLE_HLSL
-# is set.
-# This source now lives at: glslang/HLSL/
-# The HLSL target is now just a stub that exists for backwards compatibility for
-# projects that referenced this target.
-
-add_library(HLSL ${LIB_TYPE} "stub.cpp")
-set_property(TARGET HLSL PROPERTY FOLDER hlsl)
-set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-if(WIN32 AND BUILD_SHARED_LIBS)
-    set_target_properties(HLSL PROPERTIES PREFIX "")
-endif()
-
-if(ENABLE_GLSLANG_INSTALL)
-    if(BUILD_SHARED_LIBS)
-        install(TARGETS HLSL EXPORT HLSLTargets
-                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-                RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-    else()
-        install(TARGETS HLSL EXPORT HLSLTargets
-                ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-    endif()
-	install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
-endif(ENABLE_GLSLANG_INSTALL)

+ 0 - 51
3rdparty/glslang/license-checker.cfg

@@ -1,51 +0,0 @@
-[
-    {
-        "licenses": [
-            "Apache-2.0-Header",
-            "BSD-2-Clause",
-            "BSD-3-Clause",
-            "MIT-0",
-            "MIT"
-        ],
-        "paths": [
-            {
-                "exclude": [
-                    "**.md",
-
-                    "_config.yml",
-                    ".*",
-                    "CMakeSettings.json",
-                    "known_good_khr.json",
-                    "known_good.json",
-                    "LICENSE.txt",
-                    "make-revision",
-                    "README-spirv-remap.txt",
-                    "WORKSPACE",
-
-                    "glslang/OSDependent/Web/glslang.*.js",
-                    "glslang/MachineIndependent/glslang_tab.cpp",
-                    "glslang/MachineIndependent/glslang_tab.cpp.h",
-
-                    "build/**",
-                    "out/**",
-                    "Test/**",
-                    "External/spirv-tools/**"
-                ]
-            }
-        ]
-    },
-    {
-        "licenses": [
-            "GPL-Header"
-        ],
-        "paths": [
-            { "exclude": [ "**" ] },
-            {
-                "include": [
-                    "glslang/MachineIndependent/glslang_tab.cpp",
-                    "glslang/MachineIndependent/glslang_tab.cpp.h"
-                ]
-            }
-        ]
-    }
-]

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff