diff --git a/.gitmodules b/.gitmodules index a7aa927f9c..26b33177e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/Kingcom/armips.git [submodule "ext/glslang"] path = ext/glslang - url = https://github.com/hrydgard/glslang.git + url = https://github.com/KhronosGroup/glslang.git [submodule "ext/SPIRV-Cross"] path = ext/SPIRV-Cross url = https://github.com/KhronosGroup/SPIRV-Cross.git diff --git a/UWP/glslang_UWP/glslang_UWP.vcxproj b/UWP/glslang_UWP/glslang_UWP.vcxproj index 69bb015a2e..2242d14f57 100644 --- a/UWP/glslang_UWP/glslang_UWP.vcxproj +++ b/UWP/glslang_UWP/glslang_UWP.vcxproj @@ -205,7 +205,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -220,7 +220,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -235,7 +235,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -250,7 +250,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -265,7 +265,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -280,7 +280,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -295,7 +295,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -310,7 +310,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -325,7 +325,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -340,7 +340,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -355,7 +355,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -370,7 +370,7 @@ true pch.h _CRT_SECURE_NO_WARNINGS;NOMINMAX;ENABLE_HLSL;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ../../ext/glslang;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + ../../ext/glslang;../../ext/glslang-build;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) Console @@ -379,7 +379,6 @@ - @@ -397,6 +396,7 @@ + @@ -470,6 +470,7 @@ + diff --git a/UWP/glslang_UWP/glslang_UWP.vcxproj.filters b/UWP/glslang_UWP/glslang_UWP.vcxproj.filters index e18f160695..dc0cd80fc3 100644 --- a/UWP/glslang_UWP/glslang_UWP.vcxproj.filters +++ b/UWP/glslang_UWP/glslang_UWP.vcxproj.filters @@ -348,8 +348,5 @@ glslang - - glslang - \ No newline at end of file diff --git a/ext/glslang b/ext/glslang index dc11adde23..77551c429f 160000 --- a/ext/glslang +++ b/ext/glslang @@ -1 +1 @@ -Subproject commit dc11adde23c455a24e13dd54de9b4ede8bdd7db8 +Subproject commit 77551c429f86c0e077f26552b7c1c0f12a9f235e diff --git a/ext/glslang-build/Android.mk b/ext/glslang-build/Android.mk index f7d27de667..a08eaf0ec5 100644 --- a/ext/glslang-build/Android.mk +++ b/ext/glslang-build/Android.mk @@ -29,6 +29,7 @@ LOCAL_SRC_FILES := \ ../glslang/glslang/MachineIndependent/RemoveTree.cpp \ ../glslang/glslang/MachineIndependent/Scan.cpp \ ../glslang/glslang/MachineIndependent/ShaderLang.cpp \ + ../glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp \ ../glslang/glslang/MachineIndependent/SymbolTable.cpp \ ../glslang/glslang/MachineIndependent/Versions.cpp \ ../glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \ diff --git a/ext/glslang-build/glslang/build_info.h b/ext/glslang-build/glslang/build_info.h new file mode 100644 index 0000000000..3ab3fbaed2 --- /dev/null +++ b/ext/glslang-build/glslang/build_info.h @@ -0,0 +1,62 @@ +// 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. + +#ifndef GLSLANG_BUILD_INFO +#define GLSLANG_BUILD_INFO + +#define GLSLANG_VERSION_MAJOR 11 +#define GLSLANG_VERSION_MINOR 13 +#define GLSLANG_VERSION_PATCH 0 +#define GLSLANG_VERSION_FLAVOR "" + +#define GLSLANG_VERSION_GREATER_THAN(major, minor, patch) \ + ((GLSLANG_VERSION_MAJOR) > (major) || ((major) == GLSLANG_VERSION_MAJOR && \ + ((GLSLANG_VERSION_MINOR) > (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ + (GLSLANG_VERSION_PATCH) > (patch))))) + +#define GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch) \ + ((GLSLANG_VERSION_MAJOR) > (major) || ((major) == GLSLANG_VERSION_MAJOR && \ + ((GLSLANG_VERSION_MINOR) > (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ + (GLSLANG_VERSION_PATCH >= (patch)))))) + +#define GLSLANG_VERSION_LESS_THAN(major, minor, patch) \ + ((GLSLANG_VERSION_MAJOR) < (major) || ((major) == GLSLANG_VERSION_MAJOR && \ + ((GLSLANG_VERSION_MINOR) < (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ + (GLSLANG_VERSION_PATCH) < (patch))))) + +#define GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch) \ + ((GLSLANG_VERSION_MAJOR) < (major) || ((major) == GLSLANG_VERSION_MAJOR && \ + ((GLSLANG_VERSION_MINOR) < (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ + (GLSLANG_VERSION_PATCH <= (patch)))))) + +#endif // GLSLANG_BUILD_INFO diff --git a/ext/glslang.vcxproj b/ext/glslang.vcxproj index 4b9c2bdd5e..6d8e742a70 100644 --- a/ext/glslang.vcxproj +++ b/ext/glslang.vcxproj @@ -142,7 +142,7 @@ MultiThreadedDebug false Default - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build true ProgramDatabase @@ -158,7 +158,7 @@ Level3 Disabled ENABLE_HLSL;_DEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreadedDebug false Default @@ -177,7 +177,7 @@ Level3 Disabled ENABLE_HLSL;_DEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreadedDebug false Default @@ -196,7 +196,7 @@ Level3 Disabled ENABLE_HLSL;_DEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreadedDebug false Default @@ -217,7 +217,7 @@ true true ENABLE_HLSL;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreaded false true @@ -239,7 +239,7 @@ true true ENABLE_HLSL;NDEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreaded false true @@ -262,7 +262,7 @@ true true ENABLE_HLSL;NDEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreaded false true @@ -285,7 +285,7 @@ true true ENABLE_HLSL;NDEBUG;_LIB;%(PreprocessorDefinitions) - glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang + glslang/glslang/OSDependent/Windows;glslang/glslang/MachineIndependent;glslang;glslang-build MultiThreaded false true @@ -300,6 +300,7 @@ + @@ -349,8 +350,8 @@ - + diff --git a/ext/glslang.vcxproj.filters b/ext/glslang.vcxproj.filters index 3dc0c42408..55a0c490e5 100644 --- a/ext/glslang.vcxproj.filters +++ b/ext/glslang.vcxproj.filters @@ -149,6 +149,9 @@ SPIRV + + glslang + @@ -326,7 +329,7 @@ glslang - + glslang diff --git a/libretro/Makefile.common b/libretro/Makefile.common index a3f925b107..cded3e62c6 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -18,6 +18,7 @@ INCFLAGS += \ -I$(CORE_DIR)/libretro \ -I$(EXTDIR)/openxr \ -I$(EXTDIR)/glslang \ + -I$(EXTDIR)/glslang-build \ -I$(EXTDIR)/native \ -I$(EXTDIR)/zlib \ -I$(ZSTDDIR) \ @@ -417,6 +418,7 @@ SOURCES_CXX += \ $(EXTDIR)/glslang/glslang/MachineIndependent/parseConst.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/propagateNoContraction.cpp \ $(EXTDIR)/glslang/glslang/MachineIndependent/reflection.cpp \ + $(EXTDIR)/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp \ $(EXTDIR)/glslang/SPIRV/InReadableOrder.cpp \ $(EXTDIR)/glslang/SPIRV/GlslangToSpv.cpp \ $(EXTDIR)/glslang/SPIRV/Logger.cpp \